### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,123)
- misc (2)
- project euler (2)
- puzzle (31)
- site news (43)
- tantalizer (31)
- teaser (3)

### Site Stats

- 168,355 hits

Programming Enigma Puzzles

25 January 2017

Posted by on **From New Scientist #1043, 17th March 1977** [link]

If you ever take a holiday on the little island of Mandible, be sure to sample the local food. The basic element is a squash, called a Tiddly, which sells at KL francs per portion. One of these together with a Widdly and an Om make a satisfying meal for LJ francs. But you do not have to have a Tiddly every time and there is much to be said for having just the Widdly and the Om, in which case the dish will cost JL francs. Yet, the Widdly being a bug-eyed lizard and the Om a fried roll filled with peppered ants, you might do well to order a Pom too, thus raising the cost from JL to KM francs. Finally there is the famous Mandible Monster, which consists quite simply of Tiddly, Widdly, Om and Pom and costs MK francs.

Mandible money is straightforward so I have tried to confuse you by replacing digits with letters. Thus JK means 10×J + K and so on.

My own favourite dish is the Tiddly Om Pom (which I had previously supposed to be the French for a drunken man and an apple). In plain digits, what does it cost, given that a Widdly costs J francs more than an Om?

[tantalizer492]

Advertisements

%d bloggers like this:

We can determine values for a Tiddly, an Om and a Pom and then add them together to get the answer.

Here I’ve used the

SubstitutedExpression()solver from theenigma.pylibrary. It runs in 84ms.Solution:A Tiddly Om Pom costs 59 francs.The full menu is:

If allow negative prices there is a second solution:

But this is disallowed as we are told adding a Pom raises the price of the dish.

Here’s the problem as a MiniZinc model. This also executes in 83ms.