4.4.2 - ToC (Regular Expressions) Flashcards
1
Q
What is a regular expression
A
a shorthand way
of describing a set
2
Q
What are the 5 main metacharacters and what are there description
A
1- * (0 or more repetitions)
2- + (1 or more repetitions)
3- ? (0 or 1 repetitions, ie optional)
4- | (alternation, ie or)
5- ( ) to group regular expressions.
3
Q
What is the link between FSM’s and Regular expressions
A
They are equivalent
ways of defining a regular language.
4
Q
How do you know if a language can be expressed as a lregular expression
A
If it is called a regular language
5
Q
What is meant by a regualar language
A
Any formal language that comprises of a set of strings, determined by an alphabet, that an FSM will accept