InterviewSolution
Saved Bookmarks
| 1. |
He then enters a mushroom market. In the market, whenever two people greet each other, they have to swap their mushrooms. There are 64 people present in the Market.In order to save time, each pair of people is only allowed to greet each other atmost once. After a lot of greetings, Mario notices that it is no longer possible to return all mushrooms to their respective owners through more greetings. To sensibly resolve this maddening confusion, he decides to bring in even more people (with more mushrooms), to allow for even more greetings and mushroom swappings. How many extra people are needed to return all mushrooms (including the extra ones) to their rightful owners? Assume a person has exactly one mushroom. |
|
Answer» Two extra people are needed to return correct mushrooms using the following method Let the extra people have names E1 and E2. Step 1: Arrange the 64 people into lines such that In each line, every person is having the mushroom of the person directly behind. Except the last person whose mushroom is with the first person in that line. Note : If two people have each others’ mushrooms, they will make a separate line of only two people. Step 2:: For a single line, first E1 swaps mushrooms with the last person. Then E2 swaps mushrooms with each person in middle one at a time from front to back. Finally E1 will swap mushrooms with the first person.Then E1 & E2 swap each others’ mushrooms. This way everyone in this line along with E1 & E2 will have their own mushrooms. Step 3: Repeat Step 2 for each line. |
|