All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
The party (Posted on 2002-06-20) Difficulty: 4 of 5
Alice and Bill threw a party and invited four other couples. As each couple arrived there were greetings, including handshakes.

Later in the evening, Bill asked everyone, including Alice how many people they shook hand with. Every answer was different. No one shook hands with his or her own partner.

How many hands did Alice shake?

See The Solution Submitted by TomM    
Rating: 3.6923 (13 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re: Huh? (re: hmm.). | Comment 3 of 16 |
(In reply to Huh? (re: hmm.). by TomM)

ok, well sorry if it wasnt too clear..

each state is described by the number of handshakes for
each person in the party at that time.
now, if alice and bill throw the party, the first state is

{Bill = 0, Alice = 0}

the transitions between states are the arrivals of the couples. we can express a transition as the number of handshakes each person makes with the people already there. ie for arrival of couple p1,p2

{number of handshakes for p1, number of handshakes for p2}

the transition operates on the state to give a new state:

{0, 0} * {2, 0) = {1, 1, 2, 0} ( or {bill=1, alice=1, p1=2, p2=0}

ie this represents two visitors arriving, where one of them shakes
hands with bill and alice, and the other visitor does not shake hands
with anyone. the end result is that bill and alice have done 1 shake,
shake, and the two visitors have done 2 and 0.
since we dont care about Bill:

{B, 0} * {2, 0} = {B, 1, 2, 0} (or {Bill=x, Alice=1, p1=2, p2=0}

which gives more insight as to why choose transition {2, 0}. it
yields a distribution of numbers among the attendees, which
is what were aiming for
  Posted by Cheradenine on 2002-06-20 04:38:37

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information