The Two Generals Problem

Originally published at: The Two Generals Problem

Alice and Bob Imagine there’s a city in a valley. On either side of the valley, there’s an army commanded by a general. On the left hill stands General Alice and her army. On the right hill, General Bob and his army. Alice and Bob want to capture the city, but neither side has an…

2 Likes

Let’s attack at noon! Please send acknowledgement.

Ok deal. Please acknowledge that you received this, or else I won’t attack.

1 Like

Ok, acknowledged for noon. Now, please put up a smoke signal at noon to confirm that you are going to attack.

1 Like

@penguinpie you will still arrive at the same problem because you will need acknowledgement on both ends for the smoke signal as well.

Very interesting base problem and read! Really appreciate the connection to a modern scenario as well, thanks! :+1:

I admit to not reading the entire article, but I’ll still submit my solution.

Alice to Bob (one and only message sent by courier):
Hi Bob. Let’s attack tomorrow at noon. I’ll be ready and waiting for you to fire off a red and green flare at noon tomorrow if you agree. Upon seeing your flares, I will fire off a blue flare indicating that I’m attacking. (Alice knows Bob would never normally fire off red and green flares, nor would Alice fire blue).

This is penguinpie’s solution with a 3 flare gun fast acknowledgement. This ought to be fast enough.

This was a really nice read!

I think maybe the property we would like to have in the compensating action is the absorbing element, something like the zero for the multiplication, regardless of it being used once or many times the result is the same and it is commutative and idempotent.

The concept may be too mathematical but the analogy with the multiplication could be a good proxy.

I’ve subscribe to the newsletter after reading this!

3 Likes

Place a light rope on each messenger. one end contains a confirmation token around the messenger’s waist and a piece of paper, the other end is tied to a horse. When messenger arrives -he signs the paper with a predetermined codeword and unties the rope. A horse on the other end of the rope is whipped into running at a time it takes to cross the valley, successfully or unsuccessfully dragging the token and signed codeword BACK to the original side, . New messengers arriving, indicate to receiver that previous rope token paper was not received. when new messengers stop arriving, receiver knows last rope made it through. SUCCESS = Original messengers stay on receiver side with attack message, receipt of ropes with attached tokens and signatures. No new messengers sent/arrive. Attack = 100%

3 Likes

@ELC @unixrab Welcome to the forums guys. Interesting responses. How long is this rope? jk

1 Like

Rope length = 1 valley wavelength + waist size of messenger + horse size harness :smiley:

These images are also an excellent way to explain man-in-the-middle attacks. :face_with_monocle:

3 Likes

That’s a great post, super high quality. Thanks a lot for that!

2 Likes