Papers
Topics
Authors
Recent
Search
2000 character limit reached

Card Trick Dynamics

Updated 5 July 2026
  • CARD is a discrete dynamical system where a card’s position is iteratively updated to converge to a unique fixed point.
  • The methodology uses simple linear functions to track card positions, revealing that finite iterations lead to convergence.
  • Generalizations to p×3 and p×q layouts illustrate the robustness of the fixed point mechanism and its broad applicability.

Searching arXiv for the specified paper and closely related work. arXiv search query: (Champanerkar et al., 2013) Stable Fixed Points of Card Trick Functions The 21-card trick can be formalized as a discrete dynamical system in which the only state variable is the position of the selected card in the deck. In "Stable Fixed Points of Card Trick Functions" (Champanerkar et al., 2013), the dealing, column identification, and recollection step is modeled by a simple linear discrete function whose repeated iteration sends every initial position to a single stable fixed point. The paper first analyzes the classical 21=7×321=7\times 3 case, then generalizes the construction to p×3p\times 3 and finally to p×qp\times q card layouts for odd integers p,q3p,q\ge 3. In this formulation, the apparent “magic” of the trick is the finite-time convergence of all possible starting positions to the midpoint of the deck.

1. Discrete-dynamical formulation of the trick

The paper treats the classic 21-card trick as a very simple discrete dynamical system: a selected card is tracked only by its position number, and each “deal, identify the column, and recollect with that column in the middle” step defines a function on positions (Champanerkar et al., 2013). This replaces any appeal to sleight or hidden information with an explicit state-transition rule.

For the original arrangement, the 21 cards are placed in a 7×37\times 3 grid. If the selected card is in position nn, the position is written uniquely as

n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,

where kk is the row number and ll encodes the column. Specifically, l=2,1,0l=2,1,0 correspond to columns p×3p\times 30, respectively. The recollection rule is fixed: the indicated column is placed in the middle of the stack.

Because there are 7 cards in each column, and because the selected card sits in row p×3p\times 31, the paper defines the map

p×3p\times 32

for p×3p\times 33. This function models one complete round of the classical trick. Conceptually, the rule depends only on coarse row information after the redeal; the exact initial position is progressively discarded under iteration.

2. The classical p×3p\times 34-card case and its fixed point

In the p×3p\times 35 case, the fixed point is the middle position of the 21-card pile, namely p×3p\times 36 (Champanerkar et al., 2013). The verification is direct: p×3p\times 37 so p×3p\times 38, and therefore

p×3p\times 39

This midpoint interpretation is structurally important. The selected card is not merely forced into a narrow interval; it is driven to a single invariant position under the recollection rule. The paper includes a table showing the evolution of every starting position. For example, positions p×qp\times q0 all move to p×qp\times q1 after one round, then to p×qp\times q2, then to p×qp\times q3; positions p×qp\times q4 already move to p×qp\times q5 after the first round and stay there. The accompanying figure visualizes this convergence.

This fixed-point description gives a precise explanation of the standard performance rule that the procedure is repeated three times total. The familiar outcome—revelation of the 11th card—is therefore the observable consequence of an invariant of the induced position map, not an isolated combinatorial coincidence.

3. Stability and finite-time convergence

The stability argument in the paper is purely discrete. Starting from any initial position p×qp\times q6, one has

p×qp\times q7

which forces

p×qp\times q8

Writing p×qp\times q9 then implies

p,q3p,q\ge 30

Applying p,q3p,q\ge 31 again gives

p,q3p,q\ge 32

so

p,q3p,q\ge 33

hence p,q3p,q\ge 34. One more iteration yields

p,q3p,q\ge 35

Therefore,

p,q3p,q\ge 36

The paper describes p,q3p,q\ge 37 as a unique attracting fixed point, and the fixed point is stable because a whole neighborhood of inputs is mapped closer and closer to the point until all positions collapse to it after finitely many steps (Champanerkar et al., 2013). In this setting, stability is not established by calculus or local linearization, but by interval compression and exact iteration. This suggests a finite-state analogue of attraction: every orbit enters successively smaller blocks until only the midpoint remains.

The guarantee of the trick is thus stronger than asymptotic convergence. In the classical case, convergence occurs after exactly three iterations for every initial state.

4. Generalization to the p,q3p,q\ge 38 trick

The paper next generalizes the p,q3p,q\ge 39 trick to a 7×37\times 30 card trick, where 7×37\times 31 is an odd integer 7×37\times 32 (Champanerkar et al., 2013). The deck has 7×37\times 33 cards arranged in 7×37\times 34 rows and 3 columns, and again any position is written as

7×37\times 35

After one round, the selected card lands at

7×37\times 36

This is the corresponding discrete map for the 7×37\times 37 trick. Its fixed point is the middle position of the 7×37\times 38-card pile: 7×37\times 39 The paper verifies this by writing

nn0

so the row index is nn1, and substituting into nn2 gives

nn3

The stability proof again proceeds by tracking row indices through repeated iterations. The first iterate satisfies

nn4

which implies

nn5

The paper continues this bounding argument and proves by induction that if nn6, then after at most nn7 iterations the card reaches the fixed point nn8. In particular, for nn9 one gets n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,0, recovering the 21-card trick.

The first few cases are summarized explicitly: n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,1 has fixed point n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,2, n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,3 has fixed point n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,4, and n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,5 has fixed point n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,6. The general mechanism is unchanged: repeated recollection with the chosen column in the middle forces the selected card toward the midpoint row and then to the midpoint position.

5. Generalization to the n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,7 trick

The full generalization considers a n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,8 card trick, where both n=3kl,1k7,0l2,n=3k-l,\qquad 1\le k\le 7,\quad 0\le l\le 2,9 and kk0 are odd integers at least 3 (Champanerkar et al., 2013). The deck now has kk1 cards arranged in kk2 rows and kk3 columns, and the position is written as

kk4

The same recollection rule is used: the chosen column is placed in the middle of the stack, with kk5 columns above it and kk6 columns below it.

The resulting map is

kk7

The fixed point is the midpoint of the full deck: kk8 The paper verifies this directly by observing that

kk9

so the middle row index is ll0. Substituting gives

ll1

For stability, the paper uses a discrete-block argument. First, if the selected card is already in the middle row, then one more iteration sends it directly to the fixed point: ll2 Second, if the selected card lies anywhere in the block of ll3 rows centered at the middle row, then after one application of ll4 it lands in the middle row, and then a second application reaches the fixed point: ll5

This already proves stability when ll6, because then the entire deck lies inside that middle block of ll7 rows. When ll8, the deck is partitioned into blocks of ll9 rows above and below the middle block. The key inductive claim is that if the selected card starts in a block at distance l=2,1,0l=2,1,00 from the middle, then one application of l=2,1,0l=2,1,01 moves it to a block one step closer to the middle. Repeating this finitely many times eventually places it in the middle block, after which two more steps reach the fixed point. The paper therefore proves that l=2,1,0l=2,1,02 is a stable fixed point for all odd l=2,1,0l=2,1,03.

6. Conceptual significance and relation to later generalizations

The paper’s contribution is to recast the card trick as a discrete dynamical system with an attracting fixed point (Champanerkar et al., 2013). The dealing and reordering procedure induces a function that systematically discards information about the exact starting position and preserves only coarse row information, and each iteration pushes the card closer to the middle until the entire uncertainty collapses to the unique stable midpoint. The 21-card trick is the smallest nontrivial instance of this mechanism, and the general l=2,1,0l=2,1,04 version shows that the same stability phenomenon governs a broad class of card tricks.

A related later treatment, "The 21 Card Trick and its Generalization" (Deb, 2018), reformulates the process with the notation l=2,1,0l=2,1,05, where l=2,1,0l=2,1,06 is the total number of cards, l=2,1,0l=2,1,07 the number of stacks, l=2,1,0l=2,1,08 the number of stacks placed above the chosen stack, and l=2,1,0l=2,1,09 the number of iterations. That paper gives a complete solvability classification for arbitrary deck sizes under the divisibility assumption p×3p\times 300, including the statements that p×3p\times 301 is not solvable for p×3p\times 302, that top placement yields final position p×3p\times 303, that bottom placement yields final position p×3p\times 304, and that for interior placements p×3p\times 305 solvability holds if and only if p×3p\times 306 with p×3p\times 307 (Deb, 2018). This later framework is broader in arithmetic scope, whereas the 2013 paper isolates the fixed-point mechanism itself.

A plausible implication is that the 2013 analysis supplies the dynamical-systems core of the phenomenon, while the 2018 classification reorganizes the same kind of position update into a more general ceiling-function and solvability framework. In both approaches, the key mathematical content is identical in spirit: the trick succeeds because repeated structured redealing compresses the set of possible positions until only one remains.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to CARD.