# Enigmatic Code

Programming Enigma Puzzles

## Enigma 239: More points

From New Scientist #1385, 24th November 1983 [link]

Four football teams, ABC and D, have just finished a competition in which they all played each other once. They have been playing under a new system in which 10 points are awarded for a win, five points for a draw and one point for each goal scored.

There points were:

A  23
B  13
C    8
D  40

An object of this new system is to encourage goals. And this certainly seems to have happened. Each side scored at least 1 goal in every match, and in one match 10 goals were scored.

Find the score in each match.

## Enigma 1277: Colourfields

From New Scientist #2435, 21st February 2004

Draw a 4-by-4 grid. Colour each square red or blue. Select any square, S, and write 1 in it. Then write 1 in every square you can reach from S by a series of moves, where each move is from a square to an adjacent, horizontally, vertically, or diagonally, square of the same colour.

Select any empty square, T, and write 2 in it. Then write 2 in every square you can reach from T by a series of moves. Repeat this procedure for 3 and then 4 and so on until every square has a number. The last number you write down is called the “score” for that colouring. If we imagine the grid is the map of a farm, then you have divided the map into fields, one field for each number.

(1) What is the largest score possible?

(2) If we work with a 5-by-5 grid, what is the largest score possible?

## Enigma 238: Sort out your draws

From New Scientist #1384, 17th November 1983 [link]

In our local football league the six teams, Algols, Basics, Computers, Digitals, Electronics and Fortrans, each played each other once this season and the end-of-season league table has just been published. The teams finished in alphabetical order with no two teams scoring the same total number of points. We work on the system of 3 points for a win and 1 point for a draw. Just knowing each of the teams’ total points, and the fact that during the season there had been at least twice as many draws as wins, enabled me to work out the result of each match.

Someone beat Basics. Which team (or teams)? And which team(s) beat Fortrans?

## Enigma 1278: Natural numbers

From New Scientist #2436, 28th February 2004

I have assigned a number to each letter of the alphabet. The numbers, which are not all different, include negative numbers, zero, positive numbers and fractions. I can tell you that:

O + N + E = 1
T + W + O = 2
T + H + R + E + E = 3
F + O + U + R = 4
F + I + V + E = 5
S + I + X = 6
S + E + V + E + N = 7
E + I + G + H + T = 8
N + I + N + E = 9
T + E + N = 10
E + L + E + V + E + N = 11
T + W + E + L + V + E = 12
T + H + I + R + T + E + E + N = 13
F + O + U + R + T + E + E + N = 14

Find the value of  (A + F + F + I + X + I + N + G) – (A + N + S + W + E + R).

## Enigma 237: Still more dominoes

From New Scientist #1383, 10th November 1983 [link]

The picture shows a full set of 28 dominoes from 0-0 to 6-6, arranged in an 8 × 7 block. This time I have shown where the 6-3 domino goes. Please mark the boundaries between the other dominoes.

Note: I now have an internet connection at home so I’ll be able to resume my previous posting schedule (a new puzzle every other day). While I’ve been offline I’ve been able to keep up the posting frequency, but the actual times that puzzles were published was a bit variable (up to a day early or a day late). Over the next few days I’ll be checking all the activity that’s happened on the site while I’ve been offline (4 months!). Thank you for your patience.

## Enigma 1279: Big Deal

From New Scientist #2437, 6th March 2004

Joe was looking for a new way to test his daughter’s logic skills. He took a pack of 52 playing cards and after discarding the four kings he dealt the cards into four piles in a line from left to right.

Then he picked up the piles in order, with the left pile on the top and the right pile on the bottom. He repeated this process a number of times until all the cards were again in the original order.

Putting the cards away, he asked his daughter to work out how many deals were needed to return the cards to their original positions.

As she did this she noticed that several cards returned to their original positions several times during the process.

How many cards returned more than once to their original positions?

Note: I now have a phone line installed at my new house, but I’m waiting for ADSL to be activated on it, so I only have sporadic access to the internet at the moment. I should have an internet connection soon.

## Enigma 236: Men on a bummel

From New Scientist #1382, 3rd November 1983 [link]

On the last night of their German holiday, Amble, Bumble, Crumble and Dimwit ate at Das Goldene Rätsel, famous for its Anglo-German cuisine. Each had one dish from each course. Here is the menu.

Dimwit is, alas, now recovering from food poisoning and too ill to recall what he ate or spent. Nor can the others recall, but the three spent the same amount each and know what each of the three ate. Making the reasonable assumption that Dimwit was done for by something he alone chose, they have deduced what the offending dish must have been.

Can you do the same?

I am currently reading Jerome K. Jerome‘s “Three Men on the Bummel“.

Note: I now have a phone line installed at my new house, but I’m waiting for ADSL to be activated on it, so I only have sporadic access to the internet at the moment. The current estimate is that I should have an internet connection next week.

## Enigma 1280: Draws are not enough

From New Scientist #2438, 13th March 2004

Another five-team tournament has taken place in which each team played each of the other teams once, three points being awarded for a win and one for a draw. If teams finished level on points, goal difference (goals score minus goals conceded) was used to separate them, and this ensured that there were no ties.

The teams finished in the order Albion, Borough, City, Rangers, United, even though United did not lose any of their matches. No team scored more than three goals in any match, and the scores in the matches that were not drawn were all different.

If I identified one particular match as having three goals scored in it, then it would be possible to deduce with certainty which matches were drawn and the winners in the other matches.

What is the “particular match” and what was the score?

Note: I now have a phone line installed at my new house, but I’m waiting for ADSL to be activated on it, so I only have sporadic access to the internet at the moment. The current estimate is that I should have an internet connection next week.

## Enigma 235: Double trouble

From New Scientist #1381, 27th October 1983 [link]

In the following football table and addition sum letters have been substituted for digits (from 0 to 9). The same letter stands for the same digit wherever it appears and different letters stand for different digits.

The three teams are eventually going to play each other once — or perhaps they have already done so.

(Two points are given for a win and one point to each side in a drawn match).

Find the scores in the football matches and write the addition sum out with numbers substituted for letters.

Note: I now have a phone line installed at my new house, but I’m waiting for ADSL to be activated on it, so I only have sporadic access to the internet at the moment. The current estimate is that I should have an internet connection next week.

## Enigma 1281: Ingredients in order

From New Scientist #2439, 20th March 2004

The Dryfroot company makes 1 lb boxes of Frootmix; each box is made to the same recipe and contains a whole number of ounces of apples, bananas, cranberries and dates (1 lb = 16 ounces). Similarly, it makes 1 lb boxes of Mixfroot; the recipe is different but each box still contains a whole number of ounces of each of the same four fruits. Finally, it makes giant 7 lb boxes of Frix, by mixing four boxes of Frootmix with three boxes of Mixfroot.

In each of the three kinds of boxes the weights of the four fruits are different, and so on each box the company lists the ingredients in descending order. The lists on the boxes are: Frootmix – dates, cranberries, bananas, apples; Mixfroot – apples, bananas, cranberries, dates; Frix – bananas, cranberries, dates, apples.

How many ounces of dates are there in a box of Frootmix and how many ounces of bananas in a box of Mixfroot?

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The current estimate is that I should have a connection in early November.

## Enigma 234: Three square slabs

From New Scientist #1380, 20th October 1983 [link]

“I started with three square wooden slabs, each one inch thick. The sides of each were an exact number of inches, different in each case. The edge of each slab was veneered, but the top and bottom were not. Clear?”

“So far.”

“Next, I sawed each slab neatly into inch cubes. I ended up with cubes of two kinds; veneered (on one or two faces) and not veneered. Still clear?”

“You did say you sawed up each slab?”

“Yes.”

“Right.”

“Now, I find I have the same number of cubes of each kind. How many inches long were the sides of the original slabs?”

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The current estimate is that I should have a connection in early November.

## Enigma 1282: Amen

From New Scientist #2440, 27th March 2004

Janet was trying to invent one of those puzzles where every letter stands for a different digit (0 to 9).

She looked at the sum of the two-figure numbers SO + BE = IT and found that there were several possible answers, such as 21 + 37 = 58. John studied the puzzle and also found several answers, such as 5 × 0 + 3 × 6 = 2 × 9. But he had misunderstood and had treated the expression as being algebraic. When they compared answers they discovered there were a few sets of the 6 letter-values which they agreed about.

Which digits do not appear in any of their common answers?

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The current estimate is that I should have a connection in early November.

## Enigma 233: Imagine an Enigma

From New Scientist #1379, 13th October 1983 [link]

In this week’s puzzle the ENIGMA is a whole number of gross, and IMAGINE another whole number of gross, over GO times as many as in the ENIGMA.

As usual each letter stands for a digit, and, different letters represent different digits.

IMAGINE / ENIGMA > GO

Please work out what the letters stand for, and find the value of AGAIN.

Note: 1 gross is 12 dozen, i.e. 144.

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. I’ve no idea when I will get connected.

## Enigma 1283: Tick which applies

From New Scientist #2441, 3rd April 2004 [link]

In a recent test the class were given a three-figure number and asked to shade-in the appropriate boxes (see below).

One child read the three-figure number backwards to give a larger three-figure number, he shaded-in some boxes (which were the appropriate ones for that incorrect number), but then he handed in the list of shaded boxes upside down. In this bizarre way he actually managed to get the right answer!

What was the correct number he should have been working with?

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. I’ve no idea when I will get connected.

## Enigma 232: The judgement of Paris

From New Scientist #1378, 6th October 1983 [link]

One day, a handsome shepherd named Paris was minding his own business, when three goddesses hove on sight. They produced a golden apple and demanded that he award it to the fairest of them. The ancient legend then says that each offered him a thumping bribe on the quiet. But that is a libel and the true story is as follows.

Reflecting that beauty is only skin deep, he decided that there must be other criteria as well. He would rank the goddesses by each criterion, awarding x points for 1st place, y for 2nd, and z for 3rd (xy and z were descending positive whole numbers and no ties occurred). He then totalled the points and found that, helped no doubt by coming top for Beauty, although not for Conversation, Aphrodite had won. Hera totalled 20 points and Athena, despite being top for Wisdom, only 9.

The long term results are reported in the Iliad. The question for now is who scored precisely how many points in the Interesting Hobbies section of the contest?

The original problem said: “beauty is only sin deep”.

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. I’ve no idea when I will get connected.

## Enigma 1284: Os and Xs offside

From New Scientist #2442, 10th April 2004 [link]

We are playing ordinary noughts and crosses but with two extra rules:

(i) A player may not go in the centre square if going in the centre square puts that player in a position which is better for them than every other position they could have gone to instead.

(ii) If after eight turns no one has won and the centre square is empty then the game ends and is declared a draw.

For the purpose of rule (i), position P is better for a player than position Q if either (a) the player can force a win from P but not from Q, or (b) the player can force a draw or better from P but not from Q.

If, in a game, O goes first and each player plays as well as possible, is the result a win for O, a win for X or a draw?

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The latest estimate is that I’ll have a connection by the end of October 2014.

## Enigma 231: Six of the best

From New Scientist #1377, 29th September 1983 [link]

I was constantly being kept in at school to do extra work on decimals. So many unhappy memories are revived now that my son brings home his decimal homework: but thank goodness for calculators!

Unfortunately, the homework calls for exact answers, but my calculator displays only six digits after the decimal point. But that was no disadvantage for last night’s homework. For the teacher had listed all the integers greater than 1 whose reciprocals were recurring decimals such that the first six digits occurring after the decimal point occurred again in that order as the 7th-12th digits and the 13th-18th etc. So, for example, the first two numbers in the list were 3 and 7 because ⅓=0.3333333333333… and ⅐=0.142857142857… My son’s homework was to work out the decimals of all the reciprocals. So, for once, my limited calculator display was sufficient to check his answer.

How many numbers had the teacher listed?

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The latest estimate is that I’ll have a connection by the end of October 2014.

## Enigma 1285: Triangular square

From New Scientist #2443, 17th April 2004 [link]

Triangular numbers are integers that fit the formula n(n+1)/2, such as 1, 3, 5, 10, 15. Your task is to put a digit in each of the eight outer squares of a 3×3 grid, so that the numbers that you read across the two outer rows and down the two outer columns are four different 3-digit triangular numbers.

The numbers must also be such that with a digit of your choice in the central square you could read another 3-digit triangular number across the central row and with a different digit of your choice in the central square you could read another 3-digit triangular number down the central column. No number may start with a zero.

What are the triangular numbers that you could read across the central row and down the central column?

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The latest estimate is that I’ll have a connection by the end of October 2014.

## Enigma 230: Four rows

From New Scientist #1376, 22nd September 1983 [link]

Below is an addition sum with letters substituted for digits. The same letter stands for the same digit wherever it appears, and different letters stand for different digits.

Write the sum out with numbers substituted for letters.

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The latest estimate is that I’ll have a connection by the end of October 2014.

## Enigma 1286: Mixed singles

From New Scientist #2444, 24th April 2004 [link]

Some players entered a “round robin” tennis tournament, where each player plays each of the others once, with each match resulting in a win for one of the players. At the end of the tournament I noted how many matches each of the players had won. The men were pretty pathetic, winning only one match each. Even so, Alan beat Barbara in their match. On the other hand, Christine beat David: had that result been reversed all the women would have won the same number of matches.

How many men and how many women entered the tournament?

Note: I am still waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The latest estimate is that I’ll have a connection by the end of October 2014.