The following code is for "Homology Groups". I used library for implementation purpose. import gudhi # Create a simplicial complex simplex_tree = gudhi.SimplexTree() simplex_tree.insert([1, 2, 3]) simplex_tree.insert([2, 3, 4]) simplex_tree.insert([3, 4, 5]) # Compute homology homology = simplex_tree.persistence() print("Homology groups:") for interval in homology: dim, (birth, death) = interval print(f"Dimension {dim}: birth = {birth}, death = {death}") The output I get Homology groups: Dimension 0: birth = 0.0, death = inf Why I did not get the output for Dimension 1? Continue reading...