### Recent Posts

### Archives

### Categories

- enigma (822)
- project euler (2)
- site news (33)

### Site Stats

- 90,517 hits

Programming Enigma Puzzles

25 April 2015

Posted by on **From New Scientist #2394, 10th May 2003**

I have a square carpet a whole number of feet wide. It is red and blue. Its design consists of a large blue square (not centrally placed, but with its sides parallel to the sides of the carpet) with the rest being red, making a small border around the square.

I need to trim the corners of the carpet slightly. To do this I shall make four straight cuts, one through each corner of the blue square. I shall discard the four triangular pieces leaving an irregular octagon. Given those constraints, I shall choose the angles of the cuts to leave me an octagon of the largest area possible. The effect of all this will be that I shall throw away a single-digit whole number of square yards of red carpet, being precisely 10 per cent of the red part.

How wide is the uncut square carpet, measured in feet?

23 April 2015

Posted by on **From New Scientist #1422, 20th September 1984** [link]

This was a clue in a recent mathematically inclined crossword:

“These two positive whole numbers add to 12 (two words, total 9 letters)”.

The answer could be FOUR EIGHT or NINE THREE (or, of course, EIGHT FOUR or THREE NINE).

In another crossword there was a similar clue; I’ll report it to you with a couple of omissions:

“These two positive whole numbers add up to

?(two words, total?letters)”.In this case the answer was unique (apart from the fact that the [order of the] two words could be reversed). The first of those omitted numbers is 12 or less, but even if you know what it was you would be unable to work out the second omitted number.

But now, knowing all that, if I told you the second omitted number you would be able to work out the first omitted number.

What are the two omitted numbers?

21 April 2015

Posted by on **From New Scientist #2395, 17th May 2003**

Joe took a sheet of lined paper and asked me to write a whole number on the first line. This I did, writing a number that was less than a million and which consisted of the same digit repeated several times. After some elaborate calculations Joe wrote a number of the second line. After more calculations he wrote a number on the third line, and he continued like this until he had written a huge number on the eighth line.

I asked him how he calculated each number. He explained, “If the number N is on one line then I work out the remainders when N is divided by 5 or 6. In some cases the first remainder was larger than the second and in those cases I wrote the square of N+1 on the next line. In the other cases the first remainder was smaller than the second and I wrote the cube of N+2 on the next line.”

What number did I write on the first line?

19 April 2015

Posted by on **From New Scientist #1421, 13th September 1984** [link]

The heads of eight colleges are four married couples. The colleges are so sited that the chapel towers of all are visible from the towers of all the others. To ensure that the bedrock on which all are built is not shifting, each head daily at noon ascends his tower and checks the range and bearing of each of the others. It is interesting, is it not, that in doing so he or she never has to traverse his sextant by

lessthan a quarter of a right-angle — nor of course by more than two right angles.Each male head is a different distance from his wife. Mrs

Bis due east of MrB, while MrsAis due southwest of MrA. MrDis closer to MrsDthan MrCto MrsC.Through what angle must Mr

Dturn his sextant in traversing from MrCto MrsC?

17 April 2015

Posted by on **From New Scientist #2396, 24th May 2003**

Joe’s daughter likes puzzles just as much as her father and spends quite some time designing her own.

Last weekend, while just fiddling with some standard dice, she worked out that she could stack them, one on one, so that the total obtained from the numbers on one face of the stack was the same for all four faces when she used the following rule:

Take the number on one face of the first dice, add to it twice the number on the corresponding face on the second dice, three times the number on the third dice, and so on.

She made a stack and showed it to her father. After some thought and a few calculations, Joe told her that by adding a few more dice his total would be six times hers.

How many extra dice did Joe have in mind?

15 April 2015

Posted by on **From New Scientist #1420, 6th September 1984** [link]

The campaign to Brace Up Moral Standards is run by a six-person committee, who elect a president from among themselves. Each person casts three votes. On the last occasion each voted for three persons and each person totalled a different number of votes.

Lord Luvaduck Love finished higher than Miss Marriage, who voted for herself. Tansy Tickell, the romantic novelist, fared better than the Reverend Cuthbert Custard, who did not vote for himself. Peregrine Prunes voted for Miss Marriage. Sylvia Slap, the agony aunt, voted for herself. Love did not vote for Tickell. No one votes for Love and Marriage; no one for Slap and Tickell; and no one for Prunes and Custard.

How many votes did each of these bracing persons receive?

14 April 2015

Posted by on This puzzle has been getting a lot of attention recently, for example on the **Guardian** and **BBC** websites. It is quite similar to some of the **Enigma** puzzles published here.

Here it is slightly paraphrased to improve readability:

Albert and Bernard have just become friends with Cheryl, and they want to know when her birthday is.

Cheryl gives them a list of 10 possible dates, one of which is her birthday:

May 15, May 16, May 19,

June 17, June 18,

July 14, July 16,

August 14, August 15, August 17.Cheryl then says she is going to tell the month of her birthday to Albert (but not to Bernard), and the day of her birthday to Bernard (but not to Albert). She does this.

The following conversation then took place:

Albert:I don’t know when Cheryl’s birthday is, but I know that Bernard does not know either.

Bernard:I didn’t know when Cheryl’s birthday is, but now I do.

Albert:Then I also know when Cheryl’s birthday is.So, assuming they are all telling the truth and are all perfect logicians and have no further information, when is Cheryl’s birthday.

13 April 2015

Posted by on **From New Scientist #2397, 31st May 2003**

George created a novel jigsaw by dissecting a wooden rectangle into 13 square pieces. The pieces had sides which were all different whole numbers of centimetres, and two had sides which are consecutive integers. They fit together in the arrangement shown, but you should not assume that the pieces are drawn to scale.

George’s mother found the squares lying around, and arranged them all together neatly to form a rectangle, with the same dimensions as George’s, but not in his arrangement. All seven of George’s edge pieces were also edge pieces in his mother’s jigsaw, but her layout had one more edge piece.

What were the dimensions of that piece?

11 April 2015

Posted by on **From New Scientist #1419, 30th August 1984** [link]

The Returning Officer was a terrible tease. After the votes had been counted he addressed the three candidates as follows: “By a strange coincidence each of you has polled a number of votes which is a perfect square. I have told each candidate separately how many votes he received — you all got some I am pleased to say. The winner got exactly 50 per cent of the votes cast. As you know the total electorate is 1000″. He then asked each candidate in turn if he could deduce the full result.

The Amity candidate said: “I cannot even deduce the percentage turnout”.

The Brotherhood candidate then said: “I know how many votes were cast for each candidate”.

The Comradeship candidate said: “So do I”.

The Amity candidate then said: “So do I now”.

The three candidates were of course perfect logicians and entirely honest.

How many votes did each receive?

9 April 2015

Posted by on
7 April 2015

Posted by on **From New Scientist #1418, 23rd August 1984** [link]

There were six people in the room. The farmer said “Of the remaining five people here the accountant and the chemist are friends, the accountant and the butcher are friends, the butcher and the chemist are friends, the chemist and the dentist are friends, and the butcher and the engineer are friends. No other pair of the five are friends”.

Mr Fox said: “of the five remaining people here Mr Allen and Mr Brown are friends, Mr Brown and Mr Cook are friends, Mr Cook and Mr Davies are friends, and Mr Davies and Mr Easton are friends. No other pair of the five are friends”.

Fred said: “of the five remaining people here Andrew and Brian are friends, Brian and Charles are friends, Charles and David are friends, Brian and David are friends, Andrew and Charles are friends, and David and Edward are friends. No other pair of the five are friends”.

The butcher is not called Charles nor Davies, and Charles’s surname is not Cook. Write down the names of the six people (christian name and surname) in alphabetical order of occupation.

5 April 2015

Posted by on **From New Scientist #2399, 14th June 2003**

Six children are sitting at three tables: Amber and Ben at one, Christine and Dick at a second and Eric and Frances at a third. Initially the children are all visible, but every now and then one of them becomes invisible to the others, until all six are invisible. However, each chid is unaware that he or she has become invisible, so each sees only five disappearances.

They each remember the distribution of children at the tables throughout the event. Amber’s report is 122, 112, 012, 011, 001. In other words, after the first disappearance she saw there was a table with one child and two tables with two children … after the fifth disappearance she saw there were two tables with no children and one table with one child. Ben’s report is 122, 112, 012, 002, 001. Christine and Dick each gave the same report 122, 112, 111, 011, 001. Eric’s report is the same as Amber’s. Frances’s report is 122, 022, 012, 011, 001.

Who was the fourth child to disappear, the fifth and sixth?

3 April 2015

Posted by on **From New Scientist #1417, 16th August 1984** [link]

Picnicaria’s independence is to be celebrated by a triumph of technological virtuosity, a Cubic stamp-sheet, which you are asked to design. Let me explain. The “sheet” will look like a cubic die, with a square postage-stamp forming each of the six faces, and with perforations along each of the 12 edges. The whole object of the exercise is to enable the customer to stamp a letter or parcel with a postage of any whole number pence from 1 up to

Nby tearing along suitable perforations and thus getting aconnectedset of one or more stamps which add up to exactly the right amount.Nis to be made as large as possible.How large can

Nbe? And what values have the stamps on the various faces?(The easiest way to specify a layout is to give the values of opposite faces: e.g. a layout like that of an ordinary die is “1/6, 2/5, 3/4″, giving

N=21).

1 April 2015

Posted by on **From New Scientist #2400, 21st June 2003** [link]

Joe tries to maintain his daughter’s interest in logic by making up a puzzle for her to solve each weekend. Last weekend he gave his daughter a small bag of marbles and then arranged 9 egg cups in a 3 by 3 square. Each egg cup could hold up to a dozen marbles and her problem was to put as many in the centre cup as she could, leaving all the others empty. But she had to follow a rule.

If marbles were put into or removed from any one egg cup then the same number of marbles had to be put into or removed from all directly adjacent cups. For example, if one marble was place in, or taken out of, a corner cup, then one marble had to be placed in, or taken out of, each of the two cups directly adjacent to it.

Eventually Joe’s daughter managed to end up with marbles in the centre cup only.

How many marbles were in that cup?

30 March 2015

Posted by on **From New Scientist #1416, 9th August 1984** [link]

Sheik Inbed the Terrible is in transports of delight, having just placed an order for some Cadillacs, more Mercedes and yet more Rolls Royces. If you take these three numbers of cars and add them together, you get the number of his wives. If, instead, you multiply them together, you get the number of his camels, which happens to be 3150.

No doubt you would like to know how many Rolls he has ordered. Well, do you know how many wives he has? No? Never mind — you could not deduce the number of Rolls, even if you did.

Let me just add, however, that, if you knew the number of wives and I threw in the fact that there are less than half that number of Rolls ordered, then you could deduce the exact number.

So how many Rolls has the terrible fellow ordered?

28 March 2015

Posted by on **From New Scientist #2401, 28th June 2003** [link]

Eight teams entered a knockout football competition. Extra time, where necessary, ensured that there were no draws. Four goals were scored in the final, but fewer than that in each of the other games. The scores in the two semi-final matches were the same. Illustrated below is part of the table of the total goals scored against and for each team.

In the entries show, digits have been consistently replaced by letters, different letters being used for different digits.

Which four teams got through to the semi-finals of the competition?

26 March 2015

Posted by on **From New Scientist #1415, 2nd August 1984** [link]

The following long division sum with most of the figures missing comes out exactly:

Find the correct figures.

24 March 2015

Posted by on **From New Scientist #2402, 5th July 2003** [link]

My daughter Monica has been calculating the sums of the numbers 1, 2, 3, 4, … to give totals 1, 3, 6, 10, …, the so-called “triangular numbers”. She then showed me something she had written down (see diagram).

She pointed out that each of the rows was a three-figure triangular number and that the grid was symmetrical (with the first row equal to the first column, and so on). However, the leading diagonal gave 733, which is not a square. She wanted to construct another [grid] of the same type but with the leading diagonal a square.

Can you?

22 March 2015

Posted by on **From New Scientist #1414, 26th July 1984** [link]

I have in mind a five-figure number. It satisfies just one of the statements in each of the triples below.

The sum of its digits is not a multiple of 6.

It is divisible by a number whose units digit is 3.

Its middle digit is odd.The sum of its digits is odd.

It has a factor which is not palindromic.

It is not divisible by 1001.It has two or more different prime factors.

It is not a perfect square.

It is not divisible by 5.What is the number?

Due to industrial action **New Scientist** was not published for 5 weeks between 19th June 1984 and 19th July 1984.

This brings the total number of *Enigma* puzzles available on the site to 804, just over 45% of all *Enigma* puzzles published.

20 March 2015

Posted by on **From New Scientist #2403, 12th July 2003** [link]

George has written down a proper fraction whose numerator and denominator each have four digits, and has calculated the corresponding decimal fraction, thus:

All the digits of the fraction and its decimal equivalent have been replaced by # marks. Moreover, the bar over the decimal expression indicates that its value comprises one decimal digit that is followed by a recurring decimal with a seven-digit cycle.

The numerator, the denominator and the non-recurring decimal digit include nine different digits.

If the numerator is a prime, what are the seven digits under the bar?

## Recent Comments