20-adversary

20-adversary - Algorithms Lecture 20: Adversary Arguments...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Algorithms Lecture 20: Adversary Arguments An adversary means opposition and competition, but not having an adversary means grief and loneliness. Zhuangzi (Chuang-tsu) c. 300 BC It is possible that the operator could be hit by an asteroid and your $20 could fall off his cardboard box and land on the ground, and while you were picking it up, $5 could blow into your hand. You therefore could win $5 by a simple twist of fate. Penn Jillette, explaining how to win at Three-Card Monte (1999) 20 Adversary Arguments 20.1 Three-Card Monte Until Times Square was sanitized into TimesSquareLand TM by Mayor Rudy Guiliani, you could often find dealers stealing tourists money using a game called Three Card Monte or Spot the Lady. The dealer has three cards, say the Queen of Hearts and the two and three of clubs. The dealer shuffles the cards face down on a table (usually slowly enough that you can follow the Queen), and then asks the tourist to bet on which card is the Queen. In principle, the tourists odds of winning are at least one in three. In practice, however, the tourist never 1 wins, because the dealer cheats. There are actually four cards; before he even starts shuffling the cards, the dealer palms the queen or sticks it up his sleeve. No matter what card the tourist bets on, the dealer turns over a black card. If the tourist gives up, the dealer slides the queen under one of the cards and turns it over, showing the tourist where the queen was all along. If the dealer is really good, the tourist wont see the dealer changing the cards and will think maybe the queen was there all along and he just wasnt smart enough to figure that out. As long as the dealer doesnt reveal all the black cards at once, the tourist has no way to prove that the dealer cheated! 2 20.2 n-Card Monte Now lets consider a similar game, but with an algorithm acting as the tourist and with bits instead of cards. Suppose we have an array of n bits and we want to determine if any of them is a 1. Obviously we can figure this out by just looking at every bit, but can we do better? Is there maybe some complicated tricky algorithm to answer the question Any ones? without looking at every bit? Well, of course not, but how do we prove it? The simplest proof technique is called an adversary argument. The idea is that an all-powerful malicious adversary (the dealer) pretends to choose an input for the algorithm (the tourist). When the algorithm wants looks at a bit (a card), the adversary sets that bit to whatever value will make the algorithm do the most work. If the algorithm does not look at enough bits before terminating, then there will be several different inputs, each consistent with the bits already seen, the should result in different outputs. Whatever the algorithm outputs, the adversary can reveal an input that is has all the examined bits but contradicts the algorithms output, and then claim that that was the input that he was...
View Full Document

Page1 / 7

20-adversary - Algorithms Lecture 20: Adversary Arguments...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online