Algorithms
Lecture 28: Adversary Arguments
[
Sp’10
]
An adversary means opposition and competition,
but not having an adversary means grief and loneliness.
— Zhuangzi (Chuangtsu) 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 ThreeCard Monte (1999)
28
Adversary Arguments
28.1
ThreeCard Monte
Until Times Square was sanitized into TimesSquareLand
TM
, 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, the two of spades, 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 tourist’s odds of winning are at least one in three.
In practice, however, the tourist
never
wins, because the dealer cheats. The dealer actually holds at
least
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 (which might be the
two of clubs, but most tourists won’t notice that wasn’t one o the original cards). 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 won’t see the dealer changing the cards and
will think maybe the queen
was
there all along and he just wasn’t smart enough to figure that out. As
long as the dealer doesn’t reveal all the black cards at once, the tourist has no way to prove that the
dealer cheated!
1
28.2
n
Card Monte
Now let’s 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 allpowerful
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
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 Smith
 Graph Theory, The Queen, adversary, ThreeCard Monte, Penn Jillette

Click to edit the document details