¬… Complexity
note
o model
assumes source of random bits
o we
will assume primitives: biased coins, uniform sampling
o in
homework, see equivalent
Consider RP (one sided error)
- Does
randomness help?
- In
practice YES
- in
one theory model, no
- in
another, yes!
- in
another, maybe
- Size
n problems (2n
of them)
- matrix
of advice rows by input columns
- some
advice row witnesses half the
problems.
- delete
row and all its problems
- remaining
matrix still RP (all remaining rows didn't
have witness)
- halves
number of inputs. repeat n times.
Result: on RP of size n, exists n witnesses that cover all problems.
- polytime
algorithm: try n witnesses.
o Nonuniformity:
witnesses not known.
o RP
P/poly
oblivious versus nonoblivious adversary and algorithms.
Review tree evaluation. Moving LOE through a (linear) recurrence.
- define.
algo cost is number of leaves. n = 2h
- NOR
model
- deterministic
model: must examine all leaves. time 2h = 4h/2 = n
- by
induction: on any tree of height h, as
questions are asked, can answer such that root is not determined until
all leaves checked.
- Note:
bad instance being constructed on the fly as algorithm runs.
- But,
since algorithm deterministic, bad instance can be built in advance by
simulating algorithm.
- nondeterministic/checking
- T(0) = 1
- winning
position can guess move. W(h) = L(h - 1)
- losing
must check both. L(h) = 2W(h - 1)
- follows
W(h) = 2*W(h - 2) = 2h/2 = n1/2
- randomized-guess
which leaf wins.
- explain
W(T) = L(T1) +
L(T2)
- T(0) = 1
- W(T) is a random variable: time it takes to verify T is a win. Ditto L(T).
- W(h) = max over all height-h
winning trees of E[W(T)]
- Suppose
T1
wins.
|
W(T1oT2)
|

|
L(T1)
+ [evalT2]L(T2)
|
|
|
W(h)
|
=
|
(3/2)L(h -
1)
|
|
|
L(h)
|
=
|
2W(h -
2)
|
|
|
W(h)
|
=
|
3W(h -
2) = 3h/2 = hlog32
n.793
|
|
Lower Bound
- Game
Theory
- Zero
sum games. Scissors Paper Stone. Roberta, Charles.
- Payoff
Matrix M. Entries are (large) strategies.
chess.
- Optimal
strategies
- row
wants to maximize, column to minimze
- suppose
Roberta picks i. Guarantees
Mij.
- (Pessimistic)
R-optimal strategy: choose i to

Mij.
- (Pessimistic)
C-optimal strategy: choose j to

Mij.
- When C-optimal and R
optimal strategies match, gives solution of game.
- if
solution exists, knowing opponents strategy useless.
- Sometimes,
no solution using these pure strategies
- Randomization:
- mixed strategy: distribution over pure ones
- R uses dist p, C uses dist q,
expected payoff pTMq
- Von
Neumann:

pTMq = 
pTMq
that is, always exists solution in
mixed strategies.
- Once p fixed, exists optimal pure q,
and vice versa
- Yao's
minimax method:
- Column
strategies algorithms, row strategies inputs
- payoff
is expected running time
- randomized
algorithm is mixed strategy
- optimum
algorithm is optimum randomized strategy
- worst
case input is corresponding optimum pure strategy
- Thus:
- worst
case expected runtime of optimum rand. algorithm
- is
payoff of game
- instead,
consider randomized inputs
- payoff
of game via optimum pure strategy
- which
is detemrinistic algorithm!
- Worst
case expected runtime of randomized algorithm for any input equals best
case running time of a deterministic algorithm for worst distribution of
inputs.
- Thus,
for lower bound on runtime, show an input distribution with no good
deterministic algorithm
¬… Game
tree evaluation.
o input
distribution: each node 1 with probability p =
(3 -
).
o every
node is 1 with probability p
o lemma:
any deterministic alg showld finish evaluating one child of a node before doing
other: depth first pruning algorithm
o Such
algorithm has probability p of finding 1 on first child, so
W(h) = W(h - 1)
+ (1 - p)W(h - 1)
= (2 - p)h = n0.694
Game tree evaluation lower bound.
- Recall
Yao's minimax principle.
- lemma:
any deterministic alg showld finish evaluating one child of a node before
doing other: depth first pruning algorithm. proof by induction.
- input
distribution: each leaf 1 with probability p =
(3 -
).
- every
node is 1 with probability p
- let T(h) be expected number of leaves evaluated from height h.
- with
probablity p, eval one child. else eval 2.
- So
T(h) = pT(h - 1)
+ 2(1 - p)T(h - 1)
= (2 - p)h = n0.694
Stable marriage.
- complete
preference lists
- stable
if no two unmarried people prefer each other.
- med
school
- always
exists.
- proposal
algorithm:
- rank
men
- lowest
unmarried man proposes in order of preference
- woman
accepts if unmarried or prefers new proposal to current mate.
- Time
Analysis:
- womean's
state only improves with time
- only
n improvements per woman
- while
unattached man, proposals continue
- must
eventually all be attached
- Stability
Analysis
- suppose
X-y are
dissatisfied with pairing X-x, Y-y.
- X proposed to y first
- y prefers current Y
to X.
¬… Average
case analysis
o nonstandard
for our course
o random
preference lists
o how
many proposals?
o principle
of deferred decisions
§ random
choices all made in advance
§ random
choices made algorithm needs them.
o used
while discussing autopartition, quicksort
o Proposal
algorithm:
§ each
proposal is random among unchosen women
§ still
hard
§ Each
proposal among all women
§ stochastic
domination
§ done
when all women get a proposal.
§ at
each step 1/n chance women gts proposal
o Coupon
collection.
§ expected
bound
§ upper
bound