Question

Let L = { w | w is a binary string with an even number of...

Let L = { w | w is a binary string with an even number of 1s }. Which of the following REs represents L?

a.0* (1 0* 1*)* 0*

b.0* 1 (1 0* 1)* 1 0*

c.(0* 1 0* 1)*

d.0* + (0*1 0* 1 0*)*

Homework Answers

Answer #1

The answer to the above question is:

d.0* + (0*1 0* 1 0*)*

Explanation:

In option (a), there is a possibility of getting odd number of 1s

In option (b), there will be a 11 form and other forms are not supported

In option (c), the number of 1s will be even but there is no possibility of just 0s and no 1s i.e, only zeroes and no ones(zero 1s is also even)

In option (d), there can be 0s and no 1s (zero 1s is also even) and if there are 1s they will always be even

Thats why option (d) is the correct answer.

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
For Automata class: Let L be a regular language over the binary alphabet. Consider the following...
For Automata class: Let L be a regular language over the binary alphabet. Consider the following language over the same alphabet: L' = {w | |w| = |u| for some u ∈ L}. Prove that L' is regular.
A body, weight W, is attached by a string, length l, to a hook on a...
A body, weight W, is attached by a string, length l, to a hook on a vertical wall. A horizontal force F acting on the body holds it at a distance d from the wall. Derive the equation which gives the force F in terms of W, l, and d.
5. Prove or disprove the following statements. (a) Let L : V → W be a...
5. Prove or disprove the following statements. (a) Let L : V → W be a linear mapping. If {L(~v1), . . . , L( ~vn)} is a basis for W, then {~v1, . . . , ~vn} is a basis for V. (b) If V and W are both n-dimensional vector spaces and L : V → W is a linear mapping, then nullity(L) = 0. (c) If V is an n-dimensional vector space and L : V →...
Let S denote the set of all possible finite binary strings, i.e. strings of finite length...
Let S denote the set of all possible finite binary strings, i.e. strings of finite length made up of only 0s and 1s, and no other characters. E.g., 010100100001 is a finite binary string but 100ff101 is not because it contains characters other than 0, 1. a. Give an informal proof arguing why this set should be countable. Even though the language of your proof can be informal, it must clearly explain the reasons why you think the set should...
Give a regular expression for each of the following sets: a) set of all string of...
Give a regular expression for each of the following sets: a) set of all string of 0s and 1s beginning with 0 and end with 1. b) set of all string of 0s and 1s having an odd number of 0s. d) set of all string of 0s and 1s containing at least one 0. e) set of all string of a's and b's where each a is followed by two b's. f) set of all string of 0s and...
use inclusion-exclusion to find the number of binary strings of length 5 that have at least...
use inclusion-exclusion to find the number of binary strings of length 5 that have at least one of the following characteristics: start with a 1, end with a 0, or contain exactly two 1s
5 numbers chosen randomly without replacement. (#'s range 1-39). "B" represents number of even numbers, this...
5 numbers chosen randomly without replacement. (#'s range 1-39). "B" represents number of even numbers, this random variable has this probability: x 0 1 2 3 4 5 p(B=x) 0.02693 0.15989 .33858 .31977 .13464 .02020 number of odd #s chosen would then be 5-x, if x is even #s chosen. "C" represents difference b/w # of even and # of odd chosen, --> C= 2B-5 a. show how variance of B is = 1.1177 b. what is SD of "B"?...
Which of the following describes legitimate weighted voting systems? l [q: w(A),w(B),w(C),w(D)] = [16:13,8,6,4] ll [q:...
Which of the following describes legitimate weighted voting systems? l [q: w(A),w(B),w(C),w(D)] = [16:13,8,6,4] ll [q: w(A),w(B),w(C),w(D) = [30:20,17,10,5] a) l only b) ll only c) l and ll d) neither l or ll
Given a binary string of zeros (0) and ones (1). You have to build a circuit...
Given a binary string of zeros (0) and ones (1). You have to build a circuit that counts the number of occurrences of string '01' within the given string. For example, given string '01000110001001', there are 4 occurrences of '01' and output have to show number of occurance each time '01' occured. Use a FSM and a counter (built from D flip-flops) to implement this circuit. It is guaranteed that the number of occurrences is not more than 31 (you...
Given a binary string of zeros (0) and ones (1). You have to build a circuit...
Given a binary string of zeros (0) and ones (1). You have to build a circuit that counts the number of occurrences of string '01' within the given string. For example, given string '01000110001001', there are 4 occurrences of '01' and output have to show number of occurance each time '01' occured. Use a FSM and a counter (built from D flip-flops) to implement this circuit. It is guaranteed that the number of occurrences is not more than 31 (you...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT