Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/toric/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 4.6.2024 mit Größe 16 kB image not shown  

Quelle  chap2.html   Sprache: HTML

 
 products/Sources/formale Sprachen/GAP/pkg/toric/doc/chap2.html


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (toric) - Chapter 2: Cones and semigroups</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap2"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap1.html">[Previous Chapter]</a>    <a href="chap3.html">[Next Chapter]</a>   </div>

<p id="mathjaxlink" class="pcenter"><a href="chap2_mj.html">[MathJax on]</a></p>
<p><a id="X7D23D3CC7F0A06BA" name="X7D23D3CC7F0A06BA"></a></p>
<div class="ChapSects"><a href="chap2.html#X7D23D3CC7F0A06BA">2 <span class="Heading">Cones and semigroups</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap2.html#X8524A7567BA4FFA6">2.1 <span class="Heading">Cones</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap2.html#X7FEBB7547EEE8E2A">2.1-1 InsideCone</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap2.html#X87566480802A161C">2.1-2 InDualCone</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap2.html#X7B303CDE8729008F">2.1-3 PolytopeLatticePoints</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap2.html#X872AD1E785C7EB03">2.1-4 Faces</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap2.html#X7A2DA9B38507BDD3">2.1-5 ConesOfFan</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap2.html#X7C923A4B785606D6">2.1-6 NumberOfConesOfFan</a></span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap2.html#X80C858E97E741B21">2.1-7 ToricStar</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap2.html#X80AF5F307DBDC2B4">2.2 <span class="Heading">Semigroups</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">  </span><a href="chap2.html#X818998428722C3B5">2.2-1 DualSemigroupGenerators</a></span>
</div></div>
</div>

<h3>2 <span class="Heading">Cones and semigroups</span></h3>

<p><a id="X8524A7567BA4FFA6" name="X8524A7567BA4FFA6"></a></p>

<h4>2.1 <span class="Heading">Cones</span></h4>

<p>This section introduces the <strong class="pkg">toric</strong> commands which deal with cones and related combinatorial-geometric objects. Recall, a <strong class="button">cone</strong> is a strongly convex polyhedral cone (<a href="chapBib.html#biBF93">[Ful93]</a>, page 4).</p>

<p><a id="X7FEBB7547EEE8E2A" name="X7FEBB7547EEE8E2A"></a></p>

<h5>2.1-1 InsideCone</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InsideCone</code>( <var class="Arg">v</var>, <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This command returns `true` if the vector <var class="Arg">v</var> belongs to the interior of the (strongly convex polyhedral) cone generated by the vectors in <var class="Arg">L</var>.</p>

<p>This procedure does not check if <var class="Arg">L</var> generates a strongly convex polyhedral cone.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];; v:=[0,0,1];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">InsideCone(v,L);</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">L:=[[1,0],[3,4]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">v:=[1,-7]; InsideCone(v,L);</span>
[ 1, -7 ]
false
<span class="GAPprompt">gap></span> <span class="GAPinput">v:=[4,-3]; InsideCone(v,L);</span>
[ 4, -3 ]
false
<span class="GAPprompt">gap></span> <span class="GAPinput">v:=[4,-4]; InsideCone(v,L);</span>
[ 4, -4 ]
false
<span class="GAPprompt">gap></span> <span class="GAPinput">v:=[4,1]; InsideCone(v,L);</span>
[ 4, 1 ]
true
</pre></div>

<p><a id="X87566480802A161C" name="X87566480802A161C"></a></p>

<h5>2.1-2 InDualCone</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InDualCone</code>( <var class="Arg">v</var>, <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This command returns `true` if <var class="Arg">v</var> belongs to the dual of the cone generated by the vectors in <var class="Arg">L</var>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];; v:=[0,0,1];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">InDualCone(v,L);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">L:=[[1,0],[3,4]];</span>
[ [ 1, 0 ], [ 3, 4 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">v:=[1,-7]; InDualCone(v,L);</span>
[ 1, -7 ]
false
<span class="GAPprompt">gap></span> <span class="GAPinput">v:=[4,-3]; InDualCone(v,L);</span>
[ 4, -3 ]
true
<span class="GAPprompt">gap></span> <span class="GAPinput">v:=[4,-4]; InDualCone(v,L);</span>
[ 4, -4 ]
false
<span class="GAPprompt">gap></span> <span class="GAPinput">v:=[4,1]; InDualCone(v,L);</span>
[ 4, 1 ]
true
</pre></div>

<p><a id="X7B303CDE8729008F" name="X7B303CDE8729008F"></a></p>

<h5>2.1-3 PolytopeLatticePoints</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PolytopeLatticePoints</code>( <var class="Arg">A</var>, <var class="Arg">Perps</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><em>Input</em>: <var class="Arg">Perps</var><span class="SimpleMath">=[v_1,...,v_k]</span> is the list of ``inward normal" vectors perpendicular to the walls of a polytope P in the vector space L_0^*⊗ Q,
A=[a_1,...,a_k] is a k-tuple of integers, where a_i denotes the amount the i-th ``wall"
 (defined by the normal <span class="SimpleMath">v_i</span>) is shifted from the origin (each <span class="SimpleMath">a_i</span> is assumed non-negative). <br /> For example, the polytope <span class="SimpleMath">P</span> with faces <code class="code">[x=0, x=a, y=0, y=b]</code> has <var class="Arg">Perps</var><span class="SimpleMath">=[[1,0],[-1,0],[0,1],[0,-1]]</span> and <var class="Arg">A</var><span class="SimpleMath">=[0,a,0,b]</span>. <br /> <em>Output</em>: the list of points in <span class="SimpleMath">P ∩ L_0^*</span>.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Perps:=[[1,0],[-1,0],[0,1],[0,-1]];</span>
[ [ 1, 0 ], [ -1, 0 ], [ 0, 1 ], [ 0, -1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">A:=[0,4,0,3];</span>
[ 0, 4, 0, 3 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PolytopeLatticePoints(A,Perps);</span>
[ [ 0, 0 ], [ 0, 1 ], [ 0, 2 ], [ 0, 3 ], [ 1, 0 ], [ 1, 1 ], [ 1, 2 ],
  [ 1, 3 ], [ 2, 0 ], [ 2, 1 ], [ 2, 2 ], [ 2, 3 ], [ 3, 0 ], [ 3, 1 ],
  [ 3, 2 ], [ 3, 3 ], [ 4, 0 ], [ 4, 1 ], [ 4, 2 ], [ 4, 3 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">Length(last);</span>
20
</pre></div>

<p><a id="X872AD1E785C7EB03" name="X872AD1E785C7EB03"></a></p>

<h5>2.1-4 Faces</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Faces</code>( <var class="Arg">Rays</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><em>Input</em>: <var class="Arg">Rays</var> is a list of rays for the fan <span class="SimpleMath">∆</span> <br /> <em>Output</em>: All the normals to the faces (hyperplanes of the cone).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Cones1:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Faces(Cones1[1]);</span>
[ [ 1/2, 1 ], [ 2, 1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">Faces(Cones1[2]);</span>
[ [ -2, -1 ], [ -1, 1 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">Cones2:=[[[ 2,0,0],[0,2,0],[0,0,2]], [[2,0,0], [0,2,0], [2,-2,1],[1,2,-2]]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Faces(Cones2[1]);</span>
[ [ 0, 0, 1 ], [ 0, 1, 0 ], [ 1, 0, 0 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">Faces(Cones2[2]);</span>
[ [ 1/3, 5/6, 1 ], [ 1/2, 0, -1 ], [ 2, 0, 1 ] ]
</pre></div>

<p><a id="X7A2DA9B38507BDD3" name="X7A2DA9B38507BDD3"></a></p>

<h5>2.1-5 ConesOfFan</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ConesOfFan</code>( <var class="Arg">Delta</var>, <var class="Arg">k</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><em>Input</em>: <var class="Arg">Delta</var> is the fan of cones, <br /> <var class="Arg">k</var> is the dimension of the cones desired. <br /> <em>Output</em>: The <var class="Arg">k</var>-dimensional cones in the fan.</p>

<p><a id="X7C923A4B785606D6" name="X7C923A4B785606D6"></a></p>

<h5>2.1-6 NumberOfConesOfFan</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NumberOfConesOfFan</code>( <var class="Arg">Delta</var>, <var class="Arg">k</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><em>Input</em>: <var class="Arg">Delta</var> is the fan of cones in <span class="SimpleMath">V=Q^n</span>, <br /> <var class="Arg">k</var> is the dimension of the cones counted. <br /> <em>Output</em>: The number of <var class="Arg">k</var>-dimensional cones in the fan.</p>

<p>Idea: The fan <var class="Arg">Delta</var> is represented as a set of maximal cones. For each maximal cone, look at the <var class="Arg">k</var>-dimensional faces obtained by taking <span class="SimpleMath">n</span> choose <var class="Arg">k</var> subsets of the rays describing the cone. Certain of these <var class="Arg">k</var>-subsets yield the desired cones.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Delta0:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">NumberOfConesOfFan(Delta0,2);</span>
6
<span class="GAPprompt">gap></span> <span class="GAPinput">ConesOfFan(Delta0,2);</span>
[ [ [ 0, 0, 2 ], [ 0, 2, 0 ] ], [ [ 0, 0, 2 ], [ 2, 0, 0 ] ], 
  [ [ 0, 2, 0 ], [ 1, 2, -2 ] ], [ [ 0, 2, 0 ], [ 2, -2, 1 ] ],
  [ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 1, 2, -2 ], [ 2, -2, 1 ] ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ConesOfFan(Delta0,1);</span>
[ [ [ 0, 0, 2 ] ], [ [ 0, 2, 0 ] ], [ [ 1, 2, -2 ] ], 
  [ [ 2, -2, 1 ] ], [ [ 2, 0, 0 ] ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">NumberOfConesOfFan(Delta0,1);</span>
5
</pre></div>

<p><a id="X80C858E97E741B21" name="X80C858E97E741B21"></a></p>

<h5>2.1-7 ToricStar</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ToricStar</code>( <var class="Arg">sigma</var>, <var class="Arg">Delta</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><em>Input</em>: <var class="Arg">sigma</var> is a cone in the fan, represented by its set of maximal (i.e., highest dimensional) cones. <br /> <var class="Arg">Delta</var> is the fan of cones in <span class="SimpleMath">V=Q^n</span>. <br /> <em>Output</em>: The star of the cone <var class="Arg">sigma</var> in <var class="Arg">Delta</var>, i.e., the cones <span class="SimpleMath">τ</span> which have <var class="Arg">sigma</var> as a face.</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ], </span>
<span class="GAPprompt">></span> <span class="GAPinput">                [ [2,0,0],[0,2,0],[2,-2,1],[1,2,-2] ] ];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">#this is the set of maximal cones in the fan Delta</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ToricStar([[1,0]],MaxCones);</span>
[  ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ToricStar([[2,0,0],[0,2,0]],MaxCones);</span>
[ [ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 0, 0, 2 ] ],
  [ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 2, -2, 1 ], [ 1, 2, -2 ] ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">MaxCones:=[ [ [2,0,0],[0,2,0],[0,0,2] ], [ [2,0,0],[0,2,0],[1,1,-2] ] ];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ToricStar([[2,0,0],[0,2,0]],MaxCones);</span>
[ [ [ 0, 2, 0 ], [ 2, 0, 0 ] ], [ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 0, 0, 2 ] ],
  [ [ 2, 0, 0 ], [ 0, 2, 0 ], [ 1, 1, -2 ] ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ToricStar([[1,0]],MaxCones);</span>
[  ]
</pre></div>

<p><a id="X80AF5F307DBDC2B4" name="X80AF5F307DBDC2B4"></a></p>

<h4>2.2 <span class="Heading">Semigroups</span></h4>

<p><a id="X818998428722C3B5" name="X818998428722C3B5"></a></p>

<h5>2.2-1 DualSemigroupGenerators</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DualSemigroupGenerators</code>( <var class="Arg">L</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><em>Input</em>: <var class="Arg">L</var> is a list of integral <span class="SimpleMath">n</span>-vectors generating a cone <span class="SimpleMath">σ</span>. <br /> <em>Output</em>: the generators of <span class="SimpleMath">S_σ</span>,</p>

<p>Idea: let <span class="SimpleMath">M</span> be the maximum of the absolute values of the coordinates of the <var class="Arg">L</var>[i]'s, for each vector v in [1..M]^n, test if v is in the dual cone σ^*. If so, add v to list of possible generators. Once this for loop is finished, one can check this list for redundant generators. The trick is to simply omit those elements which are of the form d_1+d_2, where d_1 and d_2 are ``small" elements in the integral dual cone.



<p>This program is not very efficient and should not be used in ``large examples'' involving semigroups with ``many'' generators. For example, if you take <var class="Arg">L:=[[1,2,3,4],[0,1,0,7],[3,1,0,2],[0,0,1,0]];</var> then <code class="code">DualSemigroupGenerators(L);</code> can exhaust GAP's memory allocation.




<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">L:=[[1,0],[3,4]];; DualSemigroupGenerators([[1,0],[3,4]]);</span>
[ [ 0, 0 ], [ 0, 1 ], [ 1, 0 ], [ 2, -1 ], [ 3, -2 ], [ 4, -3 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">L:=[[1,0,0],[1,1,0],[1,1,1],[1,0,1]];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">DualSemigroupGenerators(L);</span>
[ [ 0, 0, 0 ], [ 0, 0, 1 ], [ 0, 1, 0 ], [ 1, -1, 0 ], [ 1, 0, -1 ] ]
</pre></div>


<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a>   <a href="chap0.html#contents">[Contents]</a>    <a href="chap1.html">[Previous Chapter]</a>    <a href="chap3.html">[Next Chapter]</a>   </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>

95%


¤ Dauer der Verarbeitung: 0.9 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.