Welcome to MindCipher, a social repository of the world's greatest brain teasers, logic puzzles and mental challenges.
3 1 No if() no abs()!
This is inspired by the puzzle "No if() only abs()" : Given two variable a and b, construct a function f(a,b) which return the maximum one in {a,b}. You can only use +- ยท / (basic arithmetic operator ...
Hard
10.0
9 1 Three Idols
Here's a classic: Three gods A, B, and C are called, in some order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a comp ...
Hard
9.0
8 15 Black and White Hats
There are 100 prisoners in jail. Their guards decide to play a game with them. Here's what happens: 1) The prisoners are lined up in a single file, front to back, such that the prisoner at the back of ...
logic prisoners hats Submitted by Aakash
Hard
8.9
6 6 Partitioning a set
In how many ways can a set of r objects be partitioned into subsets of k objects such that: all subsets are mutually exclusive each of k-object subset appears in exactly one of the partitions [Partit ...
Hard
8.7
6 8 Non-Adaptive 12 Identical Balls
Okay - so I posted this puzzle to reddit a few weeks ago and one guy had the following comment: Same problem, but your solution must be non-adaptive. IOW, specify the weighings that you will make up f ...
Math logic unsolved Submitted by Aakash
Hard
8.7
8 5 Prisoners and hats
100 prisoners are standing in a line each 1 seeing the back of the ones in front of him. Each prisoner is given a black or a white hat. If they can guess the color of their hat they can go away freel ...
logic brain teaser Submitted by Valentin
Hard
8.5
4 3 Birthday Problem (Classic)
A classic problem. How many people do you need to have in a room so that the probability of at least 2 of people sharing a birthday is greater than 50%. Assume 365 days in a year (no leap years) ...
Submitted by Valentin
Hard
8.4
7 8 Survivor
There are 1500 people sitting around a circular table. They are numbered in a regular manner (1 to 1500 along the table). Now, the 1st person gets a sword and kills the 2nd person. He then gives the s ...
Submitted by Shaheen
Hard
8.4
11 6 The double-square number problem
It's said that a number N with 4 digits is a double-square number when it equals the sum of the squares of two numbers: one formed by the first two digits of N, in the order they appear in N and the ot ...
Math mathematics Submitted by Guilherme
Hard
8.1
3 3 Happy Handshaking
Jack and his wife went to a party where four other married couples were present. Every person shook hands with everyone he or she was not acquainted with. When the handshaking was over, Jack asked ev ...
Submitted by Valentin
Hard
8.0
2 4 What is the sum of 1+2+3+4+5 . . . (forever)?
What is the sum of 1 + 2 + 3 + 4 . . . all the way to infinity?
infinity Submitted by Tarun245
Hard
8.0
14 1 100 Light Bulbs
There are 100 light switches, all of them are off. First, you walk by them, turning all of them on. Next, you walk by them turning every other one off. Then, you walk by them changing every third on ...
mathematical logical Submitted by Aakash
Hard
7.7
5 6 Balloon in an Elevator
A person is holding on to a helium balloon in an elevator. The elevator cable snaps, and at the exact same moment, the person lets go of the helium balloon. In the perspective of the person in the el ...
physics relativity Submitted by Aakash
Hard
7.7
47 29 All the King's Wine
So there's this king. Someone breaks into his wine cellar where he stores 1000 bottles of wine. This person proceeds to poison one of the 1000 bottles, but gets away too quickly for the king's guard ...
logic mathematical Submitted by Aakash
Hard
7.7
9 1 Simple 24
Why is that if p is a prime number bigger than 3, then p^2-1 is always divisible by 24 with no remainder?
Submitted by Aakash
Hard
7.6