The Glade 4.0

"Turn the lights down, the party just got wilder."
It is currently Fri Nov 22, 2024 10:25 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 23 posts ] 
Author Message
PostPosted: Wed Sep 23, 2009 11:46 pm 
Offline
Asian Blonde

Joined: Mon Sep 21, 2009 7:14 pm
Posts: 2075
The question
"in a deck of 52 cards (without jokers), a person randomly picks a card. You have 5 question to which the person will answer yes or no only. What 5 questions will ensure that you know the number and suit of the card at the end of the 5th question".

This has me totally stumped. Any help would be great :D


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2009 2:05 am 
Offline
Manchurian Mod
User avatar

Joined: Fri Sep 04, 2009 9:40 am
Posts: 5866
The short answer is that there is no set of five questions that will answer it for every case, as the information you receive changes the question you ask next. I'll illustrate:

"Is the card red?" This question eliminates half the deck.
"Is the card a heart?" If the card turned out to be black, then this question provides redundant information.

However, those two questions (or variations on them) do eliminate 75% of the deck. From here, I need to know if the face cards are considered to have a numerical value (11-13) and if aces are considered high or low. I'm fairly certain the system can be solved in five binary questions, but the nature of the system changes once you've narrowed down to a suit. Though there may be some uncertainty because 52/32 lies between 1 and 2.

_________________
Buckle your pants or they might fall down.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2009 2:27 am 
Offline
Solo Hero
User avatar

Joined: Wed Sep 02, 2009 9:32 pm
Posts: 3874
Location: Clarkston, Mi
Corolinth wrote:
However, those two questions (or variations on them) do eliminate 75% of the deck. From here, I need to know if the face cards are considered to have a numerical value (11-13) and if aces are considered high or low. I'm fairly certain the system can be solved in five binary questions, but the nature of the system changes once you've narrowed down to a suit. Though there may be some uncertainty because 52/32 lies between 1 and 2.


If you assume that the ace is 1 and the face cards are numbered 11 to 13 you can get rid of six or more cards by asking if it is a prime number.

Still, two questions to narrow that down...**** beyond me.

_________________
Raell Kromwell


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 3:13 am 
Offline
Bull Moose
User avatar

Joined: Wed Sep 02, 2009 7:36 pm
Posts: 7507
Location: Last Western Stop of the Pony Express
As Corolinth describes, determining the suit uses two questions, the second one depending on the answer to the first. I've tried several permutations, but to ascertain a 1 in 13 possibility I need four more questions, questions four, five, and six dependent on the answer to the previous question. I haven't figured out how to do it in three questions.

_________________
The U. S. Constitution doesn't guarantee happiness, only the pursuit of it. You have to catch up with it yourself. B. Franklin

"A mind needs books like a sword needs a whetstone." -- Tyrion Lannister, A Game of Thrones


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2009 4:02 am 
Offline
User avatar

Joined: Sun Sep 20, 2009 5:31 pm
Posts: 1532
This probably wont help, but here's another way to subdivide the cards that might not have been thought of yet.

ace
one
two
six
ten

four
five
nine
jack
king

three
seven
eight
queen

_________________
Ron Paul 2012


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2009 4:15 am 
Offline
Cheesehead

Joined: Thu Sep 03, 2009 1:15 am
Posts: 465
Coro,

52/32 is greater than 1, aye.

However, cards are easier to sort out than you may think.

For example, is the card between 2 and 10? That eliminates either 4 or 9 out of 13.

Assuming we're down to 4, it's Does the card have a man on the card?

If yes, is it the king, if no, is it the queen?

So I can get to a face card in 5 questions.

It's the other side of things that has me puzzled.

Hrm. Just had a thought. Questions like 'Is the card used in Sueca?'

http://en.wikipedia.org/wiki/Sueca_(game)

It is played with 40 cards (remove the 8s, 9s, 10s from a standard 52 card deck). The rank of the cards in each suit, from highest rank to lowest one, is:
Ace, 7, King, Jack, Queen, 6, 5, 4, 3, 2.

That could help narrow down further and faster if we think about card games and less about numbers.

_________________
Once, I was a ranger
Then, I was a warlock
And a mage
And a paladin
Now, I seek to be myself


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 7:40 am 
Offline
Rihannsu Commander

Joined: Thu Sep 03, 2009 9:31 am
Posts: 4709
Location: Cincinnati OH
Euchure is played with 9,10,J,Q,K,A


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 7:56 am 
Offline
Rihannsu Commander

Joined: Thu Sep 03, 2009 9:31 am
Posts: 4709
Location: Cincinnati OH
I can get it in 6. I cannot figure out how to get it in 5 yet. Logically I would think you can divide the list of possiblities by 2 each time:
52->26->23->7 or 6->4 or 3->2 or 1->2 or 1

but I cannot figure out how to ensure that final choice is down to 1 possiblity, not 2.

in five questions

Is it a black card? 52->26 pos
Is it a <Suit>? 26->13 possiblities
If we assign Ace a value of 1, Jack =11,Queen=12, King 13, is the card an Even or an Odd?
13->7 or 6 Possiblities
Using the same scheme, is the card in the top half of the values? 3 or 4 possiblities?


Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: Thu Sep 24, 2009 7:58 am 
Offline
Solo Hero
User avatar

Joined: Wed Sep 02, 2009 9:32 pm
Posts: 3874
Location: Clarkston, Mi
TheRiov wrote:
Euchure is played with 9,10,J,Q,K,A



Most folks I know use the fives as well... :twisted:

_________________
Raell Kromwell


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 8:02 am 
Offline
Rihannsu Commander

Joined: Thu Sep 03, 2009 9:31 am
Posts: 4709
Location: Cincinnati OH
score is kept with 5s, (or 6/4 or on paper) but the cards are not part of a play deck.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 8:42 am 
Offline
Manchurian Mod
User avatar

Joined: Fri Sep 04, 2009 9:40 am
Posts: 5866
Assumptions do not help, you have to know. That's why I asked if we can assign a numerical value to face cards, and if aces are considered to have a value of less than 2 or greater than king.

You want your questions to eliminate half of the deck regardless of how they're answered. Asking if the card is used in Euchre would help, as a 6/7 split is as close to half as would be possible. The problem is that it relies on the person holding the card to know what Eucre is and how it's played.

Also, your fifth and final answer must be, "Is it <specific card>?" That means that the remaining four questions must narrow your possibilities down to two. If you are unable to do that in four questions, than you can not solve the system explicitly for any given card. Yes, you might be able to get it for "face cards," but that accounts for only twelve cards in the deck. Twelve out of fifty-two isn't good enough.

_________________
Buckle your pants or they might fall down.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 8:56 am 
Offline
Rihannsu Commander

Joined: Thu Sep 03, 2009 9:31 am
Posts: 4709
Location: Cincinnati OH
not per the terms of the original problem statement.

Quote:
What 5 questions will ensure that you know the number and suit of the card at the end of the 5th question".

you dont have to confirm it with a question. the way I phrased my questions I'm not assuming anything--I'm framing the question--defining the terms of the answer. The only problem comes if you get to situation where you have an odd number of possiblities and the card is in the larger pool. (if you have 1 question to pull 1 card out of 3)

if a "neither" yes or no answer is possible then you can do it.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2009 9:43 am 
Offline
Manchurian Mod
User avatar

Joined: Fri Sep 04, 2009 9:40 am
Posts: 5866
Yes, you do have to confirm it with a question. The problem is solved by narrowing the original set of 52 down to smaller and smaller subsets. The first question about the color reduces you to a 26 unit subset. The second question brings you down to a 13 unit subset. At this point, you have three questions to narrow your set down further. In order to solve the system explicitly, you have to have reduced yourself to a subset of 2 by the end of the fourth question. That way when I ask, "Is it the queen of hearts?" and you say, "No," I know that the card is, in fact, the king of hearts.

Looking over the range of possible outcomes, the best case scenario leaves me with 6 cards after the third question, and 3 cards after the fourth question. This means that my fifth question can not provide me with enough information to figure out the card. Oh, there are certain possibilities for the card that would allow me to get an answer. If the card is a face card, I could do it by asking with my third question whether the card is a face. The problem is, what happens if the card isn't a face? Then I'd have two questions to narrow down a ten card set.

In the end, this system is unsolvable. Any individual solution relies on luck and good fortune at one of the last three questions, and will fail any attempt at rigor.

_________________
Buckle your pants or they might fall down.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 10:36 am 
Offline
Rihannsu Commander

Joined: Thu Sep 03, 2009 9:31 am
Posts: 4709
Location: Cincinnati OH
Incorrect, if you narrowed down the possiblities to 2 possible cards (say a 2 and 3 of clubs) you could still ask "Is the card value Odd" and get a positive lock on the correct answer without ever asking for a specific card.

I agree that you need a 6th question to ensure a correct answer in all scenarios, But at no point do you need to ask if the card is a card until.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2009 10:40 am 
Offline
Home of the Whopper
User avatar

Joined: Thu Sep 03, 2009 8:51 am
Posts: 6098
Corolinth wrote:
In the end, this system is unsolvable. Any individual solution relies on luck and good fortune at one of the last three questions, and will fail any attempt at rigor.


This is pretty much the solution we have come up with at work. (Yeah, I passed it around.) We can only narrow it down to 3 by the end of the 4th question.

_________________
"Therefore do not worry about tomorrow, for tomorrow will worry about itself. Each day has enough trouble of its own." Jesus of Nazareth


Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: Thu Sep 24, 2009 10:59 am 
Offline
Manchurian Mod
User avatar

Joined: Fri Sep 04, 2009 9:40 am
Posts: 5866
TheRiov wrote:
Incorrect, if you narrowed down the possiblities to 2 possible cards (say a 2 and 3 of clubs) you could still ask "Is the card value Odd" and get a positive lock on the correct answer without ever asking for a specific card.
At this point, asking if the card value is odd is the same as asking about a specific card. "Is the card odd?" is the same as asking, "Is the card the three of clubs?" Once you have a set of two, any binary question is asking about a specific element of the set. You have two elements remaining and your question, regardless of the answer you receive, eliminates one element.

_________________
Buckle your pants or they might fall down.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 11:10 am 
Offline
Lean, Mean, Googling Machine
User avatar

Joined: Thu Sep 03, 2009 9:35 am
Posts: 2903
Location: Maze of twisty little passages, all alike
Unless I'm sorely mistaken, the yes/no nature of the problem dictates that no series of questions is guaranteed to produce a definite, single-card solution any faster than simple recursive binary division of the cards. Or, in laymens' terms, dividing the deck in half with every question.

The problem, then, is that log2(52) = ~5.7. The minimum number of yes/no questions for a definite solution is therefore 6.

_________________
Sail forth! steer for the deep waters only!
Reckless, O soul, exploring, I with thee, and thou with me;
For we are bound where mariner has not yet dared to go,
And we will risk the ship, ourselves and all.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 11:14 am 
Offline
Rihannsu Commander

Joined: Thu Sep 03, 2009 9:31 am
Posts: 4709
Location: Cincinnati OH
the difference being that "is the card Odd" can be asked at any point in the sequence and still be counted upon to eliminate potentially just over half the available possiblities.

On the other hand, "Is the card the two of clubs" can ONLY be asked at the final stage and only if the list of possiblities is between the Two of Clubs and some other card.

since the original problem asks for a list of questions that will always solve the problem, "Is this card X card" cannot be a solution as the question is dependent on the answers. Where as the generic question "odd or even" or "is it the lesser of the two remaining cards" or something of that nature, would continue to be valid for all possiblities.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 11:28 am 
Offline
Lean, Mean, Googling Machine
User avatar

Joined: Thu Sep 03, 2009 9:35 am
Posts: 2903
Location: Maze of twisty little passages, all alike
I should amend my answer to clarify that what I said is only true if every card in the deck is unique. If all of the cards were, say, the 4 of clubs, then obviously it takes a lot fewer questions :P

Ultimately, it doesn't matter what questions you ask or how clever you get in dividing them. It doesn't even matter what the values of the cards actually are. They could be cards numbered with random (but unique) numbers between 1 and 1 million. Despite all appearances, this is not really a number theory problem. It would work the same even with a "skewed" deck where 2/3 of the cards were odd, or where 90% of them were prime. In fact, it doesn't even matter that they use numbers or letters at all. They may as well be printed with 52 unpronouncible and meaningless symbols.

Assuming that your "opponent" can truly chose any card, it simply is not possible to select *exactly* 1 value from a set of 52 unique values using only 5 binary operations for all possible initial choices.

_________________
Sail forth! steer for the deep waters only!
Reckless, O soul, exploring, I with thee, and thou with me;
For we are bound where mariner has not yet dared to go,
And we will risk the ship, ourselves and all.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 11:33 am 
Offline
Rihannsu Commander

Joined: Thu Sep 03, 2009 9:31 am
Posts: 4709
Location: Cincinnati OH
yes and no Stathol. The ability to use 6 questions is dependent on having the ability to eliminate half of the possible outcomes with a yes, no question.

however, now that I think about it you could pare down the lists by asking Is the card a member of <fully defined list of all members of that subset>


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 11:45 am 
Offline
Lean, Mean, Googling Machine
User avatar

Joined: Thu Sep 03, 2009 9:35 am
Posts: 2903
Location: Maze of twisty little passages, all alike
I'm probably not explaining this very well. :|

Look at it this way:

You have a pile of 52 pebbles. Your opponent marks one with some invisible sign that only he can see. You are allowed to divide this pile of pebbles into two parts, and then divide *those* into two parts, etc. This process can be done 5 times, and you can divide them any way you please. That is, you can divide them up 50/50 each time or 90/10, whatever.

Inevitably, you will have no more than 32 piles at the end. It is mathematically impossible for each of those no more than 32 piles to contain exactly one pebble unless 20 pebbles have mysteriously ceased to exist. Therefore, at least one of the final piles must contain at least 2 pebbles. Ergo, your opponent can choose a pebble which will wind up in that pile..

_________________
Sail forth! steer for the deep waters only!
Reckless, O soul, exploring, I with thee, and thou with me;
For we are bound where mariner has not yet dared to go,
And we will risk the ship, ourselves and all.


Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: Thu Sep 24, 2009 12:44 pm 
Offline
Manchurian Mod
User avatar

Joined: Fri Sep 04, 2009 9:40 am
Posts: 5866
TheRiov wrote:
the difference being that "is the card Odd" can be asked at any point in the sequence and still be counted upon to eliminate potentially just over half the available possiblities.

On the other hand, "Is the card the two of clubs" can ONLY be asked at the final stage and only if the list of possiblities is between the Two of Clubs and some other card.
That's why I specified that the last question be, "Is it <specific card>?" rather than asking about the two of clubs.

At some point, you will have to ask a question that does not eliminate half of all possible cards. Our second question of, "Is it <suit>?" Can't be counted upon to eliminate half of your cards if it's asked before the question that determines color. If it is that suit, you eliminate 75% of the deck, but if it's not that suit you only eliminated 25%. Likewise, the question of whether the card is even can't be counted upon to eliminate half of your cards, as face cards may not be considered to have a numerical value. The important part isn't to ask questions that eliminate half of your cards at any point in the sequence, it's that they eliminate half of the cards remaining at the time you ask the question.

When you are ready to ask your final question, you have two cards left, and you know what they both are.

_________________
Buckle your pants or they might fall down.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 24, 2009 5:36 pm 
Offline
Perfect Equilibrium
User avatar

Joined: Wed Sep 02, 2009 8:27 pm
Posts: 3127
Location: Coffin Corner
I'm going to agree with Stathol. By using your first to questions to eliminate 3 of the suits, you are left w/ 13 cards.

Unless the card is a face card and you, you cannot solve this problem with 5 questions. i.e. unless the eliminate at least 10 of the 13 cards with your third question, than you cannot solve it with the third question.

However, given a sixth question, you should be able to solve this puzzle with up to 64 cards, given the cards fit some sort pattern you can use to ask yes/no questions that pare the searchable deck left.

_________________
"It's real, grew up in trife life, the times of white lines
The hype vice, murderous nighttimes and knife fights invite crimes" - Nasir Jones


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 95 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group