You are on page 1of 3

Page 1 of 3

IZMIR ECONOMY UNIVERSITY CE 308 Midterm 2, Fall 2017


Student ID: ________________Full Name: _____________________Signature:_____________Section:___

Instructions: Write your answers clearly in the space provided, or in the back of the sheets.

1. (10pts) What is the regular expression for all binary strings that start with 01 and end with 110?

2. (10pts) Order the following automata, grammar, and language types by expressive power in
ascending order. Indicate when equal as in e < b = c = d < a < f = g
a. CFL b. PDA c. Regular Expression d. DFA e. NFA, f. deterministic TM g. non-deterministic TM

3. (10pts) List all possible paths (state sequences) on input 0101 for the NFA below; mark each path as
accepting, rejecting, or dead-end.

0,1

 0 1
q’0 q0 q1 q2
Page 2 of 3

4. (10pts) Trace all possible paths for the Turing machine below on input #baab, Mark each path
as accepting, dead-end, or rejecting. Use the instant descriptor notation e.g., (q0#baab) for
starting configuration.

q1 q2 q3

5. (20pts) Convert the following CFG with start symbol S into Chomsky Normal Form:
S => BSB | B | ε
B => 00 | ε
Page 3 of 3

6. (20pts) Design a PDA that recognize {0n1n |n>=0}

7. (20pts) Design a PDA that recognize {0n12n |n>=0}

8. (20pts) Prove or disprove that there exists a Turing machine that can decide the language
{M| M is a Turing machine that halts on all inputs}

You might also like