Computer Virus Spread Simulation - How to make each trial have random outputs?
This code is used to simulate the virus spread in the network of 20 computers with the probability of 0.1 ~ 10%. It initially starts with only 1 computer being infected and each day has a chance that it spreads to other computers in the network. The output for each trial should be: time to remove the virus from the network, probability that each computer gets infected at least once, and the expected number of computers that get infected each trial. Logically each trial should have a random for each of the outputs listed. My problem is that each trial produces the same output, and I don't under
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.