Jump to content
BrainDen.com - Brain Teasers
  • 0

Filling a room


BMAD
 Share

Question

2 answers to this question

Recommended Posts

  • 0

Label each person 1..n.

In the table below the first column represents the person switching their in-room state, the second column lists the people in the room.

Method is:

i. put person 1 in room.

ii. put next person in room, then repeat the sequence of movers that preceded this last entrant. (Of course, they'll be going in the opposite direction, this time.)

iii. repeat step ii. until all 2^n states (including the 0 state the room started in) have been visited.

Proof that the method works is inductive on n. (Left as exercise to reader.)

<empty>

1 1

2 12

1 2

3 23

1 123

2 13

1 3

4 34

1 134

2 1234

1 234

3 24

1 124

2 14

1 4

… …

Edited by austinm
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...