Enigmatic Code

Programming Enigma Puzzles

Enigma 1191: Sixth sense

From New Scientist #2347, 15th June 2002 [link]

Amber and Joe have a new game in which they each choose a whole number. Amber told me that she took two-thirds of Joe’s number away from 80 and then discarded any fraction to get her number. For example, if Joe chose 5 then Amber’s number was 76. Joe told me that he added three-quarters of Amber’s number to 23 and then discarded any fraction to get his number.

They asked me to blow the whistle for the start of the game and they each raised their hand when they had chosen their number.

Afterwards I pointed out they had not spoken to one another during the game; they smiled enigmatically.

What number did each one choose?


One response to “Enigma 1191: Sixth sense

  1. Jim Randell 30 November 2015 at 8:51 am

    This Python program runs in 33ms.

    from enigma import irange, printf
    for A in irange(1, 80):
      J = (92 + 3 * A) // 4
      if A == (240 - 2 * J) // 3:
        printf("A={A} J={J}")

    Solution: Amber chose 43. Joe chose 55.

    If we ignore the discarding of the fractional values, we can solve the following equations to give rational solutions:

    A = 80 − (2/3) J
    J = 23 + (3/4) A

    To get:

    A = 388/9, J = 116/3

    which, to the nearest integers, are:

    A = 43, J = 55.

    This gives us an approximate solution to the problem, and if we actually use these values to perform the operations in the problem text we see that these values are, in fact, the required answer.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: