I have 4 umbrellas some at home and some at the office I kee

I have 4 umbrellas, some at home and some at the office. I keep moving between home and office. I take an umbrella with me only if it rains. If it does not rain I leave the umbrella behind (at home or at the office). It may happen that all umbrellas are in one place and I am at the other place, so if it starts raining and I have to leave, I will get wet, bullet Consider the probability of rain = .5 bullet Consider an initial condition with 2 umbrellas at home and 2: at the office bullet The simulation ends when you get wet bullet Show your final location at the end of the simulation Create the flow diagram of the algorithm Write the c++ program of the algorithm bullet Consider the following template #include #include #include #include //contains prototypes for functions stand and rand using namespace std. int main() {//changing seed srand(static_cast(time(0)));//prob of raining int raining=rand()%2.//1 it is raining, zero it is sunny day return 0;}//end main

Solution

just trying to find the transition probability matrix. I was thinking that the probability of going from n umbrellas at a location to n+1 umbrellas after one day would be .2, and the probability of having the same amount of umbrellas at a location after one day would be .8. She can\'t take more than one umbrella anywhere so the probability of going from 3 to 1, 3 to 0, 2 to 0 and vice versa would be 0.

The rows in the matrix should be stochastic because the umbrella has a %100 chance of either going to a new place or staying in the same one

It\'s important to define exactly what your random variable means. The problem suggests that you define your random variable to be the number of umbrellas at her current location. For example, suppose she initially starts with all 3 umbrellas at home, and she is at home. Then X_0 will be 3. Now, suppose it\'s sunny when she goes to the office. She doesn\'t take an umbrella with her, so when she gets to the office there are no umbrellas there, and hence X_1 will be 0. So the random variable transitioned from 3 to 0.

 I have 4 umbrellas, some at home and some at the office. I keep moving between home and office. I take an umbrella with me only if it rains. If it does not rai

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site