0% found this document useful (0 votes)
26 views

Section 3 Simulation

The document simulates injuries to a football coach's squad of 6 running backs over a 10 game season. Each game, there is a 5% chance of a major injury putting a player out for the season, and a varying chance (0-3%) of minor injuries causing a player to miss the next game. The simulation tracks the fluctuating stock of running backs based on random numbers, with the minimum being 1 player by the end of the season.

Uploaded by

Hager gobran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Section 3 Simulation

The document simulates injuries to a football coach's squad of 6 running backs over a 10 game season. Each game, there is a 5% chance of a major injury putting a player out for the season, and a varying chance (0-3%) of minor injuries causing a player to miss the next game. The simulation tracks the fluctuating stock of running backs based on random numbers, with the minimum being 1 player by the end of the season.

Uploaded by

Hager gobran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

El-Shorouk Academy

Higher Institute for Computer & Term : First

Information Technology Year : 3rd

Department of Computer sciences

Instructor : Dr.farouk shaaban

Computer modeling & simulation

è Example NO.4 :- The owner of car renting company, pays a penalty


for each accident according to the following distribution:-

Amount of money/accident Probability

50 L.E 0.30

100 L.E 0.30

150 L.E 0.25

200 L.E 0.15

The accidents occur with the probability of 30% (number of accidents per
day is up to 6). Number of accidents per day has the following
distribution:-

Number of accidents Probability

2 0.05

3 0.15

4 0.40

5 0.25

6 0.15

Page 1 of 6
Simulate 12 days. Based on your simulation what is the minimum money
the owner must have to cover the penalties occurred per day. Use the
following R.N:

92 44 99 15 97 21 47 80 28 87 13 33 42 84 27 64 59 33 84
00 10 50 51 09 31 12 94 96 97 77

ANSWER

Amount of money/accident Probability

50 L.E 0.30 00à 29

100 L.E 0.30 30 à 59

150 L.E 0.25 60 à 84

200 L.E 0.15 85 à 99

Number of accidents Probability

2 0.05 00à 04

3 0.15 05 à 19

4 0.40 20 à 59

5 0.25 60 à 84

6 0.15 85 à 99

Page 2 of 6
The probability accidents occur is 30% è 00 --> 29

The probability accidents don’t occur is 70% è 30 --> 99

1st Day:

RN: 92 à NO ACCIDENT

2ND Day:

RN: 44 à NO ACCIDENT

3RD Day:

RN: 99 à NO ACCIDENT

4TH Day:

RN: 15 àACCIDENT

RN: 97 à Number of accidents = 6 accidents.

à 1th Accident:

RN: 21 à Amount of money paid= 50 L.E

à 2ND Accident:

RN: 47 à Amount of money paid= 100 L.E

à3rd Accident:

RN: 80à Amount of money paid= 150 L.E

à4th Accident:

RN: 28 àAmount of money paid = 50 L.E

à5th Accident:

RN: 87 à Amount of money paid = 200 L.E

Page 3 of 6
à6th Accident:

RN: 13 àAmount of money paid= 50 L.E

• Then the total amount paid in this day = 50 + 100 + 150 + 50 + 200 + 50 =
600 L.E

5th Day:

RN: 33 à NO ACCIDENT

6TH Day:

RN: 42 àNO ACCIDENT

7th Day:

RN: 84 à NO ACCIDENT

8th Day:

RN: 27 àACCIDENT.

RN: 64 à Number of accidents = 5 accidents.

1st Accident:

RN: 59 àAmount of money paid = 100 L.E

2nd Accident:

RN: 33 à Amount of money paid = 100 L.E

3rd Accident:

RN: 84 à Amount of money paid = 150 L.E

4th Accident:

RN: 00 à Amount of money paid = 50 L.E


Page 4 of 6
5th Accident:

RN: 10 à Amount of money paid = 50 L.E

• Then the total amount paid in this day = 100 + 100 + 150 + 50 + 50 = 450 L.E

9TH Day:

RN: 50 à NO ACCIDENT.

10TH Day:

RN: 51 à NO ACCIDENT.

11TH Day:

RN: 09 à ACCIDENT.

RN: 31 à Number of accidents = 4 accidents

à1st Accident:

RN: 12 à Amount of money paid= 50 L.E

à2nd Accident:

RN: 94 à Amount of money paid= 200 L.E

à3rd Accident:

RN: 96 à Amount of money paid= 200 L.E

à4th Accident:

RN: 97 à Amount of money paid= 200 L.E

• Then the total amount paid in this day = 50 + 200 + 200 + 200 = 650 L.E

12th Day:

RN: 77 à NO ACCIDENT

Page 5 of 6
Ø Based on the above simulation :- The minimum money the owner must have to
cover the penalties occurred per day = 450 L.E

Ø (The maximum paid money in all days) = 650 L.E

Page 6 of 6
El-Shorouk Academy Acad. Year :

Higher Institute for Computer & Term : First

Information Technology Year : 3rd

Department of Computer sciences

Instructor : Dr.farouk shaaban

Computer modeling & simulation

➔ Example NO.9 :-

- Professional football coach has six running backs on his squad. He


wants to evaluate how injuries might affect his stocks of running
backs. A minor injury causes a player to be removed from the
game and miss only the next game. A major injury puts the
player out of action for the rest of the season. The probability of
a major in a game is 0.05. There is at most one major injury per
game. The probability of minor injury per game is:

Number of injury Probability


0 0.2
1 0.5
2 0.22
3 0.05
4 0.025
5 0.005

Injuries seem to happen in a completely random pattern over the


season. A season is 10 games. Using the following random number,
simulate the fluctuating in the coach’s stock of running backs over the
season. Assume that he hires no additional running backs during the
season:-

Page 1 of 3
R.N:

044 392 898 615 986 959 558 353 577 866 305 813 024 189 878
023 285 442 862 848 060 131 963 874 805 105 452 .

Number of injury Probability


0 0.200 000 → 199
1 0.500 200 → 699
2 0.220 700 → 919
3 0.050 920 → 969
4 0.025 970 → 994
5 0.005 995 → 999

- Note we have three digit random numbers that means numbers


range 000 → 999 ( 1000 integer numbers )

- Probability of major 0.05 ( 000 → 49 ) take 5o number from 1000

Then minor take the remaining numbers 50 → 999

- There is at most one major injury per game.

Page 2 of 3
Game # No. of R.N YES/NO R.N No. of STOCK
players major minor minor

1 6 044 YES 392 1 4

“out of “miss the


season ” next match
, return in
match 3 ”

2 4 898 NO 615 1 3
miss the
next match
, return in
match 3

3 4 986 NO 959 3 1

4 2 558 NO 353 1 1

5 4 577 NO 866 2 2

6 3 305 NO 813 2 1

7 3 024 YES 189 0 2

8 4 878 NO 023 0 4

9 4 285 NO 442 1 3

10 3 862 NO 848 2 1

Page 3 of 3

You might also like