A092113
Triangle read by rows: T(n,k) is the number of stacks of n pancakes requiring k = 0, ..., A058986(n) flips to sort.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 1, 1, 3, 6, 11, 3, 1, 4, 12, 35, 48, 20, 1, 5, 20, 79, 199, 281, 133, 2, 1, 6, 30, 149, 543, 1357, 1903, 1016, 35, 1, 7, 42, 251, 1191, 4281, 10561, 15011, 8520, 455, 1, 8, 56, 391, 2278, 10666, 38015, 93585, 132697, 79379, 5804, 1, 9, 72, 575
Offset: 1
Triangle begins:
1;
1, 1;
1, 2, 2, 1;
1, 3, 6, 11, 3;
1, 4, 12, 35, 48, 20;
...
From _Jon E. Schoenfield_, Dec 16 2021: (Start)
For n=3, the 3! = 6 permutations are {1,2,3}, {1,3,2}, {2,1,3}, {2,3,1}, {3,1,2}, and {3,2,1}. Of these,
T(3,0)=1 permutation (namely, {1,2,3}) requires no prefix reversals (because it is already sorted);
T(3,1)=2 permutations (namely, {2,1,3} and {3,2,1}) require one prefix reversal, e.g., {2,1,3} -> {1,2,3};
T(3,2)=2 permutations (namely, {2,3,1} and {3,1,2}) require two prefix reversals, e.g., {2,3,1} -> {3,2,1} -> {1,2,3}; and
T(3,3)=1 permutation (namely, {1,3,2}) requires 3 prefix reversals: {1,3,2} -> {3,1,2} -> {2,1,3} -> {1,2,3};
thus, the terms in row n=3 are 1, 2, 2, 1. (End)
A359141
First differences of the pancake flipping (or sorting by prefix reversal) sequence A058986.
Original entry on oeis.org
1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 1
Original entry on oeis.org
0, 1, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15
Offset: 1
A048200
Minimal length pair-exchange / set-rotate sequence to reverse n distinct ordered elements.
Original entry on oeis.org
0, 1, 2, 4, 10, 15, 23, 32, 42, 55, 67, 84, 98, 119
Offset: 1
a(4) = 4 since "xrrx" is the shortest sequence reversing "ABCD". Explicitly, (begin) ABCD, (x)-> BACD, (r)-> ACDB, (r) -> CDBA, (x)-> DCBA.
- Danilo Bazzanella, Antonio Di Scala, Simone Dutto, and Nadir Murru, Primality tests, linear recurrent sequences and the Pell equation, arXiv:2002.08062 [math.NT], 2020.
- Sean A. Irvine, Java program (github)
- Dmitry Kamenetsky, Best known solutions for n <= 16.
- Sai Satwik Kuppili, C++ program for generating the moves for a given n
- Sai Satwik Kuppili and Bhadrachalam Chitturi, Exact upper bound for sorting R_n with LE, University of Texas at Dallas (2019).
- Sai Satwik Kuppili and Bhadrachalam Chitturi, An upper bound for sorting R_n with LRE, arXiv:2002.07342 [cs.DS], 2020.
- Sai Satwik Kuppili and Bhadrachalam Chitturi, Exact upper bound for sorting R_n with LE, Discrete Mathematics, Algorithms and Applications, 2020.
- Kevin Ryde, C Code
-
/* See links. */
-
/* See links. */
A078941
Flipping burnt pancakes. Maximum number of spatula flips to sort a stack of n pancakes of different sizes, each burnt on one side, so that the smallest ends up on top, ..., the largest at the bottom and each has its burnt side down.
Original entry on oeis.org
1, 4, 6, 8, 10, 12, 14, 15, 17, 18, 19, 21
Offset: 1
- David S. Cohen and Manuel Blum, "On the problem of sorting burnt pancakes", Discrete Applied Math., 61 (1995) 105-120.
Two new terms added from a 2009 presentation. See the University of Montreal link below. D.J. Schreffler (dj_schreffler(AT)hotmail.com), Apr 17 2010
A067607
Number of stacks of n pancakes requiring a maximum number of flips to order.
Original entry on oeis.org
1, 1, 1, 3, 20, 2, 35, 455, 5804, 73232, 6, 167, 2001, 24974, 339220, 4646117, 65758725
Offset: 1
- Josef Cibulka, Average number of flips in pancake sorting, arXiv:0901.3119 [cs.DM], 2009.
- Josef Cibulka, On average and highest number of flips in pancake sorting, Theoretical Computer Science, Volume 412, Issue 8-10, March 2011, pp 822-834.
- Josef Cibulka, Pancake sorting, webpage.
- Mohammad Hossain Heydari and Ivan Hal Sudborough, On the Diameter of the Pancake Network, Journal of Algorithms, Volume 25, Issue 1 Oct. 1997, pp. 67-94.
- Eric Weisstein's World of Mathematics, Pancake Sorting.
- Wikipedia, Pancake sorting.
Corrected and extended by
Rob Pratt, Feb 21 2004
A078942
Flipping burnt pancakes. Given a sorted stack of n burnt pancakes of different sizes (smallest on top, ..., largest at the bottom), each with its burnt side up, a(n) is the number of spatula flips needed to restore them to their initial order but with the burnt sides down.
Original entry on oeis.org
1, 4, 6, 8, 10, 12, 14, 15, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29
Offset: 1
- David S. Cohen and Manuel Blum, "On the problem of sorting burnt pancakes", Discrete Applied Math., 61 (1995) 105-120.
A131209
Maximal distance between two signed permutations of n elements.
Original entry on oeis.org
0, 1, 3, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 0
Brian Hayes, Oct 26 2007, based on email from Glenn Tesler (gptesler(AT)math.ucsd.edu)
- Brian Hayes, Sorting out the genome, Amer. Scientist, 95 (2007), 386-391.
A271474
Maximal number of flips required to sort a stack of n unburnt pancakes using the big-3 flips.
Original entry on oeis.org
0, 1, 3, 4, 8, 12, 15, 21, 27, 35, 42, 50
Offset: 1
Showing 1-9 of 9 results.
Comments