# Five robbers; Need a computer aid

Page 1 of 1

## 1 Replies - 944 Views - Last Post: 29 December 2001 - 08:41 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=2412&amp;s=bc793e0837dfa23eaf8170aa5d245f2f&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 RexChaos

Reputation: 0
• Posts: 8
• Joined: 19-December 01

# Five robbers; Need a computer aid

Posted 29 December 2001 - 08:28 PM

Hello all,
I have an interesting problem want a computer programming to solve.

Problem. Once upon a time, there were 5 robbers(A, B, C, D, E). One day, they got 100 golds and decided to carve it up. The way was very weird.

The first robber(A) gave a scheme to carve up the golds, the rest of the robbers voted to decide if they acceptd the scheme. If and only if the vote through was over half number of the rest robbers, the scheme was adopted .(i.e. there must be more than (not equal to) 2 robbers accepted the scheme)

Otherwise, the robber who raised the scheme would be killed.
After robber A was killed, it was robber(B)'s turn to give a scheme, and the rest of the robbers to vote. Like the previous case, if and only if the vote through was over half number of the rest robbers, the scheme was adopted, because there were 3 robbers to vote, so at least 2 robbers accepted the scheme would lead to the acceptance of the scheme. Otherwise, robber(B) would be killed. And it was robber©'s turn to give a scheme ... the rest may be deduced by analogy.

Suppose all the robbers were so clever to make sure they wouldn't be killed and make the most gold(s). What's scheme? Who raised the scheme?

(I have no exact answer. I think the scheme was raised by A and the scheme was
A 97
B 0
C 1
D 1
E 1
)

Can anyone give a computer programming to solve the problem?

Is This A Good Question/Topic? 0

## Replies To: Five robbers; Need a computer aid

### #2 Spock

Reputation: 0
• Posts: 54
• Joined: 24-October 01

## Re: Five robbers; Need a computer aid

Posted 29 December 2001 - 08:41 PM

RexChaos:
I do not think your assumption of 97,0,1,1,1 would work because even the three who got something wold not feel like they got enough.

I believe you also need to define "what is sufficient for any single robber to receive for him to make a vote for acceptance".

Without that parameter, My initial guess would be more like 25, 0, 25, 25, 25.