2080.1 6

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 ...
Up nextProve that th language is not a context free grammar. L = an bn cn mid n geq 0