Win a copy of The Java Performance Companion this week in the Performance forum!

# CLK Puzzle

Abacus White
Greenhorn
Posts: 8
A clock takes seven seconds to stike seven how many seconds will it take to stike eleven? (Ans not 11)

Nick George
Ranch Hand
Posts: 815
well, I supose 7 rings are composed of 7 "ringings" and 6 "inbetween ringings"

thus, 7 * (ring time) + 6 * (wait time) = 7 seconds.
and

11 * (ring time) +10 * (wait time) = ... seconds

So, we'll be either slightly abvoe 11 seconds, or slightly below 11 seconds, depending on Math.max(ring time,wait time);

fred rosenberger
lowercase baba
Bartender
Posts: 12145
30
I supose 7 rings are composed of 7 "ringings" and 6 "inbetween ringings"

I disagree. On my clock, i can hear the gears start grinding before the first chime rings. You aren't accounting for that.

Also, as the spring winds down, the chime interval is longer. do i need to take into account that my clock will chime 31 times in between 7 and 11?

Abacus White
Greenhorn
Posts: 8
Its like this
6 intervels are there as Joseph rightly said.
so 1 will take 7/6 sec and 11 will take 12.83

fred rosenberger
lowercase baba
Bartender
Posts: 12145
30
I'm curious as to why you don't count the time for the clock to raise the hammer for the first chime, but you do count it for the other 6? does that mean that it takes 0.0 seconds for the clock to chime at 1pm?

Ray Stojonic
Ranch Hand
Posts: 326
I'm curious as to why you don't count the time for the clock to raise the hammer for the first chime...

Does the race start when the judge raises his arm, or when the gun fires?

fred rosenberger
lowercase baba
Bartender
Posts: 12145
30
If it's a high-hurdle race, does it start when the sprinter leaves the blocks, or when he jumps over the first hurdle?

My point is that the first chime CAN'T happen unless/until the hammer is lifted, and that takes time.

The "gun" you refer to in this case is the minute hand reaching the top of the hour. when that happens, the chiming process begins. Part of that process is not being counted.
[ August 12, 2004: Message edited by: fred rosenberger ]

Stefan Wagner
Ranch Hand
Posts: 1923
If it takes 7 seconds to stike 7, it's 6:59:53
From 7-11 it takes 4*60*60 seconds.

So (4*60*60)+7 is the solution.

Ray Stojonic
Ranch Hand
Posts: 326
Neither, the length of the race is from when the judge indicates 'go' to when the first racer crosses the finish line. If all racers agree to stand around for 23 hours before running to the end of the track, then the race takes 23 hours + running time to run.

My point is, we don't include the judge preparing to fire, or the participants lining up on the blocks, or their arrival at the track or even their years of training. Simply from when they hear 'go' to when the first one finishes.

When should we stop regressing in your scenario? The hammer cannot be lifted until it is made, it cannot be made until the metal has been mined, the metal cannot be mined until the earth exists, so 11 rings takes ~5 billion years?

fred rosenberger
lowercase baba
Bartender
Posts: 12145
30
Neither, the length of the race is from when the judge indicates 'go' to when the first racer crosses the finish line.

Ok, then the time for the 7 chimes should be from when the mechanism that makes the chimes starts (which includes the time to lift the hammer) until... the last chime fades out to under 30db? 20db? 0db?

from when they hear 'go'

I hear the hammer being lifted, the gears turning before the first chime.
[ August 13, 2004: Message edited by: fred rosenberger ]

Ray Stojonic
Ranch Hand
Posts: 326

I hear the hammer being lifted, the gears turning before the first chime.

Do you run your own business? Can I have a job? I would love to get paid for preparing for and commuting to work.

fred rosenberger
lowercase baba
Bartender
Posts: 12145
30
I guess our problem is how we intrepret the original question.

A clock takes seven seconds to stike seven

To me, this means "from the moment the chiming mechanism begins until the last chime is struck is seven seconds".

You read this as "from the moment the first chime is struck until the moment the last chime is struck is seven seconds."

I'll let it got at that.