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

Home > Logic
Maximus (Posted on 2024-04-20) Difficulty: 3 of 5
Maximus is one of 3 or more prisoners of war who have been lined up before the Roman Emperor. The prisoners are numbered from first in the line to last as 1, 2, 3, 4, ..., N. The Emperor orders the execution of the prisoners in the following manner:
1) The first and last are immediately executed.
2) If there are still 2 or more prisoners remaining, the half of the remaining prisoners with the lowest numbers (rounded up) are executed.
3) If there are still 3 or more prisoners remaining, start again from Step 1.

For example, if there were 5 prisoners to start then prisoners 1 and 5 would be executed in Step 2, and prisoners 2 and 3 would be executed in Step 3, leaving prisoner 4 alive.

Is there a strategy by which Maximus can save himself? What if Maximus also wants to save his friend Romulus?

No Solution Yet Submitted by K Sengupta    
Rating: 4.0000 (1 votes)

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Solutionre(2): Solution Corrected programLarry2024-04-22 17:14:06
re: Clarification?Math Man2024-04-21 21:09:19
re: SolutionCharlie2024-04-20 11:59:02
Solutioncomputer solutionCharlie2024-04-20 11:06:56
SolutionSolutionLarry2024-04-20 10:26:04
re: Clarification?Larry2024-04-20 10:22:52
Clarification?Kenny M2024-04-20 09:45:20
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
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