/r/mathriddles

Photograph via snooOG

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.

Remember to spoiler tag your answers & flair your posts with the difficulty. Spoiler mode:

Welcome

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.

Rules

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!

Flair and Sorting

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.

EasyEasy - S

MediumMedium - S

HardHard - S


If you want to search solely for solved or unsolved problems, regardless of difficulty, just click one of the two buttons below.

UnsolvedSolved


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.

Spoiler Mode

Toggle spoiler mode:

Enable Disable

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).

Similar Subreddits

Check out /r/CasualMath and the other puzzle-based subreddits in the buttons at the top left of the subreddit!

/r/mathriddles

27,288 Subscribers

0

Discord server to make a collab between many people and create the hardest puzzle ever!

Imagine you are the best math-logic puzzle creator in the world. You are to make one single puzzle that will revolutionize the universe of puzzles by using math and logic. The puzzle will be unique, like no other ever existed, and it shall be the hardest puzzle ever created and almost impossible to solve, even for the best thinkers in the world and there will be only one concrete answer, without any paradoxes. https://discord.gg/wCxJ6ueC

0 Comments
2024/12/03
15:41 UTC

6

What is the minimum number of friendships that must already exist so that every user could eventually become friends with every other user?

Generalized version of my old post

There are n users on a social network called Mathbook, and some of them are Mathbook-friends. (On Mathbook, friendship is always mutual and permanent.)

Starting now, Mathbook will only allow a new friendship to be formed between two users if they have at least two friends in common. What is the minimum number of friendships that must already exist so that every user could eventually become friends with every other user?

3 Comments
2024/12/03
11:39 UTC

3

Separation of Points by a Line in the Plane

Prove that there exists a positive constant c such that the following statement is true: Consider an integer n > 1, and a set S of n points in the plane such that the distance between any two distinct points in S is at least 1. It follows that there is a line l separating S such that the distance from any point of S to l is at least c * n^(-1/3).

(A line l separates a set of points S if some segment joining two points in S crosses l.)

Note: Weaker results with c * n^(-1/3) replaced by c * n^(-alpha) may be awarded points depending on the value of the constant alpha > 1/3.

2 Comments
2024/12/02
07:11 UTC

7

For which values of alpha can Hephaestus always win the flooding game?

Let alpha ≥ 1 be a real number. Hephaestus and Poseidon play a turn-based game on an infinite grid of unit squares. Before the game starts, Poseidon chooses a finite number of cells to be flooded. Hephaestus is building a levee, which is a subset of unit edges of the grid (called walls) forming a connected, non-self-intersecting path or loop.

The game begins with Hephaestus moving first. On each of Hephaestus's turns, he adds one or more walls to the levee, as long as the total length of the levee is at most alpha * n after his n-th turn. On each of Poseidon's turns, every cell adjacent to an already flooded cell and with no wall between them becomes flooded.

Hephaestus wins if the levee forms a closed loop such that all flooded cells are contained in the interior of the loop, stopping the flood and saving the world. For which values of alpha can Hephaestus guarantee victory in a finite number of turns, no matter how Poseidon chooses the initial flooded cells?

Note: Formally, the levee must consist of lattice points A0, A1, ..., Ak, which are pairwise distinct except possibly A0 = Ak, such that the set of walls is exactly {A0A1, A1A2, ..., Ak-1Ak}. Once a wall is built, it cannot be destroyed. If the levee is a closed loop (i.e., A0 = Ak), Hephaestus cannot add more walls. Since each wall has length 1, the length of the levee is k.

9 Comments
2024/12/02
06:58 UTC

8

Can a Long Snake Turn Around in a Grid??

A snake of length k is an animal that occupies an ordered k-tuple (s1, s2, ..., sk) of cells in an n x n grid of square unit cells. These cells must be pairwise distinct, and si and si+1 must share a side for i = 1, 2, ..., k-1. If the snake is currently occupying (s1, s2, ..., sk) and s is an unoccupied cell sharing a side with s1, the snake can move to occupy (s, s1, ..., sk-1) instead.

The snake has turned around if it occupied (s1, s2, ..., sk) at the beginning, but after a finite number of moves occupies (sk, sk-1, ..., s1) instead.

Determine whether there exists an integer n > 1 such that one can place a snake of length 0.9 * n^2 in an n x n grid that can turn around.

1 Comment
2024/12/02
06:56 UTC

8

Counting  n times m Nice Matrices with Prescribed Properties

An n times m matrix is nice if it contains every integer from 1 to mn exactly once and 1 is the only entry which is the smallest both in its row and in its column. Prove that the number of n times m nice matrices is (nm)!n!m!/(n+m-1)!.

3 Comments
2024/11/30
18:21 UTC

5

Existence of Positive Integers with Exactly  Divisors in  {1,2, ....., n}

Prove that for all sufficiently large positive integers n and a positive integer k <= n, there exists a positive integer m having exactly k divisors in the set {1,2, ....., n}

4 Comments
2024/11/30
18:17 UTC

8

minimum value

What is the minimum value of

[ |a + b + c| * (|a - b| * |b - c| + |c - a| * |b - c| + |a - b| * |c - a|) ] / [ |a - b| * |c - a| * |b - c| ]

over all triples a, b, c of distinct real numbers such that

a^2 + b^2 + c^2 = 2(ab + bc + ca)?

5 Comments
2024/11/29
23:09 UTC

7

Nim with Powers: A Game of Strategy and Parity

A Nim-style game is defined as follows: Two positive integers k and n are given, along with a finite set S of k-tuples of integers (not necessarily positive). At the start of the game, the k-tuple (n, 0, 0, ..., 0) is written on the blackboard.

A legal move consists of erasing the tuple (a1, a2, ..., ak) on the blackboard and replacing it with (a1 + b1, a2 + b2, ..., ak + bk), where (b1, b2, ..., bk) is an element of the set S. Two players take turns making legal moves. The first player to write a negative integer loses. If neither player is ever forced to write a negative integer, the game ends in a draw.

Prove that there exists a choice of k and S such that the following holds: the first player has a winning strategy if n is a power of 2, and otherwise the second player has a winning strategy.

2 Comments
2024/11/29
13:51 UTC

10

Cooperative Strategy in Round-Guessing Games with Limited Information

A. Two players play a cooperative game. They can discuss a strategy prior to the game, however, they cannot communicate and have no information about the other player during the game. The game master chooses one of the players in each round. The player on turn has to guess the number of the current round. Players keep note of the number of rounds they were chosen, however, they have no information about the other player's rounds. If the player's guess is correct, the players are awarded a point. Player's are not notified whether they've scored or not. The players win the game upon collecting 100 points. Does there exist a strategy with which they can surely win the game in a finite number of rounds?

b)How does this game change, if in each round the player on turn has two guesses instead of one, and they are awarded a point if one of the guesses is correct (while keeping all the other rules of the game the same)?

7 Comments
2024/11/29
13:45 UTC

3

Streightedge and compass

It is known and not too hard to prove that any 5 points in the plane define a unique conic section.

My riddle for you is:

Given 5 points in the plane, how would you construct the tangents to the conic they define at one of the points?

2 Comments
2024/11/28
17:27 UTC

0

Another very difficult riddle of mine!

A clock has 6 hands instead of 3, each moving at a different speed. Here are the speed values for each hand:
1: Moves forward by x/12 degrees each minute
2: Moves forward by x^2 degrees each minute
3: Moves backward by x degrees each minute
4: Moves forward by x/2 degrees each first minute and 2x degrees each second minute
5: Moves forward by x degrees each minute
6: Moves backward by sqrt(x+y) degrees each five minutes
We know that two of these hands are the real minutes and hours hands, but that there is no seconds hand.
y is a prime number that is a possible value for minutes in a clock, e.g.: 59 works, but not 61.
At the start, the clock shows midnight, which is the actual time. After a certain amount of time, 4 hands meet in one one spot, while the other 2 meet in another spot.

Question: What is the time?

9 Comments
2024/11/28
13:02 UTC

7

To shoot last or first?

I got inspired to think about this problem from the movie 13 https://www.youtube.com/watch?v=D4Kdbx3q_Rs

Imagine a scenario where you have a loaded gun and there is 1/6 chance that each chamber has a bullet. All participants fire only once. All participants only get one bullet.

You're in a circle of X number of men that all point at the head of the person infront. When would it be prudent to hold your fire and fire last and when to fire first?

If there are three men in the circle (or rather triangle here) then its obviously better to hold your fire, as the person infront of you might shoot the person that will shoot you and if he has a bullet you're dead.

But if there are four people it's obviously the other way around, you want to shoot the person infront of you to save the person who might shoot the guy that will shoot you!

So what about 5 or more people? How would you calculate the probalistic aspects of whether you should wait to fire or not? Is it associated with the number of bullets in the chamber or not? Is it irrelevant at that point?

My gut feeling tells me that alternating between shooting first an shooting last (5-6-7 etc number of men), in game where all the other participants actions are randomized is the "best" solution. My second best guess is that its irrelevant. But Id love to see the math on this for 5+ players

17 Comments
2024/11/27
16:22 UTC

0

A very difficult riddle for yall

A gangster, hunter and hitman are rivals and are having a quarrel in the streets of Manchester. In a given turn order, each one will fire their gun until one remains alive. The gangster misses two of three shots on average, the hunter misses one of three shots on average and the hitman never misses his shot. The order the three shooters will fire their gun is given by these 3 statements, which are all useful and each will individually contribute to figuring out in which order the rivals will go. We ignore the possibility that a missed shot will hit a shooter who wasn't targeted by that shot.

  • A shooter who has already eaten a spiced beef tartar in Poland cannot shoot before the gangster.
  • If the hitman did not get second place at the snooker tournament in 1992, then the first one to shoot has never seen a deer on the highway.
  • If the hitman or the hunter is second to shoot, then the hunter will shoot before the one who read Cinderella first.

Assuming that each of the three shooters use the most optimal strategy to survive, what are the Gangster's chances of survival?

7 Comments
2024/11/26
08:54 UTC

2

Prove that there exists {2 ≤ j ≤ 2n} such that {a_1 + a_j} is divisible by {p}.

Let {p > 2} be a prime, and let {a_1, a_2, …, a_{2n}} be integers not divisible by {p}, such that

{{ (ra_1) / p } + { (ra_2) / p } + … + { (ra_{2n}) / p } = n}

for any integer {r} not divisible by {p}. Prove that there exists {2 ≤ j ≤ 2n} such that {a_1 + a_j} is divisible by {p}.

2 Comments
2024/11/26
05:53 UTC

4

Maximum value of P(X=Y)

Let X ~ Geo(1/2), Y ~ Geo(1/4), not necessarily independent.

How large can P(X=Y) be?

5 Comments
2024/11/25
16:51 UTC

17

What is the minimum number of friendships that must already exist so that every user could eventually become friends with every other user?

There are 2022 users on a social network called Mathbook, and some of them are Mathbook-friends. (On Mathbook, friendship is always mutual and permanent.)

Starting now, Mathbook will only allow a new friendship to be formed between two users if they have at least two friends in common. What is the minimum number of friendships that must already exist so that every user could eventually become friends with every other user?

12 Comments
2024/11/24
20:54 UTC

5

Can Nikolai choose F to make your job impossible?

Consider an infinite grid G of unit square cells. A chessboard polygon is a simple polygon (i.e. not self-intersecting) whose sides lie along the gridlines of G

Nikolai chooses a chessboard polygon F and challenges you to paint some cells of G green, such that any chessboard polygon congruent to F has at least 1 green cell but at most 2020 green cells. Can Nikolai choose F to make your job impossible?

5 Comments
2024/11/24
20:49 UTC

5

The Progenitor Card

The card is a 2x2 square with either 0 or 1 written in each grid cell.

There is the following operation: 1) take two cards. then for each of the 4 squares,
take the numbers from these two cards at the same coordinates, and write them into the draft card.
2) then we take a draft card and some third card. we look at the contents of the draft card at the (x, y) coordinate, let's say it is (a, b), and write the number from the (a, b) coordinate of the third card and write it on the (x, y) coordinate of the new card.

Initially there are сards:
[0 0] and [0 1]
[1 1] [0 1]

If at the beginning we have these 2 initial cards and some third card and start performing operation with these 3 cards (and the also with new cards we get from operation), what numbers should be on the third card, so that after performing operations few times, its possible to get cards with every existing number combination?

bonus: what if instead of being 2x2 and holding 2values (0 and 1), the cards are 3x3 and can hold 3 values? (the initial ones are [[0 1 2] [0 1 2] [0 1 2]] and [[0 0 0] [1 1 1] [2 2 2]])

https://preview.redd.it/nqrt5pi1ip2e1.png?width=1280&format=png&auto=webp&s=1aa50ace8f19cee52d1ca37b8cf5deecb6f77c8b

0 Comments
2024/11/23
20:02 UTC

3

Tiling with L triominoes and Z tetrominoes

Definitions:
Even integers N and M are given such that 6 ≤ N ≤ M.

A singly even number is an integer that leaves a remainder of 2 when divided by 4 (e.g., 6, 10).
A doubly even number is an integer that is divisible by 4 without a remainder (e.g., 4, 8).

When N is a singly even number:
Let S = N + 2.
Let T = ((NM) − 3S)/4.

When N is a doubly even number:
Let S = N.
Let T = ((NM) − 3S)/4.

Problem:
Prove that it is possible to place S L-trominoes and T Z-tetrominoes on an N × M grid such that: Each polyomino fits exactly within the grid squares. No two polyominoes overlap. Rotation and reflection of the polyominoes are allowed.

3 Comments
2024/11/23
14:10 UTC

4

A quick probability problem I animated using some Manim!

0 Comments
2024/11/23
08:52 UTC

11

100 prisoners, 2 light bulbs, and codes

There are 99 other prisoners and you isolated from one another in cells (you are also a prisoner). Every prisoner is given a positive integer code (the codes may not be distinct), and no prisoner knows any other prisoner's code. Assume that there is no way to distinguish the other 99 prisoners at the start except possibly from their codes.

Your only form of communication is a room with 2 labelled light bulbs. These bulbs cannot be seen by anyone outside the room. Initially both lights are off. Every day either the warden does nothing, or chooses one prisoner to go to the light bulbs room: there the prisoner can either toggle one or both lights, or leave them alone. The prisoner is then lead back to their cell. The order in which prisoners are chosen or rest days are taken is unkown, but it is known that, for any prisoner, the number of times they visit the light bulbs room is not bounded.

At any point, if you can correctly list the multiset of codes assigned to all 100 prisoners, everyone is set free. If you get it wrong, everyone is executed. Before the game starts, you are allowed to write some rules down that will be shared with the other 99 prisoners. Assume that the prisoners will follow any rules that you write. How do you win?

Harder version: What if the initial position of the lights is also unknown?

Bonus: Is there a way for all 100 prisoners to know the multiset of codes? (I haven't been able to solve this one yet)

18 Comments
2024/11/20
19:01 UTC

8

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.

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.

5 Comments
2024/11/19
16:52 UTC

9

Maximal path lengths in DAG modulo k.

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.

4 Comments
2024/11/19
10:29 UTC

17

15.5817... is my new favorite constant

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.

1 Comment
2024/11/17
10:01 UTC

4

A quiz I've made last year

For 5 distinct positive integers a, b, c, d and e, the following statements are true:

  1. a is equal to the sum of squares of two distinct integers.
  2. e is the second to the smallest among five integers.
  3. cd is a perfect number.
  4. The sum of all digits of b is equal to 13.
  5. d and e are coprimes.
  6. Dividing a+b+d by 12, we get 7 as the remainder.
  7. d+2 is an abundant number.
  8. a<d
  9. ae is a multiple of 3.
  10. There are at least two squares of integers among a, b, c, d and e.
  11. The sum of the maximum and the minimum among the five integers is less than 100.

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?

12 Comments
2024/11/16
15:56 UTC

6

Modular Equality Through Intermutual Exponentiation

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?

1 Comment
2024/11/13
23:18 UTC

3

unsolvable?? problem

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. :))))

19 Comments
2024/11/12
15:37 UTC

Back To Top