Betti numbers, betti diagram
Design a good data structure for storing Betti numbers (also for multigraded case).
#1 Updated by John Abbott over 2 years ago
Mario points out that for a non-graded case we will also need a datastructure.
UPDATE (20150608) Mario thinks it is better to skip consideration of the non-graded case because the numbers depend on the actual resolution chosen.
The usual case is with a grading over ZZ, when the Betti diagram is represented as a matrix.
#2 Updated by John Abbott over 2 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
Mario suggested that the internal representation should be
vector< map<degree, long> >.
The resolution is a list of modules (with homomorphisms between them) traditionally indexed from 0 on the right, and with higher integers as ones goes to the left (in the traditional way of writing them).
Since the list of modules is "dense" (i.e. there are no "holes") is seems most sensible to use a
vector with one position for each module. In the entry for each module we must find the shifts and their multiplicities: each degree(-shift) appears at most once, and has a positive integer multiplicity. Using a
std::map will ensure that each degree appears only once. Degrees must be ordered to use them as keys in a
map, but in fact they are already (lex) ordered.
Note that this design also allows an empty resolution (e.g. the resolution of the zero ideal).
Note: normally the shifts are written prefixed with a minus sign. In CoCoALib we have gradings over some cartesian power of
ZZ, so we can negate degrees. What do we want to store in the Betti structure? A shift which is to be subtracted from the plain degree, or a shift which is to be added to a plain degree?