1 4 2 3 b g 1 4 1 2 1 random walk 1 random walk 2 albert
play

1/4 2/3 B G 1/4 1/2 1 randomwalk.1 randomwalk.2 - PowerPoint PPT Presentation

Graph With Probable Mathematics for Computer Science Transitions MIT 6.042J/18.062J Outgoingedge 1/3 probabilities O sumto1 Random Walks 1/4 2/3 B G 1/4 1/2 1 randomwalk.1 randomwalk.2 AlbertRMeyer, May13,2015


  1. Graph With Probable Mathematics for Computer Science Transitions MIT 6.042J/18.062J Outgoing­edge 1/3 probabilities O sum to 1 Random Walks 1/4 2/3 B G 1/4 1/2 1 random­walk.1 random­walk.2 Albert R Meyer, May 13, 2015 Albert R Meyer, May 13, 2015 Example: Gambler’s Ruin Applications of Random Walk View as random walk on a line. • Physics — Brownian motion • Finance — stocks, options $0 $1 n­1 n n+1 T­1 T • Algorithms — web search, p p ::=Pr[win a bet] k clustering k+1 q ::= 1­p = Pr[lose a bet] k k­1 q What is Pr[reach T before 0]? random­walk.3 random­walk.4 Albert R Meyer, May 13, 2015 Albert R Meyer, May 13, 2015 1

  2. Questions Example: Toss HTH before TTH ­­ ½ ½ H T 1/3 O ­H ­­ ­T T 1/4 2/3 B 1/4 G 1/2 1 • Pr[reach O in 7 steps| start at B] Pr[win] = Pr[win| ] ­­ • Average # steps from B to O = ½Pr[win| ] + ½Pr[win| ] ­H ­T • Pr[reach G before O | start at B] random­walk.5 random­walk.6 Albert R Meyer, May 13, 2015 Albert R Meyer, May 13, 2015 Example: Toss HTH before TTH Example: Toss HTH before TTH ­­ ½ ­­ ½ ½ ½ H T H T ½ ½ ½ ­H ­­ ­T T ½ ­H ­­ ­T T H T H T HH HT ­­ T HH ­­ HT T Pr[win| ] ­H = ½Pr[win| ] HH random­walk.7 random­walk.8 Albert R Meyer, May 13, 2015 Albert R Meyer, May 13, 2015 2

  3. Example: Toss HTH before TTH Example: Toss HTH before TTH ­­ ­­ ½ ½ ½ ½ H T H T ½ ­H ½ ­­ ­T T ½ ­H ½ ­­ ­T T H T H T T H HH ­­ HT T HH HT ­­ T TH TT ­­ T Pr[win| ] ­H = ½Pr[win| ] + ½Pr[win| ] HH HT random­walk.9 random­walk.10 Albert R Meyer, May 13, 2015 Albert R Meyer, May 13, 2015 Example: Toss HTH before TTH Example: Toss HTH before TTH ­­ ½ ­­ ½ ½ ½ H T H T ½ ½ ½ ­H ­T ½ ­H ­­ ­T T H T H T T T H H HH HT ­­ T TH ­­ TT T HH HT ­­ T TH ­­ TT T T H Pr[win| ] ­T = ½Pr[win| ] + ½Pr[win| ] TH TT random­walk.11 random­walk.12 Albert R Meyer, May 13, 2015 Albert R Meyer, May 13, 2015 3

  4. Example: Toss HTH before TTH Example: Toss HTH before TTH ­­ ­­ ½ ½ ½ ½ H T H T ½ ­H ½ ­­ ­T T ½ ­H ½ ­­ ­T T H T H T T T T H H HH ­­ HT T TH ­­ TT T HH ­­ HT T TH TT ­­ T T T H H T H T H H Pr[win| ] HH T H win H lose T = ½Pr[win| ] + ½Pr[win| ] HH HT Pr[win| ] = 1 Pr[win| ] = 0 lose win Now solve system of linear equations for Pr[win] random­walk.13 random­walk.14 Albert R Meyer, May 13, 2015 Albert R Meyer, May 13, 2015 Questions 1/3 O 1/4 2/3 B 1/4 G 1/2 1 • Pr[reach O in 7 steps| start at B] • Average # steps from B to O • Pr[reach G before O | start at B] Just solve systems of linear equations random­walk.15 Albert R Meyer, May 13, 2015 4

  5. MIT OpenCourseWare http s ://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 20 15 For information about citing these materials or our Terms of Use, visit: http s ://ocw.mit.edu/terms.

Recommend


More recommend