Theory of Computation2080.15 marksRegular Expressions
Construct regular expression over {1,2,...,9} that represents a. strings of even numbers with length 4 starting with 2 and ending with 8. b. strings starting with odd numbers and ending with even numbers.
Construct regular expression over {1,2,...,9} that represents a. strings of even numbers with length 4 starting with 2 and ending with 8. b. strings starting with odd numbers and ending with even numbers. [5]
- Concatenation (.): places symbols/expressions one after another - Union (+): matches either expression - Kleene Star (): zero or more repetitions - Kleene Plus (+): one or more repetitions --- Constraints: - Length exactly 4 - First symbol: 2 - Last symbol: 8 - All symbols must be even numbers ...