Draw a finite-state machine for tennis scoring. The rules of tennis are as follows:
To win, you need at least four points and you must have at least two points more than your opponent. Start with a
state (0, 0), indicating that no one has scored yet. Then add a state (1, 0), meaning that A has scored. Label the arc
from (0, 0) to (1, 0) with an A. Now add a state (0, 1), indicating that B has scored, and label the arc from (0, 0)
with a B. Continue adding states and arcs until all the possible states have been included.