Jump to content
BrainDen.com - Brain Teasers
  • 0

order of the cards


BMAD
 Share

Question

You and your friend are told that there are N cards, each are numbered from 1 to N. You will randomly select 6 cards. Using the perfect coding system which you had set with your friend previously, you will select one card and transfer the other five to your friend. By just examining the order of these numbered five cards, your friend will be able to know the card youve selected.

What can be the maximum value for N?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

5 + 5! = 125

can you please explain how your encoding scheme would work?

Suuppose you chose the following cards [generated randomly]:

103

89

86

46

54

74

which card would you keep and how would your friend know the identitiy of the one you kept?

I will pick any 5 random cards and arrange them, as in a dictionary, to provide the position of the 6th card. e.g. if I retain 46. My code is as follows:

number the 5 remaining cards as 1 to 5 in increasing order (so 54 is 1, 74 is 2, 86 is 3, 89 is 4 and 103 is 5. Now for the moment lets call these cards by their new numbers). I will arrange 1,2,3,4,5 as in a dictionary to provide the 46th permutation. In such a dictionary 1st permutation will be 12345, 2nd will be 12354, 3rd will be 12435, 4th will be 12453, 5th will be 12534..... and 46th will be 25341. So I will hand him 2,5,3,4,1 in that order i.e. I will hand him 74,103,86,89,54 in that order. He will read it as 2,5,3,4,1 and know I have the 46th card. Since none of these 5 cards is smaller than 46 he will know I have 46.

Lets take another example, I retain 103. I hand him 89,46,54,86,74 which he reads as 5,1,2,4,3 and translates it to 98. Since all 5 cards in his hand are smaller than 98, he adds these 5 missing cards to 98 and gets 103.

Link to comment
Share on other sites

  • 0

Very clever aproach m00li!! I like it!


I was going down a very different path [binary encoding].

It seems to me that you could you extend the range of your scheme if you also
handed back some cards facing up and some facing down.

This could give you 2**5 [32] times the range.

If you could define brackets in which your dictionary approach fit [i am not
sure whether you could get 120 or 125] such as:

Bracket Range

0 1 to 120

1 121 to 240

2 241 to 360

...

x [120x] + 1 to [120 * (x+1)]

...

31 3721 to 3840

Now if you use binary encoding based on whether a card is turned up or down
[starting with the least significant digit as the first card] to determine the
bracket.

For example if the cards are returned in the following order: UP, down, down, UP, UP

1st card up [1] means 1*1 = 1

2nd card down [0] means 2*0 = 0

3rd card down [0] means 4*0 = 0

4th card up [1] means 8*1 = 8

5th card up [1] means 16*1 = 16

Sum = 1 + 8 + 16 = 25

Therefore the range is in bracket 25 [from 3001 to 3120] now apply your
dictionary look up the order of the cards.

Again, if the +5 still applies, then the range would go up to 4000

Link to comment
Share on other sites

  • 0

Very clever aproach m00li!! I like it!

I was going down a very different path [binary encoding].

It seems to me that you could you extend the range of your scheme if you also

handed back some cards facing up and some facing down.

This could give you 2**5 [32] times the range.

If you could define brackets in which your dictionary approach fit [i am not

sure whether you could get 120 or 125] such as:

Bracket Range

0 1 to 120

1 121 to 240

2 241 to 360

...

x [120x] + 1 to [120 * (x+1)]

...

31 3721 to 3840

Now if you use binary encoding based on whether a card is turned up or down

[starting with the least significant digit as the first card] to determine the

bracket.

For example if the cards are returned in the following order: UP, down, down, UP, UP

1st card up [1] means 1*1 = 1

2nd card down [0] means 2*0 = 0

3rd card down [0] means 4*0 = 0

4th card up [1] means 8*1 = 8

5th card up [1] means 16*1 = 16

Sum = 1 + 8 + 16 = 25

Therefore the range is in bracket 25 [from 3001 to 3120] now apply your

dictionary look up the order of the cards.

Again, if the +5 still applies, then the range would go up to 4000

Very nice indeed!

But the poster (or is it poser) has mentioned that " By just examining the order of these numbered five cards, your friend will be able to know the card youve selected."

I think we cannot use any other hints but just the order. (e.g. you can increase binary to ternary by handing some cards with your left. So an extra dimension is added by virtue of whether you touched a card with your left hand or right).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...