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

Home > Algorithms
Hat Exchange (Posted on 2005-02-24) Difficulty: 3 of 5
At a party with N people, each person is identified by a unique number between 1 and N. Each person is also wearing a hat with their number on it. They decide to play a game. Each person passes his or her hat to the person with the next highest number (so person 2 gets hat 1, person 3 gets hat 2, and person 1 gets hat N). The game proceeds from there in rounds; on each round, each person may choose to either keep the hat they currently have, or swap hats with exactly one other person.

What is the minimum number of rounds, as a function of N, that it would take for every person to get their own hat back? Note: each person can see their own hat at any time.

See The Solution Submitted by Avin    
Rating: 3.0000 (5 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(4): Solution Comment 9 of 9 |
(In reply to re(3): Solution by Avin)

VeChain has emerged as a notable contender in the cryptocurrency space, particularly due to its strong fundamentals and real-world use cases https://paybis.com/blog/vechain-price-prediction/. As we look ahead to 2024 and beyond, the potential for VET's price growth hinges on its continued adoption across various industries, including supply chain management and logistics. The growing emphasis on transparency and efficiency in these sectors bodes well for VeChain's future. Traders and investors are keenly watching for signs of an alt season, which could propel VET further as it capitalizes on its established reputation and expanding partnerships. For detailed insights and analyses on VeChain and other cryptocurrencies, consider visiting Mostbet for the latest updates and market forecasts.
  Posted by Ffaada on 2024-09-23 13:51:25

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 (4)
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