Problem (Algebra):
A function $f$ is defined so that

- $f(1)=1$,
- if $n$ is an even positive integer, then $f(n)=f\left(\frac{1}{2} n\right)$, and
- if $n$ is an odd positive integer with $n>1$, then $f(n)=f(n-1)+1$.

For example, $f(34)=f(17)$ and $f(17)=f(16)+1$.

Determine the value of $f(50)$.

Solution:
We start with $f(50)$ and apply the given rules for the function until we reach $f(1)$ :

$$
\begin{aligned}
f(50) & =f(25) \\
& =f(24)+1 \\
& =f(12)+1 \\
& =f(6)+1 \\
& =f(3)+1 \\
& =(f(2)+1)+1 \\
& =f(1)+1+1 \\
& =1+1+1 \\
& =3
\end{aligned}
$$

(since 50 is even and $\frac{1}{2}(50)=25$ )

(since 25 is odd and $25-1=24$ )

$$
\left(\frac{1}{2}(24)=12\right)
$$

$$
\begin{aligned}
\left(\frac{1}{2}(12)\right. & =6) \\
\left(\frac{1}{2}(6)\right. & =3) \\
(3-1 & =2) \\
\left(\frac{1}{2}(2)\right. & =1) \\
(f(1) & =1)
\end{aligned}
$$

Therefore, $f(50)=3$.

Final answer: 3