The Two Generals’ Problem

Share
Embed
  • Loading...
  • Published on:  Monday, August 12, 2019
  • Time to tell a story about idempotency, computer science, and the Night of the Multiple Orders. • Sponsored by Dashlane —try 30 days for free at: https://www.dashlane.com/tomscott

    MORE BASICS: https://fapgem.com/p/PL96C35uN7xGLLeET0dOWaKHkAlPsrkcha

    Written by Sean M Elliott and Tom Scott
    Directed by Tomek
    Graphics by Mooviemakers https://www.mooviemakers.co.uk/
    Audio mix by Haerther Productions https://haerther.net/

    Thanks to Dashlane for sponsoring the video! If you're techie enough to watch this video, you should be using a password manager. Get a 30-day free trial at https://dashlane.com/tomscott

    I'm at https://tomscott.com
    on Twitter at https://twitter.com/tomscott
    on Facebook at /tomscott
    and on Instagram as tomscottgo
Loading...

Comment

  • Tom Scott
    Tom Scott  4 months ago +3409

    Yes, I had help with the graphics for this series. There's no way I'd have animated that myself! On that note, thanks to Dashlane for sponsoring and helping me hire an animator: their free trial link is https://www.dashlane.com/tomscott

  • Phillip Otey
    Phillip Otey  2 hours ago

    I mean you need 2 minimum. A keeps sending troops saying: send one troop telling us what time to attack. We will keep sending troops until the package is received, and if the time of attack has not past we are a go.

  • Ady Day
    Ady Day  3 hours ago

    Don’t rely on technology too much..nothing is built to last!

  • Name
    Name  yesterday

    Just make an agreement that 2 or more acknowledgements means you can attack

  • Jo 1337
    Jo 1337  2 days ago

    It's 2 am and I regret nothing

  • Vysair
    Vysair  5 days ago

    Or maybe both general could send dozen more message until it hit certain threshold and that will confirm it.

  • 10k12
    10k12  7 days ago

    2:35 why not let them meet in the middle, so if they perish, they perish together and no message is received, but if they manage to meet, they can return and there are no threats on the way back to the generals.

  • Shaurya Pant
    Shaurya Pant  7 days ago

    Well, after both the teams have received confirmation of the other party that they know that you know and will go at 8PM, I don't see any further need of sending messengers. Can someone explain, please?

  • Andre L
    Andre L  7 days ago

    How come this problem exists at all, if the proposed time is 8 pm, and both of them acknowledged the acknowledgments, then why would A and B need to keep sending acknowledgments? They both acknowledged the proposal and acknowledgment, so it's already planned? They both already know that it made it to the other side at least twice, so what's the problem?


    This just feels like it's not really a problem.... How is this line of reasoning incorrect?

  • Markus B
    Markus B  7 days ago +1

    I should be asleep but general B didn’t give me a confirmation

  • john wick
    john wick  7 days ago

    Simply. General A sends a messenger which returns after delivery of the message. If the messenger does not return after a suitable time span. It is safe to assume something happend and another messenger needs to be sent

  • Space Griffin
    Space Griffin  7 days ago +1

    but wouldn't a and b know they've received the message by the third message?

  • DukeOfEarle88
    DukeOfEarle88  7 days ago

    £7.74 word.

  • UberKrassMann
    UberKrassMann  7 days ago

    2:55 starts sweating.....

  • Skepty
    Skepty  7 days ago

    Just tell them to make a fire signal after they do, as confirmation. Not that hard.

  • Ashor
    Ashor  7 days ago

    for the two generals, couldnt one side send a messenger with the message telling them to attack at a certain time (sundown) but to ensure they both know they both have to shoot a cannon ball to the west of the other general at sunrise) if they both observe the cannon ball west of them then they know they will attack at sundown

  • Midhunraj R Pillai

    I wonder how the generals problem is unsolvable. Please correct me whats the mistake of the solution below,



    Step1: General A sends message saying attack at 6pm
    (Here, A establishes the time)


    Step 2: General B gets the message, sends back an acknowledgement 1 for the message 'we go the time'

    (B gets the time)


    Step 3: General A gets the ACK 1
    (now, A knows that B got the time of attack. But B won't attack because B don't know that ACK 1 is reached at A. so..)
    A sends a confirmation ACK 2 back



    Step 4: General B gets the ACK 2
    (now, B knows that both A and B establishes the time. Also B got the ACK 2, meaning B knows that ACK 1 reached A. But B knows that A won't attack until A confirm that B got the ACK 2. so...)

    B sends a confirmation ACK 3 back


    Ahhhh this trend continues and no one will attack since they cannot make sure that the previous ACK sent by them is reached at the other end!!! I am sorry (T_T)

  • Ivan farlenkov
    Ivan farlenkov  7 days ago

    Have generals send messagers at set periods of time even when there is nothing to send. If there is no messager, ask about it in the next message.

  • Monsieur P.
    Monsieur P.  7 days ago

    My bank card would’ve texted me to confirm charge after being pinged to debit my account identical amount of money. It’s kind of stupid that nobody selling the food didn’t notice.

  • Monsieur P.
    Monsieur P.  7 days ago

    😂 these damn apps!