wildbill:
Better yet, since you don't want to spend time testing, write something that lets the arduino figure it out itself.
That's probably only practical if the Arduino can be allowed to run continuously for several days, maybe for several weeks.
And it would be wise to save data to EEPROM memory or an SD Card so it is not lost if the Arduino crashes or the power fails.
Personally, I think I would like to start with some tests so I had some info with which to judge the behaviour of a more complex program. And I think it would need to be a complex program if it was to do better than a simple look-up system.
...R