The Byzantine General Problem

The forum for general posting. Come join the madness. :)
Post Reply
Message
Author
User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

The Byzantine General Problem

#1 Post by Bob78164 » Mon Aug 01, 2016 10:02 am

I'm told that this week's Riddler is a well known problem called the Byzantine General Problem. I had never heard it but I think I have a solution.

You are the Emperor of Byzantium. You have N generals. You know that more than half of them are loyal, because otherwise the traitors would already have started a civil war to depose you.

You may ask any general about the loyalty of any other general. A loyal general will tell the truth. A traitor will say whatever he wants. What is the minimum number of questions you must ask to identify with certainty at least one loyal general, and what strategy achieves that solution?

If there are 50 generals, my solution guarantees that you will locate a loyalist in no more than 300 questions. Can anyone do better? --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
President Chump
Merry Man
Posts: 36
Joined: Tue Nov 24, 2015 9:37 pm
Location: The Chump House

Re: The Byzantine General Problem

#2 Post by President Chump » Mon Aug 01, 2016 11:42 am

Bob78164 wrote:Can anyone do better? --Bob

I would just execute them all and be done with it. Look, I just created N number of jobs!

I'll make Byzantium great again!!!!

User avatar
Bob Juch
Posts: 27132
Joined: Mon Oct 08, 2007 11:58 am
Location: Oro Valley, Arizona
Contact:

Re: The Byzantine General Problem

#3 Post by Bob Juch » Mon Aug 01, 2016 2:25 pm

I'm aware of a totally different Byzantine Generals' Problem which has to do with unreliable communications.
I may not have gone where I intended to go, but I think I have ended up where I needed to be.
- Douglas Adams (1952 - 2001)

Si fractum non sit, noli id reficere.

Teach a child to be polite and courteous in the home and, when he grows up, he'll never be able to drive in New Jersey.

User avatar
Vandal
Director of Promos
Posts: 7507
Joined: Mon Oct 08, 2007 6:42 pm
Location: Literary Circles
Contact:

Re: The Byzantine General Problem

#4 Post by Vandal » Mon Aug 01, 2016 2:48 pm

I'm pretty good at math and I think the answer is:

Image

Three
_________________________________________________________________________________
Visit my website: http://www.rmclarkauthor.com

User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: The Byzantine General Problem

#5 Post by Bob78164 » Mon Aug 01, 2016 3:35 pm

Vandal wrote:I'm pretty good at math and I think the answer is:

Image

Three
This makes me think of melly, because she gave an immediate answer to that question when serving as a PAF. --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
Vandal
Director of Promos
Posts: 7507
Joined: Mon Oct 08, 2007 6:42 pm
Location: Literary Circles
Contact:

Re: The Byzantine General Problem

#6 Post by Vandal » Mon Aug 01, 2016 3:52 pm

Bob78164 wrote:
Vandal wrote:I'm pretty good at math and I think the answer is:

Image

Three
This makes me think of melly, because she gave an immediate answer to that question when serving as a PAF. --Bob
I've never met her, but I'm pretty sure Melly has five digits at the end of her armwings.
_________________________________________________________________________________
Visit my website: http://www.rmclarkauthor.com

User avatar
plasticene
Posts: 1486
Joined: Mon Oct 08, 2007 3:02 pm
Location: Los Angeles

Re: The Byzantine General Problem

#7 Post by plasticene » Wed Aug 03, 2016 10:14 am

Bob78164 wrote:If there are 50 generals, my solution guarantees that you will locate a loyalist in no more than 300 questions. Can anyone do better? --Bob
I can't do better, because I haven't quite figured out how to generalize my method, but I'm pretty sure you'd be able to do better than 300 with a slight tweak to your solution. Would your solution require three questions for four generals? You only need one!

User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: The Byzantine General Problem

#8 Post by Bob78164 » Wed Aug 03, 2016 10:19 am

plasticene wrote:
Bob78164 wrote:If there are 50 generals, my solution guarantees that you will locate a loyalist in no more than 300 questions. Can anyone do better? --Bob
I can't do better, because I haven't quite figured out how to generalize my method, but I'm pretty sure you'd be able to do better than 300 with a slight tweak to your solution. Would your solution require three questions for four generals? You only need one!
My solution requires only 1 question for 4 generals. --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: The Byzantine General Problem

#9 Post by Bob78164 » Thu Aug 04, 2016 11:10 pm

My answer requires k(k + 1)/2 questions where k = INT((N - 1)/2) is the greatest possible number of traitors.

Proof is by induction on N. We don't need any questions at all if there are 1 or 2 generals so assume there are at least 3. Ask the next k generals (Generals 2 through k + 1) whether General 1 is loyal. If all of them say yes, then there are two possibilities, both resulting in certain knowledge that General 1 is loyal.

All k of them might be traitors, but if that's the case, then we've used up all of the traitors so General 1 is loyal (as are all of the other generals) and we are done.

Otherwise, at least one of the generals we asked is loyal, and therefore told the truth about Gemeral 1. Since all of these generals said that General 1 is loyal, a loyal general, who always tells the truth, says that General 1 is loyal, so again we know that General 1 must be loyal and again we are done.

Alternatively, one of the generals, say General k + 1, may claim that General 1 is a traitor. But then we know that at least 1 of General 1 or General k + 1 is a traitor. That means we know that more than half of the remaining N - 2 generals are loyal, so by our inductive hypothesis, we can identify a loyal general using no more than k(k - 1)/2 additional questions. Adding the k questions we have already asked to reach this point gives us a total of k(k+ 1)/2 questions, as required. --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
plasticene
Posts: 1486
Joined: Mon Oct 08, 2007 3:02 pm
Location: Los Angeles

Re: The Byzantine General Problem

#10 Post by plasticene » Fri Aug 05, 2016 10:01 am

That's what I meant by my comment. 50 generals require a maximum of 276 questions, not 300.

User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: The Byzantine General Problem

#11 Post by Bob78164 » Fri Aug 05, 2016 12:49 pm

plasticene wrote:That's what I meant by my comment. 50 generals require a maximum of 276 questions, not 300.
24*25/2=300. But the answer given in this week's column is N - 1, or 49. I'm in the air today so I can't yet verify the logic of the given solution. --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
plasticene
Posts: 1486
Joined: Mon Oct 08, 2007 3:02 pm
Location: Los Angeles

Re: The Byzantine General Problem

#12 Post by plasticene » Fri Aug 05, 2016 6:38 pm

Oh, never mind, I'm just senile. :roll:

Post Reply