回複:請教解數學題。

回答: 請教解數學題。灰衣人2010-09-06 18:14:36

Maybe smart guys can see the close form solution right away. Here is one way tackling this problem step by step. Let's forget about the ,000 and assume there are $20 in total. Since the minumal investment is $1, we assign $1 to each project. Now we have $16 left. We need to assign $16 to 4 projects, with the possibility of assign $0 to some projects.

Denote this number by f($16,4), where 16 represents money and 4 represents the number of projects. We now can use dynamic programming.

It is easy to see that f($n,1)=0, f($n, 2)=n+1, and f($n, 3)=f($n,2)+f($n-1,2)+...+f($1,2)+f($0,2)=(n+1)+n+...+2+1=(n*n+3n+2)/2.

Thus, f($n,4)=f($n,3)+f($n-1,3)+...+f($0,3)=[(n*n+3n+2)+...+(1*1+3*1+2)+(0*0+3*0+2)]/2.

The answer to your first question is f($16,4)= HALF OF (16*16+...+1*1)+3*(16+...+1)+17*2.

The answer to your second question is f($16, 5), in which there is a dummy project absorbing the rest money. Of course, you need one more step of recursion.

Does anyone have a better solution procedure?

所有跟帖: 

回複:回複:請教解數學題。 -guest1000- 給 guest1000 發送悄悄話 (364 bytes) () 09/07/2010 postreply 19:44:24

回複:回複:回複:請教解數學題。 -guest1000- 給 guest1000 發送悄悄話 (45 bytes) () 09/07/2010 postreply 19:51:53

第二題答案是不是:C(16+3,3)+C(15+3,3)+...+C(1+3,3)+C(0+3,3) -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (0 bytes) () 09/08/2010 postreply 09:10:55

I think we should change 16 to 20....we get C(24,4)=... -jinjing- 給 jinjing 發送悄悄話 (0 bytes) () 09/08/2010 postreply 09:35:30

how to understand: must be invested among 4 possible opportuniti -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (81 bytes) () 09/08/2010 postreply 10:00:33

even if we should change 16 to 20....we get C(21,4)=... -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (0 bytes) () 09/08/2010 postreply 10:03:46

sorry, C(21,4)=... wrong; C(24,4)=... right,if we should change -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (0 bytes) () 09/08/2010 postreply 10:07:18

you are right:C(20,4)=C(16+3,3)+C(15+3,3)+...+C(1+3,3)+C(0+3,3) -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (0 bytes) () 09/08/2010 postreply 10:09:50

第二題:What if not all money need be invested? 可這樣理解: -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (271 bytes) () 09/08/2010 postreply 10:37:04

我認為,您的第一題答案是正確的。 -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (265 bytes) () 09/08/2010 postreply 09:03:17

回複:我認為,您的第一題答案是正確的。 -guest1000- 給 guest1000 發送悄悄話 (327 bytes) () 09/08/2010 postreply 12:31:24

yes,您的第二題答案是正確的,as well。 -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (0 bytes) () 09/08/2010 postreply 13:03:14

Put 16 balls in 5 bins, no matter 5 bins can be empty or not, wh -皆兄弟也- 給 皆兄弟也 發送悄悄話 皆兄弟也 的博客首頁 (0 bytes) () 09/08/2010 postreply 13:17:31

請您先登陸,再發跟帖!