Introduction to Probability MSIS 575 Class notes : October 30, 2000 Scribe : Daniel Josiah-Akintonde Graph Theory A graph G = (V,E) is set of vertices V, and a set of edges E. There are two types of graphs: (1) directed graphs (digraphs), and (2) undirected graphs. 1 2 1 2 5 4 3 4 3 Directed graph 5 Undirected graph Adjacency matrix for a directed graph 1 2 3 4 5 1 2 3 4 5 1 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 1 0 Adjacency matrix for a undirected graph 1 2 3 4 5 1 2 3 4 5 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 Def. A walk in a digraph is a sequence of edges of the form : (a,b), (b,c), (c,d),…..(y,z) Def. A path is a walk where a vertex is visited at most once. Examples: (a walk) : 1211324 (s path ) : 1324 Def. A circuit is a walk from a vertex to itself. Def. A cycle is a path from a vertex to itself. Notes : All the above definitions apply to both directed and undirected graphs. Def. An undirected graph is connected if there is a path from any vertex j to any vertex k. Def. A directed graph is weakly connected when edges are taken to be undirected. It is strongly connected if there is a path from any vertex j to any vertex k. Theorem. Let G = (V,E) be a digraph with adjacency matrix A. Then the number of m , i.e the jk entry of Walks of length m from vertex j to vertex k is [A ] jk matrix A raised to power m. Proof. By induction hypothesis. [A ] For m = 0, A For m = 1, 1 = jk = [I ] jk A Assume true for m. Then number of walks of length m from j to k is m , need to show that number of walks of length m+1 from j to k is (A ) (A jk m 1 ) jk So, number of walks of length m+1 from j to k = (# of walks of length m from j to 1)(# of edges from 1 to k) + (# of walks of length m from j to 2)(# of edges from 2 to k) + . . + (# of walks of length m from j to n)(# of edges from n to k) m m = + + + …….. (A ) (A ) 1k j1 = = m (A (A A) (A ) (A ) j2 2k jk m 1 ) jk If there is path from vertex j to vertex k, then one of the matrices 2 , 3 , ………. , A A A Must have a non-zero entry at the jk position. It there is no path, then there is no walk. Markov Chains Represent the [states] possible values of a discrete random variable by the vertices of a digraph. 1/4 1 1/4 4 1/2 1/2 1/3 1/3 1/6 2/3 2 1/4 3 1/2 1/4 This is a markov chain. The sum of out going probabilities from any node is 1. Def. Let X 1 , X 2 , X 3 , …….. X n be a sequence of random variables. The Sequence is called a markov chain if Pr[ X n = j | X n 1 = j,X 1 n2 = j 2 , , X 0 = j 0 ] = Pr[[ X n = j | X n 1 = j] 1 Def. A markov chain is homogeneous if: Pr[[ X n = j | X n 1 = k] = P jk Example: In the above example V = {1 , 2 , 3 , 4}. The adjacency matrix is : P = 1 / 4 1 / 2 0 0 2/3 0 0 1/ 4 1/ 2 0 1/ 3 1/ 6 1/ 4 1/ 3 1/ 4 1 / 2 The sum of each row is 1. Pr[ X 1 = 1] = Pr[[ X 1 = 1 | X 0 = 1] . Pr[ X 0 = 1] + Pr[[ X 1 = 1 | X 0 = 2] . Pr[ X 0 = 2] + Pr[[ X 1 = 1 | X 0 = 3] . Pr[ X 0 = 3] + Pr[[ X 1 = 1 | X 0 = 4] . Pr[ X 0 = 4] So, = 1/16 T = P 1 In general: 0 T m = 0 T P m m = 1, 2, 3, ………… Example: One-dimensional random walk. 1-p 0 p 1 n 1 q 0 0 P= 0 0 0 0 p 0 0 0 0 0 0 q p 0 0 p 0 0 0 0 0 0 0 0 q 0 0 q p 0 0 p 0 0 0 0 0 0 0 0 0 0 0 q 0 0 0 q 0 p 0 q 0 0 0 0 0 0 p 0 Example: Urn of Ehrenfert. Molecules move from compartment A to compartment B, One at a time each with a probability proportional to number of molecules left. Let X be a random variable = number of molecules in compartment A at any Given time. p = k/n 1 q = 1-k/n 1 A B n A B 1 0 1 / n 0 1 1 / n 2/n 0 1 2/ n P= 3/ n 0 1 3/ n 0