Theory of Computation · Week 1 · Lesson 0007 of 7

Mixed drill

Trace, factor, construct and prove across ten mixed questions.

Time 30–35 minBook §1.1–1.4Exam win Choose a method before looking at the answer choices
The win

For each problem, write down a trace, a cut, a witness, or a short proof before checking the answer.

1Warm-up

2Figures for the drill

Q5 · DFA

Start q₀. On 0 every state goes to q₀. On 1, q₀ goes to q₁, q₁ to q₂ and q₂ stays. Only q₂ accepts.
The start arrow enters q₀, and only q₂ has a double circle.

Q2 · NFA

All states accept. q₀ goes to q₁ on a and q₃ on b. q₁ and q₂ loop on a. q₃ and q₄ loop on b. q₁ goes to q₂ on b and q₃ goes to q₄ on a.
Every state has a double circle, and each nonempty run begins by taking one of the two arrows from q₀.

Q8 · DFA comparison

DFA A₁. Start accepting q₀ goes to q₁ on 1, q₂ on 0. q₁ loops on 1 and goes to accepting q₃ on 0. q₃ goes to sink q₂ on either input.
In A₁, q₀ and q₃ are accepting and q₂ is a rejecting sink.
DFA A₂. On 1, accepting start q₀ moves to q₁, and q₁ moves to q₂. Both go to q₃ on 0. q₂ loops on 1 and goes to accepting q₄ on 0. q₄ goes to sink q₃ on either input.
In A₂, q₀ and q₄ are accepting and q₃ is a rejecting sink.

Sipser, Introduction to the Theory of Computation, §1.1–1.4.

3Test a candidate answer

A counterexample to a proposed expression is a word that exactly one of the expression and the machine accepts. Start with ε and short words that take the least obvious edge. For a claim about infinitely many strings, check whether the expression can generate any word, then look for a repeated piece of positive length.

The mistake everyone makes

A familiar-looking multiple-choice option can fail on a short word or rely on an unstated condition. Evaluate it with a trace, a count, or a counterexample before accepting it.

Exam tip

When a keyed option and a printed diagram disagree, write one distinguishing input and its state trace. When an infinitude question is missing a hypothesis, state the hypothesis and give an example where the conclusion fails.

4Recap

5Check yourself

6Cheat card

Mixed drill
Machines
DFA: one state. NFA: all reachable states, including ε-closure.
Sets
Regular union needs regular inputs. Any finite intersection is regular.
Expressions
Read mandatory edges, try cuts, and produce unbounded lengths to prove infinity.
Proof
Use a witness for strictness, finite memory for regularity, and pumping to show nonregularity.
Memory hook
Trace, cut, witness, or proof. Put one on the page before choosing.
Ask your teacher for another worked example or for feedback on your own trace.