06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

“mcs” — 2017/3/3 — 11:21 — page 926 — #934<br />

926<br />

Chapter 21<br />

Random Walks<br />

1/2<br />

1/2<br />

1 a b c<br />

1/2<br />

d<br />

1<br />

1/2<br />

Figure 21.9<br />

Problem 21.9.<br />

We use random walks on a digraph G to model the typical movement pattern of a<br />

Math <strong>for</strong> CS student right after the final exam.<br />

The student comes out of the final exam located on a particular node of the<br />

graph, corresponding to the exam room. What happens next is unpredictable, as<br />

the student is in a total haze. At each step of the walk, if the student is at node<br />

u at the end of the previous step, they pick one of the edges hu!vi uni<strong>for</strong>mly at<br />

random from the set of all edges directed out of u, and then walk to the node v.<br />

Let n WWD jV .G/j and define the vector P .j / to be<br />

P .j / WWD .p .j /<br />

1 ; : : : ; p.j /<br />

n /<br />

where p .j /<br />

i<br />

is the probability of being at node i after j steps.<br />

(a) We will start by looking at a simple graph. If the student starts at node 1 (the<br />

top node) in the following graph, what is P .0/ ; P .1/ ; P .2/ ? Give a nice expression<br />

<strong>for</strong> P .n/ .<br />

1/2<br />

1/2<br />

1<br />

(b) Given an arbitrary graph, show how to write an expression <strong>for</strong> p .j / in terms<br />

of the p<br />

.j 1/<br />

k<br />

’s.<br />

(c) Does your answer to the last part look like any other system of equations<br />

you’ve seen in this course?<br />

i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!