Problem 121

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
LarryC

Problem 121

Post by LarryC »

Hi

Problem 121 looks easy but I am unable to verify that the probability of winning is 11/120 as stated in the question. I don't make it that at all and am pretty sure of my answer so it would be useful to see if my earlier answers agree with what is expected.

Can anyone verify:
Rounds | Probability Of A Win
1 | [frac]1,2[/frac]
2 | [frac]1,6[/frac]
3 | [frac]5,18[/frac]
4 | [frac]1,9[/frac]

That would be much appreciated...
Thanks,
Lster
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: Problem 121

Post by Tommy137 »

5/18 for 3 rounds is not correct.
Image
LarryC

Re: Problem 121

Post by LarryC »

Thanks! Are the first two rounds correct?
User avatar
stijn263
Posts: 1505
Joined: Sat Sep 15, 2007 11:57 pm
Location: Netherlands

Re: Problem 121

Post by stijn263 »

Yes they are.

Remember that a player can win a game of three rounds if he takes:
- 3 blue disks (bbb)
- 2 blue disks and 1 red disk (bbr, brb, rbb)
LarryC

Re: Problem 121

Post by LarryC »

After each turn the disc is returned to the bag, an extra red disc is added, and another disc is taken at random.
I've just realized I may well be interpreting this in a way that is not intended.

Does the above statement imply that the second disk taking is also "noted" or not? It could be interpreted either way and my results assume that the disk is only removed.
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: Problem 121

Post by Tommy137 »

Example:

bag contains: B , R
player takes B

now another red disc is added

bag contains: B , R, R
player takes: R

another red disc is added

bag contains: B, R, R, R
player takes: B

=> The player took 2 blue discs and 1 red, so he has won. (probability 1/2*2/3*1/4 = 1/12)
Image
LarryC

Re: Problem 121

Post by LarryC »

Got it! Thanks for your help guys.
After each turn the disc is returned to the bag, an extra red disc is added, and another disc is taken at random.
This sentence is very ambiguous. It's primary meaning seems to imply that a disc is randomly removed after the turn and before the next. An example, similar to Tommy137's one, would go a long way! Or perhaps it should be rephrased.
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: Problem 121

Post by Tommy137 »

lster wrote:Got it! Thanks for your help guys.
Gratz :D

lster wrote:
After each turn the disc is returned to the bag, an extra red disc is added, and another disc is taken at random.
This sentence is very ambiguous. It's primary meaning seems to imply that a disc is randomly removed after the turn and before the next. An example, similar to Tommy137's one, would go a long way! Or perhaps it should be rephrased.

This interpretation did never occur to me, but people may understand it that way.
Image
ImRe
Posts: 12
Joined: Thu Aug 28, 2008 3:09 pm

Re: Problem 121

Post by ImRe »

After reading this topic, I still don't fully understand this problem.
How are the payouts done here? In the four turn game, is the player getting back £1 for every round (s)he won, or for every four turn (s)he won, or is it something completely different?

Thx
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: Problem 121

Post by Tommy137 »

The payout's done after the complete game is played. If the player wins the four turn game, he gets £10 including his stake of £1.
Image
Knut.Angstrom
Posts: 7
Joined: Thu Apr 24, 2008 8:22 pm

Problem 121

Post by Knut.Angstrom »

How much is the player paid if he wins after n turns? After 4 turns he is paid £10 so much I understand :?
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: 121

Post by Tommy137 »

Please specify your question... and you could read the already existing topic (viewtopic.php?f=50&t=997) for Problem 121 and see if it's helping you.
Image
User avatar
rayfil
Administrator
Posts: 1412
Joined: Sun Mar 26, 2006 5:30 am
Location: Quebec, Canada
Contact:

Re: Problem 121

Post by rayfil »

How much is the player paid if he wins after n turns?
If you read the problem description very carefully, THAT is the answer you have to find.

Statisticly, it would be the largest payout by the sponsor of the game such that no overall loss (and minimal gain) would be expected in the long run. (If the payout would be £11 when the probability of winning is 11/120, £121 would be given for every £120 of revenue.)
When you assume something, you risk being wrong half the time.
estanford
Posts: 10
Joined: Sun Sep 13, 2009 12:06 pm

Re: Problem 121

Post by estanford »

This problem confuses me. How much of the prize fund does the player win as a consequence of a single win event? Does it vary according to some function or is it a constant?
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 121

Post by TripleM »

I'm not quite sure what you mean by 'single win event'; there is only one outcome. If the player has won after 15 rounds, they receive the whole prize.
estanford
Posts: 10
Joined: Sun Sep 13, 2009 12:06 pm

Re: Problem 121

Post by estanford »

So am I understanding the question correctly if I read it like this?

~~~~~~~

Let there exist three piles of money:
1) The money the player has (assume infinite),
2) The money the player has given as entry fees,
3) The prize money.

Each time the player plays the game, they pay a fee of 1 pound. This money is moved from pile (1) to pile (2). Money is never transferred from pile (1) or (2) to pile (3). The size of pile (3) is an integer constant, set by the banker at the outset of the game. The player keeps playing until s/he wins. Given that the game is played for n turns, what is the smallest possible size of pile (3) such that the banker does not expect to lose money by the time the player wins?

~~~~~~

EDIT: After solving the problem, I see that the answer was 'yes'. Good times.
chiefsci
Posts: 3
Joined: Tue Nov 30, 2010 8:35 pm

Re: Problem 121

Post by chiefsci »

One quick question. I thought that I had calculated the answer with a pen and paper, but it is not being accepted. Am I correct in using combinatorics (like those in Problem 53) to calculate the numerator of the fractional form of the probability of success after 15 rounds? It works perfectly for the 4 round example, producing 11 for the 11/120, but my current answer isn't being accepted.
Image
User avatar
GenePeer
Posts: 112
Joined: Sat Apr 03, 2010 1:14 pm
Contact:

Re: Problem 121

Post by GenePeer »

I did it by Paper/Pencil too but the calculations involved never required to find any binomial coefficient! The four turns example isn't enough, work on 5-7 turns to properly understand the question, for 7 turns the payout is 17. Enjoy.
Image
User avatar
Francky
Posts: 90
Joined: Sat May 07, 2011 3:49 pm
Location: South of France

Re: Problem 121

Post by Francky »

I can find the value for n=2000 in 1.3s
Expand
18947601191262360253803057378580697801329301076723684533165395191878298252411143714310186797902167711556489721419949786937810806579217329529972194678631638533442654482854398378334853149447673949069531831098625333410171883090632250214722128265332631618578193343037722320580778108792970960943917194802493735595124957823033085786518767053117759781727787481925319439991722568517552388959994651555002449463440443849286174361989270493279066133903871788110138556190411249273065724388009677095642044125626221408800076541520852501388731276343674563430133716553873119066915295087714681969427128364097287556503076753749261033901529628795705162638141601799421290765837486027446290819453816331147793260368555879505535195928639203774274367187886853060539294593371989299700558369155953188708103477719780340576440324888510899463266418391743864472803590157789734983924237329600328247299276816113120245038625988099165278269156944792572137261859304691144638028815873856145830794633779394516906153367302125054909056148357485705004747035359744295368111536404875360668494502460286401735834572359541235454426929525784334794585952373255214626158686354662359249543908790869827909963491808170242869435288820241447167109796298219300843432388827065285977845851960894674569017814246656143578649561309245724873016945463392800801043682030061270942226421597493557710046561744965436304327629486660152323148086882898259067769381711237127615966416208577517311635360353531519822934864594563448078129247043411597309885399882650589989621047431828838940981143748700014849004925829217807136929996400621310757067922608947488625826982185462782132866461977174839646598298568965269893792345617021149309841651847351814710878729499075558897197555924354883494223882772441154788098012216803163365150711443910760231605799867454150981804484389757065312639915716784035731430394938272616879342639822774294705177133888934991617227067614794193397828177325929851196033761663190136615668419549687325222773880256735019091199453667300030952332642141694819098158312082369911324910571469548115779839286716597787115318903991906781273606634785228815460532394616323919252904564713722838285424589389533414693842447046538894276472402672550529405533875
ImageEntia non sunt multiplicanda praeter necessitatem
enderw88
Posts: 9
Joined: Tue Feb 07, 2012 4:18 am

Re: Problem 121

Post by enderw88 »

Seems like the 4 turn example considers drawing 2 Blues and 2 Reds as a win. Or am I reading it incorrectly?
Image
Post Reply