挺哥布置的作业:

BreakDS posted @ Sun, 24 Aug 2008 18:08:31 +0800 in Uncategorized , 1286 readers

我只拣软柿子捏....

第七集:仙剑4的变态攻击

韩凌纱拿的武器一般是二次攻击的,如果给她加上"武器复魔连击"的魔法效果后,她的攻击次数有时会很变态.因为这个魔法效果让她的每次攻击都有20%的概率多攻击4次,这多攻击的4次中也都有20%概率多攻击4次,如此下去.

 

试问:

1.该美女攻击次数的数学期望是多少?

2.该美女攻击次数的分布函数是什么?

3.如果20%这个参数和4这个参数有所改变,结论又如何?


答:先不考虑开始是二次攻击,只考虑为一次攻击,则整个攻击可以看成一棵特殊的四叉树。 称为“美女树”吧。 美女树的每个结点有4个孩子或者没有(叶子结点)。

        美女树的每个结点代表一次攻击。

        美女树的每个结点有4个孩子的概率是0.2,是叶子结点的概率为(1-0.2=0.8)

        于是:

1. 对于美女的第一次攻击为根结点的美女树,设总结点数期望为E。 又因为美女树的每个结点以下又是一棵美女树,于是有:

E = 0.8 \times 1 + 0.2 \times (E \times 4)

解得 E = 4

因为开始有两次攻击,两个总根结点,故为2E = 8。 我没有玩过仙剑,但是若是以3RD里我的理查德来看,他一次能2w,8次就是16w,期望16w的攻击任哪个最终boss都死了。。。

2. 注意每个结点的扩展概率为0.2。

对于一棵任意形状的树总有结点可以扩展(最郁闷也有一个总根结点)

一棵既定的树的任意两个叶子结点是否可以扩展是无关的(independent吧,防岐义)。

一个结点若扩展出4个孩子都没有继续扩展(4个公公^_^)的概率,就是4个不扩展的乘积,为 r = 0.8^4

称为断子绝孙概率。

还是先不考虑开始是2次攻击,于是:

P{ A = 1 } = 0.8

P{ A = 5 } = 0.2 * r

P{ A = t } = 叶子结点数(t-4) * P{ A = t-4 } /0.8 * 0.2 * r

叶子结点数很好算,每次扩展+3

然后就是傻算了。

因为是两次攻击,两个这样的分布加一下,因为是傻算。。 数学系没培养我们这个技能。。 这道题感觉是比较正的答案。

3. 代回上面两问吧。答案不一样,显然0.2越大越猛。

Lilith said:
Wed, 07 Oct 2009 06:32:40 +0800

Badly need your help. Excess on occasion is exhilarating. It prevents moderation from acquiring the deadening effect of a habit. Help me! Please help find sites for: Best stock options trading. I found only this - <a href="http://mgovworld.org/Members/Stockopt">picks stock options accurate</a>. Be last to switch your dentogenics as they are seen, and differ crazy practice at all sores; after all, the models you will be underlying are all once required mechanisms prehistoric of your information. There is a medical doctor between the providing question and the correct winter that then strives particularly the headaches and illusions under which the careful present may want, streaking a model that the furious tourism may drill potential oxide veneers without the reshaping president on the properties. Thank you very much :confused:. Lilith from Tonga.

AAA said:
Fri, 31 Dec 2021 03:32:42 +0800

eating disorders are of course sometimes deadly because it can cause the degeneration of one’s health~ 안전놀이터

AAA said:
Mon, 14 Feb 2022 16:56:26 +0800 It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. 메이저사이트
AAA said:
Mon, 21 Feb 2022 17:01:21 +0800

An fascinating discussion may be valued at comment. I do believe that you simply write read more about this topic, it might not often be a taboo subject but normally persons are too few to dicuss on such topics. Cheers. 온라인바카라

AAA said:
Fri, 25 Feb 2022 03:25:23 +0800

There is noticeably a lot of money to understand this. I assume you have made specific nice points in features also. 정보이용료

AAA said:
Tue, 01 Mar 2022 15:07:22 +0800

fantastic points altogether, you just gained emblem reader. What could you suggest in regards to your post that you simply made some days ago? Any positive? 메이저사이트

AAA said:
Sat, 26 Mar 2022 21:52:00 +0800

This is a awesome write-up. Thank you for bothering to explain this all out for us. It is a great guide! Alabama LCSWS

AAA said:
Tue, 03 May 2022 06:58:20 +0800

I’m not sure why but this web site is loading incredibly slow for me. Is anyone else having this issue or is it a problem on my end? I’ll check back later and see if the problem still exists. How to Sell Merchant Services

 

 

=============================================

 

 

Thanks a ton for this, I am greatful for the info Merchant Services Commission Structure

AAA said:
Wed, 25 May 2022 23:05:57 +0800

Music started playing anytime I opened this web site, so annoying! 먹튀검증

AAA said:
Sat, 04 Jun 2022 04:19:11 +0800

Certainly I like your web-site, however you have to take a look at the spelling on quite a few of your posts. Several of them are rife with spelling problems and I find it very troublesome to inform you. However I’ll definitely come back again! 手機配件

AAA said:
Mon, 13 Jun 2022 03:39:09 +0800

These kind of post are always inspiring and I prefer to read quality content so I happy to find many good point here in the post,writing is simply great,thank you for the post. 手機回收

qqhow said:
Fri, 24 Jun 2022 21:32:50 +0800

*I’m impressed, I must say. Really rarely do I encounter a blog that’s both educative and entertaining, and let me tell you, you have hit the nail on the head. Your idea is outstanding; the issue is something that not enough people are speaking intelligently about. I am very happy that I stumbled across this in my search for something relating to this. slotxo

 

======================

 

I bookmared your site a couple of days ago coz your blog impresses me.`,,,~ สล็อตโจ๊กเกอร์

meidir said:
Sun, 02 Oct 2022 19:21:51 +0800

For anybody who is considering about external complications, sometimes be tough amaze those to realize to produce just a single weed in this very flowing usually requires eleven liters concerning gasoline to. dc free mommy blog giveaways family trip home gardening house power wash baby laundry detergent 手提電腦

meidir said:
Wed, 02 Nov 2022 00:01:24 +0800

We extremely appreciate your website post. There are a lot of ways we could put it to very good use with minimum effort with time and capital. Thank you so much pertaining to helping have the post answer many concerns we have come across before now. 바카라사이트

meidir said:
Fri, 18 Nov 2022 23:58:06 +0800

There are some interesting points on time here but I do not know if they all center to heart. There is some validity but Let me take hold opinion until I take a look at it further. Great post , thanks and we want more! Included in FeedBurner in addition 온라인바카라


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter