The question of the Byzantine general. Oral algorithm OM (n. m); n = 3 m + 2

Source: Internet
Author: User

I. background of the Byzantine issue I will not describe algorithms directly here:

The following is taken from Lamport's paper:

Note the following for this algorithm:

(1) In the first round, the general will send the message to all the deputy officers, and the I-th deputy officer will receive the message as Vi. For example, 1 (Attack)

(2) In the second round, Li (the I-th deputy officer) will doubt whether the message Vi sent by the General is correct or wrong, so he will ask the remaining deputy officers. In this way, he will get the remaining (n-2) Vice value. I from 1 to n-1, so every deputy will get the remaining N-2 in the hands of the Vi. In this step, loyal Vice President j will directly send his Vj to others. The traitor sends fake messages.

When n = 7, m = 2, if the general is loyal to the Minister, then the second round of loyal Deputy officials can indeed determine the decision to be made, because they will receive (1 1 1 0 0) plus the 1 sent by the General is 1 1 1 1 0 0 0 but this algorithm is recursive and all must go to the third round. In addition, if the general is a traitor, the second round may be difficult to decide.

Here, the third round is explained, for example, L1 receives other L2 ~ L6 sent Vj, but he wants to doubt the accuracy. For example, L1 will think whether L2 sent to himself is correct? In this case, the third round of voting will be conducted.

(3) The problem following (2) in the third round. L1 will ask L3, 6 in sequence, and ask them what they sent to the last round of L2, then L1 will get L2-> L3, L2-> L4 in (2, the L2-> L5, L2-> L6 values are combined with their L2-> L1 values, use the majority function to output the messages sent by L2. Then confirm the messages sent to you by L3, L4, L5, and L6 in the second round.

In this way, L1 completes the second round of confirmation. Then L1 will output his decision from the vi value that the general sent to himself in the first step and the 5 values that are determined in the second round.

The other L2 and L3.

2. It seems that the algorithm is quite difficult. If it is still unclear, let's look at the following process:

 

Note: Two Fault Tolerance conditions proposed by Lamport

IC1: that is, all loyal Deputy officers must follow the same command to reach an agreement;

IC2: If the General is loyal, then every loyal deputy officer should act according to the general's meaning.

The general here is a traitor, so we only need to meet IC1 conditions.

Step 1: C to L1 ~ L6 sends a r a x in turn (A, R represents attack and retreat, here because C is A traitor, so you can send messages to the L1-L5 casually, here is just an example, other values can be used, as long as IC1 is satisfied)

Is Step 2:

Step 3: in step 3, L1 will be confirmed in step 2, and L2 ~ L6 sent to your own information. For example, when you confirm L2 will ask the L3-L6, in step 2 What L2 sent to you

Finally, we get the R, X (because L6 is sure to lie again at this time) combined with our own R, L1 determines in step 2 that the L2 receives the R, then the L3-L6 was confirmed. You can draw on the draft by yourself.

In fact, because the L1-L5 is loyal, they will not lie in step 2, so only need to vote L6, (a r a) is the information L6 sent to the L1-L5, the final cast is, modify A to step 2 The L1-L5 receives

You do not need to change the remaining information in the information.

Finally, the obtained L1-L5 is 4 A, 2 R. Take L1 as an example = R

L1 ~ L5 reached an agreement.

Iii. Next let's look at the signature situation: (for details about the signature algorithm, see the next blog)

Mentioned in lamport's paper:

Signing means that each time you send a message, you must sign your own name and then send it to someone else. Others can only copy the message and then forward it. This makes it easy,

And

1) The signature of the loyal commander cannot be forged, and content modification can be detected.

2) Anyone can identify the signature of the Commander. The traitor can forge the signature of the commander.

Http://blog.csdn.net/michael_kong_nju/article/details/17612969 (detailed introduction to signature algorithm)

4. Let's take a look at the relevant proof.

Proof 1: Why n> 3 m can be fault tolerant without a signature?

In Lamport's thesis, it proves that OM (m) can meet the requirements of IC (1) and IC (2) when there are at most m traitors and more than 3 m generals) when the condition is met, a theorem is introduced:

LEMMA1: For any m and k, if there are more than 2 k + m generals and a maximum of k rebels, then the algorithm OM (m) satisfies IC2 (in retrospect IC2 refers, if the general is loyal, all the deputy officers will follow the General Command ).

Proof: (1) when m = 0, if the general is loyal, because at OM (0), the loyal minister will follow the Command sent by the general. At this time, the general is loyal to the Minister, that is, to meet IC2

(2) When m is greater than 0. Mathematical induction is used to prove the validity of m-1. Assuming n> 2 k + m, the number of remaining generals in OM m-1) is n-1, but the number of traitors is still k (because the generals in the last round were loyal ministers ), n> 2 k + m-> n-1> 2 k + S-1. m-1> = 0-> n-1> 2 k. that is to say, OM m-1) has more loyal Deputy officers than traitors, so they can vote for the correct result. Can be verified at O (S-1.

Then prove the problem in "Proof 1:

Proof: through m's induction, we prove that OM (m) m> 0 by assuming OM m-1) is true.

(1) first, the general who sends the command is loyal. Then, if k is set to m, OM (m) satisfies IC2, and IC1 is satisfied when the General is loyal.

(2) If the general who sends the command is a traitor. So in the next round, there will be an 80-1 deputy official office traitor. 3 m m-1) = 2 m + 1 loyal minister,

2 m + 1> on this page, all the loyal ministers can reach an agreement. Among them, except for a general who wants to send commands, there are 3-1 and 3 m-1, n '> 3 M'. Therefore, OM (m-1) meets the conditions and must be proved.

It also proves why m + 1 replication is used. Because OM (m) satisfies. M-> 0 m + 1 in total;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.