Unravelling the Mystery of a Party Trick

  • Thread starter Hyperreality
  • Start date
  • Tags
    Mystery
In summary, the conversation discusses the Chinese Remainder Theorem, a famous result in elementary number theory. The conversation includes an example of using the theorem to solve a problem involving remainders and an age. The solution involves a formula that utilizes the extended Euclidean algorithm. However, one of the participants is struggling with understanding and correctly applying the algorithm. They also mention using Wikipedia articles for guidance.
  • #1
Hyperreality
202
0
I was reading In Code by Saray Flannery,one of the problem in the book bothered me, it is not the problem itself, it is the solution.

A Party Trick
If someone tells me 2, 2 and 3 are the remainders when she divides her age by 3, 5 and 7 respectively then I can work out her age.

Solution:
Let x = 2, y = 2, z = 3 and a = the age of the girl. Then she used this formula:

a = (70x + 21y + 15z)mod n
= (120 + 42 + 45)mod (3 x 5 x 7)
= 227mod105
= 17 years old

I have no idea of how this works. Where does this formula come from? There must be a logical way to explain this right? And are there any other ways of solving this kind of problem?
 
Mathematics news on Phys.org
  • #2
This is an example of a famous result in elementary number theory called the Chinese Remainder Theorem. The site does a better job of explaining what's involved than I can.
 
  • #3
I've been playing around with this theorem, but for the life of me i can't get it to work. I've been reading the wikipedia articles on chinese remainder theorem and euclidean algorthim
http://www.wikipedia.org/wiki/Chinese_remainder_theorem
http://www.wikipedia.org/wiki/Extended_Euclidean_algorithm
but it's not working. I was trying to solve the sample problem. Here it is:
Code:
x=2(mod 3)
x=3(mod 4)
x=2(mod 5)
"syntax": x=a[sub]i[/sub](mod n[sub]i[/sub])
First i have tried finding the values that satify
Code:
n = n[sub]1[/sub],...,n[sub]k[/sub]
r*n[sub]i[/sub] + s*n/n[sub]i[/sub]=1
I've been using the extended euclidean algorithm for that. Here (color coded for readability):
Code:
20/3 = 6 r 1 => 2 = 20 - 6(3)
3/2 = 1 r 1 => [COLOR=red]1 = 3 - 1(2)[/COLOR]  => 1= 3 -1 (20 - 6(3)) => [COLOR=red]1 = -20 + 7(3)[/COLOR]
That was just for n1 but the answer to the example says the equations should be
Code:
(-13)*3 + 2*20 =1
instead of
1 = -20 + 7(3)
The others (ni) also come out wrong. What did i do to upset the math Gods so (or to get it wrong)?

-HBar

#EDIT: Added the links
 
Last edited:

1. What is the party trick being studied?

The party trick being studied is a sleight of hand card trick where the magician appears to change the order of a deck of cards without touching them.

2. What is the goal of unraveling this party trick?

The goal of unraveling this party trick is to understand the psychology and techniques behind it, which can help us better understand human perception and cognition.

3. Who is conducting the study?

A team of psychologists and neuroscientists are conducting the study, as well as professional magicians who are experts in the party trick.

4. How will the study be conducted?

The study will involve both laboratory experiments and real-life performances of the party trick. Participants will be observed and their reactions and perceptions will be recorded and analyzed.

5. What are the potential applications of this study?

The findings of this study can have implications in the fields of psychology, neuroscience, and magic. It can also be used to improve the techniques and performances of magicians, and to create more effective and engaging magic tricks.

Similar threads

Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
890
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
21
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
955
Replies
1
Views
9K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
3K
Back
Top