Set builder notation problem

1.2k Views Asked by At

What is the set builder notation for the following two:

a) The set of all binary strings of even length and ending with 1.
b) L* has exactly one more element than L.

I am totally puzzled by these two. Could someone show me the solution to these two problems. An explanation would be great to help me understand.

1

There are 1 best solutions below

1
On

Here is one solution:

a) $\{ x \in \{0,1\}^* : \text{$x$ has even length and ends with $1$} \}$

b) $\{ L : \text{$L^*$ has one more element than $L$}\}$

There are many other solutions possible, for example:

a) $\{ x1 : x \in \{0,1\}^* \text{ and } 2 \mid |x1| \}$

b) $\{ L : |L|,|L^*| < \infty \text{ and } |L^*| = |L| + 1 \}$

Note that the condition in b) only holds for $L = \emptyset$; therefore another solution for b) would be $\{ \emptyset \}$.