15 251 great theoretical ideas in computer science
play

15-251 Great Theoretical Ideas in Computer Science Lecture 23: - PowerPoint PPT Presentation

15-251 Great Theoretical Ideas in Computer Science Lecture 23: Markov Chains November 17th, 2015 My typical day (when I was a student) 9:00am Work X b f ( x ) = f ( S ) S ( x ) S [ n ] My typical day (when I was a student) 9:01am


  1. 15-251 Great Theoretical Ideas in Computer Science Lecture 23: Markov Chains November 17th, 2015

  2. My typical day (when I was a student) 9:00am Work X b f ( x ) = f ( S ) χ S ( x ) S ⊆ [ n ]

  3. My typical day (when I was a student) 9:01am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 60% Surf

  4. My typical day (when I was a student) 9:02am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 10% 60% 60% 30% Email Surf

  5. My typical day (when I was a student) 9:03am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 50% 10% 60% 50% 60% 30% Email Surf

  6. My typical day (when I was a student) 9:00am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 50% 10% 60% 50% 60% 30% Email Surf

  7. My typical day (when I was a student) 9:01am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 50% 10% 60% 50% 60% 30% Email Surf

  8. My typical day (when I was a student) 9:02am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 50% 10% 60% 50% 60% 30% Email Surf

  9. My typical day (when I was a student) 9:03am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 50% 10% 60% 50% 60% 30% Email Surf

  10. My typical day (when I was a student) 9:04am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 50% 10% 60% 50% 60% 30% Email Surf

  11. My typical day (when I was a student) 9:05am Work X b f ( x ) = f ( S ) χ S ( x ) 40% S ⊆ [ n ] 50% 10% 60% 50% 60% 30% Email Surf

  12. And now Prepare 15-251 slides 100%

  13. Markov Model

  14. Markov Model Andrey Markov (1856 - 1922) Russian mathematician. Famous for his work on random processes. ( is Markov’s Inequality.) Pr[ X ≥ c · E [ X ]] ≤ 1 /c

  15. Markov Model Andrey Markov (1856 - 1922) Russian mathematician. Famous for his work on random processes. ( is Markov’s Inequality.) Pr[ X ≥ c · E [ X ]] ≤ 1 /c A model for the evolution of a random system. The future is independent of the past, given the present.

  16. Cool things about the Markov model - It is a very general and natural model. Extraordinary number of applications in many different disciplines: computer science, mathematics, biology, physics, chemistry, economics, psychology, music, baseball,... - The model is simple and neat. - A beautiful mathematical theory behind it. Starts simple, goes deep.

  17. The plan Motivating examples and applications Basic mathematical representation and properties Applications

  18. The future is independent of the past, given the present.

  19. Some Examples of Markov Models

  20. Example: Drunkard Walk Home

  21. Example: Diffusion Process

  22. Example: Weather A very(!!) simplified model for the weather. S = sunny Probabilities on a daily basis: R = rainy Pr[sunny to rainy] = 0.1 S R Pr[sunny to sunny] = 0.9 S  0 . 9 � 0 . 1 Pr[rainy to rainy] = 0.5 R 0 . 5 0 . 5 Pr[rainy to sunny] = 0.5 Encode more information about current state for a more accurate model.

  23. Example: Life Insurance Goal of insurance company: figure out how much to charge the clients. Find a model for how long a client will live. Probabilistic model of health on a monthly basis: Pr[healthy to sick] = 0.3 Pr[sick to healthy] = 0.8 Pr[sick to death] = 0.1 Pr[healthy to death] = 0.01 Pr[healthy to healthy] = 0.69 Pr[sick to sick] = 0.1 Pr[death to death] = 1

  24. Example: Life Insurance Goal of insurance company: figure out how much to charge the clients. Find a model for how long a client will live. Probabilistic model of health on a monthly basis: 0.69 H S D 0.1 H   0 . 69 0 . 3 0 . 01 S 0 . 8 0 . 1 0 . 1   D 0 0 1 1

  25. Some Applications of Markov Models

  26. Application: Algorithmic Music Composition

  27. Application: Image Segmentation

  28. Application: Automatic Text Generation Random text generated by a computer (putting random words together): “While at a conference a few weeks back, I spent an interesting evening with a grain of salt.” Google: Mark V Shaney

  29. Application: Speech Recognition Speech recognition software programs use Markov models to listen to the sound of your voice and convert it into text.

  30. Application: Google PageRank 1997 : Web search was horrible Sorts webpages by number of occurrences of keyword(s).

  31. Application: Google PageRank Founders of Google Larry Page Sergey Brin $20Billionaires

  32. Application: Google PageRank Jon Kleinberg Nevanlinna Prize

  33. Application: Google PageRank How does Google order the webpages displayed after a search? 2 important factors: - Relevance of the page. - Reputation of the page. The number and reputation of links pointing to that page. Reputation is measured using PageRank. PageRank is calculated using a Markov Chain.

  34. The plan Motivating examples and applications Basic mathematical representation and properties Applications

  35. The Setting There is a system with n possible states/values. At each time step, the state changes probabilistically. 1 2 1 2 1 1 1 4 3 2 3 4 n 1

  36. The Setting There is a system with n possible states/values. At each time step, the state changes probabilistically. 1 2 1 2 1 1 1 4 3 2 Memoryless 3 4 The next state only depends n 1 on the current state. Evolution of the system: random walk on the graph.

  37. The Setting There is a system with n possible states/values. At each time step, the state changes probabilistically. 1 2 1 2 1 1 1 4 3 2 Memoryless 3 4 The next state only depends n 1 on the current state. Evolution of the system: random walk on the graph.

  38. The Definition A Markov Chain is a directed graph with V = { 1 , 2 , . . . , n } such that: - Each edge is labeled with a value in (0 , 1] (a positive probability). self-loops allowed - At each vertex, the probabilities on outgoing edges sum to . 1 ( - We usually assume the graph is strongly connected. i.e. there is a path from i to j for any i and j. ) The vertices of the graph are called states. The edges are called transitions. The label of an edge is a transition probability.

  39. Example: Markov Chain for a Lecture Arrive 1 1 1 2 2 2 1 4 Playing with phone Paying attention 1 4 1 1 3 2 4 4 1 2 Kicked out Writing notes 1 This is not strongly connected.

  40. Notation Given some Markov Chain with n states: For each we have a random variable: t = 0 , 1 , 2 , 3 , . . . the state we are in after steps. X t = t 1 2 n Define . π t [ i ] = Pr[ X t = i ] π t = [ p 1 p 2 · · · p n ] π t [ i ] = probability of being in X p i = 1 state i after t steps. i We write . ( has distribution ) X t ∼ π t X t π t Note that someone has to provide . π 0 Once this is known, we get the distributions π 1 , π 2 , . . .

  41. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 X 0 ∼ π 0 X 0 = 1 1 2 1 2 1 1 1 4 3 2 3 4 4 1

  42. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 X 0 ∼ π 0 X 0 = 1 1 2 1 2 X 1 = 4 X 1 ∼ π 1 1 1 1 4 3 2 3 4 4 1

  43. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 X 0 ∼ π 0 X 0 = 1 1 2 1 2 X 1 = 4 X 1 ∼ π 1 1 1 X 2 = 3 X 2 ∼ π 2 1 4 3 2 3 4 4 1

  44. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 X 0 ∼ π 0 X 0 = 1 1 2 1 2 X 1 = 4 X 1 ∼ π 1 1 1 X 2 = 3 X 2 ∼ π 2 1 4 3 2 X 3 = 4 X 3 ∼ π 3 3 4 4 1

  45. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 X 0 ∼ π 0 X 0 = 1 1 2 1 2 X 1 = 4 X 1 ∼ π 1 1 1 X 2 = 3 X 2 ∼ π 2 1 4 3 2 X 3 = 4 X 3 ∼ π 3 3 4 4 X 4 = 2 X 4 ∼ π 4 1

  46. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 X 0 ∼ π 0 X 0 = 1 1 2 1 2 X 1 = 4 X 1 ∼ π 1 1 1 X 2 = 3 X 2 ∼ π 2 1 4 3 2 X 3 = 4 X 3 ∼ π 3 3 4 4 X 4 = 2 X 4 ∼ π 4 1 X 5 = 3 X 5 ∼ π 5

  47. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 X 0 ∼ π 0 X 0 = 1 1 2 1 2 X 1 = 4 X 1 ∼ π 1 1 1 X 2 = 3 X 2 ∼ π 2 1 4 3 2 X 3 = 4 X 3 ∼ π 3 3 4 4 X 4 = 2 X 4 ∼ π 4 1 X 5 = 3 X 5 ∼ π 5 X 6 ∼ π 6 X 6 = 4 . . .

  48. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 Pr[1 → 2 in one step] 1 2 = Pr[ X 1 = 2 | X 0 = 1] 1 2 = Pr[ X t = 2 | X t − 1 = 1] 1 1 1 4 3 2 3 4 4 1

  49. Notation 1 2 3 4 Let’s say we start at state 1 , i.e., X 0 ∼ [1 0 0 0] = π 0 1 Pr[ X 1 = 2 | X 0 = 1] = 1 2 2 1 2 Pr[ X 1 = 3 | X 0 = 1] = 0 1 1 1 1 Pr[ X 1 = 4 | X 0 = 1] = 4 3 2 2 3 4 Pr[ X 1 = 1 | X 0 = 1] = 0 4 1 1 Pr[ X t = 2 | X t − 1 = 4] = ∀ t 4 Pr[ X t = 3 | X t − 1 = 2] = ∀ t 1

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