randomness in computing
play

Randomness in Computing L ECTURE 26 Last time Randomized algorithm - PowerPoint PPT Presentation

Randomness in Computing L ECTURE 26 Last time Randomized algorithm for 3SAT Gamblers ruin Classification of Markov chains Today Stationary distributions Random walks on graphs Algorithm for - -PATH 4/23/2020


  1. Randomness in Computing L ECTURE 26 Last time • Randomized algorithm for 3SAT • Gambler’s ruin • Classification of Markov chains Today • Stationary distributions • Random walks on graphs • Algorithm for 𝑡 - 𝑢 -PATH 4/23/2020 Sofya Raskhodnikova;Randomness in Computing; based on slides by Baranasuriya et al.

  2. Classification of Markov chains • A finite Markov chain is irreducible if its graph representation consists of one strongly connected component. • A state 𝑘 is periodic if there exists an integer Δ > 1 such that Pr 𝑌 𝑢+𝑡 = 𝑘 𝑌 𝑢 = 𝑘 = 0 unless 𝑡 is divisible by Δ ; otherwise, it is aperiodic. • A Markov chain is aperiodic if all its states are aperiodic. Sofya Raskhodnikova; Randomness in Computing 4/28/2020

  3. ҧ Stationary Distributions 𝑞 𝑢 + 1 = 𝑞 𝑢 𝑸 , where ҧ 𝑞 𝑢 is the distribution of the state Recall: ҧ of the chain at time 𝑢 and 𝑸 is its transition probability matrix. • A stationary distribution of a Markov chain is a probability distribution ത 𝜌 such that ത 𝜌 = ത 𝜌𝑸 . (Describes steady state behavior of a Markov chain.) Example: Define Markov chain by the following random walk on the nodes of an 𝑜 -cycle. At each step, stay at the same node w.p. ½; go left w.p. ¼ and right w.p. ¼. Sofya Raskhodnikova; Randomness in Computing 4/28/2020

  4. Fundamental theorem • A stationary distribution of a Markov chain is a probability distribution ത 𝜌 such that ത 𝜌 = ത 𝜌𝑸 . (Describes steady state behavior of a Markov chain.) Fundamental Theorem of Markov Chains (selected items) Every finite, irreducible and aperiodic Markov chain satisfies the following: 1. There is a unique stationary distribution ത 𝜌 = (𝜌 0 , 𝜌_1, … , 𝜌 𝑜 ) , where 𝜌 𝑗 > 0 for all 𝑗 ∈ [𝑜] . For all 𝑗 ∈ [𝑜] , the hitting time ℎ 𝑗𝑗 = 1/𝜌 𝑗 . 2. Sofya Raskhodnikova; Randomness in Computing 4/28/2020

  5. Random walks on undirected graphs Given a connected, undirected graph 𝐻 = (𝑊, 𝐹) , define the following Markov chain • states = vertices of the graph • from each state 𝑤 , the chain moves to a uniformly random neighbor of 𝑤 1 if 𝑣, 𝑤 ∈ 𝐹 𝑄 𝑣𝑤 = ቐ 𝑒 𝑣 0 otherwise • Observation: This Markov chain is aperiodic iff G isn’t bipartite. Sofya Raskhodnikova; Randomness in Computing 4/23/2020

  6. Stationary distribution • Assume 𝐻 is not bipartite. Theorem A random walk on 𝐻 has stationary distribution ത 𝜌 , where 𝜌 𝑤 = 𝑒(𝑤) ෍ 2|𝐹| 𝑤∈𝑊 Sofya Raskhodnikova; Randomness in Computing 4/23/2020

  7. Hitting time, commute time, cover time • The hitting time from 𝑣 to 𝑤 , denoted ℎ 𝑣,𝑤 , is the expected time to reach state 𝑤 from state 𝑣. • The commute time between 𝑣 and 𝑤 is ℎ 𝑣,𝑤 + ℎ 𝑣,𝑤 . • The cover time of a graph 𝐻 = (𝑊, 𝐹) is the maximum over 𝑤 ∈ 𝑊 of the expected time for a random walk starting at 𝑤 to visit all nodes in 𝑊 . Sofya Raskhodnikova; Randomness in Computing 4/28/2020

  8. Bound on commute time Commute Time Lemma If 𝑣, 𝑤 ∈ 𝐹 , the commute time ℎ 𝑣,𝑤 + ℎ 𝑤,𝑣 is at most 2 𝐹 . Proof: Let 𝐸 = set of 2 |𝐹| directed edges 𝒋 → 𝒌 𝑗, 𝑘 ∈ 𝐹} 𝒋 𝒌 𝒋 𝒌 • Random walk on 𝐻 corresponds to Markov Chain with states 𝐸, where state at time 𝑢 is the directed edge taken by transition 𝑢. 𝟐 𝒋 𝒌 𝒆 𝒌 𝒍 𝒌 → 𝒍 𝒋 → 𝒌 • This Markov Chain has uniform stationary distribution. Sofya Raskhodnikova; Randomness in Computing 4/23/2020

  9. Bound on commute time Commute Time Lemma If 𝑣, 𝑤 ∈ 𝐹 , the commute time ℎ 𝑣,𝑤 + ℎ 𝑤,𝑣 is at most 2 𝐹 . Proof: This Markov Chain has uniform stationary distribution. 𝒘 → 𝒙 𝒗 𝒘 𝒗 → 𝒘 1 • By Fundamental Thm of Markov Chains, ℎ 𝑣→𝑤,𝑣→𝑤 = 2|𝐹| = expected time to traverse 𝑣 → 𝑤 starting at 𝑣 → 𝑤 = expected time to go from 𝑤 to 𝑣 and then traverse 𝑣, 𝑤 • But this is only one way to go from 𝑤 to 𝑣 to 𝑤 : 1 ℎ 𝑤,𝑣 + ℎ 𝑣,𝑤 ≤ 2|𝐹| Sofya Raskhodnikova; Randomness in Computing 4/28/2020

  10. Bound on cover time Cover Time Lemma The cover time of 𝐻 with 𝑜 nodes and 𝑛 edges is at most 2𝑛(𝑜 − 1). Proof: Choose a spanning tree 𝑈 of 𝐻 . Sofya Raskhodnikova; Randomness in Computing 4/28/2020

  11. Application: 𝒕 - 𝒖 -PATH Problem: Given an undirected graph 𝐻 with 𝑜 nodes and 𝑛 edges and two nodes, 𝑡 and 𝑢 , determine if 𝐻 contains a path from 𝑡 to 𝑢 . • Can be solved by BFS in 𝑃(𝑛 + 𝑜) time • This approach requires Ω(𝑜) space. • Today: a randomized algorithm that uses 𝑃(log 𝑜) space. Less space than it takes to store a path! Algorithm for 𝑡 - 𝑢 -PATH 1. Start a random walk from 𝑡 . 2. If the walk reaches 𝑢 in 2𝑜 3 steps, accept ; otherwise, reject . Sofya Raskhodnikova; Randomness in Computing 4/26/2020

  12. Correctness of 𝒕 - 𝒖 -PATH algorithm Theorem The algorithm uses 𝑃(log 𝑜) bits and has error probability ≤ 1/2. Proof: If there is no path, the algorithm correctly rejects. • Suppose there is an 𝑡 - 𝑢 path. • The expected time to reach 𝑢 from 𝑡 is at most the expected cover time of the connected component, which is, by Cover Lemma is ≤ 2𝑛𝑜 ≤ 𝑜 3 . • By Markov’s inequality, the probability that the walk takes more than 2𝑜 3 steps to reach 𝑢 is at most 1/2. Space analysis: Need to keep • current position: 𝑃(log 𝑜) bits • counter for the number of steps: 𝑃(log 𝑜) bits Sofya Raskhodnikova; Randomness in Computing 4/28/2020

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend