Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Byzantine Generals - Computer Engineering - Lecture Slides, Slides of Computer Science

Some concept of Computer Engineering are Binary Search, Byzantine Generals, Euclid Sequences, Houses and Utilities, Malfunction Diagnosis. Main points of this lecture are: Byzantine Generals, Theme and Direction, Binary Search, Task Scheduling, String Matching, Sorting Networks, Malfunction Diagnosis, Byzantine Generals, Cryptography, Satisfiability

Typology: Slides

2012/2013

Uploaded on 04/30/2013

naji
naji 🇮🇳

4.3

(6)

88 documents

1 / 18

Toggle sidebar

Related documents


Partial preview of the text

Download Byzantine Generals - Computer Engineering - Lecture Slides and more Slides Computer Science in PDF only on Docsity! Ten Puzzling Problems in Computer Engineering t E cee eS 4 REE Bit Ld BD het Go Docsity.com Reminder on ECE 1’s Theme and Direction A puzzling problem: looks deceptively simple, but ... appears very difficult, or even impossible, but is readily tamed with the appropriate insight Each lecture starts with puzzles that we try to solve together I introduce you to CE problems that are related to the puzzles Many engineering problems are puzzle-like (especially in CE) Topics thus far: Easy, Hard, Impossible (Collatz conjecture) Placement and Routing (houses & utilities) Satisfiability (making change) Cryptography (secret message) Byzantine Generals (liars and truth-tellers) Topics for the 2nd half: Binary Search (counterfeit coin) Task Scheduling (Sudoku) String Matching (word search) Sorting Networks (rearranging trains) Malfunction Diagnosis (logical reasoning) Docsity.com Meeting Two People on the Island You meet two people A and B on the island. A says, “Both of us are from the liars tribe.” Which tribe is A from? What about B? A: Liar, B: TT D: Liar You meet two people, C and D on the island. C says, “Exactly one of us is from the liars tribe.” Which tribe is D from? You meet two people E and F on the island. E says, “It is not the case that both of us are from the truth-tellers tribe.” Which tribe is E from? What about F? E: TT, F: Liar You meet two people, G and H on the island. Each of the two makes a statement. Which tribes are G and H from? G says: “We are from different tribes.” H says: “G is from the liars tribe.” G: TT, H: Liar Docsity.com Meeting Three People on the Island You meet three people A, B, C. You ask A, “How many among you are truth-tellers?” You don’t hear her answer, so you ask B, “What did she just say?” “She said one,” he replies. Then C adds, “Don’t believe him, he is lying!” What can you say about B’s or C’s tribe? A Liar TT B Liar TT B Liar TT C Liar TT C Liar TT C Liar TT C Liar TT 1 1 0 2 2 2 1 3 Answer: B is a liar, C is a truth teller Solution by exhaustive search Docsity.com More Examples and a Variation Truth-tellers and nay-sayers: You are allowed only yes/no questions. One group of people answer truthfully and the other always answer “no” How can you tell a truth-teller apart from a nay-sayer? Is it possible to ask the exact same question twice of a truth-teller and get two different answers? Yes, just use any question whose answer is time-dependent Or say, “Did I just ask you a question for the second time?” Twelve politicians from the island go to a city hall meeting. The 1st one says: “Not a single person in this room tells the truth.” The 2nd one says: “No more than one person in this room tells the truth.” The 3rd one says: “No more than two people in this room tell the truth.” . . . The 12th one says: “No more than 11 people in this room tell the truth.” What can you say about the composition of this group of politicians? Docsity.com The Two Generals’ Paradox Troops led by two generals are camped on the outskirts of an enemy city The generals can only communicate via messengers who must travel through enemy territory and are thus subject to delays or capture The two generals have previously agreed on a plan of attack, but they must communicate to set up the attack time G2 G1 Not attacking together has dire results G1 decides to send the message, “Let’s attack at noon tomorrow” G1 will not attack before getting an acknowledgment from G2 G2 will not attack before making sure that his acknowledgment was received by G1 (because he knows G1 would not attack otherwise), so he waits for an acknowledgment of his acknowledgment ATM: dispense cash Database: reduce balance Unreliable commun. Docsity.com Liars, Randoms, and Truth-Tellers Stand for ... Crashed: Does not respond to any message Permanently failed: May respond identically to every message Permanently failed: May give the wrong response consistently Arbitrarily failed: May give an unpredictable response Maliciously failed: Gives a response that is calculated to do the maximum harm (adversary, worst-case failure) Healthy: Gives the appropriate response to every message Truth-teller Quiet Random Byzantine Nay-sayer Liar Site status … Sites communicating with one another to reach an agreement (e.g., to select a coordinating site, often called “leader”) Docsity.com The Byzantine Generals Problem A general and n – 1 lieutenant generals lead n divisions of the Byzantine army camped on the outskirts of an enemy city The n divisions can only communicate via messengers, who may be captured or arbitrarily delayed (due to the need to hide for a while) We seek a scheme for the generals to agree on a common plan of action (attack or retreat), even if some of the generals are traitors who will do anything to prevent loyal generals from reaching agreement The problem is nontrivial even if messengers are totally reliable With unreliable messengers, the problem becomes very complex G L2 L1 Docsity.com Without Malicious Faults, Voting Will Do Centralized voting with majority rule Data fusion: Obtaining dependable results from potentially incorrect, inaccurate, or incomplete data Fuser y n y y y n n y Majority opinion Approximate voting with imprecise inputs: E.g., temperature readings of 78.2, 45.5, 79.1, 78.7, 21.2, 120.0, 77.6 78.4 Mean of reasonable inputs Median of all inputs 78.2 Distributed voting: Same concept, provided erroneous values are seen identically by the fusion processes at all sites Docsity.com Voting Comes in Many Flavors Example: What time is it? Seven students write the exact time (hour and minute) on sticky notes Sort the sticky notes on the board Pick one of the following values: Fuser x1 x2 x3 x4 x7 x6 x5 x Derived opinion Majority, if a majority exists Plurality, if a plurality exists Median of all the values proposed Mean of all the values proposed Mean of five values, after removing the largest and smallest of the seven Mean of three values, after removing the 2 largest and 2 smallest values Interval voting: Each proposer supplies a range of values that is guaranteed to hold the correct value Docsity.com Mathematics of Voting Voting studied in several fields: Mathematics / Computing Political science Sociology (social choice theory) Economics Fuser x1 x2 x3 x4 x7 x6 x5 x Derived opinion No voting scheme is totally fool-proof Regular voting: Candidates A1, A2, B More qualified candidates A1 and A2 may split the votes, leading to the election of B (run-off helps in solving this problem, but creates others) Approval voting Vote for any number of candidates you like Borda voting comes pretty close to an ideal voting scheme Each participant ranks all candidates; tally votes by giving n points to each 1st-place choice, n – 1 points for 2nd place, ... , 1 point for nth place Docsity.com