Let us define a set S of binary strings according to the following rules:
Base: The empty string and the string 1 are in S.
Recursion: If xεS, then so are x0 and x11. (That is, x followed by 0 or 11.)
If S contains no other strings, which of the following strings are in S?
111
10101
11
1101
1011
010
00000
First, any (non-empty) string from S begins from 1. So, the two last strings (#6 and #7) not in S.
Second, after the first 1 must go 0 or 11, so string #3 "11" and #4 "1101" not in S.
Next, string #1 "111" in S, "111" = "1" + "11".String #5, "1011" in S, "1" + "0" + "11".
And the remaining string is #2, "10101".It isn't in S. There is "1", then "0", and then "101", but "101" doesn't begin from "0" or from "11".
Secure Information
Content will be erased after question is completed.
Enter the email address associated with your account, and we will email you a link to reset your password.
Forgot your password?
Sign Up