- #1
Amad27
- 412
- 1
If $K$ is the set of strings of 1s and 2s with the number of 1s $\equiv3\bmod4$ and with any amount of $2$s, find a recursive definition of $K$. For example, $1112112121$.
I'm in need of some hints.
The string can be empty, have no 1's or have 1's equivalent to 3 mod 4.
$$K=\{\varepsilon,2\}\cup\{2,111,x\}K$$
I'm unable to figure out how to have the number of 1s exactly $\equiv3\bmod4$.
I'm in need of some hints.
The string can be empty, have no 1's or have 1's equivalent to 3 mod 4.
$$K=\{\varepsilon,2\}\cup\{2,111,x\}K$$
I'm unable to figure out how to have the number of 1s exactly $\equiv3\bmod4$.