Revealing the magic of the Spring Festival Gala, Peking University and Jida have issued articles one

Mondo Entertainment Updated on 2024-02-14

Recently.

The magic of the Spring Festival Gala was revealed on the Internet.

In fact, it is a mathematical "Joseph's problem".

After reading what netizens posted.

complex".

Last night. Nigmat responded on social **.

I can understand a word and count you as losing."

Peking University, Jilin University.

also published one after another.

The "Joseph Problem" was explained

Let's take a look at Peking University's "reveal" first:

What is the "Joseph Problem"?

Peking University explained in the text:

There are numbered 1 and 2 ,..N people of n form a circle, starting from the first person to report the number, stop reporting when reporting to m, and the person who reports m goes out of the circle. Then re-report the number from his next person, stop reporting the number when reporting m, and report m out of the circle. Follow this rule until everyone is out of the circle. Ask for the number of the last person left.

To simplify the problem, let's consider the case where n individual number is 0 n-1, and every m individual exits one person, which we call the (n, m) problem.

After the first person (i.e., the person numbered with the same remainder m under module n) exits, and the remaining n-1 people are renumbered, then the k number of the new question corresponds to the k+m sign in the original question. Therefore the solution of the problem (n, m) j (n, m) = j (n-1, m)+m and j (1, m) = 0 (in the sense of modulo n). Accordingly, j (n, m) can be obtained by recursively.

In practice. Joseph's problem is generally solved with **.

Liu Qian's magic trick is used.

m=2".

Let's take a look at the "secret" of Jilin University:

Netizens said: The end of magic is mathematics".

Do you understand?

*: China Youth Daily.

Related Pages