<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.formulasearchengine.com/index.php?action=history&amp;feed=atom&amp;title=Kuwahara_filter</id>
	<title>Kuwahara filter - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.formulasearchengine.com/index.php?action=history&amp;feed=atom&amp;title=Kuwahara_filter"/>
	<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/index.php?title=Kuwahara_filter&amp;action=history"/>
	<updated>2026-05-04T16:32:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0-wmf.28</generator>
	<entry>
		<id>https://en.formulasearchengine.com/index.php?title=Kuwahara_filter&amp;diff=29940&amp;oldid=prev</id>
		<title>en&gt;Monkbot: /* Bibliography */Fix CS1 deprecated date parameter errors</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/index.php?title=Kuwahara_filter&amp;diff=29940&amp;oldid=prev"/>
		<updated>2014-01-24T07:37:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Bibliography: &lt;/span&gt;Fix &lt;a href=&quot;/index.php?title=Help:CS1_errors&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Help:CS1 errors (page does not exist)&quot;&gt;CS1 deprecated date parameter errors&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In the mathematics of [[permutation]]s and the study of [[shuffling]] [[playing card]]s, a &amp;#039;&amp;#039;&amp;#039;riffle shuffle permutation&amp;#039;&amp;#039;&amp;#039; is one of the [[permutation]]s of a set of &amp;#039;&amp;#039;n&amp;#039;&amp;#039; items that can be obtained by a single [[shuffling|riffle shuffle]], in which a sorted deck of &amp;#039;&amp;#039;n&amp;#039;&amp;#039; cards is cut into two packets and then the two packets are interleaved (e.g. by moving cards one at a time from the bottom of one or the other of the packets to the top of the sorted deck).&lt;br /&gt;
&lt;br /&gt;
As a special case of this, a (&amp;#039;&amp;#039;p&amp;#039;&amp;#039;,&amp;#039;&amp;#039;q&amp;#039;&amp;#039;)-&amp;#039;&amp;#039;&amp;#039;shuffle&amp;#039;&amp;#039;&amp;#039;, for numbers &amp;#039;&amp;#039;p&amp;#039;&amp;#039; and &amp;#039;&amp;#039;q&amp;#039;&amp;#039; with &amp;#039;&amp;#039;p&amp;#039;&amp;#039;&amp;amp;nbsp;+&amp;amp;nbsp;&amp;#039;&amp;#039;q&amp;#039;&amp;#039;&amp;amp;nbsp;=&amp;amp;nbsp;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;, is a riffle in which the first packet has &amp;#039;&amp;#039;p&amp;#039;&amp;#039; cards and the second packet has &amp;#039;&amp;#039;q&amp;#039;&amp;#039; cards.&amp;lt;ref name=Weibel&amp;gt;Weibel, Charles (1994). &amp;#039;&amp;#039;An Introduction to Homological Algebra&amp;#039;&amp;#039;, p. 181. Cambridge University Press, Cambridge.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Combinatorial enumeration==&lt;br /&gt;
Since a (&amp;#039;&amp;#039;p&amp;#039;&amp;#039;,&amp;#039;&amp;#039;q&amp;#039;&amp;#039;)-shuffle is completely determined by how its first &amp;#039;&amp;#039;p&amp;#039;&amp;#039; elements are mapped, the number of (&amp;#039;&amp;#039;p&amp;#039;&amp;#039;,&amp;#039;&amp;#039;q&amp;#039;&amp;#039;)-shuffles is&lt;br /&gt;
:&amp;lt;math&amp;gt;\binom{p+q}{p}.&amp;lt;/math&amp;gt;&lt;br /&gt;
The [[wedge product]] of a &amp;#039;&amp;#039;p&amp;#039;&amp;#039;-form and a &amp;#039;&amp;#039;q&amp;#039;&amp;#039;-form can be defined as a sum over (&amp;#039;&amp;#039;p&amp;#039;&amp;#039;,&amp;#039;&amp;#039;q&amp;#039;&amp;#039;)-shuffles.&amp;lt;ref name=Weibel/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the number of distinct riffles is not quite the sum of this formula over all choices of &amp;#039;&amp;#039;p&amp;#039;&amp;#039; and &amp;#039;&amp;#039;q&amp;#039;&amp;#039; adding to &amp;#039;&amp;#039;n&amp;#039;&amp;#039; (which would be &amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;), because the [[identity permutation]] can be represented in multiple ways as a (&amp;#039;&amp;#039;p&amp;#039;&amp;#039;,&amp;#039;&amp;#039;q&amp;#039;&amp;#039;)-shuffle for different values of &amp;#039;&amp;#039;p&amp;#039;&amp;#039; and &amp;#039;&amp;#039;q&amp;#039;&amp;#039;.&lt;br /&gt;
Instead, the number of distinct riffle shuffle permutations of a deck of &amp;#039;&amp;#039;n&amp;#039;&amp;#039; cards, for &amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;amp;nbsp;=&amp;amp;nbsp;1, 2, 3, ..., is&lt;br /&gt;
:1, 2, 5, 12, 27, 58, 121, 248, 503, 1014, ... {{OEIS|id=A000325}}&lt;br /&gt;
More generally, the formula for this number is 2&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&amp;amp;nbsp;&amp;amp;minus;&amp;amp;nbsp;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;; for instance, there are 4503599627370444 riffle shuffle permutations of a 52-card deck.&lt;br /&gt;
&lt;br /&gt;
The number of permutations that are both a riffle shuffle permutation and the inverse permutation of a riffle shuffle is&amp;lt;ref name=&amp;quot;a99&amp;quot;&amp;gt;{{citation&lt;br /&gt;
 | last = Atkinson | first = M. D.&lt;br /&gt;
 | doi = 10.1016/S0012-365X(98)00162-9&lt;br /&gt;
 | issue = 1-3&lt;br /&gt;
 | journal = Discrete Mathematics&lt;br /&gt;
 | mr = 1663866&lt;br /&gt;
 | pages = 27–38&lt;br /&gt;
 | title = Restricted permutations&lt;br /&gt;
 | volume = 195&lt;br /&gt;
 | year = 1999}}.&amp;lt;/ref&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\binom{n+1}{3}+1.&amp;lt;/math&amp;gt;&lt;br /&gt;
For &amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;amp;nbsp;=&amp;amp;nbsp;1, 2, 3, ..., this is&lt;br /&gt;
:1, 2, 5, 11, 21, 36, 57, 85, 121, 166, 221, ... {{OEIS|id=A050407}}&lt;br /&gt;
and for &amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;amp;nbsp;=&amp;amp;nbsp;52 there are exactly 23427 invertible shuffles.&lt;br /&gt;
&lt;br /&gt;
==Random distribution==&lt;br /&gt;
The [[Gilbert–Shannon–Reeds model]] describes a random [[probability distribution]] on riffle shuffles that is a good match for observed human shuffles.&amp;lt;ref&amp;gt;{{citation&lt;br /&gt;
 | last = Diaconis | first = Persi | authorlink = Persi Diaconis&lt;br /&gt;
 | isbn = 0-940600-14-5&lt;br /&gt;
 | location = Hayward, CA&lt;br /&gt;
 | mr = 964069&lt;br /&gt;
 | publisher = Institute of Mathematical Statistics&lt;br /&gt;
 | series = Institute of Mathematical Statistics Lecture Notes—Monograph Series, 11&lt;br /&gt;
 | title = Group representations in probability and statistics&lt;br /&gt;
 | year = 1988}}.&amp;lt;/ref&amp;gt; In this model, the [[identity permutation]] has probability (&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;amp;nbsp;+&amp;amp;nbsp;1)/2&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt; of being generated, and all other riffle permutations have equal probability 1/2&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt; of being generated. Based on their analysis of this model, mathematicians have recommended that a deck of 52 cards be given seven riffles in order to thoroughly randomize it.&amp;lt;ref&amp;gt;{{citation|title=In Shuffling Cards, 7 Is Winning Number|first=Gina|last=Kolata|authorlink=Gina Kolata|journal=[[New York Times]]|url=http://www.nytimes.com/1990/01/09/science/in-shuffling-cards-7-is-winning-number.html|date=January 9, 1990}}.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Permutation patterns==&lt;br /&gt;
A [[permutation pattern|pattern]] in a permutation is a smaller permutation formed from a subsequence of some &amp;#039;&amp;#039;k&amp;#039;&amp;#039; values in the permutation by reducing these values to the range from 1 to &amp;#039;&amp;#039;k&amp;#039;&amp;#039; while preserving their order. Several important families of permutations can be characterized by a finite set of forbidden patterns, and this is true also of the riffle shuffle permutations: they are exactly the permutations that do not have 321, 2143, and 2413 as patterns.&amp;lt;ref name=&amp;quot;a99&amp;quot;/&amp;gt; Thus, for instance, they are a subclass of the [[vexillary permutation]]s, which have 2143 as their only minimal forbidden pattern.&amp;lt;ref&amp;gt;{{citation|title=Permutation patterns, continued fractions, and a group determined by an ordered set|url=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.103.2001&amp;amp;rep=rep1&amp;amp;type=pdf|first=Anders|last=Claesson|series=Ph.D. thesis|publisher=Department of Mathematics, Chalmers University of Technology|year=2004}}.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perfect shuffles==&lt;br /&gt;
A &amp;#039;&amp;#039;perfect shuffle&amp;#039;&amp;#039; is a riffle in which the deck is split into two equal-sized packets, and in which the interleaving between these two packets strictly alternates between the two. There are two types of perfect shuffle, an [[in shuffle]] and an [[out shuffle]], both of which can be performed consistently by some well-trained people. When a deck is repeatedly shuffled using these permutations, it remains much less random than with typical riffle shuffles, and it will return to its initial state after only a small number of perfect shuffles. In particular, a deck of 52 playing cards will be returned to its original ordering after 52 in shuffles or 8 out shuffles. This fact forms the basis of several magic tricks.&amp;lt;ref&amp;gt;{{citation&lt;br /&gt;
 | last1 = Diaconis | first1 = Persi | author1-link = Persi Diaconis&lt;br /&gt;
 | last2 = Graham | first2 = R. L. | author2-link = Ronald Graham&lt;br /&gt;
 | last3 = Kantor | first3 = William M.&lt;br /&gt;
 | doi = 10.1016/0196-8858(83)90009-X&lt;br /&gt;
 | issue = 2&lt;br /&gt;
 | journal = Advances in Applied Mathematics&lt;br /&gt;
 | mr = 700845&lt;br /&gt;
 | pages = 175–196&lt;br /&gt;
 | title = The mathematics of perfect shuffles&lt;br /&gt;
 | volume = 4&lt;br /&gt;
 | year = 1983}}.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Gilbreath shuffle|Gilbreath permutations]], the permutations formed by reversing one of the two packets of cards before riffling them&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Card shuffling]]&lt;br /&gt;
[[Category:Permutation patterns]]&lt;/div&gt;</summary>
		<author><name>en&gt;Monkbot</name></author>
	</entry>
</feed>