The Mathemagician with the Power Cards

Chris, a mathemagician, has been performing a public show in a market. He has a pack of 5 cards, with 1, 2, 4, 8, and 16 dots on them, as illustrated below.

Image Courtesy: Computer Science Unplugged Image Courtesy: Computer Science Unplugged

Now, Agnishom, one of the spectators, chooses a number between 1 and 31 ( = 1 + 2 + 4 + 8 + 16 =1+2+4+8+16 ).

Will Chris always be able to select one or more of his cards such that their dots add up to Agnishom's number?

For example, if Agnishom chooses 5, Chris could pick these two cards shown below:

Image Courtesy: Computer Science Unplugged Image Courtesy: Computer Science Unplugged

Yes No

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Geoff Pilling
Feb 2, 2017

You just need to pick the cards that form the binary representation of your number.

For example, the binary representation of 13 13 is 1101 = 1 2 3 + 1 2 2 + 0 2 1 + 1 2 0 1101 = 1\cdot 2^3 + 1\cdot 2^2 + 0\cdot 2^1 + 1\cdot 2^0 . So, he would pick 1 = 2 0 , 4 = 2 2 , and 8 = 2 3 {1=2^0,4=2^2, \text{ and } 8 = 2^3}

You just need to pick the cards that form the binary representation of your number.

Does it work for all the 31 integers? And why does it work? It can't be a coincidence, right?

Pi Han Goh - 4 years, 4 months ago
Annie Li
Mar 20, 2017

yes because he is a mathemagician after all

Can you figure out what his trick is?

Agnishom Chattopadhyay - 4 years, 2 months ago

no because i am only 11yrs old you know

Annie Li - 4 years, 2 months ago

Log in to reply

That's alright. I am only 9 years at heart.

But I am sure it is worth your time to think about how Chris can achieve this. If you figure it out, great. If not, you have at least learnt to think. And then, you can come back and ask us more about this if you want to.

Agnishom Chattopadhyay - 4 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...