-1

Consider the vector h = (1, 1, 1, 2, 2, 2) and the matrix A =
2 0 0 1 1 0
0 2 0 1 0 1
0 0 2 0 1 1

  1. write code in Macaulay 2 version 1.21 to Compute generators for the toric ideals IA and IA,h.
  2. What familiar statistical model is the discrete exponential family MA,h ?

unable to get IA,h!!

greybeard
  • 2,249
  • 8
  • 30
  • 66

1 Answers1

0

You can use the Quasidegrees package to generate toric ideals.

Macaulay2, version 1.21
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, Isomorphism, LLLBases,
               MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone

i1 : loadPackage "Quasidegrees"
o1 = Quasidegrees
o1 : Package

i2 : h = vector {1, 1, 1, 2, 2, 2}
o2 = | 1 |
     | 1 |
     | 1 |
     | 2 |
     | 2 |
     | 2 |

       6
o2 : ZZ

i3 : A = matrix {{2,0,0,1,1,0},{0,2,0,1,0,1},{0,0,2,0,1,1}}
o3 = | 2 0 0 1 1 0 |
     | 0 2 0 1 0 1 |
     | 0 0 2 0 1 1 |

              3        6
o3 : Matrix ZZ  <--- ZZ

i4 : R = QQ[x_1, x_2, x_3, x_4, x_5, x_6]
o4 = R
o4 : PolynomialRing

i5 : IA = toricIdeal(A, R)
                                                           2          2          2
o5 = ideal (x x  - x x , x x  - x x , x x  - x x , x x  - x , x x  - x , x x  - x )
             4 5    1 6   2 5    4 6   3 4    5 6   2 3    6   1 3    5   1 2    4
o5 : Ideal of R

For the second part, look at the Algebraic Optimization Degree package, maybe it will work for you or get an idea from it. For example with the toricMLIdeal function, you can compute the toric Maximum likelihood ideal.

tarashi
  • 23
  • 8