how do i define “dropzeros” of a bitstring as the result of dropping each 0 from the bitstring. ex) dropzeros of 11 is 11. The dropzeros of 1101 is 111. The dropzeros of 00 is the empty string. Let’s denote the dropzeros of the bitstring w by d(w), therefore d(10101) = 111 for example. a recursive definition of dropzeros of a bitstring is needed. Hint: first define the dropzeros of the empty string and any other necessary minimal base cases. (Use the symbol λ to denote the empty string and d(λ) to denote the dropzeros of the empty string. Include other base cases only as necessary.) Then consider a string w of length n + 1 as sb, where s is a bitstring of length n and b is a single bit, and express the dropzeros of w.
how do not understand how to approach is as just a simple recursive function. would i have to use substring?
HINT: If you know that $d(s)$ is some bitstring $u$, what is $d(s0)$ in terms of $u$? What is $d(s1)$ in terms of $u$?