# Chapter 1: Regular Languages

## Chapter 1.1, Finite Automata

### Lecture Problem

• Design a finite automaton that accepts any non-negative base 10 integer that is evenly divisible by 5.
• What is Q? (a finite set of states)
• What is Σ? (a finite set called the alphabet)
• What is δ? (Q × Σ —> Q is the transition function)
• What is q0? (the start state)
• What is F? (the set of accept states)
• Note: A finite automaton is a 5-tuple (Q, Σ, δ, q0, F).

### Active Learning Problem

• Draw a finite automaton that models a simple elevator. The elevator starts on the first floor and can be on either the first floor or the second floor. There is one switch in the elevator that controls the elevator, and it has three positions: go up, go down or remain stationary. At each time step, the controller checks the current floor and the current input and then changes floors in the obvious way.
• What is the 5-tuple that describes your finite automaton?

### Active Learning Problem

• Repeat the lecture problem for non-negative base 2 integers.