Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/nconvex/examples/   (GAP Algebra Version 4.15.1©)  Datei vom 28.11.2024 mit Größe 2 kB image not shown  

Quelle  polyhedrons.g   Sprache: unbekannt

 
Spracherkennung für: .g vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

LoadPackage( "NConvex" );

#! @Chunk example3
#! @Example

P := Polyhedron( [ [ 11 ], [ 47 ] ], [ [ 1, -1 ], [ 11 ] ] );
#! <A polyhedron in |R^2>
VerticesOfMainRatPolytope( P );
#! [ [ 11 ], [ 47 ] ]
VerticesOfMainPolytope( P );
#! [ [ 11 ], [ 47 ] ]
P := Polyhedron( [ [ 1/21/2 ] ], [ [ 11 ] ] );
#! <A polyhedron in |R^2>
VerticesOfMainRatPolytope( P );
#! [ [ 1/21/2 ] ]
VerticesOfMainPolytope( P );
#! [ [ 11 ] ]
LatticePointsGenerators( P );
#! [ [ [ 11 ] ], [ [ 11 ] ], [  ] ]
Dimension( P );
#! 1
Q := Polyhedron( [ [ 50 ], [ 06 ] ], [ [ 12 ] , [ -1, -2 ] ] );
#! <A polyhedron in |R^2>
VerticesOfMainRatPolytope( Q );
#! [ [ 06 ], [ 50 ] ]
V := VerticesOfMainPolytope( Q );
#! [ [ 06 ], [ 50 ] ]

L := LatticePointsGenerators( Q );
#! [ [ [ 0, -10 ], [ 0, -9 ], [ 0, -8 ], [ 0, -7 ], [ 0, -6 ],
#! [ 0, -5 ], [ 0, -4 ], [ 0, -3 ], [ 0, -2 ], [ 0, -1 ],
#! [ 00 ], [ 01 ], [ 02 ], [ 03 ], [ 04 ],
#! [ 05 ], [ 06 ] ], [  ], [ [ 12 ] ] ]
Dimension( Q );
#! 2
RayGeneratorsOfTailCone( Q );
#! [ [ -1, -2 ], [ 12 ] ]
BasisOfLinealitySpace( Q );
#! [ [ 12 ] ]
DefiningInequalities( Q );
#! [ [ 62, -1 ], [ 10, -21 ] ]
Q;
#! <A polyhedron in |R^2 of dimension 2>
#! @EndExample
#! @BeginLatexOnly
#! Let us now find out if the equation $-2+3x+4y-7z=0$ has integer solutions.
#! @EndLatexOnly
#! @Example
P := PolyhedronByInequalities( [ [ -234, -7 ], -[ -234, -7 ] ] );
#! <A polyhedron in |R^3 >
L := LatticePointsGenerators( P );
#! [ [ [ -40, -2 ] ], [  ], [ [ 074 ], [ 111 ] ] ]
#! @EndExample
#! @BeginLatexOnly
#! So the solutions set is $\{ [ -40, -2 ]+ t_1*[ 111 ] + t_2*[ 074 ]; t_1,t_2\in\mathbb{Z}\}$.
#! \newline
#! We know that $4x + 6y = 3$ does not have any solutions because $gcd(4,6)=2$ does not divide $3$.
#! @EndLatexOnly
#! @Example
Q := PolyhedronByInequalities( [ [-346 ], [ 3, -4, -6 ] ] );
#! <A polyhedron in |R^2 >
LatticePointsGenerators( Q );
#! [ [  ], [  ], [ [ 3, -2 ] ] ]
#! @EndExample
#! @BeginLatexOnly
#! Let us solve the folowing linear system
#! $$2x + 3y = 1\;\mathrm{mod}\;2$$
#! $$7x + \phantom{3}y = 3\;\mathrm{mod}\;5.$$
#! which is equivalent to the sytem
#! $$-1 + 2x + 3y           + 2u = 0$$
#! $$-3 + 7x + \phantom{3}y + 5v = 0$$
#! @EndLatexOnly
#! @Example
P := PolyhedronByInequalities( [ [ -12320 ], [ -37105 ],
      [ 1, -2, -3, -20 ], [ 3, -7, -10, -5 ] ] );
#! <A polyhedron in |R^4 >
L := LatticePointsGenerators( P );
#! [ [ [ -1911827 ] ], [  ], [ [ 010, -15, -2 ], [ 1, -22, -1 ] ] ]
#! @EndExample
#! @BeginLatexOnly
#! I.e., the solutions set is 
#! $$\{[-191] + t_1*[1, -2] + t_2*[ 010]; t_1,t_2\in\mathbb{Z}\}$$
#! @EndLatexOnly
#! @EndChunk

[Dauer der Verarbeitung: 0.19 Sekunden, vorverarbeitet 2026-06-17]