@@ -16,8 +16,10 @@ permuta
1616 :alt: Travis
1717 :target: https://travis-ci.org/PermutaTriangle/Permuta
1818.. image :: https://requires.io/github/PermutaTriangle/Permuta/requirements.svg?branch=master
19- :target: https://requires.io/github/PermutaTriangle/Permuta/requirements/?branch=master
20- :alt: Requirements Status
19+ :target: https://requires.io/github/PermutaTriangle/Permuta/requirements/?branch=master
20+ :alt: Requirements Status
21+ .. image :: https://zenodo.org/badge/DOI/10.5281/zenodo.4725759.svg
22+ :target: https://doi.org/10.5281/zenodo.4725759
2123
2224Permuta is a Python library for working with perms (short for permutations),
2325patterns, and mesh patterns.
@@ -235,6 +237,22 @@ and a class (no class will use the set of all permutations).
235237 [14 ] Longest increasing subsequence
236238 [15 ] Longest decreasing subsequence
237239 [16 ] Depth
240+ [17 ] Number of bounces
241+ [18 ] Maximum drop size
242+ [19 ] Number of primes in the column sums
243+ [20 ] Holeyness of a permutation
244+ [21 ] Number of stack- sorts needed
245+ [22 ] Number of pop- stack- sorts needed
246+ [23 ] Number of pinnacles
247+ [24 ] Number of cyclic peaks
248+ [25 ] Number of cyclic valleys
249+ [26 ] Number of double excedance
250+ [27 ] Number of double drops
251+ [28 ] Number of foremaxima
252+ [29 ] Number of afterminima
253+ [30 ] Number of aftermaxima
254+ [31 ] Number of foreminima
255+
238256 >> > depth = PermutationStatistic.get_by_index(16 )
239257 >> > depth.distribution_for_length(5 )
240258 [1 , 4 , 12 , 24 , 35 , 24 , 20 ]
@@ -251,6 +269,8 @@ Given a bijection as a dictionary, we can check which statistics are preserved w
251269 ... print (stat)
252270 Number of peaks
253271 Number of valleys
272+ Holeyness of a permutation
273+ Number of pinnacles
254274
255275 We can find all (predefined) statistics equally distributed over two permutation
256276classes with ``equally_distributed ``. We also support checks for joint distribution
@@ -272,6 +292,7 @@ of jointly distributed stats with ``jointly_transformed_equally_distributed``.
272292 Number of right- to- left maximas
273293 Longest increasing subsequence
274294 Longest decreasing subsequence
295+ Number of pinnacles
275296
276297 The BiSC algorithm
277298==================
@@ -287,20 +308,19 @@ To use the algorithm we first need to import it.
287308 >> > from permuta.bisc import *
288309
289310 A classic example of a set of permutations described by pattern avoidance are
290- the permutations sortable in one pass through a stack. We start by loading a
291- function ``stack_sortable `` which returns ``True `` for permutations that
292- satisfy this property. The user now has two choices: Run
293- ``auto_bisc(stack_sortable) `` and let the algorithm run without any more user
294- input. It will try to use sensible values, starting by learning small patterns
295- from small permutations, and only considering longer patterns when that fails.
296- If the user wants to have more control over what happens that is also possible
297- and we now walk through that: We input the property into `` bisc `` and ask it to
298- search for patterns of length 3.
311+ the permutations sortable in one pass through a stack. We use the function
312+ ``stack_sortable `` which returns ``True `` for permutations that satisfy this
313+ property. The user now has two choices: Run
314+ ``auto_bisc(Perm. stack_sortable) `` and let the algorithm run
315+ without any more user input. It will try to use sensible values, starting by
316+ learning small patterns from small permutations, and only considering longer
317+ patterns when that fails. If the user wants to have more control over what
318+ happens that is also possible and we now walk through that: We input the
319+ property into `` bisc `` and ask it to search for patterns of length 3.
299320
300321.. code-block :: python
301322
302- >> > from permuta.bisc.perm_properties import stack_sortable
303- >> > bisc(stack_sortable, 3 )
323+ >> > bisc(Perm.stack_sortable, 3 )
304324 I will use permutations up to length 7
305325 {3 : {Perm((1 , 2 , 0 )): [set ()]}}
306326
@@ -315,7 +335,7 @@ be considered.
315335
316336.. code-block :: python
317337
318- >> > SG = bisc(stack_sortable, 3 , 5 )
338+ >> > SG = bisc(Perm. stack_sortable, 3 , 5 )
319339 >> > show_me(SG )
320340 There are 1 underlying classical patterns of length 3
321341 There are 1 different shadings on 120
@@ -341,8 +361,7 @@ patterns, such as the West-2-stack-sortable permutations
341361
342362.. code-block :: python
343363
344- >> > from permuta.bisc.perm_properties import west_2_stack_sortable
345- >> > SG = bisc(west_2_stack_sortable, 5 , 7 )
364+ >> > SG = bisc(Perm.west_2_stack_sortable, 5 , 7 )
346365 >> > show_me(SG )
347366 There are 2 underlying classical patterns of length 4
348367 There are 1 different shadings on 1230
@@ -394,7 +413,7 @@ which keeps them separated by length.
394413
395414.. code-block :: python
396415
397- >> > A, B = create_bisc_input(7 , west_2_stack_sortable)
416+ >> > A, B = create_bisc_input(7 , Perm. west_2_stack_sortable)
398417
399418 This creates two dictionaries with keys 1, 2, ..., 7 such that ``A[i] `` points
400419to the list of permutations of length ``i `` that are West-2-stack-sortable, and
@@ -476,3 +495,13 @@ License
476495#######
477496
478497BSD-3: see the `LICENSE <https://github.com/PermutaTriangle/Permuta/blob/master/LICENSE >`_ file.
498+
499+ Citing
500+ ######
501+
502+ If you found this library helpful with your research and would like to cite us,
503+ you can use the following `BibTeX `_ or go to `Zenodo `_ for alternative formats.
504+
505+ .. _BibTex : https://zenodo.org/record/4725759/export/hx#.YImTibX7SUk
506+
507+ .. _Zenodo : https://doi.org/10.5281/zenodo.4725759
0 commit comments