1 Mazes In The Theory of Computer Science Dana Moshkovitz.

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
Introduction to Graphs
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.
Combinatorial Algorithms
Approximation Algorithms for Unique Games Luca Trevisan Slides by Avi Eyal.
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.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 8 May 4, 2005
Randomized Algorithms for the Loop Cutset Problem Author: Ann Becker, Beuven Bar-Yehuda Dan Geiger Beuven Bar-Yehuda Dan Geiger Class presentation for.
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
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Complexity 1 Mazes And Random Walks. Complexity 2 Can You Solve This Maze?
Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.
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.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
1 The TSP : NP-Completeness Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Approximation Algorithms Pages ADVANCED TOPICS IN COMPLEXITY THEORY.
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.
Chapter 10 Graph Theory Eulerian Cycle and the property of graph theory 10.3 The important property of graph theory and its representation 10.4.
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.
Seminar on random walks on graphs Lecture No. 2 Mille Gandelsman,
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.
Graph Theory Def: A graph is a set of vertices and edges G={V,E} Ex. V = {a,b,c,d,e} E = {ab,bd,ad,ed,ce,cd} Note: above is a purely mathematical definition.
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
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
Richard Anderson Autumn 2016 Lecture 5
Richard Anderson Winter 2019 Lecture 5
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

1 Mazes In The Theory of Computer Science Dana Moshkovitz

2 Can You Solve This Maze?

3 The Solution

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

5 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

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

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

8 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…

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

10 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

11 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

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

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

14 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). 

15 Illustrated Proof

16 Using the Asymptotic Estimate Corollary: Starting from some node i, we will revisit i within expectedly 2|E|/d i steps.

17 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.

18 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!

19 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.

20 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”.

21 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

22 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. 