1\documentclass[10pt,landscape]{article}
2\usepackage{multicol}
3\usepackage{calc}
4\usepackage{ifthen}
5\usepackage[landscape]{geometry}
6
7% To make this come out properly in landscape mode, do one of the following
8% 1.
9%  pdflatex latexsheet.tex
10%
11% 2.
12%  latex latexsheet.tex
13%  dvips -P pdf  -t landscape latexsheet.dvi
14%  ps2pdf latexsheet.ps
15
16
17% If you're reading this, be prepared for confusion.  Making this was
18% a learning experience for me, and it shows.  Much of the placement
19% was hacked in; if you make it better, let me know...
20
21
22% 2008-04
23% Changed page margin code to use the geometry package. Also added code for
24% conditional page margins, depending on paper size. Thanks to Uwe Ziegenhagen
25% for the suggestions.
26
27% 2006-08
28% Made changes based on suggestions from Gene Cooperman. <gene at ccs.neu.edu>
29
30
31% To Do:
32% \listoffigures \listoftables
33% \setcounter{secnumdepth}{0}
34
35
36% This sets page margins to .5 inch if using letter paper, and to 1cm
37% if using A4 paper. (This probably isn't strictly necessary.)
38% If using another size paper, use default 1cm margins.
39\ifthenelse{\lengthtest { \paperwidth = 11in}}
40	{ \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} }
41	{\ifthenelse{ \lengthtest{ \paperwidth = 297mm}}
42		{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
43		{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
44	}
45
46% Turn off header and footer
47\pagestyle{empty}
48
49
50% Redefine section commands to use less space
51\makeatletter
52\renewcommand{\section}{\@startsection{section}{1}{0mm}%
53                                {-1ex plus -.5ex minus -.2ex}%
54                                {0.5ex plus .2ex}%x
55                                {\normalfont\large\bfseries}}
56\renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
57                                {-1explus -.5ex minus -.2ex}%
58                                {0.5ex plus .2ex}%
59                                {\normalfont\normalsize\bfseries}}
60\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
61                                {-1ex plus -.5ex minus -.2ex}%
62                                {1ex plus .2ex}%
63                                {\normalfont\small\bfseries}}
64\makeatother
65
66% Define BibTeX command
67\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
68    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
69
70% Don't print section numbers
71\setcounter{secnumdepth}{0}
72
73
74\setlength{\parindent}{0pt}
75\setlength{\parskip}{0pt plus 0.5ex}
76
77
78% -----------------------------------------------------------------------
79   \newcommand{\tab}{\hspace*{2em}}
80
81\begin{document}
82
83\raggedright
84\footnotesize
85\begin{multicols}{3}
86
87
88% multicol parameters
89% These lengths are set only within the two main columns
90%\setlength{\columnseprule}{0.25pt}
91\setlength{\premulticols}{1pt}
92\setlength{\postmulticols}{1pt}
93\setlength{\multicolsep}{1pt}
94\setlength{\columnsep}{2pt}
95
96\begin{center}
97     \Large{\textbf{Combinatoric CheatSheet \\ Sympy.org}} \\
98\end{center}
99\section{Partition}
100\verb!Path: from sympy.combinatorics.partitions!\\
101\subsection{Methods}
102\verb!random_integer_partition(n, seed=None)! \\
103Generates a random integer partition summing to n as a list of reverse-sorted integers
104
105
106\verb!RGS_generalized(m)! \\
107Computes the \verb!m + 1! generalized unrestricted growth strings and returns them as rows in matrix
108
109
110\verb!RGS_enum(m)! \\
111computes the total number of restricted growth
112 strings possible for a superset of size \verb!m!
113
114
115\verb!RGS_unrank(rank, m)! \\
116Gives the unranked restricted growth string for a given superset size
117
118
119\verb!RGS_rank(rgs)! \\
120Computes the rank of a restricted growth string.
121
122
123\subsection{Subclass \texttt{Partition}}
124A partition is a set of disjoint sets whose union equals a given set.
125This Class represent abstract partition.
126
127\begin{tabular}{@{}lp{4.5cm}l@{}}
128\verb!rgs!    & Restricted Growth String\\
129\verb!from_rgs(rgs,elements)!  & Creates a set partition from a RSG\\
130\verb!rank! & Gets the rank of a partition \\
131\verb!partition!  & Return partition as a sorted list of lists\\
132\verb!sort_key(order=None)!  & Return a canonical key that can be used for sorting.
133\end{tabular}
134
135%dump : \\
136%Used at the very beginning of a document:
137%\verb!\documentclass{!\textit{class}\verb!}!.  Use
138%\verb!\begin{document}! to start contents and \verb!\end{document}! to
139%end the document.
140%\\end dump.
141
142\subsection{Subclass \texttt{IntegerPartition}}
143This class represents an integer partition.
144\newlength{\MyLen}
145\settowidth{\MyLen}{\texttt{letterpaper}/\texttt{a4paper} \ }
146\begin{tabular}{@{}p{\the\MyLen}%
147                @{}p{\linewidth-\the\MyLen}@{}}
148\verb!as_dict()! & Return the partition as a dictionary whose keys are the
149				partition integers and the values are the multiplicity of that integer \\
150\verb!as_ferrers(char='#')! & Prints the ferrer diagram of a partition\\
151\verb!conjugate! &Computes the conjugate partition of itself\\
152\verb!next_lex()! & Return the next partition of the integer, n, in lexical order\\
153\verb!prev_lex()! & Return the previous partition of the integer, n, in lexical order\\
154\end{tabular}
155
156\section{Permutation}
157Path \verb!sympy.combinatorics.permutations.Permutation!\\
158\subsection{Methods}
159\verb!array_form! \\
160This is used to convert from cyclic notation to the canonical notation
161
162\verb!ascents()!\\
163Returns the positions of ascents in a permutation, i.e., the location where $p[i] < p[i+1]$
164
165
166\verb!descents()!
167Returns the positions of descents in a permutation, i.e., the location where $p[i] > p[i+1]$
168
169
170\verb!atoms()!\\
171Returns all the elements of a permutation
172
173\verb!cardinality!\\
174Returns the number of all possible permutations.
175
176\verb!commutator(x)!\\
177Return the commutator of self and x: \verb!~x*~self*x*self!
178
179
180\verb!commutes_with(other)!\\
181Checks if the elements are commuting.
182
183
184\verb!cycle_structure!\\
185Return the cycle structure of the permutation as a dictionary indicating the multiplicity of each cycle length.
186
187
188\verb!cycles! \\
189Returns the number of cycles contained in the permutation (including singletons).
190
191\verb!cyclic_form!\\
192This is used to convert to the cyclic notation from the canonical notation. Singletons are omitted.
193
194\verb!from_inversion_vector(inversion)!\\
195Calculates the permutation from the inversion vector.
196
197
198\verb!from_sequence(i, key=None)!\\
199Return the permutation needed to obtain \verb!i! from the sorted elements of \verb!i!.
200If custom sorting is desired, a key can be given.
201
202\verb!full_cyclic_form!\\
203Return permutation in cyclic form including singletons.
204
205
206\verb!get_adjacency_distance(other)!\\
207Computes the adjacency distance between two permutations.
208
209
210\verb!get_adjacency_matrix()!\\
211Computes the adjacency matrix of a permutation.
212
213
214\verb!get_positional_distance(other)!\\
215Computes the positional distance between two permutations.
216
217
218\verb!get_precedence_distance(other)!\\
219Computes the precedence distance between two permutations.
220
221
222\verb!get_precedence_matrix()!\\
223Gets the precedence matrix. This is used for computing the distance between two permutations.
224
225
226\verb!index()!\\
227Returns the index of a permutation.
228
229
230\verb!inversion_vector()!\\
231Return the inversion vector of the permutation.
232
233
234\verb!inversions()!\\
235Computes the number of inversions of a permutation.
236
237
238\verb!is_Empty!\\
239Checks to see if the permutation is a set with zero elements
240
241
242\verb!is_Identity!\\
243Returns True if the Permutation is an identity permutation.
244
245
246\verb!is_Singleton!\\
247Checks to see if the permutation contains only one number and
248 is thus the only possible permutation of this set of numbers.
249
250
251 \verb!is_even!\\
252Checks if a permutation is even.
253
254
255\verb!is_odd!\\
256Checks if a permutation is odd.
257
258
259\verb!josephus(m, n, s=1)!\\
260Return as a permutation the shuffling of range(\verb!n!) using the Josephus scheme
261in which every \verb!m!-th item is selected until all have been chosen.
262
263
264\verb!length()!\\
265Returns the number of integers moved by a permutation.
266
267
268\verb!list(size=None)!\\
269Return the permutation as an explicit list
270
271
272\verb!max()!\\
273The maximum element moved by the permutation.
274
275
276\verb!min()!\\
277The minimum element moved by the permutation
278
279
280\verb!next_lex()!\\
281Returns the next permutation in lexicographical order.
282
283
284\verb!next_nonlex()!\\
285Returns the next permutation in nonlex order.
286
287
288\verb!next_trotterjohnson()!\\
289Returns the next permutation in Trotter-Johnson order.
290
291
292\verb!order()!\\
293Computes the order of a permutation.
294
295
296\verb!parity()!\\
297Computes the parity of a permutation.
298
299
300\verb!random(n)!\\
301Generates a random permutation of length \verb!n!.
302
303
304\verb!rank(i=None)!\\
305Returns the lexicographic rank of the permutation
306(default) or the \verb!i!th ranked permutation of self.
307
308
309\verb!rank_nonlex(inv_perm=None)!\\
310This is a linear time ranking algorithm
311that does not enforce lexicographic order.
312
313
314\verb!rank_trotterjohnson()!\\
315Returns the Trotter Johnson rank, which we get from the minimal change algorithm.
316
317
318\verb!static rmul(*args)!\\
319Return product of Permutations $[a, b, c, \ldots]$ as the Permutation whose $i$th value is $a(b(c(i)))$.
320
321
322\verb!runs()!\\
323Returns the runs of a permutation.
324
325
326\verb!signature()!\\
327Gives the signature of the permutation needed to place the elements
328 of the permutation in canonical order.
329
330
331\verb!size!\\
332Returns the number of elements in the permutation.
333
334
335\verb!support()!\\
336Return the elements in permutation, $P$, for which $P[i] \neq i$.
337
338
339
340\verb!transpositions()!\\
341Return the permutation decomposed into a list of transpositions.
342
343
344\verb!unrank_lex(size, rank)!\\
345Lexicographic permutation unranking.
346
347
348
349\verb!unrank_nonlex(n, r)!\\
350This is a linear time unranking algorithm that does not respect lexicographic order.
351
352
353\verb!unrank_trotterjohnson(size, rank)!\\
354Trotter Johnson permutation unranking.
355
356\subsection{Subclass \texttt{Cycle(*args)}}
357Wrapper around dict which provides the functionality of a disjoint cycle.
358
359
360\subsection{Subclass \texttt{Generators}}
361
362\verb!symmetric(n)!\\
363Generates the symmetric group of order \verb!n!, \verb!Sn!.
364
365
366\verb!cyclic(n)!\\
367Generates the cyclic group of order \verb!n, Cn!.
368
369
370\verb!alternating(n)!\\
371Generates the alternating group of order \verb!n, An!
372
373
374\verb!dihedral(n)!\\
375Generates the dihedral group of order \verb!2n, Dn!.
376
377
378\section{PermutationGroup}
379Path : \verb!sympy.combinatorics.perm_groups.PermutationGroup!
380
381
382\subsection{Methods}
383\verb!base!\\
384Return a base from the Schreier-Sims algorithm.
385
386\verb!baseswap(base, strong_gens, pos, randomized=False,!\\
387\verb!transversals=None, basic_orbits=None,! \\
388\verb!strong_gens_distr=None)!\\
389Swap two consecutive base points in base and strong generating set.
390
391
392
393\verb!basic_orbits!\\
394Return the basic orbits relative to a base and strong generating set.
395
396
397
398\verb!basic_stabilizers!\\
399Return a chain of stabilizers relative to a base and strong generating set.
400
401
402
403\verb!basic_transversals!\\
404Return basic transversals relative to a base and strong generating set.
405
406
407
408\verb!center()!\\
409Return the center of a permutation group.
410
411
412
413\verb!centralizer(other)!\\
414Return the centralizer of a group/set/element.
415
416
417
418\verb!commutator(G, H)!\\
419Return the commutator of two subgroups.
420
421
422\verb!contains(g, strict=True)!\\
423Test if permutation \verb!g! belong to self.
424
425
426
427\verb!coset_factor(g, af=False)!\\
428Return G's (self's) coset factorization, \verb!f,! of \verb!g!.
429
430
431
432
433\verb!coset_rank(g)!\\
434rank using Schreier-Sims representation
435
436
437
438\verb!coset_unrank(rank, af=False)!\\
439unrank using Schreier-Sims representation
440
441
442
443\verb!degree!\\
444Returns the size of the permutations in the group.
445
446
447
448\verb!derived_series()!\\
449Return the derived series for the group.
450
451
452\verb!derived_subgroup()!\\
453Compute the derived subgroup.
454
455
456\verb!generate(method='coset', af=False)!\\
457Return iterator to generate the elements of the group
458
459
460\verb!generate_dimino(af=False)!\\
461Yield group elements using Dimino's algorithm
462
463
464\verb!generate_schreier_sims(af=False)!\\
465Yield group elements using the Schreier-Sims representation.
466
467
468
469\verb!generators!\\
470Returns the generators of the group.
471
472
473
474
475\verb!is_abelian!\\
476Test if the group is Abelian.
477
478
479\verb!is_alt_sym(eps=0.05, _random_prec=None)!\\
480Monte Carlo test for the symmetric/alternating group for degrees $>= 8$.
481
482
483
484\verb!is_group()!\\
485Return True if the group if identity is present, the inverse of every element is also an element, and the product of any two elements is also an element.
486
487
488
489\verb!is_nilpotent!\\
490Test if the group is nilpotent.
491
492
493\verb!is_normal(gr)!\\
494Test if G=self is a normal subgroup of \verb!gr!.
495
496
497\verb!is_primitive(randomized=True)!\\
498Test if a group is primitive.
499
500
501\verb!is_solvable!\\
502Test if the group is solvable.
503
504
505\verb!is_subgroup(G, strict=True)!\\
506Return True if all elements of self belong to G.
507
508
509
510\verb!is_transitive(strict=True)!\\
511Test if the group is transitive.
512
513
514\verb!is_trivial!\\
515Test if the group is the trivial group.
516
517
518\verb!lower_central_series()! \\
519Return the lower central series for the group.
520
521
522\verb!make_perm(n, seed=None)!\\
523Multiply n randomly selected permutations from pgroup together, starting with the identity permutation.
524
525
526
527\verb!max_div!\\
528Maximum proper divisor of the degree of a permutation group.
529
530
531
532\verb!minimal_block(points)!\\
533For a transitive group, finds the block system generated by \verb!points!.
534
535
536
537\verb!normal_closure(other, k=10)!\\
538Return the normal closure of a subgroup/set of permutations.
539
540
541\verb!orbit(alpha, action='tuples')!\\
542Compute the orbit of alpha \verb!\{g(\alpha) | g \in G\}! as a set.
543
544
545\verb!orbit_rep(alpha, beta, schreier_vector=None)!\\
546Return a group element which sends \verb!alpha! to \verb!beta!.
547
548
549\verb!orbit_transversal(alpha, pairs=False)!\\
550Computes a transversal for the orbit of \verb!alpha! as a set.
551
552
553\verb!orbits(rep=False)!\\
554Return the orbits of self, ordered according to lowest element in each orbit.
555
556
557\verb!order()!\\
558Return the number of permutations that can be generated from elements of the group.
559
560
561
562\verb!pointwise_stabilizer(points, incremental=False)!\\
563Return the pointwise stabilizer for a set of points.
564
565
566
567\verb!random(af=False)!\\
568Return a random group element.
569
570
571
572\verb!random_pr(gen_count=11, iterations=50, _random_prec=None)!\\
573Return a random group element using product replacement.
574
575
576\verb!random_stab(alpha, schreier_vector=None, _random_prec=None)!\\
577Random element from the stabilizer of \verb!alpha!.
578
579
580\verb!schreier_sims()!\\
581Schreier-Sims algorithm.
582
583
584
585\verb!schreier_sims_incremental(base=None, gens=None)!\\
586Extend a sequence of points and generating set to a base and strong generating set.
587
588
589
590\verb!schreier_sims_random(base=None, gens=None,!\\
591
592
593
594\verb! consec_succ=10, _random_prec=None)!\\
595Randomized Schreier-Sims algorithm.
596
597
598
599\verb!schreier_vector(alpha)! \\
600Computes the schreier vector for \verb!alpha!.
601
602
603\verb!stabilizer(alpha)!\\
604Return the stabilizer subgroup of \verb!alpha!.
605
606
607\verb!stabilizer_cosets(af=False)!\\
608Return a list of cosets of the stabilizer chain of the group as computed by the Schreir-Sims algorithm.
609
610
611
612\verb!stabilizer_gens(af=False)!\\
613Return the generators of the chain of stabilizers of the Schreier-Sims representation.
614
615
616
617\verb!strong_gens!\\
618Return a strong generating set from the Schreier-Sims algorithm.
619
620
621
622\verb!subgroup_search(prop, base=None, strong_gens=None,!\\
623
624
625
626\verb!tests=None, init_subgroup=None)!\\
627Find the subgroup of all elements satisfying the property prop.
628
629
630\verb!transitivity_degree!\\
631Compute the degree of transitivity of the group.
632
633
634\section{Polyhedron}
635Path : \verb!sympy.combinatorics.polyhedron.Polyhedron!\\
636Represents the polyhedral symmetry group (PSG).
637\subsection{Methods}
638\verb!array_form!\\
639Return the indices of the corners.
640
641
642\verb!corners!\\
643Get the corners of the Polyhedron.
644
645
646
647\verb!cyclic_form!\\
648Return the indices of the corners in cyclic notation.
649
650
651\verb!edges!\\
652Given the faces of the polyhedra we can get the edges.
653
654
655\verb!faces!\\
656Get the faces of the Polyhedron.
657
658
659
660\verb!pgroup!\\
661Get the permutations of the Polyhedron.
662
663
664
665\verb!reset()!\\
666Return corners to their original positions.
667
668
669
670\verb!rotate(perm)!\\
671Apply a permutation to the polyhedron in place.
672
673
674\verb!size!\\
675Get the number of corners of the Polyhedron.
676
677\verb!vertices!\\
678Get the corners of the Polyhedron.
679
680\section{Prufer}
681Path: \verb!sympy.combinatorics.prufer.Prufer!\\
682The Prufer correspondence is an algorithm that describes the bijection
683 between labeled trees and the Prufer code.
684  A Prufer code of a labeled tree is unique up to
685   isomorphism and has a length of $n - 2$.
686\subsection{Methods}
687
688
689\verb!static edges(*runs)!\\
690Return a list of edges and the number of nodes from the given
691 runs that connect nodes in an integer-labelled tree.
692
693 \verb!next(delta=1)!\\
694Generates the Prufer sequence that is delta beyond the current one.
695
696
697\verb!nodes!\\
698Returns the number of nodes in the tree.
699
700
701\verb!prev(delta=1)!\\
702Generates the Prufer sequence that is -delta before the current one.
703
704
705
706\verb!prufer_rank()!\\
707Computes the rank of a Prufer sequence.
708
709
710\verb!prufer_repr!\\
711Returns Prufer sequence for the Prufer object.
712
713
714\verb!rank!\\
715Returns the rank of the Prufer sequence.
716
717
718\verb!size!\\
719Return the number of possible trees of this Prufer object.
720
721
722
723\verb!static to_prufer(tree, n)!\\
724Return the Prufer sequence for a tree given as a list of edges where n is the number of nodes in the tree.
725
726
727
728\verb!static to_tree(prufer)!\\
729Return the tree (as a list of edges) of the given Prufer sequence.
730
731
732
733\verb!tree_repr!\\
734Returns the tree representation of the Prufer object.
735
736
737\verb!unrank(rank, n)!\\
738Finds the unranked Prufer sequence.
739
740
741\section{Subset}
742Path: \verb!sympy.combinatorics.subsets.Subset!\\
743Represents a basic subset object.
744
745\subsection{Methods}
746
747\verb!bitlist_from_subset(subset, superset)!\\
748Gets the bitlist corresponding to a subset.
749
750
751\verb!cardinality!\\
752Returns the number of all possible subsets.
753
754
755
756\verb!iterate_binary(k)!\\
757This is a helper function. It iterates over the binary subsets by k steps. This variable can be both positive or negative.
758
759
760
761\verb!iterate_graycode(k)!\\
762It performs k step overs to get the respective Gray codes.
763
764
765\verb!next_binary()!\\
766Generates the next binary ordered subset.
767
768
769\verb!next_gray()!\\
770Generates the next Gray code ordered subset.
771
772
773\verb!next_lexicographic()!\\
774Generates the next lexicographically ordered subset. NOT IMPLEMENTED
775
776\verb!prev_binary()!\\
777Generates the previous binary ordered subset.
778
779
780
781\verb!prev_gray()!\\
782Generates the previous Gray code ordered subset.
783
784
785
786\verb!prev_lexicographic()!\\
787Generates the previous lexicographically ordered subset. NOT IMPLEMENTED
788
789\verb!rank_binary!\\
790Computes the binary ordered rank.
791
792
793
794\verb!rank_gray!\\
795Computes the Gray code ranking of the subset.
796
797
798\verb!rank_lexicographic!\\
799Computes the lexicographic ranking of the subset.
800
801
802
803\verb!size!\\
804Gets the size of the subset.
805
806
807
808\verb!subset!\\
809Gets the subset represented by the current instance.
810
811
812\verb!subset_from_bitlist(super_set, bitlist)!\\
813Gets the subset defined by the \verb!bitlist!.
814
815
816
817\verb!subset_indices(subset, superset)!\\
818Return indices of subset in superset in a list;
819the list is empty if all elements of \verb!subset! are not in \verb!superset!.
820
821
822\verb!superset!\\
823Gets the superset of the subset.
824
825
826\verb!superset_size!\\
827Returns the size of the superset.
828
829
830\verb!unrank_binary(rank, superset)!\\
831Gets the binary ordered subset of the specified rank.
832
833
834
835\verb!unrank_gray(rank, superset)!\\
836Gets the Gray code ordered subset of the specified rank.
837
838
839
840\verb!subsets.ksubsets(superset, k)!\\
841Finds the subsets of size \verb!k! in lexicographic order.
842
843
844\section{Gray Code}
845Path: \verb!sympy.combinatorics.graycode.GrayCode!
846A Gray code is essentially a Hamiltonian walk on an n-dimensional
847 cube with edge length of one. The vertices of the cube are
848 represented by vectors whose values are binary.
849 The Hamilton walk visits each vertex exactly once.
850
851\subsection{Methods}
852
853\verb!current!\\
854Returns the currently referenced Gray code as a bit string.
855
856
857\verb!generate_gray(**hints)!\\
858Generates the sequence of bit vectors of a Gray Code.
859
860
861
862\verb!n!\\
863Returns the dimension of the Gray code.
864
865
866\verb!next(delta=1)!\\
867Returns the Gray code a distance delta (default = 1) from the current value in canonical order.
868
869
870
871\verb!rank!\\
872Ranks the Gray code.
873
874
875
876\verb!selections!\\
877Returns the number of bit vectors in the Gray code.
878
879
880
881\verb!skip()!\\
882Skips the bit generation.
883
884
885\verb!unrank(n, rank)!\\
886Unranks an n-bit sized Gray code of rank k.
887This method exists so that a derivative GrayCode class can define its own code of a given rank.
888
889
890\verb!graycode.random_bitstring(n)!\\
891Generates a random bitlist of length n.
892
893
894\verb!graycode.gray_to_bin(bin_list)!\\
895Convert from Gray coding to binary coding.
896
897
898\verb!graycode.bin_to_gray(bin_list)!\\
899Convert from binary coding to gray coding.
900
901
902
903\verb!graycode.get_subset_from_bitstring(super_set, bitstring)!\\
904Gets the subset defined by the bitstring.
905
906
907
908\verb!graycode.graycode_subsets(gray_code_set)!\\
909Generates the subsets as enumerated by a Gray code.
910
911
912
913\section{Named Groups}
914Path: \verb!sympy.combinatorics.named_groups!\\
915
916\subsection{Methods}
917
918\verb!SymmetricGroup(n)!\\
919Generates the symmetric group on \verb!n! elements as a permutation group.
920
921
922
923\verb!CyclicGroup(n)!\\
924Generates the cyclic group of order n as a permutation group.
925
926
927\verb!DihedralGroup(n)!\\
928Generates the dihedral group Dn as a permutation group.
929
930
931
932\verb!AlternatingGroup(n)!\\
933Generates the alternating group on \verb!n! elements as a permutation group.
934
935
936
937\verb!AbelianGroup(*cyclic_orders)!\\
938Returns the direct product of cyclic groups with the given orders.
939
940
941
942\section{Utilities}
943Path: \verb!sympy.combinatorics.util!
944
945\subsection{Methods}
946\verb!_base_ordering(base, degree)!\\
947Order $\{0,1,\ldots,n\}$ so that base points come first and in order
948
949
950\verb!_check_cycles_alt_sym(perm)!\\
951Checks for cycles of prime length $p$ with $n/2 < p < n-2$.
952
953
954
955\verb!_distribute_gens_by_base(base, gens)!\\
956Distribute the group elements \verb!gens! by membership in basic stabilizers.
957
958
959\verb!_handle_precomputed_bsgs(base, strong_gens,!\\
960\verb!transversals=None, basic_orbits=None,!\\
961\verb!strong_gens_distr=None)!\\
962Calculate BSGS-related structures from those present.
963
964
965\verb!_orbits_transversals_from_bsgs(base, strong_gens_distr,!\\
966\verb!transversals_only=False)!\\
967Compute basic orbits and transversals from a base and strong generating set.
968
969
970
971\verb!_remove_gens(base, strong_gens,!
972\verb!basic_orbits=None, strong_gens_distr=None)!\\
973Remove redundant generators from a strong generating set.
974
975
976\verb!_strip(g, base, orbits, transversals)!\\
977Attempt to decompose a permutation using a (possibly partial) BSGS structure.
978
979
980\verb!_strong_gens_from_distr(strong_gens_distr)!\\
981Retrieve strong generating set from generators of basic stabilizers.
982
983
984
985\section{Group Constructors}
986Path: \verb!sympy.combinatorics.group_constructs!
987
988\subsection{Method}
989\verb!DirectProduct(*groups)!\\
990Returns the direct product of several groups as a permutation group.
991
992
993
994
995\section{Test Utilities}
996Path: \verb!sympy.combinatorics.testutil!
997
998\subsection{Methods}
999\verb!_cmp_perm_lists(first, second)!\\
1000Compare two lists of permutations as sets.
1001
1002\verb!_naive_list_centralizer(self, other)!\\
1003
1004
1005\verb!_verify_bsgs(group, base, gens)!\\
1006Verify the correctness of a base and strong generating set.
1007
1008\verb!_verify_centralizer(group, arg, centr=None)!\\
1009Verify the centralizer of a group/set/element inside another group.
1010
1011\verb!_verify_normal_closure(group, arg, closure=None)!\\
1012
1013
1014
1015\rule{0.3\linewidth}{0.25pt}
1016\scriptsize\\
1017https://www.sympy.org/cheatsheets
1018
1019
1020\end{multicols}
1021\end{document}
1022