I have been given the following assignment in a discrete mathematics course:
A simplified telephone switching system allows the following strings as legal telephone numbers:
a. a string of seven digits in which neither of the first two digits are a 0 or a 1.
b. A 1 followed by a three-digit area code string (any digit except 0 or 1 followed by a 0 or 1 followed by any digit) followed by a seven digit local call string.
c. A 0 alone or followed by a three-digit area code string plus a seven-digit call string.
Design a finite-state automaton to recognize all the legal telephone numbers in a, b, and c. Include an "error state" for invalid phone numbers.
I did really well with the more simple finite-state automaton drawings, but in this example, I cannot really understand even how to begin thinking about the states and inputs. In all of the examples that I have seen, there have always been two options from each state (fx, (a or b) or (0 or 1). Should I start by having each digit be a state, and then a zero meaning it's not pressed, and a one meaning it's pressed? How do I determine the length of the call string? Any help getting started is appreciated.