Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I've recently heard a riddle, which looks quite simple, but I can't solve it :/

The girl thinks of a number which is 1, 2, or 3

The boy then asks just 1 question about the number

The girl can only answer "Yes", "No", or "I don't know"

And after the girl answers it, he knows what the number is.

What is the question?

Note: girl is professional in maths and knows EVERYTHING about these three numbers


The person who told me this just said the correct answer is:

"I'm also thinking of a number. It's either 1 or 2. Is my number less than yours?"

share|cite|improve this question
'I'm also thinking of a number it's either 1 or 2, is my number bigger than yours?' does not work! It is not a solution – Nuno Calaim Oct 3 '13 at 13:04
I am thinking of a number greater than 1 and less than 3. Is my number greater than yours? -- That would work. – user1354557 Oct 3 '13 at 13:50
@ChibuezeOpata The trick is to pose the question with a new random value the girl doesn't know, thus resulting in the "I don't know". – SinisterMJ Oct 3 '13 at 16:19
Fix: I am thinking of a number that is either 1 or 2. Is my number greater than or equal to yours? – System.Cats.Lol Oct 3 '13 at 19:08
Why not simply I'm also thinking of a number. It's either 1.5 or 2.5. is my number bigger than yours? :) – peterwhy Oct 4 '13 at 5:36

41 Answers 41

up vote 221 down vote accepted

"I am thinking of a number which is either 0 or 1. Is the sum of our numbers greater than 2?"

share|cite|improve this answer
+1. Your answer appeared while I was composing my answer. This kind of approach beats appealing to currently-unsolved aspects of number theory, because the "I don't know" response is given when the answer is actually unknowable not merely unknown for now. There's no expiration date on this solution. – Blue Oct 3 '13 at 10:45
You have to offer two options to allow each of her three choices to correspond to one of the numbers. If her number is 3 she'll say Yes because adding 3 to 0 or 1 is always greater than 2. If her number is 2 she won't know, because if yours is 0 it won't be but if it's 1 it would be. If her number is 1 then adding either 1 or 0 won't make it greater than 2. – deed02392 Oct 3 '13 at 15:44
@ChibuezeOpata You're missing the point. The person can only answer "Yes" "no" or "I don't know" and must do so honestly. You can't ask "what's the number" because that's an invalid question within the constructs of the riddle. – xdumaine Oct 3 '13 at 16:13
@ChibuezeOpata No, I don't prefer it. This answer is in the spirit of the question while that one uses a trick of language to contrive an answer. – xdumaine Oct 3 '13 at 16:40
Although to be technical, it violates the constraints of the riddle. The riddle says you may ask one question, it does not state that you can ask a question dependent on a statement. – JohnP Oct 3 '13 at 17:09

"I'm also thinking of one of these numbers. Is your number, raised to my number, bigger than $2$?"

Let $n$ be the girl's number (unknown to me), and let $m$ be my number (unknown to her).

  • $n = 1 \implies $ NO: $1^m = 1 \not > 2$ for all $m \in \{1,2,3\}$.
  • $n = 3 \implies $ YES: $3^m \geq 3 > 2$ for all $m \in \{1,2,3\}$.
  • $n = 2 \implies $ I DON'T KNOW: Whether $2^m > 2$ depends on $m$.
share|cite|improve this answer
This is the answer that includes all the answers given above in my opinion. Nicely solved! – Bulki Oct 4 '13 at 14:33

I just saw this question and signed up to math.stackexchange just because I felt like sharing my answer. I haven't read the other answers so pardon me if I am repeating anyone's answer.

Here's my thought process:

First of all I ruled out indirect ways of using reference to either of the numbers 1, 2 ,3 to frame a question, as I thought it's implicit in the question that it should challenge ur thinking, not ur cleverness. If she answers I don't know, compared to yes or no, it is more likely that she is confused between two numbers, ruling out one possibility. If the boy thinks of a number, the most common way to link it up to 1, 2 ,3 will be by divisibility. Also, I thought, out of 1, 2, 3, if I can rule out one number by the way I frame the question, I will be left with two options. The most common way of describing a number is whether it's odd or even.

So how about, I am thinking of an odd number. Is it perfectly divisible by your number?

If she says, no - clearly, the number is 2. If she says, yes - the number is 1, because only with 1, you can be sure that any number is divisible by 1. If she says, I don't know - the number is 3, because an odd number can or cannot be divisible by 3.

Solving this gave me some serious thought-boosting fun - like a sip of hot black coffee in the morning :)

share|cite|improve this answer
Nice, clean answer. – jwg Oct 4 '13 at 8:35
In my humble opinion, this is the most elegant so far. – Geoff Pointer Oct 11 '13 at 0:06

Let the boy ask the girl:

"Divide the number you have with the previous number. Is the result a fraction?"

If the girl replies:

  • "Yes" then the number is 3 because 3/2 is a fraction.
  • "No" then the number is 2 because 2/1 is not a fraction.
  • "I don't know" then the number is 1 because 1/0 is undefined.
share|cite|improve this answer
I love most of these answers (great ways to think about riddles), but this one is especially clever because of the undefined factor (1/0). Great answer. – Question3CPO Oct 3 '13 at 14:12
I disagree. The correct answer in the 1 case is "I can't do that." – Ben Millwood Oct 3 '13 at 17:59
Integers are fractions too. The denominator is 1 in lowest terms, but it's still a fraction. He should ask "Is the number an integer?" Also, the question of how to handle 1/0 depends on what space you're working in. True, there's no real number 1/0, but how do you know she's not thinking of the Reimann Sphere (in which case "no", infinity is not an integer). And if you say "Is the resulting real number a fraction?" Then the correct answer is "your question makes a false assumption" – dspyz Oct 3 '13 at 18:53
"Is 1/0 a fraction?" The answer is certainly "no", not "I don't know". – alex.jordan Oct 4 '13 at 6:36
Undefined is a very precise mathematical term. It does not mean: "We don't know". We can say that 1/0 will never be defined because in terms of our definition of multiplication of numbers, no sense can be made of dividing by zero. The real numbers, without zero, are a multiplicative group. We don't do this because we haven't yet figured out how to find a multiplicative inverse of zero. It's not an unsolved problem. In limit theory, when we get 1/0, the answer is: "Does not exist". "I don't know" is not the correct answer, so this question doesn't work. – Geoff Pointer Oct 10 '13 at 23:40

Pick any bijective mapping from $\{1,2,3\}$ to $\{\text{Yes},\text{No},\text{I don't know}\}$ and then it is easy to contrive a question.

Here's an example question using this method.

Let $f =\{(1,\text{Yes}),(2,\text{No}),(3,\text{I don't know})\}$ and let $x$ be the number that you are thinking of. What is $f(x)$?

This can be generalized to any set of possible numbers and set of possible responses with the same cardinality.

share|cite|improve this answer
This seems to violate the purpose of a yes-no(-I-don't-know) question. A yes-no question is characterized by the question word, not by the answer. So you shouldn't use question words "what, when, where, why, who, or how". One way to know if your answer works is to ensure that it stilll works if she decides to answer one of "affirmative", "negative", "absolutely", "of course", "I can't tell" etc. – dspyz Oct 3 '13 at 18:45
@dspyz I understand what you're saying, and I will admit that this is likely not how the question was designed to be interpreted. That said, the question does state, The girl can only answer "Yes", "No" or "I don't know", and does not make any restrictions about what those responses have to mean. – Peter Olson Oct 3 '13 at 18:51
My favorite answer. The other ones use different ways to map the answers, but this is simplest. – bdares Oct 4 '13 at 11:13

"Among all prime numbers except 3, is there a positive and finite number of couples whose difference is the number you are thinking of?"

$N = 1 \implies$ no, since there are none ( $\{2, 3\}$ is disallowed).

$N = 2 \implies$ I don't know, at least until the Twin Primes conjecture is proved or disproved.

$N = 3 \implies$ yes, since there is only $\{2, 5\}$.

share|cite|improve this answer
While we're doing the conjecture thing, we could use Hadwiger-Nelson: ask if, for her $x$, there is never a plane coloring in $3x$ colors such that there are points unit distance apart with the same color. If she says yes, we know $3x > 7$, so $x = 3$; if she says no, we know $3x < 4$, so $x = 1$; and if she is uncertain, we know $4 < 3x < 7$, so $x=2$. – Chris Oct 4 '13 at 21:07
I like this, but what if she has solved the twin primes conjecture, and simply hasn't published yet?! The question does say she "knows EVERYTHING about these numbers" – Joe K Oct 4 '13 at 21:21
if she had solved the twin primes conjecture and she did not rush to publish it, deciding instead to ask a riddle, she would be really weird... – mau Oct 5 '13 at 12:07

The question doesn't state that the BOY is an expert in maths, so he'd probably go for:

Please say "no" if your number is 1, "don't know" if your number is 2, or "yes" if your number is 3.

share|cite|improve this answer
It is not a question. (just request). – Oleg567 Oct 3 '13 at 11:33
@Oleg567 what would you reply be if I gave you the command to say "no" if your number is 1, "don't know" if your number is 2, or "yes" if your number is 3? – ratchet freak Oct 3 '13 at 12:06
Hmm, then complete your sentence with phrase "OK?" Then it will look more as a question :) – Oleg567 Oct 3 '13 at 13:32
@Oleg567: Then her answer would be "ok" :) – Rodrigo A. Pérez Oct 3 '13 at 14:15
Or, similarly: If I like the number 1, and dislike the number 2, do I like the number you chose? – gdw2 Oct 3 '13 at 16:55

Question 1:

I'm thinking of a huge integer number with last digit $7$.

Is this ratio $~~\dfrac{\mbox{my number}}{\mbox{your number}}~~$ integer?

  • $1$ (yes)
  • $2$ (no)
  • $3$ (I don't know)

Question 2:

Consider series $\displaystyle\sum\limits_{n=1}^\infty a_n, \quad (a_n>0, ~~~ n \in \mathbb{N})$, such that there exists limit (see Ratio test) $$ L = \lim_{n\to \infty} \frac{a_{n+1}}{a_n}. $$ If $L+1$ is equal to your number, is this series convergent?

  • $1$ ($L=0$, yes)
  • $2$ ($L=1$, I don't know)
  • $3$ ($L=2$, no)
share|cite|improve this answer

‘Is there a perfect number $n$ such that $n+1$ is a multiple of your number?’ If her number is $1$, the answer is obviously yes; if her number is $2$, the answer is I don’t know, since it’s not known whether there are any odd perfect numbers; and if her number is $3$, the answer is no, because every even perfect number greater than $6$ is congruent to $1$ mod $3$.

share|cite|improve this answer
+1. But ... What if the girl's own (as-yet-unpublished) research has decided the Odd Perfect Number issue? – Blue Oct 3 '13 at 9:41
@Blue: We know that it hasn’t: it hasn’t been published and independently verified! – Brian M. Scott Oct 3 '13 at 9:43
If the girl has decided the OPN issue for herself (especially if she found an example of an odd perfect number), then she won't answer "I don't know" because she thinks she knows. (Of course, it's also possible that the girl had just measured @TonyK's brother's height as part of an anatomical statistics study, so his question isn't necessarily fool-proof, either.) – Blue Oct 3 '13 at 9:53
@Blue: Irrelevant: we’re clearly intended to assume that her knowledge represents the state of the art. You’re basically just denying the working assumptions underlying the question. – Brian M. Scott Oct 3 '13 at 9:55
@BrianM.Scott - What if there's an odd perfect number? Need that be congruent to $1$ mod $3$? – Donkey_2009 Oct 3 '13 at 12:52

This was suggested by a friend:

If $k$ is your number, does $\mathbb{S}^{3k-2}$ have an exotic smooth structure?

share|cite|improve this answer
Is there a prize for the answer which is both most esoteric and most poetic to the uninitiated? This must surely be a contender... – dardisco Oct 5 '13 at 3:55
I hope the girl really does know everything about maths, otherwise the answer would be "Have you been smoking weed again?" – Alois Mahdal Oct 6 '13 at 16:41

If $x$ is your number, is my brother's height in metres more than $10(x-2)+2$?

share|cite|improve this answer
it returns "no" "no" "i don't know" ? – Gintas K Oct 3 '13 at 9:30
This answer shows that you do not have to be a professional in math to solve this question (+1). I will ask my wife and kids. – drhab Oct 3 '13 at 9:42
Just figured a nice question: There is the sequence of phrases "1.Yes, 2.No, 3.I don't know", which word would your number point to? :DDD – Gintas K Oct 3 '13 at 9:50
One possible answer: "Trick question, you don't have a brother." – Joe Z. Oct 4 '13 at 4:58

The girl take a number in {1, 2, 3}. I say to her: "Ok, now, imagine I know your number and pick one of the other, is your number greater than mine?"

  • If she has picked 1, she will answer "no" because 1 < 2 and 1 < 3.
  • If she has picked 2, she will answer "I don't know" because 2 > 1 but 2 < 3.
  • If she has picked 3, she will answer "yes" because 3 > 1 and 3 > 2.
share|cite|improve this answer

Is it correct that your number equals 1 or it equals 2 and {any question she don't know answer for}?

Yep, it's a boring answer, but it always works for such kind of problems.

share|cite|improve this answer
Some what ambiguous in written language. Of course you must mean (n == 1) or (n==2 and x) not (n == 1 or n==2) and x – Martin Smith Oct 3 '13 at 12:41

Here's my wife's solution:

The boy asks: "I have an equation of the form $ax^2+bx+c=0$ in my mind, in which $b^2-4ac \geq 0$. Is the number of its real roots less than your number?"

  • If the girl's number is 3, then her answer is "yes".
  • If the girl's number is 2, then her answer is "I don't know".
  • If the girls' number is 1, then her answer is "no".
share|cite|improve this answer

Let $n$ be the number you are thinking. And let $x$ and $y$ be positive integers I am thinking. Is there a positive integer solution $z$ for the following equation?

$$ x^n+y^n=z^n $$

  • Yes then $n=1$
  • I don't know then $n=2$
  • No then $n=3$ because of the following proven conjecture

It is impossible to separate a cube into two cubes, or a fourth power into two fourth powers, or in general, any power higher than the second, into two like powers. I have discovered a truly marvelous proof of this, which your browser is too narrow to contain.

share|cite|improve this answer
The downvote for this one was unfair! This is a good one. @ARi, $x$ and $y$ are unknown to the girl, so if $n=2$ there may or may not be a positive integer $z$ that satisfies the equation. The poster knew FLT is proven, so $n=3$ gives no solutions. The case $n=1$ will always have solutions. – Bennett Gardiner Oct 5 '13 at 4:12
I realise now, I am used to other sites that start the vote count at 1, nevermind. – Bennett Gardiner Oct 8 '13 at 12:32

"If two less than your number is the second derivative of a function at a turning point, is that point a local minimum?"

share|cite|improve this answer
"no", the second derivative is zero does not imply the point is a local minimum. For this to work you have to say: "I'm thinking of a function with a point (x,y) where the derivative is two less than your number. Is that point a local minimum?" Of course this may be problematic since you don't know her number and she knows you don't know her number so she should know you can't really be thinking of such a function. In that case the correct answer is "you're lying" – dspyz Oct 3 '13 at 19:08
The second derivative being zero doesn't imply that it's a local minimum, but it can be a local minimum with the second derivative being zero (see $x^4$ at $x=0$). Hence her answer would be "I don't know". – Glen O Oct 4 '13 at 3:41

Does the girl know computing addition to math? Probably.

"Here is an array of three character strings, indexed from [1]:

s[] = { "Yes", "No", "I don't know" }

what is the value of s[x] where x is the number you are thinking of?"

Basically, the space of three possible answers can be used as symbols to encode the information directly.

Justification, in the light of comments:

The other answers differ in that they employ an arithmetic and logical coding trick: arithmetic is applied and then logic to produce an answer, whose truth value or in determinacy is then rendered to English "Yes", "No" or "I don't know".

It is just as valid and "mathematical" to simply obtain these symbols directly without using arithmetic coding.

Furthermore, it can still be regarded as arithmetic coding, because the answer strings are made of bits, and can therefore be coded as numbers: for instance, the bit patterns of the ASCII characters can be catenated together and treated as large integers. s is then effectively just a numeric table lookup which maps the indices 1 through 3 to integer symbols which denote text when broken into 8 bit chunks and mapped to ASCII characters.

A lookup table, though arbitrarily chosen, is a mathematical object: a function.

Furthermore, the displacement calculation to do the array indexing is arithmetic; we are exploiting the fact that the information we are retrieving is numeric and can be used to index into a table. Otherwise we would have to specify an associative set relation instead of a function from the integer domain. ("Here is a mapping of your possible state values to the symbols I'd like you to use to send me the value.")

This answer reveals that the question is basically uninteresting. An entity holds some information that can be in one of three states, and there is to be a three-symbol protocol for querying that information. It boils down to, give me the symbol which corresponds to your state, according to this state->symbol mapping function. I would therefore argue that the convoluted arithmetic coding is the hack answer not this straightforward coding method. In computing, we sometimes resort to arithmetic encoding hacks when we have to use a language that isn't powerful enough to do some task directly, or simply when the resources (time, space) aren't there for the cleaner solution.

share|cite|improve this answer
Amongst the answers here, I found this to be the most creative. +1 for it – Krypton Oct 4 '13 at 8:36

I get the sense that there's a classic comedy routine in here somewhere.

"You know, they give baseball players these days very peculiar names. [...] Well, now, let's see ... On our team we have: NO's on first, YES's on second, and I-DON'T-KNOW's on third ..."

share|cite|improve this answer
This one made me snort. – Cameron Buie Oct 4 '13 at 15:32

I am thinking of a positive integer. Is your number, raised to my number and then increased in $1$, a prime number?

$$1^n+1=2\rightarrow \text{Yes}$$ $$2^n+1=\text{possible fermat number}\rightarrow \text{I don't know}$$ $$3^n+1=2k\rightarrow \text{No}$$

share|cite|improve this answer

$\frac12-it$ is a zero of the zeta function. Is $\frac{N-1}{2}\frac12+it$ also a zero of the zeta function?

$N = 1 \implies$ no, since $it$ is not on the critical strip.

$N = 2 \implies$ I don't know, since the Riemann hypothesis has not been proved.

$N = 3 \implies$ yes, since the conjugate of a zero is another zero.

share|cite|improve this answer
@Donkey_2009 The edit was in my comment. :) – Daniel R Oct 3 '13 at 14:00
This fails because there's nothing that prevents a hypothetical question answerer from having a proof or disproof of it. In fact, the problem states that the girl "knows EVERYTHING about these three numbers". – Olathe Oct 4 '13 at 20:05

Most of the answers seem to rely on relatively complex mathematics, that I couldn't easily do in my head. I'm hoping this is the simpliest answer out there, or at least, one of the simplest.

If I take your number, and subtract 2 from it, then take the reciprocal, is it positive? In other words: $\frac{1}{x-2}$

  • Yes- Number must have been 3
  • No- Number must have been 1.
  • I don't know- Is 1/0 positive or negative? It could be either, and thus I Don't Know is the appropriate answer.
share|cite|improve this answer
Exactly what I was thinking. – Kevin Oct 3 '13 at 14:44
The answer for 1/0 isn't an "I don't know", it's "no". It's not positive (it's also not negative) – dspyz Oct 3 '13 at 18:56

The boy gives the three numbers different names: "Yes", "No" and "I don't know". So the question is, "what is the name of your number?"

share|cite|improve this answer

How about this one:

Let's say your number is $n$.
For every even number $x$ ($x>2$) is that true that $x+n$ is representable as a sum of $n$ primes?

share|cite|improve this answer

Two silly, brute-force, examples, which (I hope) give two fairly extensible ways of constructing an answer to this problem. $n$ refers throughout to the girl's number.

The unsolved problem in mathematics approach: (E.g., @alex's answer)

Is there a Moore graph of girth $5$ and degree $f(n)$? Here,

$$ f(n)=\begin{cases}2&n=1\\4&n=2\\57&n=3\end{cases} $$

$2\mapsto$Yes (the Petersen graph)

$3\mapsto$No (A Moore graph of girth $5$ may only have degree $2,3,7$ or $57$)

$57\mapsto$I don't know (It is unknown whether a Moore graph of girth $5$ and degree $57$ exists).

The unconditional (on any unsolved result being unsolved!) probabilistic approach: (E.g., @Ben Millwood's answer)

Maybe the girl has constructed a Moore graph of girth $5$ and degree $57$ in her head, or read a recent paper exhibiting such a graph. In that case, the following approach works.

Let $G(n)$ be a random variable taking values in the set $\{1,2\}$. The probability distribution is defined as follows: $G(1)$ is always $1$, $G(2)$ is always $2$ and $G(3)$ is $1$ with probability $0.5$ and $2$ with probability $0.5$.

[Fix a point in the sample space.] Is it the case that $G(n)=1$?

share|cite|improve this answer

The mathematician's answer:

I am thinking of a function $f:\{1,2,3\}\to\{0,1\}$. $f$ takes $1$ to $0$, $2$ to $1$ and $3$ either to $0$ or $1$, but I'm not telling you which.

Let $n$ be your number. Is $f(n)$ equal to $1$?

share|cite|improve this answer

If k is your number, does each continuous mass distribution µ in $\mathbb{R}^{3k-2}$ admit an equipartition by hyperplanes ?

share|cite|improve this answer

Here's one involving probabilistic trials.

If I were to choose a random variable $x$ distributed at $N(2, 0.01)$ but cut off at $[1.5, 2.5]$, would the number you're thinking of be higher than $x$?

If you're thinking of $1$, your answer is "no".

If you're thinking of $2$, your answer is "I don't know", since there's a 50-50 chance either way.

If you're thinking of $3$, your answer is "yes".

share|cite|improve this answer

For an unknown $x$, is your number 1 or (2 and $x$)?

YES means that the number is 1
NO means that the number is not 1 and not 2 -- so it's 3
I DON'T KNOW means that the number is 2 (since the (2 and $x$) clause will be true if $x=2$ and false otherwise)

share|cite|improve this answer

Without any math involved:

Boy: I'll map your numbers to your answers. 1 means "NO", 2 means "YES", 3 means "I don't know", the first word that comes out of your mouth, will you please say the phrase that is mapped to the number you are thinking of?

Girl: ahhhhhhhhhh
Boy: No, you have to say it

First dimension:

Girl: NO
BOY: Then it's 1

Alternate dimension:

Girl: YES
BOY: Then it's 2

Altnerate dimension after that:

BOY: Then it's 4, I mean 3
share|cite|improve this answer
She can answer "no" as in "no, I will not answer the phrase that is mapped to the number I am thinking of", and be answering the question correctly and honestly. – Beska Oct 3 '13 at 20:41
That's an existential argument, we're not talking about liars here or someone who thinks that is an unfair approach.. we're talking about how to deal with the asking a question once, and getting the answer from it. She could very well lie if she wanted to, or she doesn't have to answer the question at all, whether or not the boy is asking "fair" questions.. – sksallaj Oct 4 '13 at 1:07
Your one question is whether she'll do something. Answering whether she'll do something or not is not the same thing as using your code. – Olathe Oct 4 '13 at 20:12

Assume the girl's number is X.

The boy asks:

Is half day before OP posted this question past October X?

share|cite|improve this answer

protected by Community Oct 4 '13 at 5:43

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.