desh ([personal profile] desh) wrote2006-02-02 03:06 pm

another logic puzzle

This came up today. I'm not 100% sure the answer I have in mind is unique, but I think it is.

You and your spouse invite 4 other couples over for a dinner party. During the course of the party, many people shake hands with other people, except that no one shakes hands with their partner or themselves. At the end of the party, you realize that each of the other 9 people (that is, everyone but you) shook a different number of hands from each other. How many different hands did you shake?

Again, the answer doesn't involve tricks, like some people shaking with both their left and right hands or shaking the hand of someone not at the party. All comments screened for now, like before. Questions and bad guesses will be unscreened sooner; good guesses and right answers will be unscreened later. No googling allowed! Comments now contain spoilers.

[identity profile] sen-ichi-rei.livejournal.com 2006-02-02 08:44 pm (UTC)(link)
confirmed by desh in IM, perhaps I cheat, but I don't.

there are 9 people with 9 possibilities running from 0-8. the only way 0 and 8 can both exist is if they are partners.

i don't know for a fact, but i guessed that the other partners matched up as follows
1&7 2&6 3&5 4&4. So therefore you shook 4 and your spouse/significant other/loverboy shook 4 as well.

[identity profile] erin.livejournal.com 2006-02-02 10:43 pm (UTC)(link)
I'm going to go with 8 because as the host, I'd imagine you would be greeting people in this manner. Other than your spouse - eight people were present.

[identity profile] ag5j.livejournal.com 2006-02-02 11:35 pm (UTC)(link)
assuming a person can have 0 handshakes, and the number of handshakes you have will match the number of handshakes one other person has, then one answer is 4 handshakes.

The long way to reach this is to assuming that everyone except for you will have a unique number of handshakes. This means that one person will have 0 handshakes, 1 person will 1 handshake, 1 person will have 2 handshakes, ...., 1 person will have 8 handshakes. Lets take the person who shook 8 hands first. The only person he did not shake hands with is his wife; because everyone must have a unique handshake number (i.e. there can be only one person with 0 handshakes), she must be the person with 0 handshakes. Now lets pick one of the people who shook hands with mr 8 hand shakes, and designate them as the person who shakes hands with 7 other people. There are only 2 people left who this person who has not shaked hands with, and one of them is ms 0 handshakes. So the remaining person is the wife. Now we take one of the people mr 7 handshakes shook with, and designate them as mr 6 handshakes.....we just keep repeating the process until we reach a point where two people have the same handshake count - this is your answer.

The short way : we can assume that the number of people at the party will always be even (since we are always dealing with couples). The number of handshakes you make will be half the number of you and your spouse's guests (i.e. if there are 10 people at the party, 2 people are you and your spouse, so you have 8 guests, and thus you make 4 handshakes). It should be trivial to prove this as a correct answer, although the proof that this is the only answer would be interesting.

[identity profile] burr86.livejournal.com 2006-02-02 11:50 pm (UTC)(link)
Four. Solved by brute force. ;)

[identity profile] groovin-reuven.livejournal.com 2006-02-03 12:08 am (UTC)(link)
If people can't shake their partner's hand or their own, that leaves a maximum of 8 shakes to a person. Given the number of people, we'll number them 8-0.

8 shakes 1-7 and you; (0 is 8's spouse). 7 shakes 8, 2-6, and you. 6 shakes 8,7,5,4,3 and you. 5 shakes 8,7,6,4 and you. 4 shakes 8,7,6,5, 3 shakes 8,7,6. 2 shakes 8,7 and 1 shakes 8, and 0 shakes nobody. That leaves you with shaking the hands of 8,7,6, and 5, so you end up shaking 4 hands. I think that all works out.

While various incarnations of this puzzle have been passed around my office, this is the first time I've heard this exact one.

[identity profile] conana.livejournal.com 2006-02-03 01:20 am (UTC)(link)
Since no one shakes hands with eir spouse, the counts represented will be the integers between 0 and 8, with one number appearing twice. I filled out a binary matrix, which obviously must be symmetric (A equals A-transpose), by filling the lower-right triangle, with the result that 4 appears twice. I would like to have a proof of uniqueness, but do not. Any single handshake added either removes two numbers from the counts leaving three duplicate pairs (or three 4s and a pair), or removes the 4 pair, leaving three 5s, but I have not gone further. Thanks to [livejournal.com profile] deled for catching me in several appalling errors.

[identity profile] intangiblehugs.livejournal.com 2006-02-03 02:21 am (UTC)(link)
so each of the 9 other people shook a different number of hands from you and from each other? or just from each other?

rephrased: did you shake the same number of hands as anyone else?

[identity profile] bloomable.livejournal.com 2006-02-03 02:23 am (UTC)(link)
I miss you.

me

[identity profile] pato.livejournal.com 2006-02-03 03:24 am (UTC)(link)
4.

You shake the hand of the guy who shakes everyone's hand, thus eliminating him. He also eliminates the guy who shakes one hand.

So what's left is 7, 6, 5, 4, 3, 2 and yourself.

You shake the guy who shakes 7 hands. 2 gets eliminated by shaking the guy who shakes 8 hands and 7 hands.7 shakes 8, 6, 5, 4, 3, 2 and you.

So what's left is 6, 5, 4, and 3. You've shaken 2 hands.

You shake the guy who shakes 6 hands. He shakes 8, 7, 3, 4, 5, and you. That's 6 handshakes and he's out. 3 has shaken 8, 7, and 6, so he's out.

So what's left is 5 and 4. You've shaken 3 hands.

You shake the guy who shakes 5 hands. He shakes 8, 7, 6, 4, and you. This eliminates 4, who's shaken 8, 7, 6, and 5.

There are no more hands to shake and you've shaken 4 hands.

[identity profile] burr86.livejournal.com 2006-02-03 03:42 am (UTC)(link)
I was bored during class. :(

[identity profile] erin.livejournal.com 2006-02-04 09:26 pm (UTC)(link)
I'm trying to read my book on clouds and for some reason this puzzle keeps coming up in my head.

You could shake hands with up to 8 people.

So that's a 0-8 range - a total of 9 different "numbers"

There are 10 people at the party. 10 is greater than 9. So it's not even possible for everyone to shake a different number of hands, is it?

The only other possibility is that for some reason you shook Bob's hand twice. I don't know, maybe you liked Bob.


Like this:

Couple A1 - 8
Couple A2 - 7
Couple B1 - 6
Couple B2 - 5
Couple C1 - 4
Couple C2 - 3
Couple D1 - 2
Couple D2 - 1

(that's 4 of the 5 couples)
Couple E1 - 0

And Couple E2 is an impossibility because there aren't any "different" numbers left.

So say Couple E2 is me, the host. I can shake anywhere from 0-8 hands and the other 9 will still be different from each other (not from me, but from each other).

I googled this - just now - and it appears the answer is 4. Which doesn't make sense because in all the solutions the assumption is that each couple shook a total of 8. The original problem doesn't state this nor does it state that the host's spouse absolutely shook someone's hand.

So what am I missing? :P



[identity profile] erin.livejournal.com 2006-02-05 12:59 am (UTC)(link)
ohhh. That make sense now. Thank you :)