# How many books does Raju have?

“My friend Raju has more than 1000 books”, said Ram.

“Oh no, he has less than 1000 books”, said Shyam.

“Well, Raju certainly has at least one book”, said Geeta.

If only one of these statements is true, how many books does Raju have?

• What is the source of this problem? Jul 29, 2023 at 18:44

## 4 Answers

He has either no books or 1000 books, which makes either the second statement or the third statement true. If he had between 1 and 999 (both inclusive) the second and third statements would be true, and if he had strictly more than 1000 the first and third statement would be true.

The expressions are: $$P_1(x) = (x > 1000) \\ P_2(x) = (x < 1000) \\ P_3(x) = (x \ge 1)$$ Now we can inspect the cases $$P_1(x) \wedge \neg P_2(x) \wedge \neg P_3(x) = (x > 1000) \wedge (x \ge 1000) \wedge (x < 1) = \text{false} \\ \neg P_1(x) \wedge P_2(x) \wedge \neg P_3(x) = (x \le 1000) \wedge (x < 1000) \wedge (x < 1) = (x < 1) \\ \neg P_1(x) \wedge \neg P_2(x) \wedge P_3(x) = (x \le 1000) \wedge (x \ge 1000) \wedge (x \ge 1) = (x = 1000)$$ The first case leads to an inconsistency, the second to "no books", the third to "1000 books". So the problem seems ill-posed or I made an error. :-)

Put:

$P1=$ "R. has more than 1000 books"

$P2=$ "R. has less than 1000 books"

$P3=$ "R. at least 1 book"

Now $P1 \Rightarrow P3$, so if $P1$ were true, also $P3$ would be true. Therefore $P1$ is false and R. has at most 1000 books.

Suppose that $P2$ is true and $P1,\;P3$ are false: then R. has less than one book, that is he has 0 books.

Suppose $P3$ is true and $P1,\;P2$ are false: then he has exactly 1000 books.

So it can have 0 books or 1000 books.

Let $n \in \mathbb N$ be the number of books Raju has. The three statements are

$$P_1 (n) := (n > 1000) \qquad \qquad \qquad P_2 (n) := (n < 1000) \qquad \qquad \qquad P_3 (n) := (n \geq 1)$$

If only one of these statements is true, then

$$(P_1 (n) \land \neg P_2 (n) \land \neg P_3 (n)) \lor (\neg P_1 (n) \land P_2 (n) \land \neg P_3 (n)) \lor (\neg P_1 (n) \land \neg P_2 (n) \land P_3 (n))$$

where

• $P_1 (n) \land \neg P_2 (n) \land \neg P_3 (n) \equiv (n > 1000 \land n=0) \equiv \text{False}$

• $\neg P_1 (n) \land P_2 (n) \land \neg P_3 (n) \equiv (n < 1000 \land n = 0) \equiv (n = 0)$

• $\neg P_1 (n) \land \neg P_2 (n) \land P_3 (n) \equiv (n = 1000 \land n \geq 1) \equiv (n=1000)$

Thus, the formula in disjunctive normal form (DNF) above is equivalent to $(n = 0) \lor (n = 1000)$. Raju either has no books or he has $1000$ books. Either a bibliophobe or a bibliophile.