Ask Your Question

Verifying that a symbolic expression in two variables is 0.

asked 2013-05-23 18:33:21 -0600

I want to verify using SAGE that the expression:

${~~n~+1\choose k}~2^{-n~-1} - {~n\choose k}~2^{-n} + {~n\choose ~k~}~2^{-n~-1} + {~n \choose ~k-1}~2^{-n~~-1}$

is identically zero.

The SAGE script for this is:

binomial(n+1,k)2^(-n-1) - binomial(n,k)2^(-n) + binomial(n,k)2^(-n-1) + binomial(n,k-1)2^(-n-1)

I have tried using full_simplify() but it doesn't boil the expression down to zero.

Please help.


edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2013-05-23 22:58:41 -0600

tmonteil gravatar image

updated 2013-05-23 23:04:05 -0600

The reason is that your expression is not equal to zero !!!

If you multiply your expression by $2^{n+1}$, and simplify the two bionmials in the middle, you get ${n+1\choose k} - {n\choose k} + {n \choose k-1}$

This can not be zero since ${n+1\choose k} + {~n \choose k-1}$ is usually bigger than ${n\choose k}$ (unless $k>n+1$).

edit flag offensive delete link more


Ah yes! My bad. The expression I was supposed to wrestle with was: binomial(n+1,k)2^(-n-1) - binomial(n,k)2^(-n) + binomial(n,k)2^(-n-1) - binomial(n,k-1)2^(-n-1) and yes sage is able to bring it down to zero. Thanks so much. I made a sign mistake. Really sorry. And thanks for your kind reply.

caffeinemachine gravatar imagecaffeinemachine ( 2013-05-25 18:58:21 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-05-23 18:33:21 -0600

Seen: 66 times

Last updated: May 23 '13