A certain tree $T$ of order $n$ contains only vertices of degree $1$ and $3$. Show that $T$ contain $\frac{n-2}{2}$ vertices of degree $3$.
Here is what i got so far:
Since $T$ is a tree of order $n$, the size of $T$,
$$m=n-1$$
I also know that the sum of degree of all vertices in a graph is double the size. Since $T$ contain only vertices of degree $1$ and $3$. Let $x,y$ be number of vertices of degree $1$ and $3$ respectively, we have
$$x+3y=2(n-1)$$
From here, I don't know how to get $y=\frac{n-2}{2}$
Hint What is $x+y$ ?
From there you are done.