129k views
1 vote
A program is divided into 3 blocks that are being compiled on 3 parallel computers. Each block takes an Exponential amount of time, 5 minutes on the average, independently of other blocks. The program is completed when all the blocks are compiled. Compute the expected time it takes the program to be compiled.

User Geoherna
by
4.5k points

2 Answers

5 votes

Final answer:

The expected time it takes for the program to be compiled is 15 minutes.

Step-by-step explanation:

To compute the expected time it takes for the program to be compiled, we need to calculate the average time for all three blocks to complete. Since each block takes an exponential amount of time with an average of 5 minutes, the average time for a single block to complete is also 5 minutes.

To find the expected time for all three blocks to complete, we can add the average times together. So, the expected time is 5 minutes + 5 minutes + 5 minutes, which equals 15 minutes.

Therefore, the expected time it takes for the program to be compiled is 15 minutes.

User Starla
by
3.9k points
2 votes

Final answer:

The expected time for a program to be compiled on parallel computers, with three independently compiled exponential blocks each with an average time of 5 minutes, is approximately 9.167 minutes.

Step-by-step explanation:

To compute the expected time it takes for a program to be compiled when it is divided into 3 blocks with each block taking an exponential amount of time with a mean of 5 minutes, we acknowledge that since the blocks are being compiled on parallel computers, the total time is governed by the block that takes the longest.

In the case of an exponential distribution, the expected maximum of three such independently distributed exponential times is the sum of the expected times of each divided by their ordinal number (i.e., 1/1 + 1/2 + 1/3 for the first, second, and third block respectively). Multiplying this by the average time for one block (5 minutes) gives us: (1/1 + 1/2 + 1/3) * 5 minutes = (1 + 0.5 + 0.333...) * 5 minutes = approximately 9.167 minutes.

This calculated time is expectation for completion since all blocks are independent and must all complete before the entire program is compiled. It should be noted that this is an expectation and the actual time may vary on each run due to the randomness inherent in the exponential distribution.

User Timdeschryver
by
4.1k points