# Simple Question

#### orangeflow

##### New member
A machine fires every 6 seconds, but has a 20% chance to fire at 3 seconds and a 20% chance to fire at 4.5 seconds. If the goal of the machine is to fire as much as possible, what is the average the machine will fire?

((1/5)3+(1/5)4.5+(1)6)/3=4.8

Ive been told that the answer to this problem is 4.8 but I dont know how. The above equation is the farthest I have gotten to a solvable equation, but is clearly not right. I know that if the machine had an equal chance to fire at 3sec, 4.5sec, and 6seconds the average firing time would be 4.5, but since it only has a 20% chance for 3sec and 20% chance for 4.5sec I dont know how the correct answer is 4.8.

#### tkhunny

##### Moderator
Staff member
If firing resets the clock, we have the simple solution:

1 - 1/5 - 1/5 = 3/5

(1/5) * 3 + (1/5) * 4.5 + (3/5) * 6 = 25.5 / 5 = 5.1

That is not 4.8.

Since every other 3 runs into a 6, we get only half of those 3s.
Since every other 4.5 runs into a 3 or a 6, we get only half of 4.5s.
(1/10) * 3 + (1/10) * 4.5 + (6/10) * 6 = 43.5 / 10 = 4.35

Well, we have it bracketed.

A quick simulation for 100 seconds suggests 22.8 firings / 100 seconds, or an average of 4.386 seconds / firing.
Counting the intervals shows 4.33

Upping the simulation to 1000 seconds suggests 4.296

Really? I'm not sure I know what the question is asking.

#### orangeflow

##### New member
Sorry I should have been more specific. Yes the firing resets the clock. Thanks so much for the help

#### Denis

##### Senior Member
Assume order 3, 4.5, 6, 6, 6
1) 3
2)4.5 ; 7.5
3)6 ; 13.5
4)6 ; 19.5
5)6 ; 25.5
So 5 firings in 25.5 seconds; average is:
25.5 / 5 = 5.1 (as per TK)

#### chrisr

##### Full Member
On average,

3+4.5+6+6+6=25.5

If the machine fires with the given probabilities, then the average firing time is 5.1 seconds.
If the goal is to fire as much as possible, while firing every 6 seconds, then you want no firings at 4.5 seconds,
getting the machine to fire at 3 seconds with a probability of 40%.

#### Denis

##### Senior Member
chrisr said:
If the goal is to fire as much as possible, while firing every 6 seconds, then you want no firings at 4.5 seconds,
getting the machine to fire at 3 seconds with a probability of 40%.
But to "get" the machine to do that, you'll need to take time to "fix it" so it don't fire
at 4.5 marks, and it therefore will not fire at all while getting fixed, so that affects
the "as much as possible" intent ! :roll:

#### chrisr

##### Full Member
Get a good mental picture of this, Denis.
I've got all my fancy electronic tools,
now I work so fast with the machine still powered up,
I'm a total blur, can you see my 100 silhouettes simultaneously?
It's fixed before you can blink an eye.

#### tkhunny

##### Moderator
Staff member

3(0.2)
4(0.2)
6
6
6
6
6
6
6

Avg is 4.83333

We just have to turn it off after 42 seconds.

#### chrisr

##### Full Member
You've broken the machine!
after it was properly tuned up to give 4.8