given a positive integer written in decimal form the alterna
 given a positive integer written in decimal form, the alternating sum of the digits of n is obtained by starting with the right most digit, subtracting the digit immediately to the left, adding the next digit to the left, subtracting the next digit and so forth.
for example, the alternating sum of the digits for 180928 is 8-2+9-0+8-1=22. prove that for any nonnegativr integer n if the altenating sum of the digits of n are divisible by 11, then n is divisible by 11
this is a discrete mathematics proof, if possible plz include reasons and explanations so I can understand it.
Solution
Solution: Actually this is a divisibility rule for 11 i.e. if the number is divisible by 11 or not. So here is an easy proof: Let a four digit number abcd. We can write it as 1000a+100b+10c+d
now rewriting it as 1001a-a+99b+b+11c-c+d
(1001a+99b+11c)-(a-b+c-d)
11(91a+9b+c)-(a-b+c-d)
Now the first term is divisible by 11, we just have to check for second term that is (a-b+c-d), which is also called alternate sum. So if this sum is divisible by 11, then n is divisible by 11. Hence Proved.

