• 0

order of the cards

Question

Posted · Report post

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?

0

Share this post


Link to post
Share on other sites

8 answers to this question

  • 0

Posted · Report post

Your wording rules out the possibility of some cards being upside down
I believe four playing cards can encode the identity of a fifth card. So N would be at least 52. [AC = 1 ...KS=52, eg]

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

5 + 5! = 125

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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?

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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.

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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).

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Good point!

I think you are probably correct ... oh well. I still think yours is a really good approach!

0

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Mooli found the answer I was looking for. Well done!

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.