Algorithms For Simple Temporal Reasoning