200k views
1 vote
A All binary strings with is defined recursively as follows: Basis Step: ∈∈S Recursive Step: If x∈S, then 0x∈S and x1∈S. where ϵ is an empty string. Which of the following strings are not in S.

(a) 0000
(b) 101
(c) 111
(d) 011
(e) 001

User Remotec
by
8.5k points

1 Answer

7 votes

Final answer:

To determine which strings are not in S, we need to identify the conditions that define S. The only string that is not in S is 011.

Step-by-step explanation:

To determine which strings are not in S, we need to identify the conditions that must be met for a string to be in S. According to the recursive definition, a string x is in S if it can be formed by concatenating a base string with one or more 0s or 1s at the beginning or end. Let's go through each option:

  1. 0000: This string can be formed by concatenating 0 at the beginning of 000. Since 000 is a valid string in S, 0000 is also in S.
  2. 101: This string can be formed by concatenating 0 at the beginning of 1. Since 1 is a valid string in S, 101 is also in S.
  3. 111: This string can be formed by concatenating 1 at the beginning of 11. Since 11 is a valid string in S, 111 is also in S.
  4. 011: This string cannot be formed by concatenating a base string with 0s or 1s. Therefore, 011 is not in S.
  5. 001: This string can be formed by concatenating 0 at the beginning of 01. Since 01 is a valid string in S, 001 is also in S.

From the options given, the only string that is not in S is 011.

User Kiran
by
8.6k points