Cheat sheets

TOC-02Cheat sheet1 pageIn a paid pack

Regular Expressions

Regular expressions for GATE CS: the six building blocks, operator precedence, the identities that hold (with the empty set and epsilon cases) and the look-alikes that fail with their shortest counterexample, writing expressions for described languages such as no two consecutive a's or number of a's divisible by 3, testing two expressions for equivalence, and counting the strings of a given length. Every identity and construction was checked on all strings over {a, b} up to length 9.

TOC-03Cheat sheet1 pageIn a paid pack

Regular Expressions to Automata and Back

Kleene's theorem in practice: Thompson's construction from a regular expression to an epsilon-NFA with its size bound and invariants, epsilon-closure and the removal of epsilon-moves without changing the state set, the state-elimination method from a DFA to an expression, and Arden's rule for solving language equations including the condition for a unique solution. Worked examples were built and compared with the target languages on all strings up to length 9.

Diagrams from TOC-03