- 28 Jun '06 17:28 / 1 editA large company has an annual new year's lottery. Every employee puts in a dollar bill then every emploee picks a number from 1 to 100. If your number matches the randomly generated number, you win.

in the case of a tie the pot is split evenly and any remaining dollar bills go to charity.

Year 1: 41 people split the pot charity gets $12

Year 2: 19 people split the pot charity gets $7

year 3: 37 people split the pot charity gets $31

If the number of employees is constant what is the minimum number of employees at the company?

what is the maximum number of employees if no employee has reached the maximum allowable winnings of $5000? - 28 Jun '06 17:44 / 2 editsMinimum number of employees is 5,137. Maximum number of employees with no prize exceeding $5000 is 91,606.

I think.

EDIT: For anyone who is interested I obtained my answers using a quickly written piece of code that searched for numbers that returned true to:

if (mod(n,41) == 12) & (mod(n,19) == 7) & (mod(n,37) == 31)

I'd be interested to see if a non-brute force solution exists given the one way nature of the modulus function. - 28 Jun '06 19:04

of course it does.*Originally posted by XanthosNZ***Minimum number of employees is 5,137. Maximum number of employees with no prize exceeding $5000 is 91,606.**

I think.

EDIT: For anyone who is interested I obtained my answers using a quickly written piece of code that searched for numbers that returned true to:

if (mod(n,41) == 12) & (mod(n,19) == 7) & (mod(n,37) == 31)

I'd be interested to see if a non-brute force solution exists given the one way nature of the modulus function.

i think posting an answer using a computer to get it isn't very fair to everyone else - 28 Jun '06 19:13can you solve this one in your head?

Year 1: 41 people split the pot charity gets $40

Year 2: 19 people split the pot charity gets $18

year 3: 37 people split the pot charity gets $36

how about?

Year 1: 41 people split the pot THE REMAINING $12 GET ADDED TO NEXT YEARS POT

Year 2: 19 people split the pot ; $7 carries to year 3

year 3: 37 people split the pot charity gets $31

please no computer generated solutions.

Describe all possible solutions to the original problem (computer can't help you here) - 28 Jun '06 19:59

call me crazy but....*Originally posted by aginis***A large company has an annual new year's lottery. Every employee puts in a dollar bill then every emploee picks a number from 1 to 100. If your number matches the randomly generated number, you win.**

in the case of a tie the pot is split evenly and any remaining dollar bills go to charity.

Year 1: 41 people split the pot charity gets $12

Year 2: 19 peopl ...[text shortened]... maximum number of employees if no employee has reached the maximum allowable winnings of $5000?

The min number of employees is 26 if in year 2 19 people shared 1 dollar each and the remaining $7 went to charity.

The max number would be 5000 if the max pot is $5000 since everyone can only put $1 dollar into the pot. - 28 Jun '06 20:27

if there are 26 employs how did 41 people split the pot in the first year? remember same number of employees means same pot size every year. (in the original version)*Originally posted by uzless***call me crazy but....**

The min number of employees is 26 if in year 2 19 people shared 1 dollar each and the remaining $7 went to charity.

The max number would be 5000 if the max pot is $5000 since everyone can only put $1 dollar into the pot.

the max prize is 5000 but if you split a $19,000 pot 19 ways each employee only recieves $1000. etc. - 29 Jun '06 13:11

Solutions to the original problem will be like this:*Originally posted by aginis***can you solve this one in your head?**

Year 1: 41 people split the pot charity gets $40

Year 2: 19 people split the pot charity gets $18

year 3: 37 people split the pot charity gets $36

how about?

Year 1: 41 people split the pot THE REMAINING $12 GET ADDED TO NEXT YEARS POT

Year 2: 19 people split the pot ; $7 carries to year 3

year 3: 37 people ...[text shortened]... ions.

Describe all possible solutions to the original problem (computer can't help you here)

n = 5137 + 28823x (where 28823 = 19 * 37 * 41)

This gives us a clue to how e can solve the next problem "in our heads"

General solutions will be of the form n = A + 28823x - where is any answer that works. Clearly -1 works (-1 mod 41 = 40, -1 mod 19 = 18 etc - which is why you chose those numbers), so the lowest, real world solution will be -1 + 28823 * 1 = 28822.

I can't do the carries-over problem in my head though :-(