Markov chains and production line comprising 3 machines

  • Thread starter Thread starter Joe1998
  • Start date Start date
  • Tags Tags
    Line Machines
AI Thread Summary
The discussion revolves around the application of Markov chains to model a production line with three machines, focusing on how to define the state space and transition probabilities. Participants express confusion about whether to consider two or four states, with the consensus leaning towards four states representing different combinations of working and non-working machines. There is also debate about the independence of machine failures and how they affect the overall production line. The importance of sketching a Markov chain diagram and constructing a transition matrix is emphasized as crucial for solving the problem. Clarification on these concepts is sought to aid in understanding the overall mechanics of the system.
Joe1998
Messages
36
Reaction score
4
Homework Statement
A production line comprises three machines working independently of each other. For each machine, the probability of working through the day is p ∈ (0, 1) and may breakdown during a day with probability q = 1 − p, independently of its previous history. There is a single repairman who, if he has to, repairs exactly one machine overnight. If there is a machine not working by the end of the day, then the repairman works during the night. Let Xn denote the number of working machines at the end of day before the repairman begins any over-night repair.

a-) Specify the state space of (Xn : n ≥ 0).

b-) Determine the transition matrix in terms of p.

c-) Given that 2 machines are idle tonight, what is the probability of one idle machine 3 nights later, if p = 0.8 (answer 6 decimal places).
Relevant Equations
Markov chain and probability transition matrix are mainly the two relevant equations required for this question.
I have tried solving this question, but I am not even sure where to start from and how to specify a state space for this question where it has a trick stating that a worker works overnight. However, for part a, is it the case that there are only 2 states to consider which are: {machine working, machine not working}
part b-) I am very unsure, so I don't want to type some gibberish. I mean I am not even sure if the state space is indeed only 2 states or more, so that's why I am unsure about all parts because I am not sure about part (a) in the first place.
Same story with part c, I am not able to solve it unless I get the first two parts correct.
So I would really appreciate any help here, thank you very much.
 
Last edited:
  • Like
Likes Delta2
Physics news on Phys.org
Please show us what you have done and what your thoughts are.
 
So the problem is that I am not even knowing the answer for the questions to show you what I have done. Regarding my thoughts, for part a, is it the case that there are only 2 states to consider which are: {machine working, machine not working}
part b-) I am very unsure, so I don't want to type some gibberish. I mean I am not even sure if the state space is indeed only 2 states or more, so that's why I am unsure about all parts because I am not sure about part (a) in the first place.
Same story with part c, I am not able to solve it unless I get the first two parts correct.
So I would really appreciate any help here, thank you very much.
 
Joe1998 said:
for part a, is it the case that there are only 2 states to consider which are: {machine working, machine not working}
I don't think so. It sounds like anyone of the machines failing takes the whole production line down for the rest of the day. So you have different states for different numbers of failing machines. Can you sketch the Markov Chain diagram for those different states, and indicate what the transition probability is for each transition for one day?

https://en.wikipedia.org/wiki/Markov_chain
 
Thanks for the reply Berkeman, basically you are asking me if I can do it, when in reality the reason I am asking for help is because I am not even sure how to sketch the diagram and indicate the transition probability for each transition for one day, I am just so confused about it, so any help with that would be appreciate it, thanks.
 
Joe1998 said:
Regarding my thoughts, for part a, is it the case that there are only 2 states to consider which are: {machine working, machine not working}
That’s for each machine. What are the possible relevant states for all machines? (Also seeing that all machines are equivalent and independent)
 
berkeman said:
It sounds like anyone of the machines failing takes the whole production line down for the rest of the day
I don’t think it is that explicit. It could be interpreted that way, but I am not certain it is the intent of the question writer. I see two possible interpretations:

1) if there are broken machines at the beginning of the day then they will all be switched off because the production line is broken. No machines will break on such a day.

2) If a machine is broken at the beginning of a day, the others will still work and may break during the day.

These will of course give different results but the state space should be the same.
 
  • Like
Likes PeroK and berkeman
Joe1998 said:
when in reality the reason I am asking for help is because I am not even sure how to sketch the diagram and indicate the transition probability for each transition for one day,
Please read the Wikipedia link that I provided. Also, please review your study materials about how to sketch and use Markov chains.
 
Orodruin said:
I don’t think it is that explicit. It could be interpreted that way, but I am not certain it is the intent of the question writer. I see two possible interpretations:
Hmm, I see your point. When I think of a "production line", I picture a series of operations that rely on each other to build the product. But the problem statement included "working independently", so perhaps the production "line" is actually 3 parallel lines when it gets to the machine area...
 
  • #10
berkeman said:
Hmm, I see your point. When I think of a "production line", I picture a series of operations that rely on each other to build the product. But the problem statement included "working independently", so perhaps the production "line" is actually 3 parallel lines when it gets to the machine area...
That is how I read it at first. I did not see the other interpretation until you mentioned it ... it just kind of underlines that the question is a bit vague.
 
  • Like
Likes berkeman
  • #11
berkeman said:
Please read the Wikipedia link that I provided. Also, please review your study materials about how to sketch and use Markov chains.
The Wikipedia and lecture materials are helpful, but I still can't solve the problem. I mean if my lecture material were helpful enough for me to solve the question then I would have done so without posting it here, but I simply am not knowing to solve even after reviewing my lecture notes very well, so if anyone knows how to answer the question then that would be appreciated.
 
  • #12
Joe1998 said:
The Wikipedia and lecture materials are helpful, but I still can't solve the problem. I mean if my lecture material were helpful enough for me to solve the question then I would have done so without posting it here, but I simply am not knowing to solve even after reviewing my lecture notes very well, so if anyone knows how to answer the question then that would be appreciated.
I can't really see the problem in getting started. At the end of each day there are clearly four possible states:

All three machines kaput; two machines kaput; one machine kaput; and, all machines working.

Given the repairman fixes precisely one machine overnight, then there is one fewer machine not working the next morning.

I can't see what's conceptually problematic about that.

I have no idea what a transition marix is, but I'm sure (with the resources of the Internet at my disposal) I could find out quickly enough.

For part c) you can just plough through the probabilities a day at a time (*). Although, I suspect the transition matrix gives you a quick way to do this.

(*) E.g. start with two machines out which means one the next morning. At the end of day one:

Probability that all three machines are out = ##p^2##

Probability that two machines are out is ##2p(1-p)##

Probability that one machine is out is ##(1-p)^2##

Get yourself an sheet of A4 paper and do two more days of that!
 
  • #13
PeroK said:
Get yourself an sheet of A4 paper and do two more days of that!
The entire point of the transition matrix is to not have to do that but do matrix multiplication instead ...
 
  • Like
Likes Klystron and PeroK
  • #14
Orodruin said:
The entire point of the transition matrix is to not have to do that but do matrix multiplication instead ...
Yeah, I think I can guess what it is and how it works.
 
  • #15
PeroK said:
Yeah, I think I can guess what it is and how it works.
I would think that you can, yes. :wink:

It is a rather nice construction though and you can get a lot of information about the Markov chain out of analysing it.
 
  • #16
Orodruin said:
These will of course give different results but the state space should be the same.
If one stopped machine will protects all others from failure, Xn would only be 2 or 3. If it would only protect the downstream ones, the state space would care about which machine failed.
So I think we have to suppose that the others keep running and so may still fail the same day. That makes it immaterial, for the purpose of the question, whether they are in series or parallel.
PeroK said:
I have no idea what a transition marix is
As you probably guessed, it is the matrix of probabilities, ##M=(p_{ij})##, of changing from state j to state i (the prior states being the columns). If the probabilities of the current state are given by the vector X then those for the next state are given by MX.
Typically we care about long term behaviour, so individual multiplications by M become tedious. Instead, we diagonalise M. But here we only go up to three iterations.
 
  • #17
haruspex said:
If one stopped machine will protects all others from failure, Xn would only be 2 or 3.
That assumption is not in the question. I would assume three independent production lines.
 
  • #18
haruspex said:
If one stopped machine will protects all others from failure, Xn would only be 2 or 3.
Well, that assumes that no two machines can break on the same day. In the scenario I was envisioning, the machines would still break independently, but the entire production line would not be started if any machine is broken in the morning, thus only protecting the other machines from breaking if there is a machine that is not working at the beginning of the day - not if it breaks during the day's operation. Otherwise the breaking of the machines would not be independent. Hence, the state space would be {0, 1, 2, 3} because all machines could break on the same day. However, this situation is definitely different from the situation when the machines are always started in the morning if not broken, regardless of whether any other machine is broken.
 
  • #19
PeroK said:
That assumption is not in the question. I would assume three independent production lines.
That was my assumption too but, as @berkeman pointed out, the question does say "A production line comprises three machines", implying a single production line with three machines.
 
  • #20
Orodruin said:
That was my assumption too but, as @berkeman pointed out, the question does say "A production line comprises three machines", implying a single production line with three machines.
Yes, it's not clear. If ##p= 0.8## then that looks like a fairly disastrous manufacturing operation. Perhaps it's based on British industry in the 1970's?
 
  • Haha
Likes Klystron, berkeman, Steve4Physics and 1 other person
  • #21
@Joe1998, maybe this will get you started without (I hope) telling you too much.

a) As has already noted by @PeroK, there are four (not two) possible states of the system, corresponding to the four possible values of ##X_n##.

E.g. one of the states, which we can call ##X_2##, corresponds to n=2, i.e. two machines working.

The ‘state space’ is simply a list all the possible states. If some particular format is required (e.g. set notation), you will need to check your notes to find the required format.

Post your answer to part a) so we can see it.

b) A Markov chain (diagram) will show the four states with arrows and associated probabilities.

I would draw two Markov chains. The first is to show the possible changes during the daytime (i.e. fault conditions arising). You will need to work out the probability for each arrow in terms of ‘p’s.

The second Markov chain will show any overnight repair.

You should then be able to construct a transition matrix for each chain. Their matrix product (which matrix comes first?) gives the overall transition matrix, which is what you need for part c).

If you post your work here I’m sure you will get further help.
 
  • Like
Likes WWGD and PeroK
  • #22
PeroK said:
I can't really see the problem in getting started. At the end of each day there are clearly four possible states:

All three machines kaput; two machines kaput; one machine kaput; and, all machines working.

Given the repairman fixes precisely one machine overnight, then there is one fewer machine not working the next morning.

I can't see what's conceptually problematic about that.

I have no idea what a transition marix is, but I'm sure (with the resources of the Internet at my disposal) I could find out quickly enough.

For part c) you can just plough through the probabilities a day at a time (*). Although, I suspect the transition matrix gives you a quick way to do this.

(*) E.g. start with two machines out which means one the next morning. At the end of day one:

Probability that all three machines are out = ##p^2##

Probability that two machines are out is ##2p(1-p)##

Probability that one machine is out is ##(1-p)^2##

What do you mean by "Given the repairman fixes precisely..."? If the repairman fixes it overnight, then shouldn't the machine be ready the next morning?

Get yourself an sheet of A4 paper and do two more days of that!
 
  • #23
PeroK said:
I can't really see the problem in getting started. At the end of each day there are clearly four possible states:

All three machines kaput; two machines kaput; one machine kaput; and, all machines working.

Given the repairman fixes precisely one machine overnight, then there is one fewer machine not working the next morning.

I can't see what's conceptually problematic about that.

I have no idea what a transition marix is, but I'm sure (with the resources of the Internet at my disposal) I could find out quickly enough.

For part c) you can just plough through the probabilities a day at a time (*). Although, I suspect the transition matrix gives you a quick way to do this.

(*) E.g. start with two machines out which means one the next morning. At the end of day one:

Probability that all three machines are out = ##p^2##

Probability that two machines are out is ##2p(1-p)##

Probability that one machine is out is ##(1-p)^2##

Get yourself an sheet of A4 paper and do two more days of that!
 
  • #24
So after thinking about it. The state space is {0,1,2,3} where 0 indicates that 0 machine is working, 1 indicates that 1 machine is working and so on. Now, the struggle is with part b, we have a transition matrix that contains all the entries from P[00] to P[33], where P[00] = q^3 (if I am not wrong) and P[33] = p^3 (again ,if I am not wrong. But given we have 3 machines, how can I determine, for example, P[10], P[01] and P[13]?
 
  • #25
Joe1998 said:
So after thinking about it. The state space is {0,1,2,3} where 0 indicates that 0 machine is working, 1 indicates that 1 machine is working and so on. Now, the struggle is with part b, we have a transition matrix that contains all the entries from P[00] to P[33], where P[00] = q^3 (if I am not wrong) and P[33] = p^3 (again ,if I am not wrong. But given we have 3 machines, how can I determine, for example, P[10], P[01] and P[13]?
By ##P[10]## do you mean the probability of going from 1 machine working at the start of the day to zero machines working at the end of the day?
 
  • #26
PeroK said:
By ##P[10]## do you mean the probability of going from 1 machine working at the start of the day to zero machines working at the end of the day?
I just re-read the question. I guess that's going from 1 machine working at the end of the day to zero machines working at the end of the next day.
 
  • #27
Just a thought. Given that one machine is definitely repaired every night (if needed), then analysing the problem from morning to morning would seem simpler and more logical. We would have only three states, as there would be no option to have zero machines working.

I guess you have to do the problem as stated. From a practical point of view, it's the number of machines working at the start of the day that is of most operational interest, I would say.
 
  • Like
Likes Klystron
  • #28
I wrote a Python script to do the matrix multiplication. So, I have an answer for part c) if you want to post what you get.
 
  • #29
PeroK said:
then analysing the problem from morning to morning would seem simpler and more logical.
Not if you want to know how much to pay the repair man. :wink:

While it may be simpler to analyse, it does throw away information (if there are zero machines broken two mornings in a row, you will not know if the repair man has worked through the night in between).
 
  • #30
Joe1998 said:
P[00] = q^3
q³ is the probability of all three machines breaking down during a day, i.e. a state change of 3→0, not 0→0.

Your first task is to decide (and clearly state) over what time-period (T) your Markov chain (and its associated transition matrix) applies. The start and end times must be unambiguous or things will get confused. E.g. you could choose:
a) start of working day to start of next working day, or
b) end of working day to end of next working day.

Or you might want to consider using two time-periods: working-period (daytime) and repair-period (nightime) and having a Markov chain/transition matrix for each, as suggested in Post #21.

Also, your should draw the Markov chain before the matrix.
 
  • Like
Likes Klystron
  • #31
Orodruin said:
While it may be simpler to analyse, it does throw away information (if there are zero machines broken two mornings in a row, you will not know if the repair man has worked through the night in between).
The analysis and the resulting matrix are exactly the same. The difference is the state space. In one case the number working is 0, 1 or 2, while in the other it is 1, 2 or 3.
@Joe1998, a useful check is that each column of the matrix should add to 1.
Please post the matrix you get. It will be easier to write using both p and q rather than all in terms of p.
 
  • #32
haruspex said:
The analysis and the resulting matrix are exactly the same. The difference is the state space. In one case the number working is 0, 1 or 2, while in the other it is 1, 2 or 3.
This is not correct. In the case of checking how many machines are broken in the evening, it can be 0, 1, 2, or 3. If checking in the morning, it can be 0, 1, or 2. In the first case, the repair man needs to work through the night if the state is not zero. In the second, we do not know if the repair man had to work through the night if the state is zero.

Edit: Effectively, the night work is a deterministic process that just changes the state space by merging two states (0 and 1 broken -> 0) and relabeling the other two (2->1 and 3->2).
 
  • #33
Orodruin said:
This is not correct. In the case of checking how many machines are broken in the evening, it can be 0, 1, 2, or 3. If checking in the morning, it can be 0, 1, or 2. In the first case, the repair man needs to work through the night if the state is not zero. In the second, we do not know if the repair man had to work through the night if the state is zero.
Whoops - thanks. The last two columns are identical for p.m., so I guess I am agreeing with @PeroK that a.m. is simpler to analyse and with you about lost info. But the lost info is easily recovered after solving, no?
 
Last edited:
  • #34
haruspex said:
Typically we care about long term behaviour, so individual multiplications by M become tedious. Instead, we diagonalise M. But here we only go up to three iterations.
Just to mention for the OP, a typical such question would be how often the repair man would have to work through the night on average in the long term. This may be worth thinking about later, but solve the present problem first.
haruspex said:
As you probably guessed, it is the matrix of probabilities, M=(pij), of changing from state j to state i (the prior states being the columns). If the probabilities of the current state are given by the vector X then those for the next state are given by MX.
I think it is also worth noting that some texts will use the transposed definition of the above one (i.e., the element pij being the probabilty of going from state i to state j). With that definition, the state vector X is instead a row vector and is multiplied from the right by the transition matrix. I believe this notation is more common among mathematicians, but I may be wrong. Both notations work and are just each other's transpose of course, but it may be relevant to iron out some confusions.
 
  • #35
haruspex said:
But the lost info is easily recovered after solving, no?
No. Even if you know the exact sequence realized you cannot recover the information. Let's say you have the following sequence of broken machines in the morning: 100210. You cannot know whether the repair man had to work the night between day 2 and 3 as you have the transition 0->0. Either one machine broke on the second day or none did, but we have no way of knowing which based on only that information.

Edit: However, you can probably still figure out how much to pay the repair man on average (if you know the probabilities - if you have to figure out the probabilities you must estimate them from data and you can only do that without error if you have an infinite realization).
 
  • #36
Orodruin said:
No. Even if you know the exact sequence realized you cannot recover the information
I meant that if you use the a.m. analysis to find the probability distribution at the start of day n then it is easy to find the distribution at the end of day n.
 
  • #37
Steve4Physics said:
q³ is the probability of all three machines breaking down during a day, i.e. a state change of 3→0, not 0→0.

Your first task is to decide (and clearly state) over what time-period (T) your Markov chain (and its associated transition matrix) applies. The start and end times must be unambiguous or things will get confused. E.g. you could choose:
a) start of working day to start of next working day, or
b) end of working day to end of next working day.

Or you might want to consider using two time-periods: working-period (daytime) and repair-period (nightime) and having a Markov chain/transition matrix for each, as suggested in Post #21.

Also, your should draw the Markov chain before the matrix.
Thanks for the reply. So if I choose option b, from end to end working day "BEFORE" the repairman begins any over-night repair. Also, there is no way I can know how to draw the Markov Chain before figuring out the transition matrix, because I draw it by deriving the values from the transition matrix entries.

Regarding P[00], that's what I am struggling with. I mean if we start with 0 machines working by the end of the day and then we end up still with 0 working machines in the next working day, then how is that even represented? I mean does that mean we haven't started any machine and therefore the value would just be 0? Or does it mean we end up with 0 working machines by the end of the first day and then with 0 working machines by the end of the next day? If it is the latter, then does it mean q^3 or is that P[30] again? Yeah, so I am struggling with knowing what value does it take when we start with 0 working machine, and even worse ending up in a state of 0 working machines? Any help would be really appreciate it.

Regarding P[10], does that mean it starts with 1 working machine and ends up with zero working machines, thus it is equal to 1-p?

For P[01], again I am not sure at all what value does a "zero machine working by the end of the day" take here? is it just p here or something else?
 
  • #38
PeroK said:
I wrote a Python script to do the matrix multiplication. So, I have an answer for part c) if you want to post what you get.
Yeah, once I figure out first the transition matrix, then I will post my answer for part c and compare it with yours. However, isn't it just P^2 (where P is the transition matrix here) and then plucking out P[21] from the new matrix? Or do we have to calculate P^3 (again, P is the transition matrix here) because it is 3 nights? thanks for your help by the way, I really appreciate it buddy!
 
Last edited:
  • #39
Joe1998 said:
Thanks for the reply. So if I choose option b, from end to end working day "BEFORE" the repairman begins any over-night repair. Also, there is no way I can know how to draw the Markov Chain before figuring out the transition matrix, because I draw it by deriving the values from the transition matrix entries.

Regarding P[00], that's what I am struggling with. I mean if we start with 0 machines working by the end of the day and then we end up still with 0 working machines in the next working day, then how is that even represented? I mean does that mean we haven't started any machine and therefore the value would just be 0? Or does it mean we end up with 0 working machines by the end of the first day and then with 0 working machines by the end of the next day? If it is the latter, then does it mean q^3 or is that P[30] again? Yeah, so I am struggling with knowing what value does it take when we start with 0 working machine, and even worse ending up in a state of 0 working machines? Any help would be really appreciate it.

Regarding P[10], does that mean it starts with 1 working machine and ends up with zero working machines, thus it is equal to 1-p?

For P[01], again I am not sure at all what value does a "zero machine working by the end of the day" take here? is it just p here or something else?
To avoid getting confused, it might be better to start with two matrices, one for the change during the day and one for the change overnight. Assuming the columns represent the prior state, the first matrix has three columns (1, 2, 3) and four rows (0 to 3), while the second has four columns and three rows.
Armed with those, you can multiply them in one order to get the 3x3 a.m. to a.m. transition matrix or in the other order to get the 4x4 p.m. to p.m. matrix.

Wrt your question about P[00], if there are none working at the end of a day, how many will be working in the morning? How many might then be working at the end of that day, and with what probabilities?
 
  • #40
haruspex said:
To avoid getting confused, it might be better to start with two matrices, one for the change during the day and one for the change overnight. Assuming the columns represent the prior state, the first matrix has three columns (1, 2, 3) and four rows (0 to 3), while the second has four columns and three rows.
Armed with those, you can multiply them in one order to get the 3x3 a.m. to a.m. transition matrix or in the other order to get the 4x4 p.m. to p.m. matrix.

Wrt your question about P[00], if there are none working at the end of a day, how many will be working in the morning? How many might then be working at the end of that day, and with what probabilities?
Working with two matrices would complete things more for me. I mean it could be just way simpler to help me with P[00], P[10] and P[01] and I can figure out the rest by myself.
In regard to to P[00], if there are non working at the end of a day, then one must be working in the morning because the repairman fixes one overnight with a prob. of p. But then, that machine might break down during the day with prob. of q, so would that mean P[00] = pq?
 
  • #41
Joe1998 said:
the repairman fixes one overnight with a prob. of p
With a probability of 1.
Joe1998 said:
would that mean P[00] = pq?
No. There is exactly one working at the start of the day. What is the probability there is exactly one working at the end of the day?
Joe1998 said:
Working with two matrices would complete things more for me.
I assume you meant "complicate", but you seem very confused and separating it into the two stages is likely to help with that.
If you are struggling with P[00], wait till you get to some later cases!
 
  • #42
haruspex said:
With a probability of 1.

No. There is exactly one working at the start of the day. What is the probability there is exactly one working at the end of the day? But why do we even need to know the prob. there is exactly one working at the end of the day when we are dealing with P[00]? I mean we are transitioning here from 0 machines working to 0 machines working, so if the prob. of a machine being repaired is 1, then in the morning we have 1 machine working but it has a prob. of breaking down of q, so P[00] = q*1 = q, right?

I assume you meant "complicate", but you seem very confused and separating it into the two stages is likely to help with that.
 
  • #43
Was there something you meant to add?
 
  • #44
haruspex said:
Was there something you meant to add?
Yeah I tried to reply to your message but didn't go through properly, so will type it again here.
You said "No. There is exactly one working at the start of the day. What is the probability there is exactly one working at the end of the day?". But why do we even need to know the prob. there is exactly one working at the end of the day when we are dealing with P[00]? I mean we are transitioning here from 0 machines working to 0 machines working, so if the prob. of a machine being repaired is 1, then in the morning we have 1 machine working but it has a prob. of breaking down of q, so P[00] = q*1 = q, right?
 
  • #45
Joe1998 said:
why do we even need to know the prob. there is exactly one working at the end of the day when we are dealing with P[00]?
Yes, I should have asked for the probability it is not working at the end of the day.
Joe1998 said:
P[00] = q*1 = q, right?
Right. Here's a tougher one: P[1,2]
(By which I mean transiting from 2 working to 1. Not sure how you are defining P[xy].)
 
  • #46
haruspex said:
To avoid getting confused, it might be better to start with two matrices, one for the change during the day and one for the change overnight.
If we are starting at the end of a day with ##\{0, 1, 2, 3 \}## then the first step is start the next day with ##\{1, 2, 3, 3 \}##. I didn't use a separate matrix for that.
 
  • #47
Joe1998 said:
Yeah I tried to reply to your message but didn't go through properly, so will type it again here.
You said "No. There is exactly one working at the start of the day. What is the probability there is exactly one working at the end of the day?". But why do we even need to know the prob. there is exactly one working at the end of the day when we are dealing with P[00]? I mean we are transitioning here from 0 machines working to 0 machines working, so if the prob. of a machine being repaired is 1, then in the morning we have 1 machine working but it has a prob. of breaking down of q, so P[00] = q*1 = q, right?
Yes. To give you a start and some Latex, the first column of the transition matrix is:
$$T =
\begin{bmatrix}
q& \dots \\
p& \dots \\
0 & \dots \\
0 & \dots
\end{bmatrix}
$$
 
  • #48
Joe1998 said:
Yeah, once I figure out first the transition matrix, then I will post my answer for part c and compare it with yours. However, isn't it just P^2 (where P is the transition matrix here) and then plucking out P[21] from the new matrix? Or do we have to calculate P^3 (again, P is the transition matrix here) because it is 3 nights? thanks for your help by the way, I really appreciate it buddy!
Three nights later means computing ##P^3##, which gets messy.
 
  • #49
PeroK said:
Yes. To give you a start and some Latex, the first column of the transition matrix is:
$$T =
\begin{bmatrix}
q& \dots \\
p& \dots \\
0 & \dots \\
0 & \dots
\end{bmatrix}
$$
Why P[10] = p?
And why P[20] = P[30] = 0? I mean the transition here for P[20] is saying that we have 2 machines today, then a repairman repairs the third machine and so the probability 0 machines are working by the end of the next day is q^3, isn't that right?
 
  • #50
This is what I got for the transition matrix, is there anything wrong with it:

P[00] = q P[01] = p P[02] = p^2 P[03] = p^3

P[10] = q P[11] = p P[12] = p^2 P[13] = P^2

P[20] = q^2 P[21] = (p*q)*2 P[22] = p^2 P[23] = p^3

P[30] = q^3 P[31] = p*q^2 P[32] = q*p^2 P[33] = p^3So the reasoning for the values that I got are as follows:

P[00] = q: It means that no working machine exists by the end of one day, then a repairman repairs one machine and then it fails by the end of the next day. Thus, the probability that the one working machine at the start of the day will fail by the end of the day is q.

P[01] = p: It means that no working machine exists by the end of one day, then a repairman repairs one machine and then it remains working by the end of the next day. Thus, the probability that the one working machine remains working is p.

P[02] = p^2: It means that no working machine exists by the end of one day, then a repairman repairs one machine and then it remains working by the end of the next day, but also an extra working machine is added to the production line. Thus, the probability that both machines remain working during the day is p^2.

P[03] = p^3: It means that no working machine exists by the end of one day, then a repairman repairs one machine and then it remains working by the end of the next day, but also 2 extra working machines are added to the production line. Thus, the probability that both machines remain working during the day is p^3.

P[10] = q: It means that one working machine exists by the end of one day. Thus, the probability that the machine breaks down by the end of the day is q (Sorry I typed p, when it should be q, right?).

P[11] = p: It means that one working machine exists by the end of one day. Thus, the probability that the machine remains working by the end of the day is p (sorry I thought it is p*q but now I think it is just p).

P[12] = p^2: It means that one working machine exists by the end of one day. Thus, the probability that the machine remains working by the end of the day plus an extra working machine is added, is p^2 (or is it just 0, because the probability of adding an extra machine is not specified in the question which means it is zero?)

P[13] = p^2: It means that one working machine exists by the end of one day. Thus, the probability that the machine remains working by the end of the day plus 2 extra working machines are added, is p^2 (or is it just 0, because the probability of adding an extra machine is not specified in the question which means it is zero?)

P[20] = q^2: It means two working machines exist by the end of one day. Thus, the probability that both of the machines break down by the end of the next day is q^2

P[21] = (p*q)*2: It means two working machines exist by the end of one day. Thus, the probability that one of the machines breaks down by the end of the next day while the other remains working is (p*q)*2 (the reason it is multiplied by 2 is because it could be machine 1 or machine 2 that breaks down or remains work).

P[22] = p^2: It means two working machines exist by the end of one day. Thus, the probability that both remain working by the end of the next day is p^2

P[23] = p^3: It means two working machines exist by the end of one day. Thus, the probability that both remain working by the end of the next day plus an extra machine is added, is p^3 (or is it just 0, because the probability of adding an extra machine is not specified in the question which means it is zero?)

P[30] = q^3: It means 3 working machines exist by the end of one day. Thus, the probability that all 3 machines will be broken down by the end of the next day is q^3

P[31] = p*q^2: It means 3 working machines exist by the end of one day. Thus, the probability that 2 machines will be broken down by the end of the next day and 1 machine remains working by the end of the next day, is p*q^2

P[32] = q*p^2: It means 3 working machines exist by the end of one day. Thus, the probability that 1 machine will be broken down by the end of the next day and 2 machines remain working by the end of the next day, is q*p^2

P[33] = p^3: It means 3 working machines exist by the end of one day. Thus, the probability that all 3 machines remain working by the end of the next day, is p^3.

Please correct me as soon as you can and let me know what mistakes did I make?

Thanks for your help, I truly appreciate it everyone!
 
Last edited:
Back
Top