Quelle chap3.html
Sprache: HTML
products/sources/formale Sprachen/GAP/pkg/utils/doc/chap3.html
"
<!DOCTYPE html html -W3C
"http://www.w3.org/TR/xhtml1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<html xmlns="http://www.w3.org/1999/xhtml " xml:lang="en" >
<head >
<title >GAP (Utils) - Chapter 3: Lists, Sets and Strings</title >
< http-equivcontent/;="/java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
<meta name class>> < ="" > );<span
<rel ="/css href" css
<script src="manual.js" type="text/
<script type="
<head
<body
<div <h5>3.1-3</h5
<div
<p id class>table ="func =" 10%>tr =""&87; SearchCycle/(var=Arg>>)/>tdclass" "(nbsp;&;)/>/>
<
" name=7AE6EFC086C0EB3C>
<
div class=
"ChapSects" ><a href=
"chap3.html#java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0
<iv=ContSect class
"< =&; ahref="chap3#
">3. < class=" Heading for</></ajava.lang.StringIndexOutOfBounds
Exception: Index 172 out of bounds for length 172
</span >
<div class="ContSSBlock" >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap3.html#
<span class<span =>><span span ="GAPinput> =java.lang.StringIndexOutOfBoundsException: Range [70, 68) out of bounds for length 141
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chap3.html#X86096E73858CFABD" >3.1-3 SearchCycle14 2]
<span class="ContSS" ><br /><span span class"" >gap<span class"fori [.10 do:(^2+ 103 AddL,) >
</div ></div >
<div class="ContSect" ><span class="tocline" ><span class="nocss" class">&<span <span "APinput>; <
</span >
<div class="ContSSBlock" >
<span 12 1,38 9,22 5,5,64 88 04 21 21 0,51
/>/>
<div class80,271 1182 2,7,75 7,74 5,64
</span >
<div class="ContSSBlock" >
<span class="ContSS" ><br ,0,7 10 2 8 9,7 5,7 041java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
/></div
/>
<h3 classGAPprompt/> <span classGAPinput=Positions(L 5 ;/pan
<p><a id="X7C3F1E7D878AAA65" name 1, 26 38,50 6,7, 8,9 ]
<h4>3.1 <span class="Heading" >Functions for lists</span ></h4>
<p><a id="X78B7C92681D2F13C" name="X78B7C92681D2F13C" ></a></p>
<h5>3.1-1 DifferencesList</h5>
<java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
classpjava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
<p>314RandomCombination>
<div
span =GAPprompt>> class" 1.1] n-gtn^)
[ 1, 8, 27, 64, 125, 216, 34pThis has transferred package class"" >ResClasses>.<p>
<span classIt a unorderedspan ="" >k<span of elements a set<span class="SimpleMath" >S</span >.</p>
[ 7, 19, 37, 61, 91, 127, 169, 217, 271, 331, 397 ]
<span class="GAPprompt" >gap></span > <span class="GAPinput" >java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 0
[ 12, 18, 24, 30, 36, 42, 48, 54, 60, 66 ]
<span class"GAPprompt" >gap></span <span class="GAPinput" >ifferencesList );</span
[ 6, 6, 6,6, 6 6,6, 6 6]
</pre ></div >
<p><a id="X7975371E865B89BC" name="X7975371E865B89BC" ></a></p>
<h5>3.1-2 QuotientsList</
< class>table =func=0%>tr < class"< =func>#27 QuotientsList"L/>) tdclass=""( functionnbsp; /tr>/table>div
<div class="func" ><table class
<>hese have transferred packagestrong ="" >ResClasses/strong >.</>
<p>They take a list <span class="SimpleMath" >L</span > of length <span class="SimpleMath" >n</span > and output the quotients <span class="SimpleMath" >L[
<
span =GAPprompt&;/> < class"L([.10,-gt;( )>
[ 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800 ]
s class"gap&;/>< " "QuotientsList()
[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
<span class ="func>tableclass=func =codeclass"">ã ( ">(nbspoperation )/>
<span class="GAPprompt" >div ="func>table class=func =10%< class">82;CommonRepresentativesvar ">)/>">(&bsp;operation )/>
[3 /,15 3 / java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
<span class="GAPprompt" >gap></span > <span class="GAPinput" >FloatQuotientsList( L );</span >
[ 3., 1.66667, -0.2, 3., 1.66667 ]
<span class="GAPprompt" >gap></span > <span class=<div class"" >< classfuncwidth=0%>tr =tdleft">"> code>( varclass=Arg" >grp>,< class></var var =">list/> ) L/>asetclass">n">[ . n]> and Hall conditionis satisfied (he union of >k</> elements of< classcode ></code >exists>
10.
</pre ></div >
<p>a id="X86096E73858CFABD" nameX86096E73858CFABD<a></p>
h5>.-SearchCycleh5>
<p>This
<p>code ="code" SearchCyclecode istoollistsWhat a<c<em fuzzy possibly. The ideathat list,thattheneeds in ascycle/
<div
< class="GAPprompt" gap/> class">L := [..0; L1]=3;;
<span class="GAPprompt" >gap></span > <span class="GAPinput" >for i in [1..19] do class="GAPprompt" gap;</span < class"GAPinput" >DistinctRepresentatives)<span
<span class="GAPprompt" >></span > <span class="GAPinput" > ifspan classGAPpromptgap;</> < classGAPinput( J, K );</span
<span class">/pan> " od; >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >L; </span >
,0 0 0 ,1,8 ,2 , 4,2 ,4 ,1 ,2 1,4]
span =>>span >span ="" >SearchCycle ;
[ 1, 4, 2 ]
<span class="GAPprompt" >gap></span > <span class="GAPinput" >n := 1;; L := [n];;</span >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >for i in4,3,2)),RightCosetc4,(18)(27)(,)45)]
span ="GAPprompt" gap;</> <span ="GAPinput>L
[ 1, 2, 5, 26, 677, 363, 610, 481, 739, 715, 795, 272, 754, 157, 604, 848,
1004, 271, 211, 802, 5
1 0,51 7, 75 7,5, 1574021 1java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 78
895, 272, 754, 157, 604, 848, 1004, 271, 211, 802, 521, 378, 795, 272,
754, 157, 604, 848, 1004java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
848, 1004, 271, 211, 802, 521, 378, 795, 272, 754,java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0
271, 211, 802, 521, 378, div ="func>tableclass=" "width" 10%>tr class"tdleft>code class" >#82;</code ( <var classArgobjvar > )/td class"tdright" >( function;)</></tr /table div
<span class="GAPprompt" >>/panspan =GAPinputC:=SearchCycle( )</span
[ 157, 604, 848, 1004, 271, 211, 802, 521, 378, 795, 27
<span ="GAPprompt>gap&;GAPinputP:=Positions( L,17 )</span
[ 14, 26, 3java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<span class="GAPprompt" >gap></span java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
2
[ 12, 12, 12, 12, 12, 12, 12 [ f1f2 ]
</" f1,f2 ]"
<p><a id="f1f2,]"
<h5>3.1-4 RandomCombination><div
<div class="func" ><<div class="" > a href"chap0html" TopBooknbsp ".html#contents" []</a&; &;<ahref"chap2html>Previous Chapter&bsp; nbsp< =chap4html>NextChapter]
<p>This function has been transferred from package <strong class="pkg" >ResClasses</strong >.</p>
<p>It returns a random unordered ="> by < =" https..rwth-aachen/~Frank/GAPDoc/>p
<div class="example" ><pre >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >## "6 aus 49" is a common lottery in Germany</span >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >RandomCombination( [1..49], 6 ); </span >
[ 2, 16, 24, 26, 37, 47 ]
</pre ></div >
<p><a id="X82F443FF84B8FCE3" name="X82F443FF84B8FCE3" ></a></p>
<h4>3.2 <span class="Heading" >Distinct and Common Representatives</span ></h4>
<p><a id="X78105CAA847A888C" name="X78105CAA847A888C" ></a></p>
<h5>3.2-1 DistinctRepresentatives</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ DistinctRepresentatives</code >( <var class="Arg" >list</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ CommonRepresentatives</code >( <var class="Arg" >list</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ CommonTransversal</code >( <var class="Arg" >grp</var >, <var class="Arg" >subgrp</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ IsCommonTransversal</code >( <var class="Arg" >grp</var >, <var class="Arg" >subgrp</var >, <var class="Arg" >list</var > )</td ><td class="tdright" >( operation )</td ></tr ></table ></div >
<p>These operations have been transferred from package <strong class="pkg" >XMod</strong >.</p>
<p>They deal with lists of subsets of <span class="SimpleMath" >[1 ... n]</span > and construct systems of distinct and common representatives using simple, non-recursive, combinatorial algorithms.</p>
<p>When <span class="SimpleMath" >L</span > is a set of <span class="SimpleMath" >n</span > subsets of <span class="SimpleMath" >[1 ... n]</span > and the Hall condition is satisfied (the union of any <span class="SimpleMath" >k</span > subsets has at least <span class="SimpleMath" >k</span > elements), a set of <code class="code" >DistinctRepresentatives</code > exists.</p>
<p>When <span class="SimpleMath" >J,K</span > are both lists of <span class="SimpleMath" >n</span > sets, the operation <code class="code" >CommonRepresentatives</code > returns two lists: the set of representatives, and a permutation of the subsets of the second list.</p>
<p>The operation <code class="code" >CommonTransversal</code > may be used to provide a common transversal for the sets of left and right cosets of a subgroup <span class="SimpleMath" >H</span > of a group <span class="SimpleMath" >G</span >, although a greedy algorithm is usually quicker.</p>
<div class="example" ><pre >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >J := [ [1,2,3], [3,4], [3,4], [1,2,4] ];;</span >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >DistinctRepresentatives( J );</span >
[ 1, 3, 4, 2 ]
<span class="GAPprompt" >gap></span > <span class="GAPinput" >K := [ [3,4], [1,2], [2,3], [2,3,4] ];;</span >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >CommonRepresentatives( J, K );</span >
[ [ 3, 3, 3, 1 ], [ 1, 3, 4, 2 ] ]
<span class="GAPprompt" >gap></span > <span class="GAPinput" >d16 := DihedralGroup( IsPermGroup, 16 ); </span >
Group([ (1,2,3,4,5,6,7,8), (2,8)(3,7)(4,6) ])
<span class="GAPprompt" >gap></span > <span class="GAPinput" >SetName( d16, "d16" );</span >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >c4 := Subgroup( d16, [ d16.1^2 ] ); </span >
Group([ (1,3,5,7)(2,4,6,8) ])
<span class="GAPprompt" >gap></span > <span class="GAPinput" >SetName( c4, "c4" );</span >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >RightCosets( d16, c4 );</span >
[ RightCoset(c4,()), RightCoset(c4,(2,8)(3,7)(4,6)), RightCoset(c4,(1,8,7,6,5,
4,3,2)), RightCoset(c4,(1,8)(2,7)(3,6)(4,5)) ]
<span class="GAPprompt" >gap></span > <span class="GAPinput" >trans := CommonTransversal( d16, c4 );</span >
[ (), (2,8)(3,7)(4,6), (1,2,3,4,5,6,7,8), (1,2)(3,8)(4,7)(5,6) ]
<span class="GAPprompt" >gap></span > <span class="GAPinput" >IsCommonTransversal( d16, c4, trans );</span >
true
</pre ></div >
<p><a id="X8033A2FE80FC2F2A" name="X8033A2FE80FC2F2A" ></a></p>
<h4>3.3 <span class="Heading" >Functions for strings</span ></h4>
<p><a id="X870C964E7804B266" name="X870C964E7804B266" ></a></p>
<h5>3.3-1 BlankFreeString</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ BlankFreeString</code >( <var class="Arg" >obj</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>This function has been transferred from package <strong class="pkg" >ResClasses</strong >.</p>
<p>The result of <code class="code" >BlankFreeString( obj );</code > is a composite of the functions <code class="code" >String( obj )</code > and <code class="code" >RemoveCharacters( obj, " " );</code >.</p>
<div class="example" ><pre >
<span class="GAPprompt" >gap></span > <span class="GAPinput" >gens := GeneratorsOfGroup( DihedralGroup(12) );</span >
[ f1, f2, f3 ]
<span class="GAPprompt" >gap></span > <span class="GAPinput" >String( gens ); </span >
"[ f1, f2, f3 ]"
<span class="GAPprompt" >gap></span > <span class="GAPinput" >BlankFreeString( gens ); </span >
"[f1,f2,f3]"
</pre ></div >
<div class="chlinkprevnextbot" > <a href="chap0.html" >[Top of Book]</a> <a href="chap0.html#contents" >[Contents]</a> <a href="chap2.html" >[Previous Chapter]</a> <a href="chap4.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="chap5.html" >5</a> <a href="chap6.html" >6</a> <a href="chap7.html" >7</a> <a href="chap8.html" >8</a> <a href="chap9.html" >9</a> <a href="chap10.html" >10</a> <a href="chap11.html" >11</a> <a href="chap12.html" >12</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 >
quality 100%
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet)
¤
*© Formatika GbR, Deutschland