Enigmatic Code

Programming Enigma Puzzles

Enigma 1331: Three into two

From New Scientist #2490, 12th March 2005

There are four football teams in our league, each playing each other once in a season. At the end of the season I worked out the league table (with teams in alphabetical order) and consistently replaced digits by letters in some of the entries to give the table below.

Enigma 1331

Unfortunately I was a bit confused and the points for Albion were based on two points for a win (and one for draw) whereas the others were based on the correct three points for a win.

Which team was top of the league and which was bottom? And which of those two teams (if either) won when they played each other?

Enigma 184: Product sum

From New Scientist #1329, 28th October 1982 [link]

First, place the whole numbers from 1 to 16, one in each square. Next, multiply the numbers in each pair of touching squares and write the product in the little circle between the squares. Finally, add up the numbers in the circles. That gives you the “product-sum”, which you want to make as large as possible.

How big can you make it?

If you follow the Google Books link you will find that this Enigma was published next to a review (and advert) for the book Enigmas by Robert Eastaway, featuring 140 pages of Enigma puzzles selected from New Scientist. I have found a second hand copy of this and ordered it.

Enigma 1332: Square pins

From New Scientist #2491, 19th March 2005

George, and his brothers Fred and Henry, are comparing the PIN codes they have been given for their new credit cards. Each is a four digit number, and none contain a zero digit. The last digit of Fred’s number is the same as the first digit of George’s, the last digit of George’s is the first digit of Henry’s, and the last digit of Henry’s is the first digit of Fred’s. Apart from these three pairs of different digits, no digit occurs more than once among the PINs.

The brothers have each calculated the sum of the squares of the four digits in their PIN and to their great surprise they found that the three totals are exactly the same.

What is the sum of the four digits in George’s PIN?

Enigma 183: The heart has its reasons

From New Scientist #1328, 21st October 1982 [link]

Romeo and Juliet sometimes play a little game of deduction. They extract all the hearts from a pack of cards, discard the ace, shuffle the other 12 and take one each. They look at their own but do not show the other.

Anyone who can prove that his/her own card is the higher must say so at once and scores five points. Anyone who can name the other’s card must do so at once and scores 10 points. The maximum possible score is thus 15. As soon as one player performs either or both of these feats, the other has one further chance to score and the game stops. Neither may lie or suppress information and each knows the other to be a perfect logician. (Any actual proving is done after the game).

Being sporting, they often say a bit more than the mere grunt which the rules require for a player who is in no position to score. For instance, Romeo opened a recent game by remarking:

“I do not know which of us has the higher card.”

“Nor do I,” said Juliet.

“Nor do I,” said Romeo.

“Nor do I,” said Juliet.

“Nor do I,” said Romeo.

At this point Juliet scored and Romeo went on to win the game.

Which card did Romeo hold?

I think this puzzle is flawed, in that there is not a unique answer for the card that Romeo holds.

Enigma 1333: Perimetric progression

From New Scientist #2492, 26th March 2005

I asked Harry and Tom each to draw three rectangles of a certain area less than 100 square centimetres, with the length and breadth of each rectangle an integral number of centimetres.

They did so, and only had one rectangle in common. The perimeters of Harry’s rectangles formed an arithmetic progression; so did the perimeters of Tom’s rectangles.

Next day I repeated the exercise, specifying the next smallest area (greater than 100 square centimetres) for which it was again possible that the perimeters of their rectangles would form two different arithmetic progressions. They did.

What were the dimensions of the only rectangle they had in common on (a) the first and (b) the second day?

Enigma 182: ‘I would if I could’

From New Scientist #1327, 14th October 1982 [link]

“I would if I could, but I’m sorry I can’t”
I felt that I had to say this to my Aunt.
She seemed to expect me to lend her some cash
And knowing my Aunt that would surely be rash.
I happen to know what her overdraft is;
My Uncle’s is large, hers is much more than his.
Her husband, my Uncle, in fact owed the bank
A number of pounds which was, let’s be frank,
Sixty-three more than my overdraft then.
Aunty’s and mine are two-hundred-and-ten;
Between them, I mean, and I’d like you to see,
When I say “much”, Aunt’s is Uncle’s times three —
Or as near to three as it can be,
Bearing in mind this vital fact,
The pounds we owe are all exact.

What are the overdrafts of my Aunt, my Uncle and myself?

Enigma 1334: Prames

From New Scientist #2493, 2nd April 2005

A friend recently showed me the following puzzle: “The age of my cat is a prame and the age of my dog is one more than a prame. The difference between the two ages is a prame. The sum of the ages equals the sum of two unequal prames. How old are my cat and dog?”

My friend explained that there are four prames and each one is a positive whole number less than 9. The puzzle was intended for people who knew what the four prames were.

After my friend told what the four prames were I worked out the ages of the cat and dog. I then multiplied together the four prames and the two ages and noticed that the age of the dog did not occur as a digit in the product.

What are the four prames?

Enigma 181: A winter’s tale

From New Scientist #1326, 7th October 1982 [link]

Staff on our off-shore oil platforms cannot rely on regular mail collection throughout the football season. The lads on one North Sea rig have a standing arrangement with Bigdeals Pools Ltd whereby identical bets are handled each week on their behalf. All the bets are full permutations which involve the same match numbers on successive weekly coupons throughout the season.

The divers plunge once only — into the 8-match treble-chance pool. The operations staff have cautiously deleted match number 13 from their only entry on the 7-aways pool. Excepting this one match, the operations staff use all the numbers nominated by the divers.

The apprentices rejected the match number derived from their foreman’s birthdate; excepting this one match, they use all the numbers employed by the operations staff. The apprentices enter two permutations — one each in the treble-chance and the 7-aways pool; all the match numbers at their disposal are used for each permutation. The combined cost of the apprentices’ bets just equals the single stake risked by the operations staff.

Bigdeals Pools operate a 1p-per-line across-the-board stake for all their pools. What then is the total weekly stake to be remitted from the rig?

Enigma 1335: I know where you live!

From New Scientist #2494, 9th April 2005

The four children Andy, Bandy, Candy and Dandy were talking about where they lived. They each wrote down their two-figure house number and then showed me the four different numbers without telling me which was which. It turned out that they were all perfect squares. Andy said, “Mine uses the digit 1.” Bandy said, “Mine doesn’t use the digit 4.” Candy said, “Mine’s even.” Dandy said, “The first digit of mine is higher than the second.”

It was still impossible for me to work out which was which. Even if I had known the house number of the fair-haired child I would still not have been able to work out which was which of the other numbers. Alternately, even if I had known the house number of the brown-haired child I would still not have been able to work out which was which of the other numbers. However, the ginger-haired child told me its house number and I was then able to work out all their numbers.

And now if I were to tell you which of the four children was ginger-headed then it would be possible for you to work out their house numbers.

What (in the order A, B, C, D) are their house numbers?

Enigma 180: Still an enigma

From New Scientist #1325, 30th September 1982 [link]

Our local football league consists of four teams each of which plays each of the other three once in a season. At the end of one season I looked at their results and started to base a letters-for-digits puzzle on them. As always in my problems of this type, I was going to give part of the final league table with teams in points order (and alphabetically in the event of a tie) and with different letters representing different digits. Based on the 2-points-for-a-win/1-for-a-draw system, part of my puzzle was going to be:

Enigma 180 - 1

Then I read that the point system was to be changed to 3 points for a win and 1 for a draw, so I temporarily discarded the puzzle. But on reflection I see that for the same season of matches the same table above can still be used for one of my standard football problems, but now in the new point system. Of course the values of the letters might have to be different, but because it is for the same set of matches you should be able to complete (with for the same set of numbers) the following table.

Enigma 180 - 2

Enigma 1336: Rectangles

From New Scientist #2495, 16th April 2005

George has a rectangular piece of paper, 3 inches by 4 inches, marked with a 1-inch grid. He is wondering in how many ways he can mark a rectangle (which may be a square) on it, following the grid lines.

He has identified eight [*] different possible sizes and shapes, and various different places in which each can be marked, ranging from 1 to 17 different positions per shape. The total is 60.

He now has a larger rectangular piece of paper of integer dimensions (more than 100 square inches) and he has tackled the same problem. Instead of 60, he has calculated a much larger number which is the product of four consecutive primes.

What are the dimensions of this piece of paper?

[*] I think there is a mistake in this puzzle, in that it should read “He has identified nine different possible sizes and shapes…”. It all seems to make sense if you make that change.

Enigma 179: Dominoes

From New Scientist #1324, 23rd September 1982 [link]

Enigma 179

“Let’s have an easier one,” said Uncle Dick. So here is an easier one, based on an idea of George Glæser which I heard from John Mason. The picture shows a full set of 21 dominoes, from 0-0 to 5-5, arranged in a 6 × 7 block. All I ask you to do is mark in the boundaries between the dominoes. There is only one possible arrangement.

Enigma 1337: A powerful square

From New Scientist #2496, 23rd April 2005

I have put one digit in each square of a 4×4 grid, so that I can read eight different four-figure numbers across the rows or down the columns, four of them being odd and four even. One of the across numbers is a cube and another is a fourth power, and the same is true of the numbers down. Two of the other numbers are squares.

Which two numbers in the grid are not perfect powers?

Enigma 178: A high-powered sum

From New Scientist #1323, 16th September 1982 [link]

If the digits of a number are added together, and this process repeated several times, if necessary, on the numbers so formed, eventually an integer which is in the range 1 to 9 is obtained. For example, the integer obtained from the number 16886 is 2 (i.e. 1 + 6 + 8 + 8 + 6 = 29; 2 + 9 = 11; 1 + 1 = 2).

What is the integer obtained from the number (9624 + 2)1872?

Enigma 1338: Country walks

From New Scientist #2497, 30th April 2005

The picture shows villages A to K and all but one of the lanes between them. The missing lane does not cross any other lane.

Enigma 1338

I remember that it is possible to reach a friend’s village by starting at my village, going for a walk along the lanes, and using every lane exactly once.

I also remember that it is possible to start at my village, go for a walk along the lanes, and pass though each of the other villages exactly once before returning to my own village.

Which two villages are joined by the lane which was missed out of the picture?

Enigma 177: Mud in your eye

From New Scientist #1322, 9th September 1982 [link]

All five horses fell at the water jump, reports George Girth, who was riding one of them. In any event, all the jockeys fell off and then, confused by the mud, all got back on to the wrong horse.

On they galloped. Bert Bridle was third past the post, riding the horse belonging to the jockey then riding Frank Fetlock’s horse. Bert’s own horse was being ridden by the jockey who had started on the horse now being ridden by Sam Stirrup. Sam’s own horse (the one he had started on) was beaten home by the horse which Frank Fetlock finished on. Willie Withers and exactly two of the others came in ahead of the horses they had started on.

Can you list the jockeys (capital letters) and their final mounts (small letters naming the original jockey; e.g. Bg would mean B finished on G’s horse) in finishing order?

Enigma 1339: Quarter-final draws

From New Scientist #2498, 7th May 2005

Of the 8 fifth round games in this year’s FA cup competition 4 were won and 4 required replays. When the draw for the quarter-finals was made each game matched a team that had won against the winner of a replay.

(1) What as a fraction expressed in its lowest terms was the probability that the draw would produce this outcome?

(2) What was the probability (similarly expressed) that it would produce two games that involved the four teams that had won and two that involved the winners of the four replays?

Enigma 176: Bye-bye tennis

From New Scientist #1321, 2nd September 1982 [link]

Our local tennis club has just had its annual knockout tournaments. All the male members played in the men’s singles, and all the female members played in the women’s singles. Luckily there was an even number of men and so they were able to form pairs and all take part in the men’s doubles. Similarly, all the ladies took part in the women’s doubles. The men and women paired off as far as possible for the mixed doubles, but some women had to miss this even because of a shortage of men. The total number of matches in all five competitions was just 11 more than the total number of byes necessary in all five competitions (some being necessary in each), and this total number of byes was 100 more than the total number of members in the club.

How many women and how many men in the club?

Enigma 1340: Stairs and sums

From New Scientist #2499, 14th May 2005

Andy has a new game which he plays on his stairs. These are numbered 0 (ground) to 9 (landing). He places his teddy on stair 9 and writes 9 on his score card. He pushes teddy over the edge, notes which stair he ends up on and writes that number on his card. He pushes teddy again over the edge of the stair he is on and again writes down the number of the stair he ends up on. He repeats this until teddy reaches the ground, when he stops.

Andy’s score for a game is the sum of the numbers on his card. Andy played his game many times and kept all the score cards. When he looked at all the cards he found an amazing thing. If he looked at which of the stairs (8, 7, …, 1, 0) teddy had ended up on when pushed off stair 9, he found teddy ended up on each stair the same number of times. Further, if Andy looked at all the cards with any particular initial sequence, say, 9, 7, 6 he found that all the remaining stairs, here, 5, 4, 3, 2, 1, 0 occurred equally often as the stair upon which teddy ended up when pushed off the last stair of the initial sequence, here, 6.

What was the average of all Andy’s scores?

Enigma 175: Hexagon-wiggling

From New Scientist #1320, 26th August 1982 [link]

Enigma 175

The rules for hexagon-wiggling are simple. You start with a hexagonal pattern of dots, lying in the junctions of a regular 60° grid. You then begin at any dot, and follow path from dot to dot along the grid lines. You must wiggle at every dot you come to you; that is, each leg of the path must lie at 60° or 120° to the previous leg. Your path must include every dot. Finally, the path should, if possible, be re-entrant.

The hexagon at (a) has been wiggled with complete success according to these rules. Can you wiggle those at (b) and (c)?

The term “re-entrant” is used here to denote that the path is closed (i.e. a loop or circuit that can be started at any point, rather than an open path with a beginning and an end).

Follow

Get every new post delivered to your Inbox.