Question: You said: ( Computer project ) Twenty computers are connected in a network. One computer becomes infected with a virus. Every day, this virus spreads

You said:
(Computer project) Twenty computers are connected in a network. One computer becomes infected with a virus. Every day, this virus spreads from any infected computer to any uninfected computer with probability 0.1. Also, every day, a computer technician takes 5 infected computers at random (or all infected computers, if their number is less than 5) and removes the virus from them. Estimate: (a) the expected time it takes to remove the virus from the whole network; (b) the probability that each computer gets infected at least once; (c) the expected number of computers that get infected. These are some advice on how to solve this: 1. Decide on N =(large number) of simulations Loop the simulation N times, collect data, then average. 2. A single simulation is also a while-loop there can unknown # of days: from day 1 when the virus is introduced until the day when the network is clean. 3. Network: C1, C2, C3......................., all conected to each other. 4. In the beginning of a simulation, i.e., before day 1 infect one computer, say C1( or a random one)5. In a single day: a)Morning Virus spreads Currently infected: ........... Currently clean: ............. For each "infected/clean in the morning" pair (connection) its a Bernoulli trial with p =0.1 for the virus to spread along this connection. b)Afternoon: The technician shows up and tries to clean. If currently infected is less than or equal to 5: all get cleaned, finish the simulation. If currently infected more than 5: randomly chose 5 of them to clean. 6. what do we need to count in a single simulation? a) Number of days c) For each computer, a flag indicating if it has been infected(has had the virus on it) at least once during the simulation, In the end: # of computers for which this flag is true. b) Event: # of computers infected(from part (c))=20 give code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!