Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Generators for Simple Complex #2

Open
mfansler opened this issue Nov 20, 2015 · 1 comment
Open

Unexpected Generators for Simple Complex #2

mfansler opened this issue Nov 20, 2015 · 1 comment

Comments

@mfansler
Copy link

As a simple test case, I am trying to compute the homology with generators of the chain complex:

C_0 = { v }
C_1 = { a, b }
C_2 = { c, d }

with boundary:

\partial (c) = b

and all others equal to zero. I have the following .mat file:

0
0 1 0
0 0 0
1
0 1 0
1 0 1
0 0 0
1 1 0

Using the command chomp-matrix myfile.mat -g, I obtain the output:

Betti Numbers: 1 1 1 
------------
| Homology |
------------
  H_0 = ℤ^1
  H_1 = ℤ^1
  H_2 = ℤ^1

--------------
| Generators |
--------------
H_0:
  (0) : 1[0]
H_1:
  (0) : 1[1]
H_2:
  (0) : 1[0]

While the Betti Numbers and vector spaces are as expected, the generators are not. For H_1, the [1] index refers to b, which is in the image of boundary and thus is reducible to the trivial group in homology. Furthermore, the generator for H_2 is given as c, which is not a cycle and so can't be a generator.


I suppose I must be doing something incorrectly, and would appreciate any guidance as to how to correct it.

As a note, when I use similar incidence matrices to generate a CellComplex in Sagemath, and then ask for homology with generators, I obtain a reasonable result and as far as I know, Sagemath is just interfacing back to CHomP (although I think it is using the old version).

@mfansler
Copy link
Author

I think I may have figured out my issue. Namely, indexes given in the generators do not correspond to the indices used in the .mat file, but instead to the order that the cells appear in the .mat file. Thus, they are referring to the correct elements.

I got the expected output by sorting the incidence entries in the input file:

0
0 0 0
0 1 0
1
0 0 0
1 0 1
0 1 0
1 1 0

which gives

Betti Numbers: 1 1 1 
------------
| Homology |
------------
  H_0 = ℤ^1
  H_1 = ℤ^1
  H_2 = ℤ^1

--------------
| Generators |
--------------
H_0:
  (0) : 1[0]
H_1:
  (0) : 1[0]
H_2:
  (0) : 1[1]

I suppose this issue could be closed, but the dependence to the order in which incidence entries appear seems to be unnecessary and counterintuitive. That is, I feel it could be enhanced by changing this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant