Give a recursive definition for the set of all binary string

Give a recursive definition for the set of all binary strings containing an even number of 1s.
(Select one or more of the following answers)

If x is a binary string with an even number of 1s, so is 1x1, 0x, and x0.

The string 0 belongs to the set

The string 11 belongs to the set

If x is a binary string, so is 0x0, 1x, and x1.

If x is a binary string with an even number of 1s, so is 0x0, 1x, and x1.

If x is a binary string, so is 1x1.

(I think A and C are correct, but I am not sure about B)

A

If x is a binary string with an even number of 1s, so is 1x1, 0x, and x0.

B

The string 0 belongs to the set

C

The string 11 belongs to the set

D

If x is a binary string, so is 0x0, 1x, and x1.

E

If x is a binary string with an even number of 1s, so is 0x0, 1x, and x1.

F

If x is a binary string, so is 1x1.

Solution

The answer is A. C is not the right answer because the it is not neccesarily required to have 11 in the string. For example the string 0101 belongs to the set of binary strings. But it does not have 11.

Give a recursive definition for the set of all binary strings containing an even number of 1s. (Select one or more of the following answers) If x is a binary st

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site