randomized algorithms
play

Randomized Algorithms Markov Chain X 0 , X 1 , X 2 , . . . 1 1 - PowerPoint PPT Presentation

Randomized Algorithms Markov Chain X 0 , X 1 , X 2 , . . . 1 1 1 / 3 2 1 / 3 1 / 3 3 2 / 3 1 / 3 M = ( , P ) ( t ) = (0) P t 1 2 1 2 3 2 1 3 reducible 1 4 1 1 3 1 / 3 2 3 4 1 4 4 1 / 3 1 /


  1. Randomized Algorithms 南京大学 尹一通

  2. Markov Chain X 0 , X 1 , X 2 , . . . 1 1 1 / 3 2 1 / 3 1 / 3 3 2 / 3 1 / 3 M = ( Ω , P ) π ( t ) = π (0) P t

  3. 1 2 1 2 3 2 1 3 reducible 1 4 1 1 3 1 / 3 2 3 4 1 4 4 1 / 3 1 / 3 3 2 / 3 1 / 3 1 periodic 1

  4. Fundamental Theorem of Markov Chain: If a finite Markov chain is irreducible and M = ( Ω , P ) π (0) aperiodic , then ∀ initial distribution t →∞ π (0) P t = π lim where is a unique stationary distribution satisfying π π P = π

  5. Fundamental Theorem of Markov Chain: If a finite Markov chain is irreducible and M = ( Ω , P ) π (0) aperiodic , then ∀ initial distribution t →∞ π (0) P t = π lim where is a unique stationary distribution satisfying π π P = π finiteness existence (Perron-Frobenius) irreducibility uniqueness ) ) (coupling) ergodicity convergence

  6. Fundamental Theorem of Markov Chain: If a Markov chain is irreducible and M = ( Ω , P ) π (0) ergodic , then ∀ initial distribution t →∞ π (0) P t = π lim where is a unique stationary distribution satisfying π π P = π ergodic : aperiodic + non-null persistent

  7. PageRank Rank: importance of a page • A page has higher rank if pointed by more high - rank pages. • High - rank pages have greater influence. • Pages pointing to few others have greater influence.

  8. PageRank ( simplified ) G ( V, E ) rank of a page: r ( v ) the web graph r ( u ) � r ( v ) = d + ( u ) u :( u,v ) ∈ E d + ( u ) : out - degree of u � 1 if ( u, v ) ∈ E, d + ( u ) P ( u, v ) = random walk: 0 otherwise . a tireless stationary distribution: rP = r random surfer

  9. Random Walk on Graph • undirected graph G ( V , E ) • walk: v 1 , v 2 , . . . ∈ V that v i +1 ∼ v i • random walk: v i +1 is uniformly chosen from N ( v i ) � 1 u � v d ( u ) P ( u, v ) = 0 u ⇥� v adjacency matrix A P = D − 1 A � d ( u ) u = v D ( u, v ) = 0 u � = v

  10. Random Walk on Graph random walk on G ( V , E ) • stationary: • convergence; • stationary distribution; • hitting time: time to reach a vertex; • cover time: time to reach all vertices; • mixing time: time to converge.

  11. Random Walk on Graph � 1 u � v G ( V , E ) d ( u ) P ( u, v ) = 0 u ⇥� v • for finite chain: irreducible and aperiodic ⇒ converge • irreducible ⇔ G is connected P t ( u, v ) > 0 A t ( u, v ) > 0 • aperiodic ⇔ G is non-bipartite bipartite ⇒ no odd cycle ⇒ period =2 non-bipartite ⇒ ∃ (2k+1)-cycle � ⇒ aperiodic undirected ⇒ ∃ 2-cycle

  12. Random Walk on Graph � 1 u � v G ( V , E ) d ( u ) P ( u, v ) = 0 u ⇥� v Stationary distribution π : π v = d ( v ) ∀ v ∈ V, 2 m d ( v ) 1 � � � d ( v ) = 1 π v = 2 m = 2 m v ∈ V v ∈ V v ∈ V d ( u ) d ( u ) = d ( v ) 1 � � ( π P ) v π u P ( u, v ) = = = π v 2 m 2 m u ∈ N ( v ) u ∈ V regular graph uniform distribution

  13. Lazy Random Walk • undirected graph G ( V , E ) • lazy random walk: flip a coin to decide whether to stay  1 u = v 2   1 P ( u, v ) = u ∼ v 2 d ( u )  0 otherwise  adjacency matrix A P = 1 2( I + D − 1 A ) � d ( u ) u = v D ( u, v ) = 0 u � = v always aperiodic!

  14. Lazy Random Walk  1 u = v 2   1 G ( V , E ) P ( u, v ) = u ∼ v 2 d ( u )  0 otherwise  Stationary distribution π : π v = d ( v ) ∀ v ∈ V, 2 m = 1 d ( v ) 2 m + 1 d ( u ) 1 � X ( π P ) v = π u P ( u, v ) 2 2 2 m d ( u ) u ∈ V u ∈ N ( v ) = d ( v ) = π v 2 m

  15. Hitting and Covering consider a random walk on G ( V , E ) • hitting time: expected time to reach v from u ⇥ ⇤ ⌅ ⇧ ⇤ X n = v ⇤ � τ u,v = E min n > 0 ⇤ X 0 = u ⇤ • cover time: expected time to visit all vertices ⇥ ⇤ ⌅ ⇧ ⇤ { X 0 , . . . , X n } = V ⇤ � C u = E n ⇤ X 0 = u min ⇤ C ( G ) = max u ∈ V C u

  16. G = K n C ( G ) = Θ ( n log n ) G : path or cycle C ( G ) = Θ ( n 2 ) G : “lollipop” K n 2 C ( G ) = Θ ( n 3 ) n 2

  17. Hitting Time ⇥ ⇤ ⌅ ⇧ ⇤ X n = v ⇤ � τ u,v = E min n > 0 ⇤ X 0 = u ⇤ π v = d ( v ) stationary distribution π 2 m Renewal Theorem: τ v,v = 1 = 2 m d ( v ) π v

  18. random walk on G ( V , E ) τ v,v = 1 = 2 m d ( v ) π v Lemma: τ u,v < 2 m uv ∈ E u 1 X τ v,v = d ( v )(1 + τ w,v ) v wv ∈ E X τ u,v < 2 m 2 m = (1 + τ w,v ) wv ∈ E

  19. Cover Time � h i � { X 0 , . . . , X n } = V C ( G ) = max u ∈ V C u � � C u = E n � X 0 = u min � Theorem: C ( G ) ≤ 4 nm pick a spanning tree T of G

  20. Cover Time � h i � { X 0 , . . . , X n } = V C ( G ) = max u ∈ V C u � � C u = E n � X 0 = u min � Theorem: C ( G ) ≤ 4 nm pick a spanning tree T of G Eulerian tour: v 1 → v 2 → · · · → v 2( n − 1) → v 2 n − 1 = v 1 2( n − 1) � C ( G ) ≤ τ v i ,v i +1 i =1 < 4 nm

  21. USTCON ( undirected s - t connectivity ) • Instance: • undirected G ( V , E ) ; • vertices: s , t G undirected • s - t connected ? t s • deterministic: • traverse: linear space • log - space ?

  22. Theorem ( Aleliunas - Karp - Lipton - Lovász - Racko ff 1979 ) USTCON can be solved by a poly - time Monte Carlo randomized algorithm with bounded one - sided error, which uses O ( log n ) extra space. unconnected ⇒ “no” • start a random walk at s ; • if reach t in steps 4 n 3 connected ⇒ return “yes” Cover time: • else return “no” C ( G ) ≤ 4 nm < 2 n 3 Markov’s inequality ⇒ space: O ( log n ) Pr [ “no” ] < 1/2

  23. Electric Network edge uv : resistance R uv potential vertex v : φ v current flow edge orientation : C u → v u → v potential difference φ u,v = φ u − φ v Kirchhoff’s Law: ∀ vertex v , flow-in = flow-out ∀ edge uv , C u → v = φ u,v Ohm’s Law: R uv

  24. Effective Resistance electrical network: 1 u 1 effective resistance R ( u , v ): potential difference between u and v required to send 1 unit of flow current from u to v

  25. each edge e u resistance R e = 1 Theorem (Chandra-Raghavan-Ruzzo-Smolensky-Tiwari 1989) τ u,v + τ v,u = 2 mR ( u, v ) ∀ u, v, ∈ V,

  26. graph G ( V , E ) construct an electrical network: for every edge e : R e = 1 each vertex u : inject d ( u ) units current flow into u a special vertex v : remove all 2 m units current flow from v Lemma: ∀ u ∈ V, φ u,v = τ u,v

  27. Lemma: ∀ u ∈ V, φ u,v = τ u,v C u → w (Kirchhoff) X d ( u ) = uw ∈ E X (Ohm) φ u,w = uw ∈ E X = ( φ u,v − φ w,v ) uw ∈ E X = d ( u ) φ u,v − φ w,v uw ∈ E 1 X φ u,v = 1 + φ w,v d ( u ) uw ∈ E

  28. Lemma: ∀ u ∈ V, φ u,v = τ u,v 1 X φ u,v = 1 + φ w,v d ( u ) uw ∈ E ⇥ ⇤ ⌅ ⇧ ⇤ X n = v ⇤ � τ u,v = E n > 0 ⇤ X 0 = u min ⇤ 1 X τ u,v = d ( u )(1 + τ w,v ) wu ∈ E 1 X = 1 + τ w,v d ( u ) wu ∈ E

  29. Lemma: ∀ u ∈ V, φ u,v = τ u,v 1 X φ u,v = 1 + φ w,v d ( u ) ) uw ∈ E has the same unique solution 1 X = 1 + τ w,v τ u,v d ( u ) wu ∈ E

  30. each edge e u resistance R e = 1 Theorem (Chandra-Raghavan-Ruzzo-Smolensky-Tiwari 1989) τ u,v + τ v,u = 2 mR ( u, v ) ∀ u, v, ∈ V, A: B: Scenario B

  31. Lemma: ∀ u ∈ V, φ u,v = τ u,v 1 X φ u,v = 1 + φ w,v d ( u ) ) uw ∈ E has the same unique solution 1 X = 1 + τ w,v τ u,v d ( u ) wu ∈ E

  32. Theorem (Chandra-Raghavan-Ruzzo-Smolensky-Tiwari 1989) τ u,v + τ v,u = 2 mR ( u, v ) ∀ u, v, ∈ V, A: B: Scenario B φ A φ B v,u = τ v,u u,v = τ u,v

  33. Theorem (Chandra-Raghavan-Ruzzo-Smolensky-Tiwari 1989) τ u,v + τ v,u = 2 mR ( u, v ) ∀ u, v, ∈ V, A: B: C: Scenario B Scenario C φ A φ C u,v = φ B φ B u,v = τ u,v v,u = τ v,u v,u = τ v,u D: D = A + C φ D u,v = φ A u,v + φ C u,v = τ u,v + τ v,u u,v : potential difference between u and v φ D to send 2 m units current flow from u to v Scenario D

  34. Theorem (Chandra-Raghavan-Ruzzo-Smolensky-Tiwari 1989) τ u,v + τ v,u = 2 mR ( u, v ) ∀ u, v, ∈ V, A: B: C: Scenario B Scenario C φ A φ C u,v = φ B φ B u,v = τ u,v v,u = τ v,u v,u = τ v,u D: D = A + C φ D u,v = φ A u,v + φ C u,v = τ u,v + τ v,u R ( u, v ) = φ D u,v Scenario D 2 m

  35. Theorem (Chandra-Raghavan-Ruzzo-Smolensky-Tiwari 1989) τ u,v + τ v,u = 2 mR ( u, v ) ∀ u, v, ∈ V, Theorem: C ( G ) ≤ 2 nm pick a spanning tree T of G Eulerian tour: v 1 → v 2 → · · · → v 2( n − 1) → v 2 n − 1 = v 1 2( n − 1) X � τ v i ,v i +1 = ( τ u,v + τ v,u ) C ( G ) ≤ i =1 uv ∈ T X ( R u,v + R v,u ) = 2 mn = 2 m uv ∈ T

  36. Theorem (Chandra-Raghavan-Ruzzo-Smolensky-Tiwari 1989) τ u,v + τ v,u = 2 mR ( u, v ) ∀ u, v, ∈ V, u v G : path 1 n = O ( n 2 ) C ( G ) ≤ 2 nm = 2 n 2 C ( G ) = Θ ( n 2 ) = Ω ( n 2 ) C ( G ) ≥ τ u,v = τ v,u τ u,v + τ v,u = 2 mR ( u, v ) = 2 n ( n − 1)

  37. Theorem (Chandra-Raghavan-Ruzzo-Smolensky-Tiwari 1989) τ u,v + τ v,u = 2 mR ( u, v ) ∀ u, v, ∈ V, G : lollipop u v K n 2 n 2 C ( G ) ≤ 2 nm = O ( n 3 ) C ( G ) = Θ ( n 3 ) = Ω ( n 3 ) C ( G ) ≥ τ u,v τ v,u = O ( n 2 ) τ u,v + τ v,u = 2 mR u,v = Ω ( n 3 )

Recommend


More recommend