All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Games
Flipper (Posted on 2023-12-16) Difficulty: 3 of 5
The game Flipper is played with 2 coins which may have any integer denomination from 1 to 99, inclusive. The coins are tossed, and the value of the toss is the sum of the denominations of those coins that show heads. The higher sum wins. In case of a tie, the game is replayed.

Two people play this game. One person has coins valued 1 and X, the other person has 5 and X. It is found that the game is fair, that is, the two people win in exact proportion to the total value of their coins.
What is the value of X?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 1 of 7
Name the Players "One" and "Five" according to the unique coin they possess.
Player One can score 0, 1, X, or 1+X
Player Five can score 0, 5, X, or 5+X

X value  One wins   Five wins
1,4        4           9
2,3        4          10
5           5           8
> 5        6           8


X   ratio of wins        ratio of coins
1 0.4444444444444444 0.3333333333333333
2 0.4 0.42857142857142855
3 0.4 0.5
4 0.4444444444444444 0.5555555555555556
5 0.625 0.6
6 0.75 0.6363636363636364
7 0.75 0.6666666666666666
8 0.75 0.6923076923076923
9 0.75 0.7142857142857143
10 0.75 0.7333333333333333
11 0.75 0.75                      <--- the same
12 0.75 0.7647058823529411
13 0.75 0.7777777777777778
14 0.75 0.7894736842105263
15 0.75 0.8
thereafter, the flip score remains unchanged but the ratio increases

When x = 11, Team One wins 6/16 and Team Five wins 8/16 with 2 ties which will ultimately play out at the same win/loss ratio of 6/8=3/4.
And when x = 11, (1+11)/(5+11) = 12/16 = 3/4


-------------
import random
def flip(x):
    red = [0,1,x,1+x]
    blue = [0,5,x,5+x]
    redwins = 0
    bluewins = 0
    for r in red:
        for b in blue:
            if r > b:
                redwins += 1
            if r < b:
                bluewins += 1
    return redwins/bluewins

for x in range(1,16):
    print(x,flip(x), (1+x)/(5+x))

Edited on December 16, 2023, 3:31 pm
  Posted by Larry on 2023-12-16 15:29:28

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information