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.
Consider the language L = { w w : w ∈ { 0 , 1 }...
Consider the language L = { w w : w ∈ { 0 , 1 } ∗ } is not context-free. Note that this is the language of all strings that consist of some combination of 0s and 1s, followed immediately by that same combination of 0s and 1s. For example, 0101, 101101, and 110110 are all in the language because they consist of a string followed by itself. Can you build a PDA to recognize this language? (Hint: you...
Write a program that reads a binary string (string of 0’s and 1’s) converting the binary...
Write a program that reads a binary string (string of 0’s and 1’s) converting the binary value into decimal. Allow the user to type in as many numbers as they want (one at a time) and end the program when they type in “0”. Use Horner’s method (given in step 3, below) to convert from binary to decimal. Sample Run Binary to Decimal Conversion Enter a binary string: 1101 1101 = 13 decimal Enter a binary string: 10011001 10011001 =...
Do a Push Down Automata for the following language: L = { binary strings of the...
Do a Push Down Automata for the following language: L = { binary strings of the form w#wR where w is any binary string and wR is the reverse of w } Show your work please.
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.
Can you tell whether a binary number is even or odd only by inspecting the digit...
Can you tell whether a binary number is even or odd only by inspecting the digit in the 1s place? is that always possible for an arbitrary base? if you could, can you explain why or why not? thanks
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
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT