/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,277 Subscribers

7

Counting  n times m Nice Matrices with Prescribed Properties

An n times m matrix is nice if it contains every integer from 1 to man 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)!.

0 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}

3 Comments
2024/11/30
18:17 UTC

7

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

8

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

11

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

6 Comments
2024/11/29
13:45 UTC

4

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

19

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?

11 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

4

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

4

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

3

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

6

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

8

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

18

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

7

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

4

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

11

Help Bob win and extremely win this graph grabbing game

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.

https://preview.redd.it/k0byclpe4pzd1.png?width=518&format=png&auto=webp&s=947cdabed515ae133677677f5a9a354ddc246052

  1. Construct a graph where, under optimal play, Bob can secure over half the vertices. (easy to medium)
  2. Construct a graph where, under optimal play, Bob can secure over 2/3 of the vertices. (hard)

Source (contains spoilers for part 1): https://puzzling.stackexchange.com/q/129032/2722

13 Comments
2024/11/08
15:29 UTC

3

Ensuring a Reliable Deduction of the Secret Number

Ensuring a Reliable Deduction of the Secret Number

  1. Prepare a Set of Cards for Accurate Deduction:

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.

  1. Person B Selects a Secret Number:

Person B chooses a number between 1 and 64 and keeps it hidden.

  1. Person A Presents Each Card in Sequence:

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.

  1. Determine the Secret Number with Precision:

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.

  1. Account for Possible Errors in Responses:

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.

11 Comments
2024/11/07
07:42 UTC

7

Another animated video going over a Polish Olympiad puzzle! (for anyone interested)

2 Comments
2024/11/02
11:01 UTC

4

Simple math puzzle I made.

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?

8 Comments
2024/10/31
23:37 UTC

2

Fake Coins and Weighings

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.

2 Comments
2024/10/31
15:07 UTC

Back To Top