Question

In: Statistics and Probability

2. Imagine a collection of nine rooms, R1, R2,...,R9 connected as in the figure below. A...

2. Imagine a collection of nine rooms, R1, R2,...,R9 connected as in the figure below. A social gathering involving N people takes place in these rooms, and the percentage of persons in each room is x1, x2,...,x9. As time progresses it is observed that in a time span of fifteen minutes people mingle and either stay where they are or migrate to an adjacent room with equal probability.


(a) Suppose that 100 people are distributed through out the rooms so that R1 has 30 people, R2 has 40 people, R5 has 10 people and R8 has 20 people. After fifteen minutes how many people do we expect to have in each room.

(b) The number of people observed at a given time in rooms R1, R2,...,R9 respectively is (125,50,150,75,275,100,125,50,150). What was the number of persons in each room fifteen minutes earlier?

(c) If everybody begins in R1, how long until there are people in R9? At that time, what is the distribution of people throughout the rooms?

(d) If you were to cater an event at this location, how would you divide your resources through out the nine rooms?

Solutions

Expert Solution

In 15 mins.​, the probabilties of locations are:-

R1 R2 R3 R4 R5 R6 R7 R8 R9
R1 0.5 0.5 0 0 0 0 0 0 0
R2 0.33 0.33 0.33 0 0 0 0 0 0
R3 0 0.33​ 0.33​ 0.33​ 0 0 0 0 0
R4 0 0 0.33​ 0.33​ 0.33​ 0 0 0 0
R5 0 0 0 0.33​ 0.33​ 0.33​ 0 0 0
R6 0 0 0 0 0.33​ 0.33​ 0.33​ 0 0
R7 0 0 0 0 0 0.33​ 0.33​ 0.33​ 0
R8 0 0 0 0 0 0 0.33​ 0.33​ 0.33​
R9 0 0 0 0 0 0 0 0.5 0.5

Now, solving Parts 1,2,3 and 4 in R:-

-----

install.packages("markovchain")

library("markovchain")
States = c("r1","r2","r3","r4","r5","r6","r7","r8","r9")
byRow = TRUE
sMatrix = matrix(data = c(0.5,0.5,0,0,0,0,0,0,0,0.33,0.34,0.33,0,0,0,0,0,0,0,0.33,0.34,0.33,0,0,0,0,0,0,0,0.33,0.34,0.33,0,0,0,0,0,0,0,0.33,0.34,0.33,0,0,0,0,0,0,0,0.33,0.34,0.33,0,0,0,0,0,0,0,0.33,0.34,0.33,0,0,0,0,0,0,0,0.33,0.34,0.33,0,0,0,0,0,0,0,0.5,0.5), byrow = byRow, nrow = 9,dimnames = list(states, states))
#inverse of transition matrix - required for Part 2
smi = solve(sMatrix)

mcrm = new("markovchain", states = States, byrow = byRow,
transitionMatrix = sMatrix, name = "Weather")

mcrmi = new("markovchain", states = States, byrow = byRow,
transitionMatrix = smi, name = "Weather")

## Part 1
initialState = c(30,40,0,0,10,0,0,20,0)
after1day = initialState*(mcrm)
data.frame(room_people = c(after1day))

# room_people
1 28.2
2 28.6
3 13.2
4 3.3
5 3.4
6 3.3
7 6.6
8 6.8
9 6.6

## Part 2
finalState = c(125,50,150,75,275,100,125,50,150)

### initialStateReqd = finalState*(mcrmi)
## Can't get answer of Part 2


## Part 3: All start at R1, time taken to 1st person in R9
initialState = c(100,0,0,0,0,0,0,0,0)
# taking that when total persons in any room > 0.5, there's a person in that room:
after13days = initialState*(mcrm)^13
after15days = initialState*(mcrm)^15
### ANSWER: Takes 13 time periods (195 minutes) to get a person in R9
### It takes 15 time periods (225 minutes) to be SURE that a person is in R9


## Part 4: Allocation to be according to the steady state:-
data.frame(room_allocation = c(steadyStates(mcrm)))

# room_allocation
1 0.07932692
2 0.12019231
3 0.12019231
4 0.12019231
5 0.12019231
6 0.12019231
7 0.12019231
8 0.12019231
9 0.07932692


Related Solutions

let r1 and r2 be the relations represented as r1 (ABC) and r2 (ADE) .Assume the...
let r1 and r2 be the relations represented as r1 (ABC) and r2 (ADE) .Assume the corresponding domains of both the tables are same.r1 has 2000 tuples and r2 has 4500 tuples 1.common tuples between r1 and r2 are 500, what would be the resultant number of tuples for r1-r2, justify your answer 2.assuming 500 as the common tuples between r1 and r2,what is the maximum number of tuples that results in ]] A( r1) U ]] A r2. justify...
A. Consider two concentric spherical structures of radius r1 and r2 such that r1 < r2...
A. Consider two concentric spherical structures of radius r1 and r2 such that r1 < r2 and full load Q and -2Q respectively. Calculate the magnitude of the field on ́ectrico in all three regions, i.e. within the smaller sphere, between the spheres and outside the sphere of the larger radius. Where does the electric field point to for this system? (no matter what material these concentric spherical are made of) B. Two cylindrical coaxial shells with radius r1 and...
Three resistors with resistances R1, R2, R3 are connected in parallel across a battery with voltage...
Three resistors with resistances R1, R2, R3 are connected in parallel across a battery with voltage V. By Ohm’s law, the current (amps) is I = V* [ (1/R1) + (1/R2) + (1/R3) ] Assume that R1, R2, R3, and V are independent random variables where R1 ~ Normal (m = 10 ohms, s = 1.5 ohm)             R2 ~ Normal (m = 15 ohms, s = 1.5 ohm)             R3 ~ Normal (m =20 ohms, s = 1.0 ohms)...
say R1, R2,...., Rn are commutative rings with unity. Show that U(R1 + R2 +.... +...
say R1, R2,...., Rn are commutative rings with unity. Show that U(R1 + R2 +.... + Rn) = U( R1) + U(R2)+ .... U(Rn). Where U - is the units of the ring.
Two hoops have the same mass M. Their radii are R1 and R2 = 2 R1....
Two hoops have the same mass M. Their radii are R1 and R2 = 2 R1. Similarly, two uniform disks also have mass M and the radii, R1 and R2. Which of these objects has the largest moment of inertia about the axis perpendicular to the screen and through the center of the hoop or disk? The moment of inertia of a uniform disk of mass mand radius r about its center is (1/2)mr2; for a hoop it is mr2....
Two resistors, R1 = 20-ohm and R2 = 30-ohm, are connected in parallel to each other,...
Two resistors, R1 = 20-ohm and R2 = 30-ohm, are connected in parallel to each other, and this combination is connected across a 30-V source of emf. The current through the resistor R2 is:
A ping fails when performed from router R1 to directly connected router R2. The network administrator...
A ping fails when performed from router R1 to directly connected router R2. The network administrator then proceeds to issue the show cdp neighbors command. What is CDP protocol? Why would the network administrator issue this command if the ping failed between the two routers? You have been hired at AABC Inc. to help with an important network project. The network administrator has given you the internal IP address of 192.168.10.0/24 that need to have access to the corporate server...
Problem Description: Given Machine Instruction 1. LD R1, 50(R2) 2. ADD R3, R1, R4 3. LD...
Problem Description: Given Machine Instruction 1. LD R1, 50(R2) 2. ADD R3, R1, R4 3. LD R5, 100(R3) 4. MUL R6, R5, R7 5. ADD R1, R1, #100 6. SUB R2, R2, #8 Font type: Times New Roman and Size 12 Task to do: a) Draw the four-stage pipeline for the above Instruction. b) Calculate the total clock cycles for all the above-mentioned instructions need to be completed. c) Explain how to handle structural hazards the pipeline instruction. d) Explain...
Problem 2 Statement: Let r1 = 1 + cos θ and r2 = 3 cos θ....
Problem 2 Statement: Let r1 = 1 + cos θ and r2 = 3 cos θ. (a) Graph each function in the rθ-plane. (b) Find all intersection points (both collision and non-collision). (c) Find the area common to the two graphs.
Consider the following relations: R1 = {(a, b) ∈ R2 ∣ a > b}, the greater...
Consider the following relations: R1 = {(a, b) ∈ R2 ∣ a > b}, the greater than relation R2 = {(a, b) ∈ R2 ∣ a ≥ b}, the greater than or equal to relation R3 = {(a, b) ∈ R2 ∣ a < b}, the less than relation R4 = {(a, b) ∈ R2 ∣ a ≤ b}, the less than or equal to relation R5 = {(a, b) ∈ R2 ∣ a = b}, the equal to relation...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT