CS411: Introduction to Computation Theory HW1

CS 411 Introduction to Computation Theory
HW1: warm-up

Assigned: W, 9/8/99
Due: M, 9/13/99

1. (convert a grammar to Chomsky normal form) Do problem 18 on page 149 of your text book (end of Chapter 5).

2. (convert a grammar to Greibach normal form) Do problem 29 on page 151 of your text book (end of Chapter 5).

3. (construct a finite automaton)

Consider the toy shown in the above figure. A marble is dropped in at A or B. Levers x1, x2, x3, cause the marble to fall either to the left or right. Whenever a marble encounters a lever, it causes the lever to change state, so that the next marble to encounter the lever will take the opposite branch.

a) Model this toy by a finite automaton. Denote a marble in A by a a-input and a marble in B as a b-input. A sequence of inputs is accepted if the last marble comes out at D.

b) Describe the set accepted by the finite automaton (in English and as a regular expression).