#### 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.

Verified

#### Step 1

1 of 4

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

$s_0$=Elevator is on floor 1

$s_1$=Elevator is on floor 2

$s_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 $U-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 $s_1$ to state $s_0$ with label $U-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 $s_2$ to state $s_0$ with label $U-1$.

## Create an account to view solutions

#### Introduction to Cryptography

2nd EditionJohannes Buchmann

#### Mathematical Structures for Computer Science: A Modern Approach to Discrete Mathematics

6th EditionJudith L. Gersting
1,615 solutions

#### Mathematical Structures for Computer Science: Discrete Mathematics and its Applications

7th EditionJudith L. Gersting
2,287 solutions

#### Mathematical Structures for Computer Science

7th EditionJudith L. Gersting
2,287 solutions