Enigmatic Code

Programming Enigma Puzzles

Enigma 490: Uglification practice

From New Scientist #1641, 3rd December 1988 [link]

Alice has met Professor Pip Palindrome — through the looking glass, of course. He never attempts anything which does not involve palindromes, that is, numbers which read the same from left to right as from right to left, for example 2882 or 31413.

They multiply two non-square three-digit palindromes and get an odd five-digit palindrome product, when Pip spots that this is also the product of a four-digit palindrome and a two-digit palindrome.

What was the five-digit product?

[enigma490]

Enigma 1021: All at threes and sevens

From New Scientist #2177, 13th March 1999 [link]

For his work in detention, Johnny was set to multiply two large numbers together. One number consisted entirely of threes, the other entirely of sevens:

3333… × 7777… = ???

Surprisingly, he managed to get the correct answer. When he examined his answer he noticed that it contained exactly 7 sevens and 3 threes.

How many digits were there altogether in Johnny’s answer?

[enigma1021]

Puzzle 28: Cross number

From New Scientist #1079, 24th November 1977 [link]

Across:

1. Three of these digits are those of 6 across, not necessarily in the same order, and the other one is the sum of the digits of 6 across.
5. A multiple of the square root of 7 down.
6. A perfect cube.
8. A multiple of 23.
9. This is a prime number when reversed.
10. Each digit is greater than the one before.
12. The sum of the digits is 12.

Down:

1. The sum of the digits of this number is the same as the sum of the digits of 3 down.
2. The same when reversed.
3. See 1 down.
4. Each digit is greater than the one before.
7. A perfect square.
8. A multiple of 19.
11. A prime number.

[puzzle28]

Enigma 489: Habitadd

From New Scientist #1640, 26th November 1988 [link]

My word processor has developed a curious habit. As I type out a puzzle from my manuscript, it increases all the numbers I have written, as follows.

It adds 2 to the 3rd number in the puzzle, then it adds 5 to the 6th number in the puzzle, then it adds 8 to the 9th number in the puzzle, and so on.

Recently, I bought 8 apples, 9 oranges and 10 pears and paid 38 pence, whereas my wife bought 13 apples, 13 oranges and 14 pears and paid 51 pence and my daughter bought 16 apples, 18 oranges and 18 pears and paid 54 pence.

The word processor also makes any other necessary changes to the wording so that the puzzle is grammatically correct.

What was the cost of each apple, each orange and each pear?

[enigma489]

Enigma 1022: Only

From New Scientist #2178, 20th March 1999 [link]

The six islands of A, B, C, D, E and F are linked by planes of Red Airline and Green Airline. For any pair of islands there are four possibilities for the route between them:

(1) no planes fly on the route;
(2) only red planes fly to and fro on the route;
(3) only green planes fly to and fro on the route; or
(4) both airlines fly their planes to and fro on the route.

We say Island X is linked by Red to Island Y if we can fly from X to Y using only Red planes; similarly for Green. We say X is directly linked by Red to Y if Red planes fly on the route between X and Y; similarly for Green. We say X is indirectly linked by Red to Y if they are linked by Red but not directly linked by Red; similarly for Green.

We have the following information (I):

I1: Island A is linked by Green to only D and E.
I2: Only B and C are linked by Red to D.
I3: Island B is linked only by Red to C.
I4: Island A only links indirectly by Green to D.
I5: Island F is directly linked by Red to only one of the islands.

Question 1: For each of the following four statements, say whether it is true, false or we cannot say whether it is true or false:

(a) Island B is only indirectly linked by Red to D.
(b) Island A is only indirectly linked by Red to E.
(c) There are only two islands that F is not linked to.
(d) If E is linked to F by Red or Green, and it is possible to fly from A to B with only one intermediate stop, then E is only indirectly linked by Red to F.

For the past number of years the airlines have ensured that the pattern of Red and Green flights is never the same in any two years. However, they have allowed only patterns that ensure the statements (I) are true. They now find this is the last year they will be able to carry on this practice.

Question 2: For how many years have the airlines been following this practice?

[enigma1022]

Tantalizer 435: Compleat idiots

From New Scientist #986, 5th February 1976 [link]

The landlord of the Compleat Idiot likes to add spice to the day’s angling. Each angler starts by predicting everyone’s catch and there is a double scotch for each correct prediction afterwards. Yesterday no one was right about anyone, each man having predicted too few for those who beat him and too many for those who did not (including himself). Everyone caught at least one fish and all caught a different number. If I tell you the predictions (predictors down the left, persons predicted for across the top), can you work out the actual catches?

[tantalizer435]

Enigma 488: Divisor at work

From New Scientist #1639, 19th November 1988 [link]

In the following division sum each letter stands for a different digit:

Enigma 488

Rewrite the sum with the letters replaced by digits.

[enigma488]

Enigma 1023: Semi-prime progressions

From New Scientist #2179, 27th March 1999 [link]

Harry and Tom have been investigating sequences of positive integers that form arithmetic progressions where each member of the sequence is the product of two different prime numbers and no members of the sequence have any factors in common. Harry has found the sequence of four such integers whose final (largest) member is the smallest possible for the final member of such a sequence; Tom has found the sequence of five such integers whose final (largest) member is the smallest possible for the final member of such a sequence.

What are the smallest and largest integers in:

(1) Harry’s sequence,
(2) Tom’s sequence.

[enigma1023]

Puzzle 29: Division (letters for digits)

From New Scientist #1080, 1st December 1977 [link]

In the following division sum each letter stands for a different digit:

Rewrite the sum with the letters replaced by digits.

[puzzle29]

Teaser 2779: New Year Party

From The Sunday Times, 27th December 2015 [link]

We have a game planned for our forthcoming New Year party. Each person there will write their name on a slip of paper and the slips will be shuffled and one given to each person. If anyone gets their own slip, then all the slips will be collected up and we shall start again. When everyone has been given a name different from their own, each person will use their right hand to hold the left hand of the person named on their slip. We hope that everyone will then be forming one circle ready to sing Auld Lang Syne — but there’s a slightly less than evens chance of this happening.

How many people will there be at the party?

[teaser2779]

Enigma 487: It still is one

From New Scientist #1638, 12th November 1988 [link]

I’ve just been sorting out some old papers and I’ve come across the fill set of football results from our local league of four teams for their 1958/59 season. They each played each other once and they used to get two points for a win and one for a draw. I had started to set a puzzle based on those results. I was going to include the partially filled in table below from the end of the season, but with digits replaced by letters (different digits being consistently replaced by different letters). I would then give some additional clues (including the fact that one of the games was won by a margin of five goals) to enable the puzzler to work out all the scores. (The team order is alphabetical, not in order of merit).

Enigma 487

I’ve now decided to see if the same cryptic table is still the basis of an Enigma based on the same set of football results but with three points for a win and one for a draw. It still is one, but I note that had the new point system been in force the 1958/59 champions (who were decided by better goal difference) would in fact only have been runners-up.

Find all six scores (for example, A5 B4; A3 C5; and so on).

I’m sure the name of the third team is meant to be Crumblies, so I’ve changed it. It doesn’t affect the outcome of the puzzle.

[enigma487]

Enigma 1024: Regal progress

From New Scientist #2180, 3rd April 1999 [link]

George is whiling away some time contemplating a chessboard. He has placed a King in the bottom left square and proposes to transfer it by a sequence of moves to the top right square. A King can, of course, move only one square at a time, either horizontally vertically or diagonally. In order to keep this process finite, however, George has decided to allow only three different moves — one square forward (upward), one square to the right, or one square diagonally up-right.

Even with this restriction, there are many ways of transferring the King to the diagonally opposite corner. It could proceed up the left-hand side then across the top. Or along the bottom then up the right-hand side. Or diagonally straight across the middle. Or any one of a myriad of zig-zag routes.

George’s attempts to identify all possible routes were witnessed by his small son.

“There must be thousands of ways of getting there, dad.”

“No, son, there can only be a few dozen.”

Who is right — and exactly how many different routes are there?

[enigma1024]

Tantalizer 436: Rhyme and reason

From New Scientist #987, 12th February 1976 [link]

The poems of Prudence Meek are for all estates and conditions of men. They can be bought bound in velvet or in rags, printed in silver or in grey, scented with myrrh or with soap.

“Selling like hot cakes?” she was asked recently on a radio chat show.

“Verily”, she replied, “27 bound in velvet, 29 printed in silver, 34 scented with myrrh in less than a week. Half those scented with myrrh were printed in silver”.

“How about those scented with soap?”

“Three were not only printed in silver but also bound in velvet.”

“And total sales?”

“57”, the poetess confessed coyly, “but I’ll have you know that I had sold more luxury editions (the sort with velvet, silver and myrrh) than the total sales of Beverley Bunion’s disgusting odes”.

Knowing Bunion’s sales figure, the interviewer could then announce Miss Meek’s score in luxury editions.

What is it?

I’ve marked this puzzle as “flawed”, as, although it is possible to solve it and get a unique answer, the answer I found was different from the published solution. So it seems the setter had a different puzzle in mind.

[tantalizer436]

Enigma 486: Number please

From New Scientist #1637, 5th November 1988 [link]

“I didn’t realise that telephone calls in the principality of Tarizania were so costly,” said Tom to George. “My bill for last month came to 100 zorinds for only 25 calls.”

“You spend a lot of time on all your calls,” observed George.

“I know — but the cost is independent of a call’s duration,” countered Tom. “Off-peak rates are two or five zorinds for local or trunk calls — and the corresponding charges at peak times are three or seven zorinds.”

“It sounds as though you were making trunk calls at the peak times,” remarked George.

“No; I made at least one call at all four rates. Admittedly I made more off-peak trunk calls than local ones at peak times.”

“How many calls did you make at each rate?”

“If you knew the one-digit number I made at the cheapest rate, you might find it interesting to work that out.”

How many three-zorind calls did he make?

Enigma 995 was also called “Number please”.

[enigma486]

Enigma 1025: A score or more

From New Scientist #2181, 10th April 1999 [link]

We have a word game a bit like Scrabble. Each player is given a selection of letters with which to make words. Each letter of the alphabet is consistently worth a non-zero single-digit number and if you make a word you work out the word-score by adding up the value of the letters in the word.

In this way, for example, ELEVEN has a different word-score from TWELVE. In fact if you work out the word-scores of ONE, TWO, THREE, NINE, TEN and THIRTEEN you find that each is equal to that of either ELEVEN or TWELVE.

Which of them is (or are) equal to ELEVEN?

[enigma1025]

Puzzle 30: Football – new method (3 teams)

From New Scientist #1081, 8th December 1977 [link]

A new method to encourage goals in football matches has been suggested. In this method 10 points are awarded for a win, five points for a draw and one point for each goal scored whatever the result of a match.

3 teams, A, B and C are all to play each other once. After some, or perhaps all, of the matches have been played the points were as follows:

A   3
B   7
C  21

Not more than 7 goals were scored in any match.

What was the score in each match?

[puzzle30]

Enigma 485: A digital question

From New Scientist #1636, 29th October 1988 [link]

“0234 871956?” remarked Telephonopoulos on hearing Ms Omnidigitalis’s telephone number. “Why, it contains all the 10 digits once and once only.”

“That’s not all that’s interesting about it,” she replied. “It’s divisible by 11 without remainder. That’s if you agree to treat it as being the same number as 234,871,956: that is, to discount the initial zero.”

“There must be quite a few numbers consisting of 10 digits, none of them repeated within the same number, which are divisible by 11 without remainder.”

Exactly how many are there if:

(a) They are not constrained to begin with 0?
(b) They are constrained not to begin with 0?

[enigma485]

Enigma 1026: Dualities

From New Scientist #2182, 17th April 1999 [link]

Across:

1. A prime which is also a square reversed. The first two digits form a square, and the last two a prime. The 1st, 3rd and 5th digits are all the same.
4. The square root of 7 across.
5. A palindromic square.
6. The square root of the reverse of 2 down.
7. A square which is prime when reversed.

Down:

1. A prime which is also a square reversed. The first three digits form a square which is also a square when reversed. The last two digits form a prime which is also a prime when reversed.
2. A prime which is also a square when reversed. All the digits are different. The first three digits form a square which is also a square when reversed: and the last digit is the same as that of 1 down.
3. A square which is a prime when reversed.

Find the answers for 1 across, 1 down, 3 down and 7 across.

[enigma1026]

Tantalizer 437: Miniatures

From New Scientist #988, 19th February 1976 [link]

When Pestle arrived at Mortar’s house last night for their weekly game of chess, he had forgotten to bring the pieces. Unsmilingly Mortar produces a board and a supply of Brandy, Gin, Kirsch, Rum, Vodka and Whisky in miniature bottles. Captures having been drunk, the game declined in quality, finally reaching this position. But Mortar had the harder head as well as the white pieces and delivered mate on the move.

The black circled pieces are black (white ones having had their tops removed at the start of play) and each kind of piece was represented by a different drink. Whenever a Vodka threatened a Gin, the Gin also threatened the Vodka. Whenever a Brandy threatened a Whisky, the Whiskey did not threaten the Brandy. Whenever a Kirsch did not threaten a Rum, the Rum did not threaten the Kirsch.

What was Mortar’s mating move?

[tantalizer437]

Enigma 484: Who knows?

From New Scientist #1635, 22nd October 1988 [link]

There were 10 candidates A, B, C, …, J for an examination consisting of six multiple-choice questions P, Q, …, U. For each question there were five choices numbered 1 to 5 and just one choice was correct. The candidates’ answers are given in the following table:

Enigma 484

Three logicians, X, Y, Z, were shown the table and told that one candidate had got all six questions correct.

X was told the answer to P and asked if she knew the answer to Q. Y was told X’s answer and also the answer to R, and asked if she knew the answer to S. Z was told Y’s answer and also the answer to T, and asked if she knew the answer to U.

If I told you Z’s answer then you could choose one of the six questions so that, if I told you its answer, then you could tell me which candidate got all six questions correct.

What was Z’s answer?

Which question would you want to know the answer to?

If I told you the answer to your chosen question was 1, which candidate would you tell me got all six questions correct?

[enigma484]

%d bloggers like this: