IsEmpty - Maple Help

PolyhedralSets[ZPolyhedralSets]

 IsEmpty
 check whether a given ZPolyhedralSet is empty or not

 Calling Sequence IsEmpty(zpoly)

Parameters

 zpoly -

Description

 • IsEmpty(zpoly) returns true if zpoly is empty, and otherwise returns false.

Examples

 > $\mathrm{with}\left(\mathrm{PolyhedralSets}\right):$
 > $\mathrm{with}\left(\mathrm{ZPolyhedralSets}\right):$

Create a Z-polyhedron in the two-dimensional space with a system of three linear inequalities.

 > $\mathrm{ineqs}≔\left[x+\frac{2y}{3}\le 4,-x+y\le \frac{7}{8},\frac{1x}{11}+\frac{24}{11}\le y\right]$
 ${\mathrm{ineqs}}{≔}\left[{x}{+}\frac{{2}{}{y}}{{3}}{\le }{4}{,}{-}{x}{+}{y}{\le }\frac{{7}}{{8}}{,}\frac{{x}}{{11}}{+}\frac{{24}}{{11}}{\le }{y}\right]$ (1)
 > $\mathrm{zp}≔\mathrm{ZPolyhedralSet}\left(\mathrm{ineqs},\left[x,y\right]\right)$

Check whether it is empty.

 > $\mathrm{ZPolyhedralSets}:-\mathrm{IsEmpty}\left(\mathrm{zp}\right)$
 ${\mathrm{true}}$ (2)

 > $\mathrm{EnumerateIntegerPoints}\left(\mathrm{zp}\right)$
 $\left[\right]$ (3)

Create another Z-polyhedron in the three-dimensional space with a system of linear inequalities.

 > $\mathrm{ineqs}≔\left[0\le -16+2y+z,0\le -72+4x+4y+3z,0\le 2y-z,0\le -24+4x+4y-3z,0\le -4x+4y+3z,0\le 48-4x+4y-3z,0\le 48-4x-4y+3z,0\le 8-2y+z,0\le -24+4x-4y+3z,0\le 24-2y-z,0\le 24+4x-4y-3z,0\le 96-4x-4y-3z\right]$
 ${\mathrm{ineqs}}{≔}\left[{0}{\le }{-}{16}{+}{2}{}{y}{+}{z}{,}{0}{\le }{-}{72}{+}{4}{}{x}{+}{4}{}{y}{+}{3}{}{z}{,}{0}{\le }{2}{}{y}{-}{z}{,}{0}{\le }{-}{24}{+}{4}{}{x}{+}{4}{}{y}{-}{3}{}{z}{,}{0}{\le }{-}{4}{}{x}{+}{4}{}{y}{+}{3}{}{z}{,}{0}{\le }{48}{-}{4}{}{x}{+}{4}{}{y}{-}{3}{}{z}{,}{0}{\le }{48}{-}{4}{}{x}{-}{4}{}{y}{+}{3}{}{z}{,}{0}{\le }{8}{-}{2}{}{y}{+}{z}{,}{0}{\le }{-}{24}{+}{4}{}{x}{-}{4}{}{y}{+}{3}{}{z}{,}{0}{\le }{24}{-}{2}{}{y}{-}{z}{,}{0}{\le }{24}{+}{4}{}{x}{-}{4}{}{y}{-}{3}{}{z}{,}{0}{\le }{96}{-}{4}{}{x}{-}{4}{}{y}{-}{3}{}{z}\right]$ (4)
 > $L≔\mathrm{Lattice}\left(\mathrm{Matrix}\left(\left[\left[1,0,2\right],\left[0,-1,1\right],\left[0,0,2\right]\right]\right),\mathrm{Vector}\left(\left[0,0,1\right]\right)\right)$
 ${L}{≔}{\mathrm{Lattice}}{}\left(\left[\begin{array}{ccc}{1}& {0}& {2}\\ {0}& {-1}& {1}\\ {0}& {0}& {2}\end{array}\right]{,}\left[\begin{array}{c}{0}\\ {0}\\ {1}\end{array}\right]\right)$ (5)
 > $\mathrm{vars}≔\left[x,y,z\right]$
 ${\mathrm{vars}}{≔}\left[{x}{,}{y}{,}{z}\right]$ (6)
 > $\mathrm{zp}≔\mathrm{ZPolyhedralSet}\left(\mathrm{ineqs},\mathrm{vars},':-\mathrm{lattice}'=L\right)$
 ${\mathrm{zp}}{≔}\left\{\begin{array}{lll}{\text{Relations}}& {:}& \left\{\begin{array}{:}{0}{\le }{2}{}{y}{-}{z}\\ {0}{\le }{-}{16}{+}{2}{}{y}{+}{z}\\ {0}{\le }{8}{-}{2}{}{y}{+}{z}\\ {0}{\le }{24}{-}{2}{}{y}{-}{z}\\ {0}{\le }{-}{4}{}{x}{+}{4}{}{y}{+}{3}{}{z}\\ {0}{\le }{-}{72}{+}{4}{}{x}{+}{4}{}{y}{+}{3}{}{z}\\ {0}{\le }{-}{24}{+}{4}{}{x}{-}{4}{}{y}{+}{3}{}{z}\\ {0}{\le }{-}{24}{+}{4}{}{x}{+}{4}{}{y}{-}{3}{}{z}\\ {0}{\le }{24}{+}{4}{}{x}{-}{4}{}{y}{-}{3}{}{z}\\ {0}{\le }{48}{-}{4}{}{x}{-}{4}{}{y}{+}{3}{}{z}\\ {0}{\le }{48}{-}{4}{}{x}{+}{4}{}{y}{-}{3}{}{z}\\ {0}{\le }{96}{-}{4}{}{x}{-}{4}{}{y}{-}{3}{}{z}\end{array}\right\\\ {\text{Variables}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\text{Parameters}}& {:}& \left[\right]\\ {\text{ParameterConstraints}}& {:}& \left\{\begin{array}{}\end{array}\right\\\ {\text{Lattice}}& {:}& {\text{ZSpan}}\left(\left[\begin{array}{ccc}{1}& {0}& {2}\\ {0}& {-1}& {1}\\ {0}& {0}& {2}\end{array}\right]{,}{,}{,}\left[\begin{array}{c}{0}\\ {0}\\ {1}\end{array}\right]\right)\end{array}\right\$ (7)

Check whether it is empty.

 > $\mathrm{ZPolyhedralSets}:-\mathrm{IsEmpty}\left(\mathrm{zp}\right)$
 ${\mathrm{false}}$ (8)

 > $\mathrm{Point_from_pzp}≔\mathrm{SamplePoint}\left(\mathrm{zp}\right)$
 ${\mathrm{Point_from_pzp}}{≔}\left[{x}{=}{10}{,}{y}{=}{7}{,}{z}{=}{9}\right]$ (9)

References

 Rachid Seghir, Vincent Loechner, and Benoı̂t Meister. "Integer affine transformations of parametric Z-polytopes and applications to loop nest optimization." Proceedings of TACO, Vol. 9(2):8:1–8:27, 2012.
 Rui-Juan Jing and Marc Moreno Maza. "Computing the Integer Points of a Polyhedron, I: Algorithm." Proceedings of CASC 2017: 225-241, Springer.
 Rui-Juan Jing and Marc Moreno Maza. "Computing the Integer Points of a Polyhedron, II: Complexity Estimates." Proceedings of CASC 2017: 242-256, Springer.

Compatibility

 • The PolyhedralSets:-ZPolyhedralSets:-IsEmpty command was introduced in Maple 2023.