"Probability" Uva 10900-so you want to be a 2n-aire?

Source: Internet
Author: User

Finish writing this question and quickly open a new question ...

Say this question let me re-turn the probability of the textbook, sure enough, and then returned to the teacher, no eggs.

Many people take this great God's work, and I share it with you.

For a brief explanation of the formula here. Because I also understand for a while to understand.

TIPs:

1. Set D[i] to have the expected value of the bonus after I answer the first question correctly.

2, for the first i+1 problem, we can have two options: answer, do not answer;

If you do not answer, then the bonus will be up to 2i;

If the answer is wrong, the prize of course is 0; if you answer correctly, the bonus will change to p*d[i+1](This is an expectation, it can be said to mean, or you can understand, choose to get the bonus expectation of the answer = (1-p) *0 + p*d[i+1], answer the wrong no bonus , the bonus of course is it.

Now the question is, p here is the probability of the answer to question i+1 , what is the probability of this?

First we consider a question, under what circumstances would you choose to answer?

Also use to think Ah of course is the answer to the bonus expectations than not answer more! This is also:

p*d[i+1] > 2i (Note that the bonus expectations for the i+1 title are not 2i+1)

The transformation is that this p>2i/d[i+1] , the probability of getting the bonus will be relatively large, we will choose to answer the question;

Make ep=2i/d[i+1], consider the range of tmp:

When ep<t, because the probability of the player to correct the problem is evenly distributed between (t,1), so the probability of the player to answer the question will be very large, then we will let the players answer questions, the probability of the answer is (1-max (T,EP))/(1-T);

When the ep>t, the player is not sure of the correct answer and wrong judgment, the probability of choosing the answer is (1-max (T,ep))/(1-T);

Note here Max (T,EP), if ep<t the probability of the answer is (1-T)/(1-T), and if ep>t, according to the distribution function evenly distributed we can know the probability of the answer is (1-EP)/(1-T), it can be translated into a formula ( 1-max (T,EP))/(1-T);

and the probability P, which was discussed before, because ep<p<1, according to the mathematical expectation of the uniform distribution ep= (1+EP)/2;

3, then we can now ask the first question after the bonus value D[i]:

We choose not to answer the probability of (EP-T)/(1-T), at this time take the bonus 2i

We choose to answer the probability of (1-EP)/(1-T), at this time take the bonus (1+EP)/2 * d[i+1];

So d[i]= (ep-t)/(1-t) * 2i + (1-EP)/(1-T) * ((1+EP)/2*d[i+1]);

4, this question needs to push, altogether I problem, then d[i]=2i

Finally ask D[0] can.

The code is not attached ...

"Probability" Uva 10900-so you want to be a 2n-aire?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.