Give the regular set for each of the following regular expressionsi. (10)*10*ii. a*U(bc*)iii. (0 U 1) (0 U 1)*00iv. a(bc)* U (dc)*v. (a U b . c)*vi. a.(b u c)vii. a* . (b u c)viii. (10)*10
Question
Give the regular set for each of the following regular expressionsi. (10)10ii. aU(bc)iii. (0 U 1) (0 U 1)00iv. a(bc) U (dc)*v. (a U b . c)vi. a.(b u c)vii. a . (b u c)viii. (10)*10
Solution
i. The regular set for the regular expression (10)10 includes all strings that are made up of the pattern "10" repeated zero or more times, followed by the pattern "0" repeated zero or more times. Examples include "", "10", "100", "1010", "10100", etc.
ii. The regular set for the regular expression aU(bc) includes all strings that are made up of the pattern "a" repeated zero or more times, or the pattern "b" followed by the pattern "c" repeated zero or more times. Examples include "", "a", "aa", "b", "bc", "bcc", etc.
iii. The regular set for the regular expression (0 U 1) (0 U 1)*00 includes all strings that start with either "0" or "1", followed by any combination of "0" and "1" repeated zero or more times, and ending with "00". Examples include "00", "100", "1100", "0100", etc.
iv. The regular set for the regular expression a(bc)* U (dc)* includes all strings that start with "a" followed by the pattern "bc" repeated zero or more times, or the pattern "dc" repeated zero or more times. Examples include "a", "abc", "abcbc", "dc", "dcdc", etc.
v. The regular set for the regular expression (a U b . c)* includes all strings that are made up of the pattern "a" or the pattern "b" followed by "c", repeated zero or more times. Examples include "", "a", "bc", "abc", "bcbc", etc.
vi. The regular set for the regular expression a.(b u c) includes all strings that start with "a" followed by either "b" or "c". Examples include "ab", "ac".
vii. The regular set for the regular expression a* . (b u c) includes all strings that are made up of the pattern "a" repeated zero or more times, followed by either "b" or "c". Examples include "b", "c", "ab", "ac", "aab", "aac", etc.
viii. The regular set for the regular expression (10)*10 includes all strings that are made up of the pattern "10" repeated zero or more times, followed by "10". Examples include "10", "1010", "101010", etc.
Similar Questions
Write regular expressions for the following languages.1. the set of all alphabetic strings;2. the set of all lower case alphabetic strings ending in a b;3. the set of all strings from the alphabet a, b such that each a is immedi-ately preceded by and immediately followed by a b
Which language accepted by the regular expression (0+1)*0(0+1)*0(0+1)*.Select one:a. The set of all strings containing at least two 0’s.b. The set of all strings that begin and end with either 0 or 1.c. The set of all strings containing at most two 0’s.d. The set of all strings containing the substring 00.
Select all regular expressions that are equivalent to (0+1)*1 point(0*1*)(1*0*)(0*1*)*(01)*(0*1)*(0*1)*0*
Which of the following languages are regular?A = {x | x has two 0’s separated by the number of positions that is a multiple of 4 }.B = {x | x is binary representation of multiple of 3}.C = {x | x is a binary string and decimal of any prefix of x is not of form 3m + 2, where m ≥ 0}.Select one:a. All of the mentioned.b. Only B and C. c. Only A.d. Only B.
You have a regular expression: (01 + 10)*. Which of the following strings is in the language defined by this regular expression?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.