# Enigmatic Code

Programming Enigma Puzzles

## Puzzle 7: The Woogle on the wardrobe

From New Scientist #1058, 30th June 1977

I thought Professor Knowall looked at me rather strangely as I came into the office one day.

“You don’t look, my dear Sergeant Bungle”, he said, “as though you have had a very good night’s sleep”.

I was amazed by his perception. In a flash he had seen not only that I was not feeling quite myself, but also why. The least I could do, I felt, was to give him more information about the sleepless night thats I had been having.

The last few nights had been rather windy. I had heard, as I lay in bed, an intermittent high-pitched squeak, and a regular dull thud.

I got out of bed, clasped with one hand the woogle that hangs outside my wardrobe and with the other the chumph that is loose on the top of my chest of drawers, and steadied with my foot the pollux, which is normally free to move around the floor on casters. The thud stopped, but the squeak continued.

I kept hold of the chumph, seized with my other hand the Venetian blind, and transferred my foot to the rocking chair. The squeak stopped and there was still no thud.

I then kept hold of the Venetian blind, seized the woogle once more and took my foot off the rocking chair. The thud started up again, but there was no squeak.

But what could I do? I know that the Professor would approve of my making these experiments, but not many can control woogles, chumphs, polluxes’, Venetian blinds and rocking chairs, all at once, and I had been unable to come to any conclusions as to what caused the noises.

The professor, with the information that I had given him, solved the problem in less time than it takes to steady a pollux with a foot.

What can you say about the causes of the two noises?

Happy Christmas from Enigmatic Code!

[puzzle7]

### 2 responses to “Puzzle 7: The Woogle on the wardrobe”

1. Jim Randell 25 December 2019 at 8:19 am

This Python program solves the problem using the observation that a noise must be made by something that is not held when the noise is heard, but is held when the noise stops. Calculating the culprits for each kind of noise leads us to a single suspect in each case. It runs in 81ms.

Run: [ @repl.it ]

```from enigma import intersect, printf

# situation 1:
# W + C + P = no thud, squeak
s1 = set('WCP')

# situation 2:
# C + V + R = no thud, no squeak
s2 = set('CVR')

# situation 3:
# W + V = thud, no squeak
s3 = set('WV')

def solve(positives, negatives):
# the thing that makes the noise must be one of the things that is
# held when it stops (positives), but not one of the things that is
# held when it continues
return intersect(positives).difference(*negatives)

# the thud must be being made by something that was held when
# the thud stopped (s1 and s2), but not something that was held
# when there was a thud (s3)
thud = solve([s1, s2], [s3])

# the squeak must be being made by something that was held when
# the squeak stopped (s2 and s3), but not something that was
# held when there was a squeak (s1)
squeak = solve([s2, s3], [s1])

printf("thud = {thud}, squeak = {squeak}")
```

Solution: The thud is caused by the chumph. The squeak is caused by the Venetian blind.

2. Hugh Casement 25 December 2019 at 11:18 am

Or, as a van doing the rounds in Belfast proclaims, a venetion blind.
The company also does verticles. Confirms my opinion that English was abolished in schools here a generation ago (so it’s a bit like the blind leading the blinds).

A verry merry Yule to all you puzzlers out there,
and thanks to Jim for his sterling work in providing solutions and explanations throughout the year.

This site uses Akismet to reduce spam. Learn how your comment data is processed.