Exam-style question
Try this first
Which statement correctly describes the relationship between regular expressions and finite state machines (FSMs)?.
- A.Every regular expression describes a language that no FSM can recognise.
- B.Regular expressions and FSMs are equivalent ways of defining a regular language.
- C.FSMs can describe only numerical languages, whereas regular expressions describe only text.
- D.A regular expression is a program that must be executed by an FSM.
Model answer
What a good answer should say
- Regular expressions and FSMs are equivalent ways of defining a regular language.
Explanation
Why this works
The specification states that regular expressions and FSMs are equivalent ways of defining a regular language. A regular expression can be written for the same language as a given FSM, and vice versa.
Common mistake
No common mistake is linked to this question yet.
