Question : Evaluate - $$ \binom{n}{0}-\binom{n}{1}+\binom{n}{2}-\binom{n}{3} \dots + (-1)^r\binom{n}{r}$$
I tried to solve it but I am able to solve only when $r=n$.In that case I can put $x=-1$ in the expansion of $(1+x)^n$ and the result is $0$.
I know that for asking any question on this forum, I need to show my approach and thoughts but literally I have no idea how to solve up to $r+1$ terms.
Although I tried to add and subtract the terms to reach upto $\binom{n}{n}$, and evaluate the remaining sum, but nothing helpful.
Any help will be appreciable!
You have
$${n \choose k}={n-1 \choose k-1}+{n-1\choose k}$$ meaning that to get the next line in the Pascal's triangle, you sum two numbers above. Now you're computing an alternating sum, so you get a telescoping effect:
$${n\choose 0}-{n\choose 1}+\cdots+(-1)^r{n\choose r}=$$ $$=\bigg(0+{n-1\choose 0}\bigg)-\bigg({n-1\choose 0}+{n-1\choose 1}\bigg)+\cdots + (-1)^r\bigg({n-1 \choose r-1}+{n-1\choose r}\bigg)=$$ $$\textstyle=\big[{n-1\choose 0}-{n-1\choose 0}\big]+\big[{n-1\choose 1}-{n-1\choose 1}\big]+\cdots + \big[{n-1 \choose r-1}-{n-1\choose r-1}\big]+(-1)^r{n-1\choose r}=$$ $$=(-1)^r {n-1\choose r}$$
Short answer: you're counting each number from the upper row of the Pascal's triangle twice with opposite signs, except from the $r$-th one (including the sign).