Qbasicnews.com
September 17, 2019, 07:20:22 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Alice and Bob  (Read 11311 times)
DefHo
Member
*
Posts: 74



« Reply #15 on: January 04, 2006, 09:21:12 PM »

I hearby declare vspickelen the winner of this challenge. Special thanks goes to Agamemnus for helping me explain it Wink

Vspickelen, nicely done. That's the same solution I thought of. Not exactly the same but based on the same principles.

Sterling:  (WARNING: spoilers ahead!)
No, the volunteer chooses five cards but Alice gets to decide which card to make the guessed card. She also doesn't need to hide the other suited (signal) card. It just makes it more difficult for the audience to figure out the trick. (BTW, what he meant by "hide" the other card is that by the sum of the shown cards Bob would be able to  determine the location of the same-suited card. For example, if the sum of the four cards divided by four has a remainder of 0, then make the signal card the first card. If the remainder is 1, then make it the second, etc.)

She could, for example, order the cards so that the guessed card always has the same suit as the first card. It's still a bit tricky to solve since now there are only three cards to make a permutation with. (WARNING: more spoilers! Stop here if you want to solve the rest of the problem on your own.) Three cards could only represent six combinations and there are twelve possible cards to guess from. But Alice can choose which of the two suited cards is the guessed card. Now she just orders them so that the following is true:

card1's suit = card5's suit

and

(card1's value + the number shown by the combination [1 through 6]) MOD 13 = card5's value  

(To keep things simple, values could be assigned like: A=1, 2=2, 3=3,.... ,J=11, Q=12, and K=0)
Voila!

Quote
You can even do this with up to 124 unique cards. (in the deck)

 Shocked  Wow. I didn't know that. Since there wasn't any information left over after my solution, I assumed 52 was the max. That get's me thinking...
Logged

hat were we arguing about again?
vspickelen
Member
*
Posts: 26



WWW
« Reply #16 on: January 05, 2006, 02:42:30 PM »

Thanks,

I'm in high feathers with my honours,
Cheerz!

vspickelen
Logged
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #17 on: January 06, 2006, 01:20:28 AM »

On second thought, I looked at a simpler case of 2 shown cards shown and 3 cards drawn and I don't see how this is possible.. turns out that you just get several different results for every 2 cards.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
vspickelen
Member
*
Posts: 26



WWW
« Reply #18 on: January 10, 2006, 01:41:34 PM »

The 2-card 'message space' is out of proportion to the 52-card deck.
It's far too small to encode the whole 3-card 'uncovered hand space'.
They match only if hand! / (deck - hand + 1) >= 1.

Alie & Ben have recently learned a brilliant strategy from prof. Berlekamp.
Their divination abilities are boundless now. I presented them decks with 8, 27, 52, 124 and even 725 cards.
A fifth card symbol called 'tips' was coined specially for this occasion.

http://home.graffiti.net/vspickelen:graffiti.net/doos/Cardspp.zip

vspickelen
Logged
DefHo
Member
*
Posts: 74



« Reply #19 on: January 11, 2006, 02:39:02 AM »

But you already won the challenge! Now you're just showing off. (I'm kidding of course Cheesy) It looks interesting. I'll read it more thoroughly when I have time.
Logged

hat were we arguing about again?
vspickelen
Member
*
Posts: 26



WWW
« Reply #20 on: January 13, 2006, 07:07:00 AM »

Just indulgin', DefHo.
Ain't yo gonna show us what you came up with?
Logged
DefHo
Member
*
Posts: 74



« Reply #21 on: January 13, 2006, 05:33:53 PM »

My solution to the 52 card problem was pretty much the same as yours. I explained it above. As for the 124 card problem, I brainstormed it but never came up with a working solution. I'll get it eventually.
Logged

hat were we arguing about again?
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!