Internal points of lattice polytope

49 views
Skip to first unread message

Soli vishkautsan

unread,
Mar 11, 2014, 5:14:04 PM3/11/14
to sage-s...@googlegroups.com
Is there a quick way to calculate the number of *internal* lattice points of a lattice polytope? LatticePolytope object has npoints method, which returns the total number of lattice points, including the border points.

Volker Braun

unread,
Mar 12, 2014, 3:26:39 AM3/12/14
to sage-s...@googlegroups.com
Not easily. There is this internal method whose output includes which points saturate which equation. Though you probably should just iterate over all points and pick the ones you like.

sage: from sage.geometry.polyhedron.ppl_lattice_polytope import LatticePolytope_PPL
sage: P =  LatticePolytope_PPL([0,0], [3,0], [0,3])
sage: P.constraints()
Constraint_System {x0>=0, x1>=0, -x0-x1+3>=0}
sage: P._integral_points_saturating()
(((0, 0), frozenset([0, 1])),
 ((0, 1), frozenset([0])),
 ((0, 2), frozenset([0])),
 ((0, 3), frozenset([0, 2])),
 ((1, 0), frozenset([1])),
 ((1, 1), frozenset([])),
 ((1, 2), frozenset([2])),
 ((2, 0), frozenset([1])),
 ((2, 1), frozenset([2])),
 ((3, 0), frozenset([1, 2])))

Dima Pasechnik

unread,
Mar 12, 2014, 6:14:36 AM3/12/14
to sage-s...@googlegroups.com
probably LattE (see https://www.math.ucdavis.edu/~latte/)
can do this reasonably fast. LattE can be installed as
an experimental Sage package
http://www.sagemath.org/packages/experimental/latte_int-1.6.spkg
(but there is no interface between Sage and it created yet...)


Reply all
Reply to author
Forward
0 new messages