Question

An elevator in a three-story building services floors 1, 2, and 3. Input consists of a signal to the elevator of an up-or-down request (U or D) together with the floor from which the signal originates. The elevator responds to an input signal by moving to the correct floor. For example, when the elevator is on floor 1 and receives a D-3 signal, it moves to floor 3. Draw a state graph for a finite-state machine that describes the elevator behavior.

Solution

Verified

Step 1

1 of 4

Let us define the state of the finite-state machine as:

s0s_0=Elevator is on floor 1

s1s_1=Elevator is on floor 2

s2s_2=Elevator is on floor 3

When we are on floor 1, then we can only request to move up and thus the only possible request from floor 1 is U1U-1.

\bullet If the elevator was at floor 2, then the elevator needs to move to floor 1 and thus we require an arc from state s1s_1 to state s0s_0 with label U1U-1.

\bullet If the elevator was at floor 3, then the elevator needs to move to floor 1 and thus we require an arc from state s2s_2 to state s0s_0 with label U1U-1.

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Recommended textbook solutions

Related questions