Math and Logic Puzzles: Redux
-
-
Charles510 heGoonhe
- Goon
- Goon
- Posts: 219
- Joined: March 11, 2017
- Pronoun: he
- Location: San Francisco Bay Area
-
-
StrangerCoug He/HimDoes not ComputeHe/Him
- Does not Compute
- Does not Compute
- Posts: 12457
- Joined: May 6, 2008
- Pronoun: He/Him
- Location: San Antonio, Texas
No, I was busy watching election results.STRANGERCOUG: Stranger Than You!
Current avatar by PurryFurry of FurAffinity.
What Were You Thinking XV! is in progress.-
-
Charles510 heGoonhe
- Goon
- Goon
- Posts: 219
- Joined: March 11, 2017
- Pronoun: he
- Location: San Francisco Bay Area
-
-
StrangerCoug He/HimDoes not ComputeHe/Him
- Does not Compute
- Does not Compute
- Posts: 12457
- Joined: May 6, 2008
- Pronoun: He/Him
- Location: San Antonio, Texas
Here in Texas it largely went as expected.STRANGERCOUG: Stranger Than You!
Current avatar by PurryFurry of FurAffinity.
What Were You Thinking XV! is in progress.-
-
Dessew Mafia Scum
- Mafia Scum
- Mafia Scum
- Posts: 1086
- Joined: June 14, 2013
Hey, haven't been to this site in ages :D
I wanted to ask my crush out for a date, but her brother is very protective of her, and gave me a condition I first have to fulfil unless I wish him to give me a purple nurple. I'll play 2n+1 games of chess (he hasn't decided exactly how many yet, but he'll tell me before we start) against him and his sister, always alternating. So for example if I first play against my crush, then I'll have to play against the brother next, then against her and so on, and in this case my last possible game would be against her. Only when I prove myself to be a colossal nerd by winning two games in a row, am I allowed to ask his sister out.
Now, she's very smart, and I can't even figure this problem out on my own, so my chances of winning against my crush are slim. Unfortunately, I can't tell her to lose against me on purpose, though, because then both my nurples will be purple, and that's where the limits of my ever-lasting love lie. On the other hand, her brother is a brute, and beating him should be a walk in the park.
Can you help me? Is there a way for me to maximise the probability of my crush's brother allowing me to ask his sister out? He's already letting me always play with the white pieces.-
-
Who Yes?
- Yes?
- Yes?
- Posts: 4745
- Joined: March 22, 2013
- Location: Third Base
To clarify, the games are all being played sequentially, right? No game starts before the last one has ended. If so, are any of the following strategies allowed?
Use Stockfish against your crush
After beating her brother, before playing her, play another game against someone else you can beat, claim that you have won two games in a row and thus should be allowed to ask her out as per the exact words of the deal.
Beat her brother then forfeit against her before playing, then beat her brother again. Claim that because you forfeited before playing you didn't lose a game you played and thus you have won two games you played in a row and this one is just the last one but worse. Alternatively, lie and say you played her when you didn't.
What time control is there on each match, and are the games played immediately one after the other? Can you prolong a game against her brother to the point where she leaves/goes to sleep and then start the game against her and win on time when she doesn't show up?
Open with the bongcloud. She will assume that it is a meme game and proceed make meme moves, wait for her to screw up so badly that you can win starting a serious game there.Who said that?
Chamber. It's all a conspiracy.
Or is it?6-
-
Dessew Mafia Scum
- Mafia Scum
- Mafia Scum
- Posts: 1086
- Joined: June 14, 2013
These are very creative solutions, but if the brother thinks I'm cheating or up to some trickery, he'll purple the nurple till I burple the purple. That wouldn't be a pretty sight.
HINT 1:This is a maths problem.
HINT 2:Perhaps there's an apect of these series of games that hasn't been explicitly specified yet, and where one option gives me a clear mathematical advantage over the other(s).-
-
Dessew Mafia Scum
- Mafia Scum
- Mafia Scum
- Posts: 1086
- Joined: June 14, 2013
And yes, the games are played sequentially.-
-
implosion he/himPolymathhe/him
- Polymath
- Polymath
- Posts: 14450
- Joined: September 9, 2010
- Pronoun: he/him
- Location: zoraster's wine cellar
-
-
Dessew Mafia Scum
- Mafia Scum
- Mafia Scum
- Posts: 1086
- Joined: June 14, 2013
Thanks to your help, managed to win two games in a row, and asked my crush out for a date. As it turns out, she hates my guts, and wants nothing to do with me. She broke my legs and my heart.
Spoiler:-
-
Dessew Mafia Scum
- Mafia Scum
- Mafia Scum
- Posts: 1086
- Joined: June 14, 2013
Let's try another one. I generate a random number p between 0 and 1 with uniform distribution, then I mint a coin such that the probability that it lands on heads when I toss it is p. What is the probability that I get exactly as many tails as heads if I toss the coin 2n times?-
-
biancospino he/shecompulsive complex Inventorhe/she
- compulsive complex Inventor
- compulsive complex Inventor
- Posts: 2265
- Joined: October 18, 2022
- Pronoun: he/she
- Location: UTC+1
There's like an 80% chance I've messed some computation up along the line, but the general idea should work.
I write C(a,b) for a!/(b!(a-b)!) for each pair of integers with a>=b.
Suppose first that p was fixed. There are C(2n,n) scenarios in which you get n heads, and so the probability of getting exactly n heads is C(2n,n)p^n(1-p)^n.
Now, since p is extraded in [0,1] uniformly at random, the requested probability is the integral from 0 to 1 of C(2n,n)p^n(1-p)^n dp.
Now, let's compute the integral of p^n(1-p)^n dp between 0 and 1.
By parts, one has that, for a,b positive integers,
\int_0^1[p^a(1-p)^b dp]=
=[p^(a+1)/(a+1)(1-p)^b]|_0^1+\int_0^1[p^(a+1)/(a+1)(1-p)^(b-1)b dp]=
=\int_0^1[p^(a+1)(1-p)^(b-1) dp]b/(a+1)
So, by using this expression n times, one gets that
\int_0^1[p^n(1-p)^n dp]=(n/(n+1))*((n-1)/(n+2))*...*(1/2n)*\int_0^1[p^(2n)dp]
=n!/((2n)!/n!)*(1/(2n+1))=n!^2/(2n+1)!
And so in conclusion the requested probability is
C(2n,n)n!^2/(2n+1)!=((2n)!n!^2)/(n!*n!*(2n+1)!)=.1/(2n+1)Now modding-
-
Dessew Mafia Scum
- Mafia Scum
- Mafia Scum
- Posts: 1086
- Joined: June 14, 2013
Yes, correct!
Spoiler:-
-
biancospino he/shecompulsive complex Inventorhe/she
- compulsive complex Inventor
- compulsive complex Inventor
- Posts: 2265
- Joined: October 18, 2022
- Pronoun: he/she
- Location: UTC+1
Eh, let's do one.
Suppose there's a plane with 400 seats; all seats are booked, and all passengers are actually going to take the plane.
Passengers board the plane in a random order. The first one sits on the wrong seat (that is, a seat different from the one indicated in their ticket); all subsequent passengers sit on the correct seat if it's not occupied by someone else, and on a random unoccupied seat otherwise.
What is the chance that the last passenger to board will sit on the correct seat?Now modding-
-
tris sheSplatoon Tetrisshe
- Splatoon Tetris
- Splatoon Tetris
- Posts: 5664
- Joined: January 7, 2019
- Pronoun: she
- Location: tris
-
-
Aisa she/her, they/themMafia Scumshe/her, they/them
- Mafia Scum
- Mafia Scum
- Posts: 2838
- Joined: December 19, 2013
- Pronoun: she/her, they/them
- Location: Europe
In post 238, biancospino wrote: Eh, let's do one.
Suppose there's a plane with 400 seats; all seats are booked, and all passengers are actually going to take the plane.
Passengers board the plane in a random order. The first one sits on the wrong seat (that is, a seat different from the one indicated in their ticket); all subsequent passengers sit on the correct seat if it's not occupied by someone else, and on a random unoccupied seat otherwise.
What is the chance that the last passenger to board will sit on the correct seat?Spoiler:-
-
biancospino he/shecompulsive complex Inventorhe/she
- compulsive complex Inventor
- compulsive complex Inventor
- Posts: 2265
- Joined: October 18, 2022
- Pronoun: he/she
- Location: UTC+1
That is correctIn post 240, Aisa wrote:In post 238, biancospino wrote: Eh, let's do one.
Suppose there's a plane with 400 seats; all seats are booked, and all passengers are actually going to take the plane.
Passengers board the plane in a random order. The first one sits on the wrong seat (that is, a seat different from the one indicated in their ticket); all subsequent passengers sit on the correct seat if it's not occupied by someone else, and on a random unoccupied seat otherwise.
What is the chance that the last passenger to board will sit on the correct seat?Spoiler:Now modding-
-
Aisa she/her, they/themMafia Scumshe/her, they/them
- Mafia Scum
- Mafia Scum
- Posts: 2838
- Joined: December 19, 2013
- Pronoun: she/her, they/them
- Location: Europe
-
-
biancospino he/shecompulsive complex Inventorhe/she
- compulsive complex Inventor
- compulsive complex Inventor
- Posts: 2265
- Joined: October 18, 2022
- Pronoun: he/she
- Location: UTC+1
I'm answering the "fair coins" situatiom for now.
Let Q(n) be the chance that, by throwing n coins twice, you get the same number of heads.
Let R(n) be the chance that, by throwing n coins twice, you get more coins the first time. Now, R(n)=(1-Q(n))/2, since provided you get different numbers, which is larger is equally probable.
Let in the end P(n) be the chance that, by throwing n+1 coins, you get more heads than by throwing another n coins. Clearly P(n) is the chance that the first coin is head, times Q(n)+R(n); or that the first coin is tail, times R(n). So,
P(n)=(Q(n)+(1-Q(n))/2)/2+(1-Q(n))/4
=Q(n)/2+1/4-Q(n)/4+1/4-Q(n)/4
=1/2
If p!=1/2, one gets
P(n)=(Q(n)+(1-Q(n))/2)p+((1-Q(n))/2)(1-p)
=Q(n)*(2p-1)/2+1/2
But atm idk how to compute Q(n) nicely for general p.Now modding-
-
Aisa she/her, they/themMafia Scumshe/her, they/them
- Mafia Scum
- Mafia Scum
- Posts: 2838
- Joined: December 19, 2013
- Pronoun: she/her, they/them
- Location: Europe
Perfect!
Whoops - the answer is I wrote the question at 2 am and didn't realise you'd need to compute Q(n) for general p to get this part. I don't know if there's a nice formula for it (:In post 243, biancospino wrote: But atm idk how to compute Q(n) nicely for general p.-
-
biancospino he/shecompulsive complex Inventorhe/she
- compulsive complex Inventor
- compulsive complex Inventor
- Posts: 2265
- Joined: October 18, 2022
- Pronoun: he/she
- Location: UTC+1
I've asked wolfram and it appears that the formula is really not that nice lol. Clearly one has that, for fixed n, Q(n;p) must be an even polinomial of degree 2n in (p-1/2) with Q(n;0)=Q(n;1)=1 and Q(n;1/2)=comb(2n,n)/2^(2n) (since Q(n;1/2) is then equal to the chance that there is as many heads in the first pile astailsin the second (equal) pile, which happens iff there are n heads total), but other than that it seems real uglyNow modding-
-
Aisa she/her, they/themMafia Scumshe/her, they/them
- Mafia Scum
- Mafia Scum
- Posts: 2838
- Joined: December 19, 2013
- Pronoun: she/her, they/them
- Location: Europe
Yeahhh not sure what there is to say exceptwhat is the?? Sorry if you wasted any time on that.hypergeometric function
Here is another one.
-
-
Mitillos HeMafia ScumHe
- Mafia Scum
- Mafia Scum
- Posts: 2300
- Joined: August 23, 2012
- Pronoun: He
Solution to Euler's hypergeometric differential equation. It has a wikipedia page, if you want to learn more.
Anyway, for your problem, (2, 2023, 1 (repeated 2021 times)).
Yes, (2, n, 1 (repeated n - 2 times)). Also (3, n, 1 (repeated 2n - 3 times)). Also (k, n, 1 (repeated kn - n - k times)). Also (2 (repeated k times), 1 (repeated 2^k - 2k times)). Also (2 (repeated k times), 3 (repeated n times), 1 (repeated 2^k * 3^n - 2k - 3n times)). And so on.You don't have ambiguity; you haveoptions.-
-
biancospino he/shecompulsive complex Inventorhe/she
- compulsive complex Inventor
- compulsive complex Inventor
- Posts: 2265
- Joined: October 18, 2022
- Pronoun: he/she
- Location: UTC+1
Unless you're asking if there are infinitely many such sets with exactly 2023 elements, in which case the answer is no (if we're talking positive integers. Otherwise (n,-n, 0 2021 times) always works).
For suppose that A is such (multi)set, and let M=max(A). Note that, for each a>b>1 and 0<c<b, one has (a+c)-ac>(a+b)-ab; so by using this repeatedly and replacing each element of A that is greater than 1 with 1, except for the (possibly not strictly) second-largest element with 2 and keeping the largest unaltered (N.B.: since M+2022>M always, there must exist an element of A, other than M, greater than one), one gets
M+2+2021>=2M
M<=2023
And so, there clearly are at most 2023^2023 such sets. Note that this upper limit is very clearly very generous (and the actual number is surely way, way lower), but it's finite.Now modding-
-
Aisa she/her, they/themMafia Scumshe/her, they/them
- Mafia Scum
- Mafia Scum
- Posts: 2838
- Joined: December 19, 2013
- Pronoun: she/her, they/them
- Location: Europe
Both the answers look good to me ^^.
I was asking if these sets in were finite in general, without the constraint they have to have 2023 elements, but I think bianco's answer is also correct.
Copyright © MafiaScum. All rights reserved.