/r/mathriddles
This subreddit is for anyone to share math or logic related riddles, and try and solve others. Come check it out! This subreddit is designed for viewing on old.reddit.com.
Welcome to Math Riddles! Post your math and logic puzzles, and try and solve others! While the subreddit aims for math related riddles, all logic puzzles and riddles are welcome as well.
This subreddit is for people to share math problems that they think others would enjoy solving. It is not intended for helping students with homework problems or explaining mathematical concepts. If you are searching for such a subreddit, you should consider /r/cheatatmathhomework, /r/HomeworkHelp, or /r/learnmath.
Titles should be descriptive of the problem, and sensationalized titles such as "Completely stumped by this problem" or "One of my favorite puzzles" are discouraged.
While math riddles of any difficulty are welcomed, please avoid posing problems whose solution is formulaic and/or trivial (e.g. "What number is 3 more than its double?") In general, if you might expect to see a problem on a typical school exam, don't post it here.
Codebreaking and "guess the rule" type posts are not permitted; if you wish to submit such a post, do so on subreddits such as /r/puzzles.
Puzzles should generally only be posted here if you have enjoyed solving them and want to share that experience with others; if you are trying to discover the answer to a question of yours that you can't solve, you should try asking on /r/math or /r/learnmath depending on the topic.
Image posts are discouraged on /r/mathriddles, and should be linked with more context in a text post. Pictures of text should be transcribed, where possible.
Make sure to spoiler tag your solutions!
Spoiler Tag: >!spoiler!< produces spoiler. This works reddit-wide and on mobile. If subreddit CSS is enabled, the following spoiler formats work as well:
[this text here](#spoiler) will appear as this text here. Hover over it to reveal. Additionally, > > this text here
will appear as
this text here
The double blockquotes format is better if you want additional markup within. For just one line it can be simpler to use the (#spoiler) format.
This subreddit is designed for best viewing on Old Reddit; if you use New Reddit, some CSS features will be unavailable.
If you have any ideas for the subreddit, feel free to message the mods!
Always flair your posts with an estimated difficulty. The three levels are listed below. The below buttons also function as sorting, so if you're in the mood for only Hard problems, or only Easy problems, just click one of the buttons below. The left button is unsolved, while the right button is solved.
If you want to search solely for solved or unsolved problems, regardless of difficulty, just click one of the two buttons below.
Posts can also be flaired as solved, either by a moderator or by the original poster of the problem. To do this, click the "flair as solved" button below the post, and choose the 'Solved' variant of your post. If your post was initially marked as Medium, then choose Medium - Solved.
This change will change the next to your post to , marking the post as solved.
If a moderator changes your post to solved, and you believe that it still is not, feel free to change it back.
Toggle spoiler mode:
This button toggles spoiler mode, meaning that all of the comments are hidden until a button is hovered over. This makes all comments visible (even those that are spoiler tagged).
Check out /r/CasualMath and the other puzzle-based subreddits in the buttons at the top left of the subreddit!
/r/mathriddles
To divide a heritage, n brothers turn to an impartial judge (that is, if not bribed, the judge decides correctly, so each brother receives (1/n)th of the heritage). However, in order to make the decision more favorable for himself, each brother wants to influence the judge by offering an amount of money. The heritage of an individual brother will then be described by a continuous function of n variables strictly monotone in the following sense: it is a monotone increasing function of the amount offered by him and a monotone decreasing function of the amount offered by any of the remaining brothers. Prove that if the eldest brother does not offer the judge too much, then the others can choose their bribes so that the decision will be correct.
Let G be a directed acyclic graph. Suppose k is a positive integer, such that the lengths of maximal paths in G do not cover all residue classes modulo k. Prove that chromatic number of G is at most k.
warning: if you do not like algebra crunching, please skip this.
When a spacecraft wants to raise its orbital radius around a celestial body from r to R, it can either do Hohmann transfer or bi-elliptic transfer. (see below for more details)
There exist a constant k such that when R / r > k, bi-elliptic transfer always require less Δv (thus less fuel) than a Hohmann transfer even though it require one more engine burn.
k is a root of a cubic polynomial. Find this cubic polynomial.
For those who do not want to deal with physic stuff, here are some starting assumptions (axiom) that i work from:
!1. Kepler's first law: the spacecraft orbit is an ellipse, where the celestial body is at one of the focus. (engine burn changes the shape, but still an ellipse)!<
!2. Kepler's second law: at apoapsis (furthest) and periapsis (closest), r1 v1 = r2 v2 (unless engine burn is performed)!<
!3. Conservation of energy: at any point, 1/2 v^2 - μ / r is a constant (unless engine burn is performed), where μ is another constant related to the celestial body. wlog you can set μ=1.!<
!4. An engine burn spend fuel to change velocity. A bi-elliptic transfer has 3 engine burns!<(diagram) >!, first burn brings the apoapsis from r to x, where x>R. Then at apoapsis, second burn brings periapsis from r to R, finally when back to periapsis, third burn brings the apoapsis back from x to R, circularizing the orbit. if x=R, then it is reduced to Hohmann transfer!< (diagram) . >!the problem ask for which k, ∀x>R, bi-elliptic is better.!<
note: i discovered this problem when playing ksp , and the solution i found became my new favorite constant. part of the reason for this post is to convince more people: this constant is cool! :)
too easy? try this variant: There exist a constant k2 such that when R / r < k2, bi-elliptic always require more Δv (thus more fuel) . k2 is a root of 6th degree polynomial.
For 5 distinct positive integers a, b, c, d and e, the following statements are true:
If there exists a pentagon whose lengths of edges are equal to a, b, c, d and e respectively, what is the minimum perimeter of the pentagon?
For each positive integer n, how many integer pairs (j,k) exist such that j^k = k^j (mod n) and 0 < j < k < n?
my teacher challenged us with this puzzle/problem and no matter how hard i try i can’t seem to solve it or find it online (chatgpt can’t solve it either lol) i’m really curious about the solution so i decided to try my luck here. it goes like this: there are three people, A,B and C. Each of them has a role, they are either a knight, a knave or a joker. The knight always tells the truth, the knave always lies, and the joker tells the truth and lies at random (there is only one of each, there can’t be two knights, for example). Find out who is who by asking only 3 yes or no questions. You can ask person A all three questions or each of them one question, however you wish, but they can ONLY answer with yes or no. :))))
On a connected graph G, Alice and Bob (with Alice going first) take turns capturing vertices. On their first turn, a player can take any unclaimed vertex. But on subsequent turns, a player can only capture a vertex if it is unclaimed and is adjacent to a vertex that same player has claimed previously. If a player has no valid moves, their turn is skipped. Once all the vertices have been claimed, whoever has the most vertices wins (ties are possible).
An example game where Alice wins 5 to 3 is given in the image.
Source (contains spoilers for part 1): https://puzzling.stackexchange.com/q/129032/2722
Ensuring a Reliable Deduction of the Secret Number
To guarantee that Person A can accurately deduce Person B's secret number, create a set of 13 cards. Each card should contain a carefully chosen subset of natural numbers from 1 to 64, such that every number within this range appears on a unique combination of these cards. Prepare these cards in advance to ensure accurate identification.
Person B chooses a number between 1 and 64 and keeps it hidden.
Person A then shows each of the 13 cards to Person B, asking if the secret number appears on that card. Person B responds with “Yes” or “No” to each card.
Person A interprets the pattern of “Yes” and “No” responses to uniquely identify the secret number. Each number from 1 to 64 is associated with a distinct pattern of responses across the 13 cards, allowing for an accurate deduction.
In the 13 responses from Person B, allow for up to 2 errors in the form of incorrect “Yes” or “No” answers. Person A should consider these potential mistakes when interpreting the pattern to reliably deduce the correct secret number.
Riddle:
What kind of card set should Person A prepare?
NOTE:
I would like to share the solution with you at a later date, because the solution that I learned from my friend is too good to be true.
A ship is travelling southeast in a straight line at a constant speed. After half an hour, the ship has covered c miles south and c - 1 miles east, and the total distance covered is an integer greater than 1. How long will it take the ship to travel c miles?
Yesterday, our teacher introduced us to the false coin problem in class. The first problem involved 8 coins: one of them is heavier, and we have only 2 weighings to find it. After some time, we managed to figure out the solution. Then he presented us with a second problem: this time, there are 12 coins, with one being a fake that could be either heavier or lighter than the others. We still only have 3 weighings to identify it. No one could solve it in class, but one student came up with a solution if the two sets of 4 coins weighed the same.
After class, our teacher showed us the solution and gave us a new problem as a homework. This time, we need to define exactly 3 weighings that will identify the fake coin and tell us if it's heavier or lighter. For example, if the weighings result in a pattern like E-E-R (equal/equal/right heavier or lighter), we would know which coin is fake and whether it’s heavier or lighter. If the weighings differ, it will reveal that another coin is fake.
I would appreciate any tips. I'm trying really hard, but I feel stuck and can't seem to make any progress.
Sorry for being roundabount about this problem. English is not my main language. If anyone needs more details, feel free to ask, I will try to clarify.
5 prisoners are taken to a new cell block. The warden tells them that he will pick one prisoner at random, per day, and bring them into a room with two light switches. For the prisoners to escape, the last prisoner to enter the room for the first time, must correctly notify the warden. If all prisoners have entered the room at least once, but none of them have notified the warden, they have lost. If not all prisoners have entered the room at least once, but one of them notifies the warden believing they have, they lose.
The prisoners can choose to either switch one, both or neither of the switches when they enter. The switches both start in the off position, and the prisoners are aware of this. They are given time to strategize before the event takes place.
How can they guarantee an escape?
Some of you may be familiar with the reality show Are You The One (https://en.wikipedia.org/wiki/Are\_You\_the\_One). The premise (from Season 1) is:
There are 10 male contestants and 10 female contestants. Prior to the start of the show, a "matching algorithm" pairs people according to supposed compatibility. There are 10 such matches, each a man matched with a woman, and none of the contestants know which pairings are "correct" according to the algorithm.
Every episode there is a matching ceremony where everyone matches up with someone of the opposite gender. After everyone finds a partner, the number of correct matches is revealed. However, which matches are correct remains a mystery. There are 10 such ceremonies, and if the contestants can get all 10 matches correctly by the tenth ceremony they win a prize.
There is another way they can glean information, called the Truth Booth. But I'll leave this part out for the sake of this problem.
Onto the problem:
The first matching ceremony just yielded n correct matches. In the absence of any additional information, and using an optimal strategy (they're trying to win), what is the probability that they will get all 10 correct on the following try?
Anyone willing to come down the rabbit hole and continue to generalize this problem? It's neat.
Let x(1) < ...< x(n) be i.i.d in U(0,1) and let Y be their average. Show that P(x(k) < Y < x(k+1)) = A(n-1,k-1) / (n-1)! where A(n,k) are the Eulerian numbers, which count permutations with a given number of descents (x(i+1)<x(i)).
The hint below breaks out the problem into two parts
! (1) Let z(1) < ... < z(n-1) be i.i.d in U(0,1) and let S be their sum. Show that P(x(k) > Y) = P(S >n-k) for 1 <= k <= n !<
!(2) Show that P(k < S < k+1) = A(n-1,k)/(n-1)! !<
Hint for (2)
!Find a (measure preserving) bijection between these two subsets of the unit hypercube:!<
!(a) k < sum y(j) < k+1!<
!(b) y(j+1) < y(j) for exactly k coordinates!<
The problem follows directly from (1) + (2). Note that (2) is a classic result with many different proofs. The bijection approach is due to Richard Stanley. I’ll post links in a few days.
Let a(n) be the expansion of n in base -2. Examples:
2 = 1(-2)^2 + 1(-2)^1 + 0(-2)^0 = 4 - 2 + 0 = 110_(-2)
3 = 1(-2)^2 + 1(-2)^1 + 1(-2)^0 = 4 - 2 + 1 = 111_(-2)
6 = 1(-2)^4 + 1(-2)^8 + 0(-2)^2 + 1(-2)^1 + 0(-2)^0 = 16 - 8 + 0 - 2 + 0 = 11010_(-2)
For which n are the digits of a(n) all 1's?
Let S be the set of integers that are the sum of 4, but no fewer, squares of positive integers: (7, 15, 23, 28, ...). Show that S contains infinitely many consecutive pairs: (n, n+1), but no consecutive triples: (n, n+1, n+2).
More general variation of this problem. What is the probability that the mean of n random numbers (independent and uniform in [0,1]) is lower than the smallest number multiplied by a factor f > 1?
Generate n random numbers, independent and uniform in [0,1]. What’s the probability that all but one of them is greater than their average?
N >= 2 players play a game - they are each given independently and uniformly a number from [0, 1]. On each round, they are to guess whether their number is higher or lower than the average of the remaining players. All who guess wrongly are eliminated before the next round starts.
Assumptions:
Players only know their own number, and not anyone else’s.
Players are myopic and play only to optimise their survival probability in the present round.
Players all follow an optimal strategy.
The players are given full information on the actions of other players in previous rounds and subsequent eliminations.
Without any analysis, we know that the optimal strategy is to guess "higher" if one's number exceeds a certain value depending on the information available to the player so far.
Question: What is the optimal strategy?
easier variant of this recently unsolved* problem (*as of the time writing this).
Let A be a set of n points randomly placed on a circle. In terms of n, determine the probability that the convex hull of A contains the center of the circle.
note: this might give some insight to the original problem, or not... i had yet to make it work on 3D.
Let k_1, ..., k_n be uniformly chosen points in (0,1) and let A_i be the interval (k_i, k_i + 1/n). In the limit as n approaches infinity, what is expected value of the total length of the union of the A_i?
Find a combination of four tetrahedral dice with the following special conditions.
As described in Efron's Dice, a set of four tetrahedral (four-sided) dice satisfying the criteria for nontransitivity under the specified conditions must meet the following requirements:
There is a cyclic pattern of winning probabilities where each die has a 9/16 (56.25%) chance of beating another in a specific sequence. For dice ( A ), ( B ), ( C ), and ( D ), the relationships are as follows:
Die ( A ) has a 9/16 chance of winning against die ( B ).
Die ( B ) has a 9/16 chance of winning against die ( C ).
Die ( C ) has a 9/16 chance of winning against die ( D ).
Die ( D ) has a 9/16 chance of winning against die ( A ).
This structure forms a closed loop of dominance, where each die is stronger than another in a cyclic manner rather than following a linear order.
The expected value of each die is 60, ensuring that the average outcome of rolling any of the dice is identical. Despite these uniform expected values, the dice still exhibit nontransitive relationships.
Each face of the dice is labeled with a prime number, making all four numbers on each die distinct prime numbers.
There are exactly 16 distinct prime numbers used across the four dice, ensuring that no prime number is repeated among the dice.
The winning probability between dice ( A ) and ( C ) is exactly 50%, indicating that neither die has an advantage over the other. Similarly, the winning probability between dice ( B ) and ( D ) is also 50%, ensuring an even matchup.
These conditions define a set of nontransitive tetrahedral dice that exhibit cyclic dominance with 9/16 winning probabilities. The dice share equal expected values and are labeled with 16 unique prime numbers, demonstrating the complex and non-intuitive nature of nontransitive probability relationships.
easier variant of this recent problem
An adventurer is doing a quest: slay the blob of size N>=1. when a blob size n is slain, it splits into (more accurately, creates) multiple blobs of smaller positive integer size. the probability that size n blob creating size k blob is k/n independent of other values of k. The quest is completed iff all blobs are slain and no new blob is created.
The game designer wants to gauge the difficulty of blob size N.
Find the expected number of blob created/slain for each blob size to complete the quest.
edit to clarify: find the expected number of blob size k, created by one blob size n.
Define the n-hedron to be a three dimensional shape that has n vertices. Assume this n-hedron to be contained within a sphere, with each of the n vertices randomly placed on the surface of the sphere. Determine a function P(n), in terms of n, that calculates the probability that the n-hedron contains the spheres center.
A man is playing a magical pipe organ - every chord is an integer number of decibals (dB) loud. The softest chord is 0 dB. Every chord of N > 0 dB creates a random number of echoes - for every 0 <= n <= N-1, an echo of volume n dB is created with probability (N-n)/N independently of other values of n. These echoes then independently produce their own echoes.
Question: What is the mean, median and mode of the number of echoes produced by a chord of volume N dB?
Notes:
In the abscene of exact values, approximations and asymptotics are welcome.
By median, we mean the smallest n for which the number of echoes is less than n with probability at least 1/2.
By mode, we mean that value of n that has the greatest chance of occurring.
One sphere is inside another sphere. Which sphere has the largest surface area?
Find all non-decreasing and continuous f: ℝ-> ℝ such that f(f(x))=f(x) for all x∈ ℝ
Problem is not mine
Place points on the plane independently with density 1 and draw a circle of radius r around each point (Poisson distributed -> Poisson = fish -> fish puddles).
Let L(r) be the expected value of the supremum of the lengths of line segments starting at the origin and not intersecting any circle. Is L(r) finite for r > 0?
You have 8 batteries, 4 are dead and 4 have charges, 2 charged batteries are required to use a flashlight. How many battery pairings must you test for the flashlight to turn on? The question works on worst case scenario so there's no finding a working pair on the first try. It's always explained that you need to be sure, in the worst case scenario, that you have two working pairs.
A basic strategy (explained below) gets you to 8 tests. The optimal solution is said to be 7 tests. I have worked out it can be done in 4 tests. Can anybody find out how?
8 Test Strategy:
4 good batteries and 4 bad batteries for a total of 8 batteries.
Label them 1, 2, 3, 4, 5, 6, 7, 8.
Test them in pairs: 1+2, 3+4, 5+6, 7+8. In the worst case no pairs turn on the torch.
We know from these tests there has to be done one bad battery per tested pair. Since there are four bad batteries in total we must have exactly one bad battery per pair. Thus each pair also has one good battery.
We go on to test one pair with another pair.
1+3, 1+4, 2+3, 2+4.
In the end the pair of 2+4 work be good and the torch will turn. Here we have 8 tests.
Can anybody see how we can get a working pair in only 4 tests?
For every r > 0 let C(r) be the set of circles of radius r around integer points in the plane except for the origin. Let L(r) be the supremum of the lengths of line segments starting at the origin and not intersecting any circle in C(r). Show that
lim L(r) - 1/r = 0,
where the limit is taken as r goes to 0.