Take the program
This should randomly remove some a atoms before printing the number of a atoms and terminating. However, with your optimisations, it repeats the a+c->c rule either 0 or as many times as it can before any other rule, meaning it only outputs 10 or 0.