Automata and regular languages
導入済み
語彙
| English | 意味 |
|---|---|
| deterministic finite automaton | A finite-state machine with one transition for each state and input symbol. |
| pumping lemma | A necessary property of regular languages used to prove that some languages are not regular. |
English
The table machine
- A deterministic finite automaton is states plus a transition table: read a symbol, move, accept or reject at the end of input. The course DFA accepts strings over $\{a, b\}$ ending in $ab$.

{exercise:uni-cs1101-dfa}
実践
The course DFA on input aba ends in state —
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
q0-a-q1, q1-b-q2, q2-a-q1: ends q1, rejected (q2 accepts, not q1).
English
The pumping ceiling
- The pumping lemma: any long accepted string splits $xyz$ with $|xy| \le p$, $|y| \ge 1$, and every $xy^iz$ accepted — so $L = \{a^n b^n\}$ is NOT regular: pump $y$ (all $a$'s) and the count breaks.
- Regular languages cannot count unboundedly — memoryless is the ceiling.
{exercise:uni-cs1101-pumping}
実践
The pumping lemma shows a^n b^n is not regular because —
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
y lies in the a-block; pumping changes the count of a without b.
English
Traces, exactly
aababwalks q0→q1 (a), q1→q1 (a), q1→q2 (b), q2→q1 (a), q1→q2 (b) — accept.abawalks q0, q1, q2, q1 — reject (ends mid-pattern).- Regex
ab|baas an NFA guesses the branch; the subset-construction DFA tracks both possibilities at once — determinisation can square the state count.
{exercise:uni-cs1101-trace}
実践
The trace of aabab in the ends-in-ab DFA is —
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
a:q1, a:q1, b:q2, a:q1, b:q2 - accept.