Attribution Non-Commercial (BY-NC)

23 views

Attribution Non-Commercial (BY-NC)

- C++ Lab Maual
- cs503-2014-15_examveda
- SAS Enterprise Miner 12.3
- L12 Dectree14-08-09
- References of My Thesis
- A Simple QuadTree Implementation in C# - CodeProject
- Sol 9
- Methods-Class8
- 1324e2sp11a
- Rock Mechanics
- syllabus
- Class-Specific Hough Forests for Object Detection - Gall, Lempitsky - Proceedings of IEEE Conference on Computer Vision and Pattern Recognition - 2009
- gvCZVSCv
- Chapter8_DisjointSets1
- The Spatial Nearest Neighbor Skyline Queries
- Programs
- Scale-Invariant Region-Based Hierarchical Image Matching
- 5 - Trees
- Artigo Sobre Vdiff e Verilog
- 103-145-2-PB

You are on page 1of 40

Prabhakar Raghavan

IBM Almaden Research Center

San Jose, CA.

{ Typeset by FoilTEX {

Deterministic Algorithms

INPUT

ALGORITHM

OUTPUT

algorithm solves the problem

correctly (always) and quickly

(typically, the number of steps

should be polynomial in the

size of the input).

{ Typeset by FoilTEX { 1

Randomized Algorithms

INPUT

ALGORITHM

OUTPUT

RANDOM NUMBERS

takes a source of random

numbers and makes random

choices during execution.

Behavior can vary even on a

xed input.

{ Typeset by FoilTEX { 2

Randomized Algorithms

INPUT

ALGORITHM

OUTPUT

RANDOM NUMBERS

to show that this behavior is

likely to be good, on every

input.

(The likelihood is over the

random numbers only.)

{ Typeset by FoilTEX { 3

Not to be confused with the

Probabilistic Analysis of

Algorithms

RANDOM

INPUT

ALGORITHM

OUTPUT

DISTRIBUTION

to be from a probability

distribution.

Show that the algorithm works

for most inputs.

{ Typeset by FoilTEX { 4

Monte Carlo and Las Vegas

for a xed number of steps,

and produces an answer that is

correct with probability 1=3.

A Las Vegas algorithm always

produces the correct answer

its running time is a random

variable whose expectation is

bounded (say by a polynomial).

{ Typeset by FoilTEX { 5

Monte Carlo and Las Vegas

These probabilities/expectations

are only over the random

choices made by the algorithm

{ independent of the input.

Thus independent repetitions

of Monte Carlo algorithms drive

down the failure probability

exponentially.

{ Typeset by FoilTEX { 6

Advantages of randomized

algorithms

Simplicity

Performance

For many problems, a randomized

algorithm is the simplest, the

fastest, or both.

{ Typeset by FoilTEX { 7

Scope

Number-theoretic algorithms:

Primality testing (Monte Carlo).

Data structures: Sorting,

order statistics, searching,

computational geometry.

Algebraic identities: Polynomial

and matrix identity verication.

Interactive proof systems.

{ Typeset by FoilTEX { 8

Mathematical programming:

Faster algorithms for linear

programming. Rounding linear

program solutions to integer

program solutions.

Graph algorithms: Minimum

spanning trees, shortest paths,

minimum cuts.

Counting and enumeration:

Matrix permanent. Counting

combinatorial structures.

{ Typeset by FoilTEX { 9

Parallel and distributed computing:

Deadlock avoidance, distributed

consensus.

Probabilistic existence proofs:

Show that a combinatorial

object arises with non-zero

probability among objects drawn

from a suitable probability

space.

{ Typeset by FoilTEX { 10

Derandomization: First devise

a randomized algorithm, then

argue that it can be \derandomized"

to yield a deterministic algorithm.

{ Typeset by FoilTEX { 11

Game-tree evaluation

9

MAX

9 3

MIN MIN

7 9 3 17

1 7 9 5 3 2 17 12

nodes.

Each leaf has a real value.

Goal: To evaluate the root.

{ Typeset by FoilTEX { 12

Game-tree evaluation

9

MAX

9 3

MIN MIN

7 9 3 17

1 7 9 5 3 2 17 12

inspected.

Algorithm: Computes leaf-

inspection sequence.

{ Typeset by FoilTEX { 13

Simple special case

with n=2h

leaves.

All values are boolean, so

MAX!OR and MIN!AND.

Exercise: Every deterministic

algorithm can be forced to read

n leaves.

{ Typeset by FoilTEX { 14

Randomized algorithm

AND

1 0

OR OR

0 1 0 0

1 0 1 1 1 0 1 0

child of the current node.

If this does not determine

the value of the current node,

evaluate the other child.

{ Typeset by FoilTEX { 15

Analysis of tree evaluation

AND-OR trees of depth 2k (k

levels of AND and k levels of

OR on any path) will prove by

induction on k.

Expected cost for an OR

subtree evaluating to 1:

1 3k;1 + 1 2 3k;1 = 3 3k;1:

2 2 2

{ Typeset by FoilTEX { 16

Analysis of tree evaluation

For an OR subtree evaluating

to 0, we must evaluate both

of its subtrees, incurring cost

2(3k;1).

Now consider the root AND:

(a) If it is 1, both OR subtrees

must evaluate to 1 expected

cost paid is twice above, = 3k.

(b) If it is 0, at least one OR

subtree evaluates to 0.

{ Typeset by FoilTEX { 17

Game tree analysis

evaluating to 0:

k 1 1 3

2 3 + 2 23 3 :

; k ;1 k

k

Number of leaves in tree = 4 .

Thus expected cost of randomized

algorithm n0:793

{ Typeset by FoilTEX { 18

Lower bounds and the

minimax principle

bound on the performance of

all randomized algorithms for a

problem, derive instead a lower

bound for any deterministic

algorithm for the problem when

the inputs are drawn from a

probability distribution (of your

choice).

{ Typeset by FoilTEX { 19

Let I denote the set of

instances of the problem, and

A the set of deterministic

algorithms for the problem.

Any randomized algorithm can

be viewed as a probability

distribution on the algorithms in

A.

{ Typeset by FoilTEX { 20

Minimax Principle

and q over A,

min

A2A

E

C ( Ip A )] max

I 2I

E

C ( I A q )] :

{ Typeset by FoilTEX { 21

Lower bound for game tree

evaluation

distribution on instances (0=1

values for the leaves) and lower

bound the expected running

time of any deterministic algorithm.

{ Typeset by FoilTEX { 22

NOR trees instead

AND-OR tree of even depth is

equivalent to a tree of the same

depth, all of whose nodes are

NOR nodes.

We will show the lower bound

for a NOR tree with n leaves.

{ Typeset by FoilTEX { 23

The input distribution

p

Let p = (3 ; 5)=2.

Claim: The value of any

node is 1 with probability p,

independent of all other nodes

at the same level.

Claim: Any deterministic

algorithm may as well determine

the value of one sub-tree of a

node, before inspecting any leaf

of its sibling sub-tree.

{ Typeset by FoilTEX { 24

The Analysis

number of leaves it inspects in

determining the value of a node

at distance h from the leaves.

Clearly

W (h) = W (h;1)+(1;p)W (h;1):

Letting h = log2 n, this gives a

lower bound of n .

0:694

{ Typeset by FoilTEX { 25

Exercise: Why is this lower

bound weak?

{ Typeset by FoilTEX { 26

The 2-SAT Problem

Given a set of boolean clauses

in CNF each containing two

literals, nd a satisfying assignment

if one exists.

(x1 + x4)(
x4 + x3)(x2 + x
3)

Start with any tentative assignment

If there is an unsatised

clause, pick one of its two

literals at random, and ip it.

{ Typeset by FoilTEX { 27

If no solution found in 2n2

steps, declare \none exists".

Monte Carlo: If a solution

exists, will nd it with probability

> 1=2.

If not, will always declare \none

exists".

{ Typeset by FoilTEX { 28

Random Walk Analysis

What is the probability of

missing a satisfying assignment

in 2n2 steps?

Fix any particular satisfying

assignment A.

Consider the number of literals

on which the algorithm's

tentative assignment agrees

with A.

{ Typeset by FoilTEX { 29

This is a random walk on the

integers that increases with

probability at least 1=2 at

each step.

Expected time to nd an

assignment < n2.

Markov's inequality ) probability

of missing an assignment in 2n2

steps is < 1=2.

{ Typeset by FoilTEX { 30

Binary planar partitions

L2 L1

L1

s1

L2 L3

s

3

s1 s3 s3 s

s 2

2

L3

segments in the plane, build a

small linear decision tree that

has (pieces of) at most one

segment in each cell.

{ Typeset by FoilTEX { 31

Autopartitions

random order.

Extend the chosen segment (if

necessary) to cut any cells

where it is not \alone".

The expected size of the

resulting tree is n + 2nHn.

{ Typeset by FoilTEX { 32

Analysis of autopartition size

v

1

u

v

2

containing segment u.

u a v denotes l(u) cuts v in

the constructed tree.

index(u v) is i if l(u) intersects

i ; 1 other segments before

hitting v.

{ Typeset by FoilTEX { 33

Autopartitions

Pr

u a v] 1=(index(u v)+1):

Thus the expected size of the

X X

tree constructed is

n+ Pr

u a v]

n+

X X 1

u v6=u

{ Typeset by FoilTEX { 34

For any u i, index(u v) = i for

at most two v thus the above

sum is n + 2nHn.

It follows that for any n

segments in the plane, there

always exists an autopartition of

size O(n log n).

{ Typeset by FoilTEX { 35

Matrix product verication

n matrices with entries from a

nite eld F . We wish to verify

whether AB = C .

Multiplying out takes about

n3 steps { this can be cut to

O(n2:38) steps using sophisticated

algorithms.

{ Typeset by FoilTEX { 36

Simple randomized

algorithm

entries randomly drawn from

F.

Compute z = A(Bx).

If z = Cx output AB = C ,

else output AB 6= C .

Takes O(n2) steps.

{ Typeset by FoilTEX { 37

Simple randomized

algorithm

AB = C .

If AB 6= C , will output

AB = C with probability at

most 1=jFj.

{ Typeset by FoilTEX { 38

Sources

R.M. Karp. An introduction to

randomized algorithms. Discrete

Applied Mathematics, 34:165{

201, 1991.

R. Motwani and P. Raghavan.

Randomized Algorithms. Cambridge

University Press, 1995.

D. J. A. Welsh. Randomised

algorithms. Discrete Applied

Mathematics, 5:133{145, 1983.

{ Typeset by FoilTEX { 39

- C++ Lab MaualUploaded byRajat Kumar
- cs503-2014-15_examvedaUploaded byAasher Malik
- SAS Enterprise Miner 12.3Uploaded byaminiotis
- L12 Dectree14-08-09Uploaded byAllison Collier
- References of My ThesisUploaded byvanaj123
- A Simple QuadTree Implementation in C# - CodeProjectUploaded byDhiresh Das
- Sol 9Uploaded byamysure1
- Methods-Class8Uploaded byDenis Eydelman
- 1324e2sp11aUploaded bydanhse7en
- Rock MechanicsUploaded bypersianknight
- syllabusUploaded bySourabh Bansal
- Class-Specific Hough Forests for Object Detection - Gall, Lempitsky - Proceedings of IEEE Conference on Computer Vision and Pattern Recognition - 2009Uploaded byzukun
- gvCZVSCvUploaded byPrem Kumar
- Chapter8_DisjointSets1Uploaded byShrikant Patil
- The Spatial Nearest Neighbor Skyline QueriesUploaded byMaurice Lee
- ProgramsUploaded bySuresh Rajiv
- Scale-Invariant Region-Based Hierarchical Image MatchingUploaded bysatbir2008
- 5 - TreesUploaded bywe0038
- Artigo Sobre Vdiff e VerilogUploaded byDouglas Dutra
- 103-145-2-PBUploaded byirinarm
- 2013-05-22 Rational Functions 4Uploaded bySam Shah
- Queue PackageUploaded byAruna Aruchami
- 1 - 4 - About the Course (17 Min)Uploaded byStrate89
- [11] Channel Assignment for Multicast in Multi-channel Multi-radio Wireless Mesh NetworksUploaded byجعفرالشموسي
- Dp Finite QueueUploaded byZharlene Sasot
- Checkpoint AnswersUploaded byEugune Chow Mun Wai
- A Singular Mathematical PromenadeUploaded byDiegoFernandoGonzálezLarrote
- The Theory Of Games And Game Models.pdfUploaded byp_rosalin2506
- Building the Hierarchy Bridge TableUploaded byAnonymous LBD61Rrg6
- 1803.00179Uploaded bywangxy802

- Recommendation Letter 1Uploaded byHassan Zaki
- two_2012_tcm18-231389Uploaded bysanjapatil
- Memory Systems of the Brain - A Brief History and Current Perspective LR Squire 2004Uploaded byrocolmar
- Aqa Bly2h w Ms Jan12Uploaded byApplemeister
- 6 math hw q1 modeling and multiplying decimals docx - google docsUploaded byapi-218476909
- CTR Objectif MilitaireUploaded byPatrick Gallito
- Deploying Microsoft SQL Server 2008 r2 With Microsoft Hyper v on Hitachi VspUploaded byStone Wang
- BE1-CDS220_IMPackageUploaded bygusfaj
- Comparative Methods in ResearchUploaded byAl Fatima Trust
- re07075_2005-10Uploaded byAdrian Rodrigo Jofre Alvarez
- Books.S.a.ostroumov,Books authored and co-authored by Dr. S. Ostroumov. Ecology, environment, conservation, water quality, biology. Including the books, one of chapters of which was authored by him. Книги с авторством и соавторством д.б.н. С.А.Остроумова.http://www.scribd.com/doc/63499091Uploaded bySergei Ostroumov
- FCCID.io-2463456Uploaded byDenver Dela Cruz Padrigo
- 20110125_ScienceEcologyUploaded byAnna Le
- out(1)Uploaded byGabriela Ioana Ionita
- TC11_EN 50341-2-4_NNA_Germany 2015-10-26_rev3Uploaded byDarko Risteski
- Intel C++ Compiler for Windows CompatibilityUploaded byOm Dinu K
- 7th grade heredity unit overview and pre-planningUploaded byapi-350211422
- Match User Manual 2008Uploaded byEiger Es
- Development Economic SyllabusUploaded byTran Kahn
- Microprofessor-1 Monitor Program Assembly SourceUploaded byJose Luis Abasolo Mayor
- caseanalysisUploaded byapi-192210232
- PLSQL_3_4Uploaded byBaihaqi Suhaeri
- Enviro ThinUploaded byGerardo L. Cazón B.
- UPLBRDEDigest_Vol1No1Uploaded byUPLB Office of the Vice Chancellor for Research and Extension
- jamesUploaded byPriyan Ds
- Strait Kraus 2013 Music Biology PlasticityUploaded byCassia Lmt
- Soviet official and unofficialUploaded byAnna Nakai
- Exam 2 Review FallUploaded byMunaf Karowaliya
- El 31908912Uploaded byAnonymous 7VPPkWS8O
- FME-Evolution of Clock EscapementUploaded byBranislav Popkonstantinović

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.