# Enigmatic Code

Programming Enigma Puzzles

## Enigma 526: Ewe to move

Each of the four fields at Sunny Meadows Farm contains some sheep and some cows. On the gate of each field is hung a sign saying what fraction of the animals in that field are sheep. The signs are 1/2, 1/3, 2/3, 1/4.

Farmer Gillian explained that if she exchanged the signs on [any] two of the fields then, by simply moving some sheep from one of the two fields to the other, she could return to a situation where each sign again correctly indicated the fraction of the animals that were sheep in that field.

As I walked round I noticed that the total number of animals on the farm was between 300 and 350.

How many sheep, and how many cows, were on the farm?

I added the “any” in square brackets, as without it there are many solutions to the puzzle.

[enigma526]

## Tantalizer 430: Hop, skip and jump

From New Scientist #981, 1st January 1976 [link]

To shake down the plum pud, the five adults held three post-prandial athletic events. Each competitor scored the number of the place gained in each event, with the aim of totalling as few points as possible overall. Thus Uncle Arthur came second in the hop and scored 2 points for it. There were no ties in any event or in the overall totals and no one took the same place in two or more events.

Aunt Barbara, although bottom in one event, was top at skipping, Mother having been forced down to third place by a fit of hiccoughs. Father did better than Uncle Charlie at hopping. Uncle Arthur did not win the jumping. Mother did better at jumping than at hopping. Aunt Barbara was not second overall. The overall winner did not win the hopping.

As your post-prandial exercise, would you care to list the order in each event?

The puzzle can be solved as presented, but has two solutions. To arrive at the published single solution we seem to need an extra fact — “Uncle Arthur finished in third place overall”.

#### News

This puzzle completes the archive of Tantalizer puzzles from 1976. There is a full archive from this puzzle to the final Tantalizer puzzle in May 1977 (when the Puzzle series started).

[tantalizer430]

## Tantalizer 434: Limited editions

From New Scientist #985, 29th January 1976 [link]

Boremaster’s commentary on Hegel being a basic book, our library has several copies. It is not exactly a jolly read, as you will know if you have ever waded through its 36 chapters, but is much in demand on the ground that it is less painful than Hegel himself. Even so I was surprised to meet my friend Jones leaving the library with three copies under his arm.

“Steady on, old bean!” I exclaimed, “there are other readers to think of.”

“The other copies are all on the shelf”, he replied airily, “but I had to take three to get a complete text. Some rotter has snipped whole chapters out of every copy.”

“Well, surely two copies would have done?”

“No. No two copies would yield a full text.”

“Do you mean that I shall have to check every copy, if I want to be sure of a full text?”

“Oh no. Just take any three at random, as I did. You are bound to get a full text, even through no chapter is present in all copies. For each pair of chapters there is at least one copy with only one of them.”

For this to be true, how few copies need the library have in total?

[tantalizer434]

## 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]

## Puzzle 40: The washing machine that didn’t

From New Scientist #1091, 23rd February 1978 [link]

“A detective is what I am, my dear Sergeant Simple”, as Professor Knowall has so often said to me.

“And detection is what I am interested in, even though the facts and objects to which you call my attention may appear to be only trivial and unimportant pawns in the game of life”.

When the mystery of the washing machine, therefore, was brought to my notice it seemed reasonable to take the professor at his word and put the facts before him.

This machine, I’m afraid, was not the washing machine it had been. Errors, inefficiencies and failure to wash had somehow crept in. I did not feel, however, that I could reveal the terrible things that this machine had been doing and I therefore decided that a screen of anonymity was required.

And so neatly anonymous did I make it that the results looked like this:

1. D, E is followed by q, r;
2. B, C, E is followed by q, s, t;
3. A, C, D is followed by p, t.

I showed this proudly to the professor, but I am afraid that his reaction was disappointing.

“Can’t you ever get things right, Sergeant?”, he said.

It is a humble Simple who has to confess to his public that the professor was once more quite right. There was one mistake in the causes, i.e., in the capital letters, so that to get it right one either has to cross one out or add another one (say, F).

On the assumption that each of the faults are caused by single events and not by two or more in conjunction or separately, what can you say about Sergeant Simple’s mistake and about the causes of the various defects?

[puzzle40]

## Teaser 2503

From The Sunday Times, 12th September 2010 [link]

George has placed two vertical mirrors touching each other, with an angle between them. He has also placed a small cube between the mirrors and counted how many images there are of it in the mirrors. (For example, if the mirrors had 90 degrees between them, there would be three images). He wrote down two whole numbers – the angle between the mirrors, in degrees, and the number of images of the cube. When Martha saw the two numbers, she commented that their product, appropriately, was a perfect cube.

What was the angle between the mirrors?

Note: After much discussion of this puzzle, regular solvers of The Sunday Times Teaser puzzles have decided that the puzzle is flawed, and there is not enough information given to arrive at a unique solution. Nevertheless the puzzle has some interesting aspects to it.

[teaser2503]

## Enigma 460: Tear me off a strip

From New Scientist #1611, 5th May 1988 [link]

I had a rectangular block of stamps four stamps wide. I tore off one stamp. Then I tore off two stamps. Then I tore off three stamps, and so on, and so on. Each time, the stamps which I tore off formed a rectangle of their own, in one piece. And, following this pattern, the last piece I required (which needed no tearing off because it exhausted my supply of stamps) was also a rectangle. And only when I was forced to was any of these rectangles a strip one stamp wide. (So, for example, the four stamps and the subsequent non-primes were not in thin strips).

Each time, after tearing off the stamps, the remaining stamps were in one piece and formed either a rectangle or an L-shaped piece.

[enigma460]

## Tantalizer 456: Square deal

From New Scientist #1007, 1st July 1976 [link]

Feeling mortal, Lord Woburn summoned his daughters, Alice and Beatrice, to hear about his will. “I have decided to leave you my hippos”, he announced. “There are either 9 or 16 of them but you do not know which. Each of you will inherit at least one and I shell tell each of you privately how many the other will be getting”.

He was as good as his word. “How many shall I be getting?” Alice asked Beatrice nervously afterwards. Beatrice refused to say but asked, “How many shall I be getting?”. Alice refused to say and again asked, “How many shall I be getting?”. You should know that each lady is a perfect logician, who never asks a question she knows or can deduce the answer to.

I think this proves that a square deal on the hippopotonews is equal to the sum of the squaws on the other two sides. At any rate how many hippos was each to receive?

The puzzle as presented above is flawed, in that the situation described would not arise. An apology was published with Tantalizer 460.

[tantalizer456]

## Tantalizer 464: Pentathlon

From New Scientist #1015, 26th August 1976 [link]

The Pentathlon at the West Wessex Olympics is a Monday-to-Friday affair with a different event each day. Entrants specify which day they would prefer for which event — a silly idea, as they never agree.

This time, for instance, there were five entrants. Each handed in a list of events in his preferred order. No day was picked for any event by more than two entrants. Swimming was the only event which no one wished to tackle on the Monday. For the Tuesday there was just one request for horse-riding, just one for fencing and just one for swimming. For the Wednesday there were two bids for cross-country running and two for pistol-shooting. For the Thursday two entrants proposed cross-country and just one wanted horse-riding. The Friday was more sought after for swimming than for fencing.

Still, the organisers did manage to find an order which gave each entrant exactly two events on the day he had wanted them.

In what order were the events held?

I don’t think there is a solution to this puzzle as it is presented. Instead I would change the condition for Thursday to:

For Thursday two entrants proposed cross-country and just one wanted fencing.

This allows you to arrive at the published answer.

[tantalizer464]

## Tantalizer 465: Decline and fall

From New Scientist #1016, 2nd September 1976 [link]

Paul Pennyfeather, you will recall from Evelyn Waugh’s novel, was sent down from Oxford and went to teach in Dr Fagan’s horrid school at Llanaba Abbey. There he found that a class of the beastliest boys could be kept quiet till break by offering a prize of half a crown for the longest essay, irrespective of all possible merit. Now read on:

“Sir”, remarked Clutterbuck after break, “I claim the prize”.

“But you”, Paul protested feebly, “have written only one-third as many words as Ponsonby, one-fifth as many as Briggs and one-eighth as many as Tangent”.

“Nonetheless, Sir, Dr Fagan would certainly wish me to have the prize”.

And so it proved. You might also like to know that the oldest of these four boys wrote 2222 more words than the second oldest and used more full stops in his essay than any of them who wrote less words than the youngest.

Where was Clutterbuck in the order of age, and how many words did he write?

[tantalizer465]

## Tantalizer 476: Take your partners

From New Scientist #1027, 18th November 1976 [link]

Amble, Bumble, Crumble and Dimwit had a jolly night of it at the Old Tyme ball. Each took his wife but did not dance with her. In fact each danced only three dances, changing partner each time, and spent the rest of the night in the bar.

In the Cha-Cha Amble danced with a wife larger than Mrs A and Bumble with a wife larger than Mrs B. Then came the rumba, with Crumble in the arms of a wife larger than Mrs C. Then they did the tango, in which Bumble had a wife smaller than Mrs B and Mrs B was squired by a man fatter than Amble. These were the three dances mentioned and no two men swapped partners [with each other] between the Cha-Cha and the rumba or between the rumba and the tango. No two wives are the same size.

What were the pairings for the rumba?

[tantalizer476]

## Enigma 401: Uncle bungles the answer

From New Scientist #1551, 12th March 1987 [link]

It is true, of course, that there are rather a lot of letters in this puzzle, but despite that I though that for once Uncle Bungle was going to write it out correctly. In fact there was no mistake until the answer but in that, I’m afraid, one of the letters was incorrect.

This is another addition sum with letters substituted for digits. Each letter stands for the same digit whenever it appears, and different letters stand for different digits. Or at least they should, and they do, but for the mistake in the last line across.

Which letter is wrong?

Write out the correct addition sum.

As it stands the puzzle has no solution. New Scientist published the following correction with Enigma 404:

Correction to Enigma 401, “Uncle bungles the answer”. Unfortunately, as a result of a printer’s error, New Scientist managed to bungle the question. We will publish the correct question, in full, in our issue of 9 April, as Enigma 405. In the meantime, our apologies to those who were thwarted by the mistake.

[enigma401]

## Enigma 390: Which statements are false?

From New Scientist #1539, 18th December 1986 [link]

Each of the following six statements is true or false or we cannot say whether it is true or false.

(1) Either 2 or 3 is the first true statement in the list of six.
(2) We can say both 4 and 5 are true.
(3) 6 is false and/or 4 is true.
(4) 1 is true and/or 6 is true.
(5) 3 is false and/or 1 is true.
(6) Both 2 and 5 are true.

Which of the six statements are false?

[enigma390]

## Enigma 321: Going to pieces

From New Scientist #1469, 15th August 1985 [link]

I have a puzzle consisting of eight jigsaw type pieces. Each sturdy piece has been cut from a piece of card 2 inches by 3 inches, by removing one or more of the six 1 inch by 1 inch squares into which it can be divided. For example, one of the pieces is as shown:

The card is the same on both sides and the pieces can be used either way up. For three-quarters of the pieces (like the one shown) this is no advantage, but the other pieces are different when turned over. No two pieces of the puzzle are the same.

The pieces can all be put together to form a large rectangle and, although this can be done by several different arrangements of the pieces, you can only get a large rectangle of one particular size.

What is the size of the large rectangular jigsaw which we can make?

[enigma321]

## Enigma 267: Just one at a time

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.

[enigma267]

## Enigma 251: Could deece be love?

From New Scientist #1398, 23rd February 1984 [link]

“… She loves me … she loves me not … she loves me …”

The voice, Alice decided, was coming from behind the privet hedge. Peering over she saw a squat figure rolling a cube. He stopped and appeared to concentrate deeply as he counted on his fingers. “She loves me not!” he declared suddenly, and he picked up the cube to throw again. Alice coughed politely and the figure looked up. It was the red knight.

“Bless me!” he exclaimed.

“Oh, I do hope I didn’t disturb you, it’s just I did wonder …”

“What I was doing? Well I’m playing a game with this deece, of course!”

“Deece?” enquired Alice.

“Gracious, surely you know what a deece is. Like dice only it has two ‘sixes’ and no ‘one’.”

“But that’s cheating.”

“Not at all, it makes things much more exciting. Now where was I? Oh yes, I keep rolling the deece until the product of all the throws contains the number of the last throw. So if my score was 120 and I threw a three then the matter would be resolved.”

“The matter?”

“Courtship, my girl. Whether she loves me or not.”

Alice felt it wrong to ask who “she” was.

“Why, one thousand five hundred and … confound it, you’ve made me forget the rest. Let’s see, this last throw was … yes … and the one before it was a three …”

Alice sensing some arithmetic in the air, decided that it was time to leave.

What, meanwhile, were the throws that the knight had made so far, in the correct order?

[enigma251]

## Enigma 240: The missing *

From New Scientist #1386, 1st December 1983 [link]

In an * to economise * the wording * my Enigmas * am this * experimenting with * new system * writing. In * system I * every third * with a *. It should * be possible * work out * is being * while saving * 33 per cent of * words in * process. This * puzzle is * five men, * names are (* conveniently) Arnold, *, Cedric, Derek * Eric. All * play for * local football *. One of * is goalkeeper * the other * play at * forward, outside *, outside right * centre half. * a quite * coincidence, the * also live * a row * five terraced * next to * other. Cedric * next door * the goalkeeper. * centre forward’s * are Derek * the outside *. The centre * lives at * end of * row, next * a player * has scored * more goal * Basil (who * not live * to the {*} right). Eric * at outside *. And finally, * lives fewer * away from * than Derek * from the *.

What are * positions of * five men? (* will appreciate * in cases * the word * in doubt, * most appropriate * be used, * known!)

Note: There appears to be a misprint in the original puzzle statement. I have inserted the * in braces into this puzzle so that every third word is replaced by a *. In this form the puzzle has a unique solution, without it I could not find a satisfactory solution.

[enigma240]

## Enigma 218: Relatively speaking

From New Scientist #1364, 30th June 1983 [link]

The professor during his lecture on relativity asked: “If I am in a spacecraft travelling at half the speed of light and pass another craft travelling in the opposite direction at a quarter of the speed of light, what is our relative velocity?”

“Three quarters of the speed of light,” replied one student.

“You weren’t paying attention at my last lecture,” said the professor. “We proved that, according to the special theory of relativity, when two velocities are to be added then the result is not their sum but this,” he broke off to write $(v_1 + v_2) / (1 + v_1 v_2 / c^2)$ on the board then continued, “where c is the velocity of light — 300 000 kilometres per second.

“Is it possible for two equal rational velocities to be added so that the result is an integral number of 1000 kilometres (we shall say megametres) per second?”

“No professor,” answered a bright student. “But if the speed of light is decreased by an integral number of megametres per second then it is possible.”

“But you can’t reduce the speed of light! — It is constant,” protested the professor.

“But we can imagine it to be less,” persisted the student.

The professor then suggested the amount his student had taken as the velocity of light.

“I took it as more than that, professor.”

“In that case I calculate what you took as the speed of light and all the possible sums of the equal velocities.”

Can you?

Note: I am waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment.

[enigma218]

## Enigma 194: The plot thickens

From New Scientist #1340, 13th January 1983 [link]

“So what did you think of that?” smiled George, pulling on his coat as the titles drifted up the screen.

“I don’t know,” said Edith, still sitting with a dazed expression. “These modern films do get so involved.”

“How do you mean?”

“Well, for example, I still don’t know why they had to strangle that world famous neurosurgeon while he was in the shower.”

“That was because of the conversation he had with Boris and the heroine’s solicitor when they were flying in that damaged jet.”

“Boris was the blond chap who later watched in horror as that psychopathic psychiatrist fellow took the fatal plunge from the multi-story inferno …”

“No, no, that was Charlie.”

“So who was the bald one who was running away from that UFO thingy?”

“Oh, he was the one who was savaged by the giant shark after falling out of the boat.”

“And that was Derek, wasn’t it?”

“Wrong again, love. Derek was the man from the CIA who was peering through the eyes of that Rembrandt when somebody stabbed the chap who was mistaken for the solicitor.”

“That means,” said Edith thinking hard, “that the one who lived happily ever after must have been Alvin, the drug-smuggling baseball player.”

“My love, you’re getting very confused. Remember, Alvin snuffed it shortly after the visit from Charlie’s widow.” There was a brief silence. “So … how did Eric fit into all this?”

Since Eric was one of only five men being described in the conversation, I’m sure you can answer that, and also work out the sequence in which the characters met their fates!

[enigma194]

## Enigma 192: Merry Christmas

From New Scientist #1337, 23rd December 1982 [link]

Mr Pickwick and his friends, Mr Snodgrass, Mr Tupman and Mr Winkle spent last Christmas together. “No children this year, alas,” observed Mr Pickwick on Christmas morning, “I am very fond of children.” But just then there was a knock on the front door. Opening it, Mr Pickwick beheld more than half a dozen children, who thereupon sang God Rest Ye Merry Gentlemen. “Bless my soul!” he beamed and, fetching a tin of striped humbugs from the mantelpiece, shared them out equally and exactly among the children. The tin had once held a gross of humbugs but Mr Pickwick had already eaten some. Yet there were still enough (more than a hundred) to ensure that each child would receive more than half a dozen. In fact, if you knew how many Mr Pickwick had eaten himself, you could work out exactly how many each child got.

With the carollers gone, it was time for presents. As usual each person gave, and each received, one scarf, one pair of gloves and one bottle of port. Each gave a present to each. Mr Pickwick gave gloves to the person who gave Mr Snodgrass a scarf; and Mr Winkle gave port to the person who gave Mr Tupman gloves.

The dinner was a true feast — a sizzling goose, which weighed 8lb plus half its own weight, pursued by a pudding decked with holly and enriched with as many silver coins as you could place bishops on a chess board without any attacking any square occupied by another. Afterwards came cigars. “I would have you know”, remarked Mr Pickwick, puffing contentedly, “that if cigar-smokers always told the truth and others never did, then Mr Snodgrass would say that Mr Winkle would deny being a cigar smoker. Furthermore Mr Tupman would say that Mr Winkle would deny that Mr Snodgrass smokes cigars”. After these and other pleasant exchanges the quartet retired a trifle unsteadily to bed.

Thus were Mr Pickwick’s Yuletide jollifications exceedingly merry. He wishes similar Christmastide celebrations for revellers everywhere.

A few questions remain.

(1) How many humbugs had Mr Pickwick eaten himself?
(2) Who gave a bottle of port to whom? (four answers)
(3) What did the goose weigh?
(4) How many coins were hidden in the pudding?
(5) Was Mr Winkle a cigar-smoker?
(6) What are the four words of a, b, c, d letters in the sentences in italics [or bold] such that:
a³ – a = 20b and b² = 2bc and 2b² = c²d.

This issue of New Scientist contains an article by David Singmaster on the Rubik’s Cube [link].

#### News

This puzzle completes the archive of Enigma puzzles from 1982.

There are now 650 puzzles on the site, with a full archive from the start of Enigma in 1979 to the end of 1982 (192 puzzles) and also puzzles from January 2005 up to the end of Enigma in December 2013 (457 puzzles) — which is just over 36.5% of all Enigma puzzles.

[enigma192]