Archive for the ‘Computer programming’ Category

The Dice Club Project

Sunday, September 30th, 2018

One Saturday afternoon, as Jack, a new member, entered the Snake Eyes Dice Club he saw many people busy throwing dice at various felt-covered tables.

“Why are you repeatedly throwing that die, Vince, won’t you get a sore arm,” asked Jack.

“Hope not. I’m checking how many throws are needed to get all die faces from one to six to appear at least once,” said Vince.

“Any conclusion so far?” asked Jack.

“Seems that about 14 throws will do the job,” said Vince, after checking some marks on a notepad. “We’re running a project to check the results for different numbers of dice,” added Vince.

“So you’ll soon be using two dice to see how many throws are needed to get all the doubles?” said Jack.

“That’s the next step,” agreed Vince, “probably take quite a bit longer. Maybe I’ll pass the job on to Joe over there,” said Vince, rubbing his elbow.

“Charlie at the big table yonder is working on getting all the triples, but he’s been at it for a really long time,” said Vince.

“Anybody working out the probability for n dice?” said Jack.

“Yeah, my cousin Lennie at the desk over there is doing the theory and checking it out on a PC. He’s quite good at math,” said Vince.

“Good luck with the project, Vince. Seems a bit complicated to me, so I’ll be heading for the lounge,” said Jack.

Can you offer a formula for calculating the number of throws with n dice needed to get all the n-tuples?

 

The Ringing Bells

Monday, May 22nd, 2017

The small village of Bloemenfontein had two churches which were located quite near each other. The bells of the churches rang with different periods, the Church of the Five Trinities ringing every 5/3 seconds, the Church of the Eleven Pentalphan Saints every 11/5 seconds.

To summon the members of the congregations for service on Sundays, both churches would sound their bells for 12 minutes precisely at 11 am in the morning.

A peculiar effect with these bells was that every now and then people could only hear one bell ringing, which would confuse members of the congregations, resulting in an equal proportion going to the wrong church.

But this did not matter much, as the preachers of the churches actually were twins and would switch roles every other week or so, thus saving time in writing sermons to give more free time for their hobby of fishing.

The local bicycle shop owner Joop Visser, who was also the mayor of Bloemenfontein, had worked out that when the clappers of the bells struck within an interval of 0.6 seconds of each other, only one bell ring could be heard.

Visser, being a meticulous person, had also counted the number of bell rings with the aid of a sound recorder.

Being a business man, mayor Visser decided to hang up a poster on the large, spreading oak tree in the main plaza of the village.

The poster stated that the first person who could correctly say how many bell rings in total were heard during a period of 12 minutes each Sunday would win a new, red bicycle.

Entry fee for submitting an answer to Visser was ten guilders.

Visser received numerous payments and responses very quickly, but the first correct one was from a young computer nerd.

Under these conditions, what would you say is the number of rings heard from these bells sounding on Sunday mornings?

On the average how many congregation members do you figure would wind up at the wrong church on a Sunday?