Skip to content
m·amathatlas
ExploreAboutOpen problemsCited authorsMy libraryFeedback
Sign in
FRENES
Loading views…Recent views only, across all languages. Vercel history is unavailable for this page. Repeat visits in the same tab are grouped for 30 minutes.
ShareLinkedInXFacebookWhatsApp
← All open problems
Unanswered question

An explicit "easily" computable-and-invertible mapping between permutations?

Combinatorics

Imported on November 28, 2026

The forum classified this question as unanswered when collected. This does not certify an open research problem; check the answers and revision history at the source.

Read the question with its definitions and background below. The source provides the full formulation and further discussion; the glossary and Wikipedia links offer additional reading aids.

Problem statement

TL;DR version: With the magician's back turned, a spectator shuffles a standard deck of n=52n=52n=52 playing cards and selects and arranges m=27m=27m=27 of them face-up in a row left to right. The magician's assistant turns one of these cards face-down, leaving the ordered arrangement otherwise undisturbed. The magician turns around, observes this arrangement with k=m−1=26k=m-1=26k=m−1=26 face-up cards, and announces the single face-down card. How do the magician and assistant perform this trick?

Details: I'm trying to generalize the ideas behind Fitch Cheney's "5-card trick," where a spectator selects m=5m=5m=5 cards, the assistant arranges k=4k=4k=4 of them in a row left to right to present to the magician, who announces the remaining card. This trick is feasible if and only if (nm)≤(n)k{n \choose m} \leq (n)_k(mn​)≤(n)k​ (where the RHS is the falling factorial); that is, considering the set UUU of possible mmm-card selections by the spectator and the set VVV of possible kkk-card arrangements that may be presented to the magician, the obvious necessary condition that ∣U∣≤∣V∣|U|\leq|V|∣U∣≤∣V∣ is also sufficient (this follows from the bi-regularity of the corresponding bipartite graph with vertex sets UUU and VVV).

There is a very simple "calculate-in-your-head" method for performing that original 5-card trick. But the above inequality suggests that the trick should be feasible in principle with a larger deck, using a maximum of n=124n=124n=124 cards; discussions suggest that Berlekamp and Kleber have actually performed this variant.

The proposed "27-card" variant above is interesting in that the spectator gets to arrange the selected cards; all the assistant can do is determine which of the cards to turn over. A similar counting argument shows that this trick should be feasible in principle, since (n)m≤(n)k(mk)(n)_m \leq (n)_k{m \choose k}(n)m​≤(n)k​(km​): the LHS counts ways for the spectator to select and arrange m=27m=27m=27 cards from the deck of nnn, and the RHS counts configurations that the magician may observe with k=m−1=26k=m-1=26k=m−1=26 face-up cards.

But I'm having difficulty coming up with an actual explicit construction of an appropriate mapping, even a formula that might be suitable for a computer version of the trick, let alone mental calculation.

(For another example demonstrating the idea: a spectator rolls m=6m=6m=6 dice each with n=6n=6n=6 sides and arranges them in any desired order left to right, the assistant covers some of the dice, leaving the k<mk<mk<m other dice showing, and the magician announces the value on the covered di(c)e. In this case, the trick is feasible if and only if nm≤nk(mk)n^m \leq n^k{m \choose k}nm≤nk(km​). For example, (n,m,k)=(10,10,9)(n,m,k)=(10,10,9)(n,m,k)=(10,10,9) corresponds to writing down a 10-digit number, covering one digit, and announcing that covered digit. This can be done by indexing the digit positions 0 through 9: the assistant covers the digit in position sss, where sss is the sum of the digits modulo 10. The magician computes the covered value as s−tmod  10s-t \mod 10s−tmod10, where ttt is the sum of the visible digits.)

Statement and context adapted from MathOverflow · possiblywrong

CC BY-SA 4.0 · Formatting adapted; mathematical formulas preserved · Source history

A few useful definitions

Bipartite graph
Its vertices can be split into two groups so that every edge runs between the groups.
Graph
A set of vertices connected by edges. A vertex’s degree counts the incident edges; the statement specifies whether directions or multiple edges are allowed.

Topics : co.combinatorics

Authors listed by the source : possiblywrong

Sources and original status

  • MathOverflow Status in source : unanswered at collection

Last activity on the question : December 3, 2025

Coverage, sources and method

This count measures imported entries, including distinct variants. It is not a count of all open mathematical questions worldwide. One entry may belong to several fields and sources.

This directory is neither exhaustive nor updated in real time. “Reported open” describes the source classification observed at import; imported entries have not each undergone independent mathematical verification. The 32 explained entries were reviewed separately.

Formal Conjectures: only “research open” statements with no reported formal proof are retained; their tag is checked in a pinned repository revision. Variants remain distinct. A “sorry” placeholder is not sufficient to establish open status.

Erdős: solved or independent problems and entries with a Lean solution are excluded, including “open (Lean)”. Exact matches to the main Formal Conjectures statements are merged.

Open Problem Garden: the open index is checked against the solved index; spam, identified clones and some outdated statuses are excluded. Statements and definition context are attributed to their original pages; formulas are preserved and the content remains under the GFDL. Recognized duplicates across sources are merged; this does not resolve every mathematical equivalence.

OEIS: direct extraction of conjectural comments and formulas, one entry per sequence, excluding mentioned resolutions. MathOverflow and Math Stack Exchange: questions classified as unanswered by their API, excluding closed posts and non-research categories. They remain distinct from problems reported open. This is a partial, dated collection; every entry credits its authors and license.

Documented exclusions account for recent announcements and conflicting statuses. A stronger variant or a special case can remain open after a different statement is settled.

Attribution: The Formal Conjectures Authors; teorth/erdosproblems and contributors; Open Problem Garden and contributors. Each source retains its license.

  • Formal Conjectures · 1,924 · Apache-2.0 / CC-BY-4.0
  • Erdős Problems (teorth) · 622 · Apache-2.0
  • Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
  • OEIS · 18,857 · CC BY-SA 4.0
  • MathOverflow · 19,035 · CC BY-SA (version on each entry)
  • Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)
Report a development or correction
mathatlas

An independent atlas to understand, read, and question research.

The papers present claimed results at different stages of verification.
NewsletterShare feedbackAbout Data and privacy
Created by Sonny Mupfuni