a) Give a recursive definition of the function ones(s), which counts the number of ones in a bit string s.
b) Use structural induction to prove that ones(st) = ones(s) + ones(t).
a) Give a recursive definition of the function ones(s), which counts the number of ones in a bit string s.
b) Use structural induction to prove that ones(st) = ones(s) + ones(t).