10.2.1: Applications of Markov Chains (Exercises)
SECTION 10.2 PROBLEM SET: APPLICATIONS OF MARKOV CHAINS
Questions 1-2 refer to the following:
Reference: Bart Sinclair, Machine Repair Model. OpenStax CNX. Jun 9, 2005 Creative Commons Attribution License 1.0 . Download for free at http://cnx.org/contents/56f1bed0-bd34-4c28-a2ec-4a3f9ded8e18@3 . This material has been modified by Roberta Bloom, as permitted under that license.
A Markov chain can be used to model the status of equipment, such as a machine used in a manufacturing process. Suppose that the possible states for the machine are
Idle & awaiting work (I) Working on a job/task (W) Broken (B) In Repair (R)
The machine is monitored at regular intervals to determine its status; for ease of interpretation in this problem, we assume the status is monitored every hour. The transition matrix is shown below:
|
|
Questions 3-4 refer to the following description of how a Markov chain might be used to “train” a computer to generate music.
Teaching a computer music theory so that it can create music would be an extremely tedious task.
You would have to teach chord structure, different musical styles, and so on. What if you could give the program examples of pieces you considered to be music and ask it, “write something like that for me.” This is essentially how our Markov chain would work. The principle behind Markov chains in music is to generate a probability table to determine what note should come next. By feeding the program an example piece of music, the program can analyze the piece and create a probability table to determine which notes are more likely follow a given note. With the probability transition matrix one can generate random notes that still has some musical structure to it. By constructing a similar matrix for beats or note durations, one can complete a Markov chain model for music generation.
Source: © Dec 18, 2008 Frank Chen. Textbook content produced by Frank Chen is licensed under a Creative Commons Attribution License 2.0 license. Download for free at http://cnx.org/contents/62219fba-96df-418a-b9aa-14fddd7c30fa@2 ." Modified by Roberta Bloom, as permitted under this license.
The transition matrix below provides an example. The states are the notes A, A#,B,C,D,E,F,G,G#.
The matrix shows the probability of the next note (column state), given the current note (row state).
To generate computer created music, a computer program would randomly select the next note based on the previous note and the probabilities given in the transition matrix.
|
4a. If the current note is A# (A-sharp) what does the transition matrix tell us about the next note? 4b. If the next note is F, what do we know about the current note. |
Question 5 refers to the following:
Markov chains play an important role in online search.
“PageRank is an algorithm used by Google Search to rank websites in their search engine results. PageRank was named after Larry Page, one of the founders of Google. PageRank is a way of measuring the importance of website pages”
Source:
https://en.Wikipedia.org/wiki/PageRank
under the Creative Commons Attribution-ShareAlike License;
The theory behind PageRank is that pages that are linked to more often are more important and useful; identifying those that are linked to more often about a topic helps identify the pages that should be presented as most pertinent in a search.
In real world search, there are thousands or millions of pages linking together, resulting in huge transition matrices. Because of the size and other properties of these matrices, the mathematics behind PageRank is more sophisticated than the small example we examine here with only four websites. However our example is adequate to convey the main concept of PageRank and its use in search algorithms.
It should be noted that real world search algorithms, PageRank or similar Markov chain ranking schemes are only one of a variety of methods used.
Suppose we have 4 webpages that contains links to each other. We call the pages A, B, C, D.
- From page A, 30% of people link to page B, 50% link to page C, and 20% link to page D
- From page B, 50% of popele link to page A and 50% link to page D
- From page C, 10% of people link to page B, 70% link to page C, and 20% link to page D
- From page D, 20% of people link to page A, 40% to page B, 10% to page C, and 30% link to page D
(In this example, when a page links to itself, it means that a person viewing the page stays at that page and does not link to another page.)
|
|
|
|
|
|