Complexity 1 Mazes And Random Walks. Complexity 2 Can You Solve This Maze?

Slides:



Advertisements
Similar presentations
Reductions Complexity ©D.Moshkovitz.
Advertisements

2 4 Theorem:Proof: What shall we do for an undirected graph?
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Review Binary Search Trees Operations on Binary Search Tree
COMP 553: Algorithmic Game Theory Fall 2014 Yang Cai Lecture 21.
Complexity Theory Lecture 4 Lecturer: Moni Naor. Recap Last week: Space Complexity Savitch’s Theorem: NSPACE(f(n)) µ SPACE(f 2 (n)) –Collapse of NPSPACE.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
NL equals coNL Section 8.6 Giorgi Japaridze Theory of Computability.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
Agrawal-Kayal-Saxena Presented by: Xiaosi Zhou
Approximation Algorithms for Unique Games Luca Trevisan Slides by Avi Eyal.
The number of edge-disjoint transitive triples in a tournament.
2 4 Theorem:Proof: What shall we do for an undirected graph?
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 18-1 Complexity Andrei Bulatov Probabilistic Algorithms.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
(Omer Reingold, 2005) Speaker: Roii Werner TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A AA A A A A AA A.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
1 Mazes In The Theory of Computer Science Dana Moshkovitz.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 8 May 4, 2005
Randomized Computation Roni Parshani Orly Margalit Eran Mantzur Avi Mintz
Complexity ©D.Moshkovits 1 Space Complexity Complexity ©D.Moshkovits 2 Motivation Complexity classes correspond to bounds on resources One such resource.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Analysis of Algorithms CS 477/677
CSE 421 Algorithms Richard Anderson Lecture 4. What does it mean for an algorithm to be efficient?
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Complexity 1 Hardness of Approximation. Complexity 2 Introduction Objectives: –To show several approximation problems are NP-hard Overview: –Reminder:
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
Undirected ST-Connectivity In Log Space
Undirected ST-Connectivity In Log Space Omer Reingold Slides by Sharon Bruckner.
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
Ch. 8 & 9 – Linear Sorting and Order Statistics What do you trade for speed?
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Approximation Algorithms Pages ADVANCED TOPICS IN COMPLEXITY THEORY.
Expanders via Random Spanning Trees R 許榮財 R 黃佳婷 R 黃怡嘉.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
Markov Chains and Random Walks. Def: A stochastic process X={X(t),t ∈ T} is a collection of random variables. If T is a countable set, say T={0,1,2, …
Lecture 11 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Jan Topological Order and SCC Edge classification Topological order Recognition of strongly connected components.
1 Chapter 22: Elementary Graph Algorithms II. 2 About this lecture Depth First Search DFS Tree and DFS Forest Properties of DFS Parenthesis theorem (very.
Complexity and Efficient Algorithms Group / Department of Computer Science Testing the Cluster Structure of Graphs Christian Sohler joint work with Artur.
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
NPC.
 2004 SDU 1 Lecture5-Strongly Connected Components.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
CSE 421 Algorithms Richard Anderson Autumn 2015 Lecture 5.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Theory of Computational Complexity Probability and Computing Lee Minseon Iwama and Ito lab M1 1.
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
TIRGUL 10 Dijkstra’s algorithm Bellman-Ford Algorithm 1.
Space Complexity Guy Feigenblat Based on lecture by Dr. Ely Porat Complexity course Computer science department, Bar-Ilan university December 2008.
Umans Complexity Theory Lectures
Markov Chains and Random Walks
Path Coupling And Approximate Counting
Planarity Testing.
CSE 421: Introduction to Algorithms
Turnstile Streaming Algorithms Might as Well Be Linear Sketches
Enumerating Distances Using Spanners of Bounded Degree
Advanced Algorithms Analysis and Design
Randomized Algorithms Markov Chains and Random Walks
Chapter 22: Elementary Graph Algorithms I
Analysis of Algorithms
Locality In Distributed Graph Algorithms
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

Complexity 1 Mazes And Random Walks

Complexity 2 Can You Solve This Maze?

Complexity 3 The Solution

Complexity 4 What Will We Do? Our task is to show an algorithm for general mazes. We have memory which is logarithmic in the size of the maze.

Complexity 5 Introduction Objectives: –To explore the undirected connectivity problem –To introduce randomized computations Overview: –Undirected Connectivity –Random Walks

Complexity 6 Undirected Connectivity Instance: An undirected graph G=(V,E) and two vertices s,t  V Problem: To decide if there is a path from s to t in G

Complexity 7 What Do We Know? Theorem: Directed Connectivity is NL-Complete Corollary: Undirected Connectivity is in NL.

Complexity 8 Undirected Connectivity is in NL: Revisit Our non-deterministic algorithm: At each node, non- deterministically choose a neighbor and jump to it

Complexity 9 What If We Don’t Have “Magic Coins”? Non-deterministic “algorithms” use “magic coins” to lead them to the right solution if one exists. In real life, these are unavailable…

Complexity 10 Idea! What if we have plain coins? In other words, what if we randomly choose a neighbor?

Complexity 11 Random Walks Add a self loop to each vertex. Start at s. Let d i be the degree of the current node. Jump to each of the neighbors with probability 1/d i. Stop if you get to t. st

Complexity 12 Notations Let v t denote the node visited at time t (v 0 =s). Let p t (i) = Pr[v t =i] p 0 (s)=1 p 1 (a)=0.5 sta

Complexity 13 Stationary Distribution Lemma: If G=(V,E) is a connected graph, for any i  V,

Complexity 14 Weaker Claim We’ll prove a weaker result: Lemma: If for some t, for any i  V, then for any i  V,

Complexity 15 Proof Proof:  d i =2|E|. If the i th node has weight d i at time t, then it retains this weight at time t+1 (it’s reachable (only) from its d i neighbors). 

Complexity 16 Illustrated Proof

Complexity 17 Using the Asymptotic Estimate Corollary: Starting from some node i, we will revisit i within expectedly 2|E|/d i steps. Proof: Since the walk has no “memory”, the expected return time is the same as the asymptotic estimate 

Complexity 18 One-Sided Error Note that if the right answer is ‘NO’, we clearly answer ‘NO’. Thus, a random walk algorithm has one- sided error. Such algorithms are called “Monte-Carlo” algorithms.

Complexity 19 How Many Steps Are Needed? If the right answer is ‘YES’, in how many steps do we expect to discover that? st... The probability we head in the right direction is 1/d s But every time we get here, we get a second chance!

Complexity 20 How Many Steps Are Needed? Since expectedly we return to each vertex after 2|E|/d i steps, We expect to head in the right direction after |E| steps (w.p. ½). By the linearity of the expectation, we expect to encounter t in d(s,t)  |E|  |V|  |E| steps.

Complexity 21 Randomized Algorithm for Undirected Connectivity 1.Run the random walk from s for 2|V|  |E| steps. 2.If node t is ever visited, answer “there is a path from s to t”. 3.Otherwise, reply “there is probably no path from s to t”.

Complexity 22 Main Theorem Theorem: The above algorithm -uses logarithmic space -always right for ‘NO’ instances. -errs with probability at most ½ for ‘YES’ instances. To maintain the current position we only need log|V| space Markov: Pr(X>2E[X])<½ PAP

Complexity 23 Summary We explored the undirected connectivity problem. We saw a log-space randomized algorithm for this problem. We used an important technique called random walks. 