Here are some languages for which you are required to construct regular expressions. Assume = {a,
Question:
Here are some languages for which you are required to construct regular expressions.
Assume ∑ = {a, b} for each of these languages.
(i) Language of all words whose length is odd.
(ii) Language of all words whose length is even.
(iii) Language of all words whose length is even but that start with the letter ‘a’.
(iv) Language of all words whose second letter is ‘b’.
(v) Language of all words whose second the last letter is ‘a’.
(vi) Language of all words which have an even number of a’s(with any number of b’s).
(vii) Language of all words that contain even clumps of a’s and even clumps of b’s.
(viii) Language of all words that end with two or more b’s.
(ix) Language of all words whose length is more than two letters.
(x) Language of all words start or end with double letter.
Regular Expressions for Identifiers, Operators, Literals, Comments, Punctuation Marks, White Spaces in order to Identify Tokens.
Fundamentals of Database Systems
ISBN: 978-0136086208
6th edition
Authors: Ramez Elmasri, Shamkant Navathe