Strings & Automata

Work fresh traces, diagnose invalid implementations, and identify model boundaries.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. KMP prefix-function values for "ababaca" end in what value?
2. KMP matches "abab" and then mismatches the next character. What is the purpose of falling back through the prefix table?

Select one answer.

3. Under full-match regex semantics with . and *, does pattern a*b match "aaabx"?

Select one answer.

4. Under full-match semantics, how many copies of a may a* consume when matching the empty string?
5. A numeric FSM has read "12e-" at end of input. What is the correct decision?

Select one answer.

6. Two search engines evaluate a|ab on "ab" from the same leftmost start. A leftmost-first engine selects a. A POSIX leftmost-longest engine selects which match?

Select one answer.

7. Why can memoizing (text position, pattern position) help a restricted regex matcher with nested alternatives?

Select one answer.

Join Discord