Anarit
Short for Spanish Arithmetic Analizer. This program solves the
figures part of a Spanish television challenge called "Figures and letters".
You have six numbers choosen among 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 25, 50,
75 and 100 and using the four basic arithmetic operations you try to get a
three figures target number. You can only use once each number, but you
don't need to use all of them.
Configuration
You can choose among two operation modes: normal and expert.
In normal mode you use suitable buttons to define the problem's data
and, when ready, press the Analize button to get the solution.
In expert mode you are not bound to the regular rules and you can insert
any number you want. Just put a space between every two numbers.
Solution
The program always gives you the closer number that is possible to reach;
this is for sure, as the program analize all the cases until it gets
the exact target number.
History
I developped the first version of this program in 1992, using the advice of
the Spanish AI firm EQ Sistemas Inteligentes while a was a student of
the experts systems course they dictated.
I used the C programming language and, despite that and the bunch of tricks
I thought to accelerate the running, my computer needed almost a minute solving
the most difficult problems. Now, the same C code is running on your Android
device and I guess it needs less than a second on every one. This is why I
give you the time elapsed in milliseconds.
Complexity
Besides the solution and the time elapsed you can see another piece of
information: the complexity of the search. The second number of it say how
many groups of four numbers the program got using just two operations; the
first one is how many of that groups have in fact different numbers.
To know more
You can visit my website pedroreina.net and read (in Spanish) more
detailed explanations about the search algorithm and download the source
code for you to see for yourself. The program was written in Java using the
Android SDK but also uses the NDK to reuse the legacy C code. A lot of fun!