Macaulay2 » Documentation
Packages » FourTiTwo :: toricGraverDegrees
next | previous | forward | backward | up | index | toc

# toricGraverDegrees -- displays the degrees of all Graver basis elements for the toric ideal I_A

- Usage:
    `toricGraverDegrees(A)`
- Inputs:
  - A, a matrix, whose columns parametrize the toric variety. The toric ideal $I_A$ is the kernel of the map defined by A
- Optional inputs:
  - Precision => an integer or a string, default value 32, 32, 64, or "gmp", the precision of the integers used during the computation

## Description

Equivalent to "output --degrees foo.gra" in 4ti2. Very often the Graver basis consists of too many binomials, and one is only interested in their degrees. In this case, instead of looking at the Graver basis of $I_A$, we may just want to look for the degrees of binomials which show up:

    i1 : A = matrix "1,1,1,1; 1,2,3,4"

    o1 = | 1 1 1 1 |
         | 1 2 3 4 |

                  2       4
    o1 : Matrix ZZ  <-- ZZ

    i2 : toricGraver(A) -- the Graver basis

    o2 = | 1 -2 1  0 |
         | 2 -3 0  1 |
         | 1 -1 -1 1 |
         | 0 1  -2 1 |
         | 1 0  -3 2 |

                  5       4
    o2 : Matrix ZZ  <-- ZZ

    i3 : toricGraverDegrees(A) -- just the degrees
    -------------------------------------------------
    4ti2 version 1.6.14
    Copyright 1998, 2002, 2006, 2015 4ti2 team.
    4ti2 comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome
    to redistribute it under certain conditions.
    For details, see the file COPYING.
    -------------------------------------------------
    Norm = 4,   number of elements = 3
    Norm = 6,   number of elements = 2

Note that these are all 1-norms of the vectors. Since $I_A$ is homogeneous, there are 3 binomials of degree 2 (norm 4) and 2 binomials of degree 3 (norm 6).

Here is a more complicated example, where one may not want to see the Graver basis elements explicitly. The toric ideal I_M is the ideal of the rational normal scroll S(3,2,3):

    i4 : M = matrix "1,1,1,1,1,1,1,1,1,1,1; 1,1,1,1,0,0,0,0,0,0,0; 0,0,0,0,1,1,1,0,0,0,0; 0,0,0,0,0,0,0,1,1,1,1; 1,2,3,4,1,2,3,1,2,3,4"

    o4 = | 1 1 1 1 1 1 1 1 1 1 1 |
         | 1 1 1 1 0 0 0 0 0 0 0 |
         | 0 0 0 0 1 1 1 0 0 0 0 |
         | 0 0 0 0 0 0 0 1 1 1 1 |
         | 1 2 3 4 1 2 3 1 2 3 4 |

                  5       11
    o4 : Matrix ZZ  <-- ZZ

    i5 : toricGraverDegrees(M)
    -------------------------------------------------
    4ti2 version 1.6.14
    Copyright 1998, 2002, 2006, 2015 4ti2 team.
    4ti2 comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome
    to redistribute it under certain conditions.
    For details, see the file COPYING.
    -------------------------------------------------
    Norm = 4,   number of elements = 37
    Norm = 6,   number of elements = 115
    Norm = 8,   number of elements = 76
    Norm = 10,   number of elements = 15

Here is another example where with many Graver basis elements. The following matrix is a design matrix for a particular statistical model for a 4-node p1 network; see Fienberg-Petrovic-Rinaldo.

    i6 : A = matrix "1,0,1,1,0,1,1,0,1,0,0,0,0,0,0,0,0,0;0,1,1,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0;0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,1,0,1;0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,1,1;0,1,1,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0;1,0,1,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0;0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,1,1;0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,1,0,1;0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1";

                  9       18
    o6 : Matrix ZZ  <-- ZZ

    i7 : toricGraverDegrees(A)
    -------------------------------------------------
    4ti2 version 1.6.14
    Copyright 1998, 2002, 2006, 2015 4ti2 team.
    4ti2 comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome
    to redistribute it under certain conditions.
    For details, see the file COPYING.
    -------------------------------------------------
    Norm = 4,   number of elements = 9
    Norm = 6,   number of elements = 67
    Norm = 8,   number of elements = 378
    Norm = 10,   number of elements = 792
    Norm = 12,   number of elements = 1800
    Norm = 14,   number of elements = 1872
    Norm = 16,   number of elements = 1224
    Norm = 18,   number of elements = 792
    Norm = 20,   number of elements = 432
    Norm = 22,   number of elements = 96

## Ways to use toricGraverDegrees:

- `toricGraverDegrees(Matrix)`

## For the programmer

The object toricGraverDegrees is a method function with options.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/FourTiTwo.m2:522:0.