Question: 1 Regular Expressions and Finite Automata Task 1.1 For each of the following language descriptions, give a regular expression that matches exactly that language. You
1 Regular Expressions and Finite Automata
Task 1.1
For each of the following language descriptions, give a regular expression that matches exactly that language. You dont have to find the shortest possible regular expression. You may use expressions such as [a z] to represent the letters a through z, and/or regular definitions:
letter [a z]
string letter
To make things clearer, use to mean a single space (e.g. write "Hello world" instead of "Hello world".)
(a) Strings over the alphabet {a, b, c, d} that are in alphabetical order.
Examples: aabccc, abcd, bd, a, ad
Not examples: dc, ca, cba
(b) Natural numbers (0 and up), with no leading zero unless the whole thing is a single zero, and going right-to-left, groups of 3 digits are separated by commas.
Examples: 0; 1; 12; 123; 1,234; 12,345; 1,000,000
Not examples: 01; 1000; 123,4; 12,34
(c) Strings consisting of letters a-z and spaces that do not begin or end with whitespace and all white space is one space long.
Example: "so this is ok"
Not examples: "this is bad", " this too", "and this "
Please solve this questions and I will give you like.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
