Question

Which one of the following languages over the alphabet {0,1} is described by the regular expression...

Which one of the following languages over the alphabet {0,1} is described by the regular expression

(0+1)* 0 (0+1)* 0 (0+1)* ?

a.The set of all strings that begin and end with either 0 or 1

b.The set of all strings containing at most two zeros

c.The set of all strings containing at least two zeros.

d.The set of all strings containing the substring 00

Homework Answers

Answer #1

Option C is correct because in the given regular expression (0+1)* 0(0+1)* 0 (0+1)* the underlined two zeros will definitely be written.


Option A is incorrect because the given regular expression cannot yield 01 which is essential to satisfy option A.


Option B is incorrect because the given expression can generate 000 which rules out the possibility of B being correct.


Option D is incorrect because the given expression can also produce 11010 which does not include the substring 00.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Give a regular expression for the set of all strings on the alphabet {0,1} with no...
Give a regular expression for the set of all strings on the alphabet {0,1} with no runs of length greater than 3(for example, no substrings 0^i or 1^i with i > 3)
Q2 [10 pts] Give DFA's accepting the following languages over the alphabet {0,1}: a) The set...
Q2 [10 pts] Give DFA's accepting the following languages over the alphabet {0,1}: a) The set of all strings whose 3rd symbol from the right end is a 0. b) The set of strings such that the number of 0's is divisible by 3 and the number of 1's divisible by 2.
Problem 5 Regular Expressions. a) Define a regular expression for all strings of odd length, over...
Problem 5 Regular Expressions. a) Define a regular expression for all strings of odd length, over the alphabet of {0}. b) Define a regular expression for identifiers over the alphabet of {A,B,C,a,b,c,0,1,2,3,4,5,6,7,8,9}, such that an identifier must begin with an alphabetic character and must contain at least one numeric character. c) Try to modify the definition above so that identifiers still begin with an alphabetic character, but after that, it must contain at least one numeric, at least one lower-case...
Are the following languages over {a, b} regular? If they are then prove it. If they...
Are the following languages over {a, b} regular? If they are then prove it. If they are not prove it with the Pumping Lemma {an bm | m != n, n >= 0} {w | w contains the substring ‘aaa’ once and only once } Clear concise details please, if the language is regular, provide a DFA/NFA along with the regular expression. Thank you. Will +1
Find a regular expression to describe: The set of all strings over the alphabet {a, b,...
Find a regular expression to describe: The set of all strings over the alphabet {a, b, c, d} that contain exactly one a and exactly one b So, for example, the following strings are in this language: ab, ba, cccbad, acbd, cabddddd, ddbdddacccc and the following strings are NOT in this language: a, ccbc, acbcaaacba, acacac, bcbbbbbca, aca, c, d, b
1.2 Which of the following statements is wrong?        a). A set is a subset of itself...
1.2 Which of the following statements is wrong?        a). A set is a subset of itself        b). Emptyset is a subset of any set        c). A set is a subset of its powerset        d). The cardinality of emptyset is 0 1.3. Which of the following statements is correct?        a). A string is a set of symbols from an alphabet        b). The length of the concatenation of two strings can           be the same as one of them        c). The length of...
The alphabet is Ʃ = {a,b}. Give regular expressions that generate the following languages below. Use...
The alphabet is Ʃ = {a,b}. Give regular expressions that generate the following languages below. Use these symbols: Ʃ, a, b, ε, Ø, *, (, ), U. 1) ? = {? | ? contains an odd number of a's and ends with b} 2) ? = {a? b? | ? < 5,? < ?} 3) ? = {? | ? contains the substring ab and contains the substring ba} 4) ? = {? | ? has an odd number of...
Show a regular expression representing the described set: a). The set of strings of odd length...
Show a regular expression representing the described set: a). The set of strings of odd length over {s,t,r,i,n,g} containing exactly 3 n's.
1. Define a deterministic finite automaton over the alphabet {a, b} which accepts the set of...
1. Define a deterministic finite automaton over the alphabet {a, b} which accepts the set of all strings that end with the substring ab or ba.
1. The alphabet for generating DNA sequences is {A, T, G, C}. Write a regular expression...
1. The alphabet for generating DNA sequences is {A, T, G, C}. Write a regular expression that represents all DNA strings that begin with ‘A’ and end with ‘T’. Note: assume empty string is not a valid string. 2. Please submit the regular expression and Diagram of the DFA. I will be creating C++ code that extracts patterns that begin with 'A' and end with 'T' , but I need help with the visual representation. Thank you! example Input: CATTGCAGGTG...