Re: Picking Generators of Homology

Dmitriy Morozov
 

There are two things at work here. First of all, by default, Dionysus computes generators only for finite bars. So the 1-dimensional cycle, the boundary of [0,1,2] is never computed. If the triangle was in that filtration, then you'd have a pair (5,6) and 6 would store the cycle consisting of the three edges.

The cycles are stored in terms of indices in the filtration, so to translate them into simplices, you need to look them up in the filtration. So, for example, you could change the loop above to:

for i,c in enumerate(m):
  print(f[i],end=': ')
  print(" + ".join(["%d * %s" % (x.element, f[x.index]) for x in c]))

In other words, the elements of c have members element and index that tell you what the coefficient is and where the simplex is in the filtration.

I hope it helps.
Dmitriy


On Wed, Aug 15, 2018 at 7:42 PM, <nukpezah@...> wrote:
Hi
I have a question about picking generators of homology represented in the barcodes. I understand that the homology generators are equivalence classes of non boundary cycles, so we can only pick a representative. In Dionysus, the persistence_homology class gives us the reduced representation of the boundary matrix from which I presume we can read off the homology generators. But I am confused about how to do that. In my understanding, we have some ordering of the simplices in the filtration, hence the columns of reduced boundary matrices gives you the indexed simplices that give you the generators? But it does not tell you the actual collection of vertices that generate the indexed simplices in the reduced boundary matrix? I guess I am confused about this code on the site shown below; how do you read from this code that the simplex [o,1,2] is a homology generator for H1( one homology). Thanks
Jon
>>> m = d.homology_persistence(f)
 >>> for i,c in enumerate(m):
 ...     print(i, c)
 0
 1
 2 1*0 + 1*1
 3
 4 1*1 + 1*3
 5


Join dionysus@groups.io to automatically receive all group messages.