## On the Optimization of Alphabetical Ruling

I used to rule the world - Unfortunately I gave it too little care.

Use the letter to find the rule to modify the digit displayed. Afterwards, modulo this result by 10 by adding or subtracting 10 until it is within the range of 0-9. If after modulo 10, the value is 0, the actual value is 1. Press the button corresponding to that value. Do this 3 times to disarm.

### Case: Simple Modifiers, No Edgework

E | Add 0. | F | Modulo the digit by 6. | G | Add 1. |
---|---|---|---|---|---|

O | Add 1. | W | If the digit is even, the value is 1. Otherwise the value is 5. | Z | Add 1. |

### Case: Simple Modifiers, No Conditions, Edgework Required

A | Subtract the last digit of the serial number. | B | Add the number of Parallel ports. | C | Add the number of battery holders. |
---|---|---|---|---|---|

D | Subtract the number of AA batteries. | H | Add the number of PS/2 ports. | I | Subtract the number of OmegaForget modules on the bomb. (Most of the time, you're subtracting by 0.) |

K | Add the number of indicators. | M | Add the number of modules. | P | Add the number of serial ports. |

S | Add the sum of digits in the serial number. | U | Add the number of digits in the serial number. | X | Add the sum of the number of batteries and battery holders. |

Y | Subtract 1, then add the number of port plates. | R | Add the number of D batteries and PS/2 ports. Then subtract the sum of digits in the serial number. Take the absolute value of this result. |