Question: 3. (20 marks) write regular expressions for the following languages over the alphabet = (a) the set of all strings beginning with a 1, 2
3. (20 marks) write regular expressions for the following languages over the alphabet = (a) the set of all strings beginning with a 1, 2 or 3, that, when the string is interpreted as an integer in base 9, is a multiple of 6 plus 4. For example: e strings 11, 31,37 1111, 3001, 301, 3331, 22211, and 22277 are in the language; e the strings 10, 00,011, 0010, 36, 13, 23, 113, 1313, 2347,2, 21, 161, 3333, 707, and 041 are not. (b) The set of all strings that ends with an 1, 2, or 3 and when the string is interpreted in reverse as an integer in base 9, is a multiple of 6 plus 4. Examples of strings in the language are 11, 13,73 ,1111, 1003, 103, 1333, 11222 and 77222 Examples of strings that are not in the language are: 0, 00, 01, 110, 0100,63, 31, 32, 161,311, 3131,7432, 2, 12, 3333, 707, and 140
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
