Katkat

Deduce Cat Counts from Conditional Truth Rules

SIG (Susquehanna)Data Scientist · Online Assessment

Last updated

Deduce the exact number of cats owned by three individuals based on conditional truth-telling rules, percentage relations, and average constraints.

Problem Statement

Three friends—Alice (A), Bob (B), and Charlie (C)—each own a distinct positive integer number of cats, denoted by a, b, and c respectively.

They follow a strict conversational rule:

  • Whenever person X speaks to person Y, person X tells the truth if and only if person Y owns strictly more cats than person X (cats(Y) > cats(X)).
  • Otherwise (if cats(Y) < cats(X)), person X lies (every claim they make in that statement is false).

No two people own the same number of cats.

The following dialogue takes place in order:

  1. Alice speaks to Bob: "Bob owns more cats than Charlie, and Charlie owns an even number of cats."
  2. Bob speaks to Charlie: "Charlie owns exactly 40% more cats than I do, and the average number of cats among the three of us is an integer."
  3. Charlie speaks to Alice: "The total number of cats owned by all three of us is greater than 20."

Determine the exact number of cats owned by Bob (b), and find the unique values of (a, b, c).

Requirements

  1. Establish the relative ordering of a, b, and c by analyzing the consistency of the truthfulness rules.
  2. Translate the statements into algebraic relations.
  3. Apply integrality and parity constraints to deduce the unique number of cats owned by B, as well as A and C.

Hints

Hint 1

Start by testing whether Alice tells the truth to Bob: if she were telling the truth, both her claims must hold, which quickly forces a contradiction with Charlie's rank.

Hint 2

Once you establish that Alice lies to Bob, conclude that a > b is impossible if Alice is lying, so deduce the complete ordering between a, b, and c.

Hint 3

Since Bob speaks to someone with more cats, his statement is completely true: write c in terms of b using the 40% condition and use the fact that c is an integer.

Follow-up questions

  • How would the solution change if the rule allowed equal cat counts and speakers told the truth when counts were equal?
  • Can you construct a general algorithm to solve truth-teller/liar puzzles with numeric relations modeled as a constraint satisfaction problem (CSP)?
  • What is the minimum number of statements required to uniquely identify n distinct positive integers under this comparison rule?