Skip to content

Solutions to Lab 2 exercises & Reflection

Written solutions

The written solutions for this week can be download as PDF below.

Download Solutions to Lab 2


FAs are a useful theoretical tool to model simple computation, but do they have any directly practical applications?

Yes, they do! Typical examples include:

  • Design of lexical analysis in compilers.
  • Searching and replacing using regular expressions. (Popular with Web development and Data Science.)

Can you find more?


You don't have to hand-in your reflection -- this is not an assessment. Keep your notes and go over them as you understand the material more. Some of the above ideas will become clear in one week, while others will be met again towards the end of the module!

Video explanations of some solutions

Videos for questions 2, 3, 6, 7 from the green section, and questions 1--2 from the orange section are shown in the hints page.

Visit the Hints page

Please let me know if you want clarification on any other exercises.