# Enigmatic Code

Programming Enigma Puzzles

## Puzzle 20: “I do not wish to be, I’d like to add”

From New Scientist #1071, 29th September 1977 [link]

I do not wish to be,
Being is a matter of degree,
I know this well,
But my decision just to be no more
It comes from an experience of life second to none.
It means that I have said, no love, no laughter,
Mechanisation’s what I want and see what follows after.
It leads to certainty, and that is what I have a passion for,
“Why yes, perhaps it is, perhaps it is not”, no more, no more.
For now the great adventure, the hour when I cease to exist,
And just become a computer, no life but also no risk.
Perhaps you this my no-life has no future.
To show you’re wrong I offer you a test.
Letters for digits, add something to “COMPUTER”
And you will find certainty, peace and rest. Write the sum out with numbers substituted for letters.

[puzzle20]

### 2 responses to “Puzzle 20: “I do not wish to be, I’d like to add””

1. Jim Randell 19 June 2019 at 9:54 am

This is a straightforward alphametic sum that can be solved directly by the [[ `SubstitutedSum()` ]] solver in the enigma.py library.

This command line runs in 151ms.

Run: [ @repl.it ]

```% python -m enigma SubstitutedSum "COMPUTER + TAPRURCR = COAXOXPRO"
(COMPUTER + TAPRURCR = COAXOXPRO)
(10248935 + 96458515 = 106707450) / A=6 C=1 E=3 M=2 O=0 P=4 R=5 T=9 U=8 X=7
```

Solution: The sum is: 10248935 + 96458515 = 106707450.

2. GeoffR 20 June 2019 at 3:02 pm
```% A Solution in MiniZinc
include "globals.mzn";

%   C O M P U T E R
% + T A P R U R C R
%------------------
% C O A X O X P R O
%------------------

var 1..9: C; var 1..9: T; var 0..9: O;
var 0..9: M; var 0..9: P; var 0..9: U;
var 0..9: E; var 0..9: R;
var 0..9: A; var 0..9: X;

constraint all_different ([C, O, M, P, U, T, E, R, A, X]);

% Column carry digits from far right column
var 0..1: c1; var 0..1: c2; var 0..1: c3;
var 0..1: c4; var 0..1: c5; var 0..1: c6;
var 0..1: c7; var 0..1: c8;

% Adding columns from right hand side, with carry digits
constraint (R + R) mod 10 == O /\ (R + R ) div 10 == c1;
constraint (E + C + c1) mod 10 == R /\ (E + C + c1) div 10 == c2;
constraint (T + R + c2) mod 10 == P /\ (T + R + c2) div 10 == c3;
constraint (U + U + c3) mod 10 == X /\ (U + U + c3) div 10 == c4;
constraint (P + R + c4) mod 10 == O /\ (P + R + c4) div 10 == c5;
constraint (M + P + c5) mod 10 == X /\ (M + P + c5) div 10 == c6;
constraint (O + A + c6) mod 10 == A /\ (O + A + c6) div 10 == c7;
constraint (C + T + c7) mod 10 == O /\ (C + T + c7) div 10 == c8;
constraint C == c8;

solve satisfy;

output [show(C),show(O),show(M),show(P),show(U),show(T),show(E),show(R)
++ " + " ++ show(T),show(A),show(P),show(R),show(U),show(R),show(C),show(R)
++ " = " ++ show(C),show(O),show(A),show(X),show(O),show(X),show(P),show(R),show(O)];

% 10248935 + 96458515 = 106707450
% time elapsed: 0.02 s
% ----------
% ==========
% Finished in 253msec
```

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