# 情趣生活

## 情趣生活 => 灵机一动 => Topic started by: 万精油 on 十月 03, 2004, 10:28:57 pm

Title: 每周一题: 生日休假的最大工作量 (10/4/04 -- 10/10/04)
Post by: 万精油 on 十月 03, 2004, 10:28:57 pm

Title: 每周一题: 生日休假的最大工作量 (10/4/04 -- 10/10/04)
Post by: supertramp on 十月 04, 2004, 06:36:30 am
Suppose the factor has N workers, with n different birthdays.

Add one more worker:
with probability n/365, this new work will have one of the existing n birthdays;
with probability ( 1 - n/365 ), this new work with a new birthday, so the total number of birthdays becomes n+1.

In case one, the new worker-day = ( N + 1 ) * ( 365 - n ).
In case two, the new worker-day = ( N + 1 ) * ( 365 - n - 1 ).

New expected worker-day =  n / 365 * ( N + 1 ) * ( 365 - n )
+ ( 1 - n / 365 ) * ( N + 1 )  * ( 365 - n  - 1 )

Old worker-day = N ( 365 - n ).

Expected increase in worker day = ( 365 - n )  * 364 / 365 - N ( 365  - n ) / 365.

The optimum occurs when expected increase is zero.

This requires N = 364.
Title: 每周一题: 生日休假的最大工作量 (10/4/04 -- 10/10/04)
Post by: sean on 十月 04, 2004, 10:16:13 am
My  answer might be wrong, 'cause it conflicts with Prof. 10k's and super's.   :wink:  I guess I am just not good at probability.  Anyway, since I gave it some thought, I will post my answer here. I wish someone can clean the bugs in my knowledge of probability.

My answer is: the more workers, the better.

Suppose there are N workers.  For any day, the probability that it is not a birthday of anyone is 364/(364+N) : this comes from computing some elementary probability, which I guess is correct.

Thus for any day, the expected workload is N*364/(364+N) person.day's. Thus  for the whole year,  the expected workload is

365*364*N/(364+N).

Thus, the more the better.

When N=1 or 2, the expected workload is equal to or close to what Prof 10k says.

The answer is kind of *funny*. If it is correct, here is an explanation: when N becomes larger, it is harder for one day not to be a birthday; however, if the boss gets one lucky day, he gets a big N person.day's.
Title: 每周一题: 生日休假的最大工作量 (10/4/04 -- 10/10/04)
Post by: idiot94 on 十月 04, 2004, 01:06:44 pm
Sean, your idea is right, but your calculation is not right.

The very first step, while
Quote
Suppose there are N workers. For any day, the probability that it is not a birthday of anyone is 364/(364+N) : this comes from computing some elementary probability, which I guess is correct.
...
is wrong.

For any given day, suppose the probability of this day being the birthday of worker1 is p (of course, p=1/365). For worker1, this day not being his birthday would have prob. 1-p. With N independent workers, this day not being any1's bday has prob. (1-p)^N.

The expected workmanday of this day is thus N*(1-p)^N. This is the same for all 365 days. Thus you need just to max N*(1-p)^N w.r.t. N, given p=1/365.
The result is 364 or 365, which is the same as Mr. S.'s answer (of course).
Title: 每周一题: 生日休假的最大工作量 (10/4/04 -- 10/10/04)
Post by: sean on 十月 04, 2004, 02:36:34 pm
Quote from: idiot94
Sean, your idea is right, but your calculation is not right.

The very first step is wrong.

Yeah, I was wrong. I made a stupid mistake. Thanks a lot.  Your explanation is very clean and convencing.

Prof Wan, maybe you (and whoever give the problems) can mark the problems that are solved as "solved"  (or beautifully solved).  I checked the old problems posted here since June, and think that some of them are still not cleanly solved, though there are some useful discussions and the correct solutions can be obtained based on them (the guy who provided the useful ideas should be able to write a clean solution).  For example,  for the rectangle problem posted last week,  from those discussions, we know that when k satisfies some condition, there is a solution; and when k satisfies some other condition, L shapes do not work.  I think the person who showed that could easily tell whether there are other working shapes or not.
Title: 每周一题: 生日休假的最大工作量 (10/4/04 -- 10/10/04)
Post by: 万精油 on 十月 04, 2004, 03:04:49 pm
I think a general principle should be whoever post the problem should make a statement after 1 or 2 weeks. Either post the answer (in case nobody solves it) or make a statement about the answer that other people has (confirm it or disagree).
Title: Re: 每周一题: 生日休假的最大工作量 (10/4/04 -- 10/10/04)
Post by: 万精油 on 九月 13, 2013, 12:11:47 pm