Question: Write a program in either Java or Python to simulate the following experiment: There is a region with small towns connected together by a network

 Write a program in either Java or Python to simulate the

Write a program in either Java or Python to simulate the following experiment:

There is a region with small towns connected together by a network of roads. In each town is a traffic light and traffic going through a town takes one of two routes out of the town, depending on the traffic light If a car enters town A, it moves to B or C, t to D, E, or F, and proceeds through the network reaching P. The car leaves one town going to either of two destination towns according to probabilities in the following table: 2.8 4 .6 3 .7 0 1.0 The time to drive the roads between towns in minutes is given in the table below: E|F|G H MNOP 4 6 CS 355/555, Spring 2019, Program II Write a program to simulate traffic flow with 10,000 cars. Calculate the average Run this program 10 times and compute the average transit time for 100,000 cars Compare the 10 rus of 10,000 with the one run of 100,000 transit time from A to P and calculate the standard deviation and the standard deviation

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 Databases Questions!