# Anomalous cancellation

__: Kind of arithmetic error__

**Short description**An **anomalous cancellation** or **accidental cancellation** is a particular kind of arithmetic procedural error that gives a numerically correct answer. An attempt is made to reduce a fraction by cancelling individual digits in the numerator and denominator. This is not a legitimate operation, and does not in general give a correct answer, but in some rare cases the result is numerically the same as if a correct procedure had been applied.^{[1]} The trivial cases of cancelling trailing zeros or where all of the digits are equal are ignored.

Examples of anomalous cancellations which still produce the correct result include (these and their inverses are all the cases in base 10 with the fraction different from 1 and with two digits):

The article by Boas analyzes two-digit cases in bases other than base 10, e.g., 32/13 = 2/1 and its inverse are the only solutions in base 4 with two digits.^{[2]}

The anomalous cancellation happens also with more digits, e.g. 165/462 = 15/42 and those with different numbers of digits (98/392 = 8/32).

## Elementary properties

When the base is prime no two-digit solutions exist. This can be proved by contradiction: suppose a solution exists, and without loss of generality we can say that this solution is

[math]\displaystyle{ \frac{a||b}{c||a}=\frac{b}{c} }[/math]

where the line indicates digit concatenation. Thus we have

[math]\displaystyle{ \frac{ap+b}{cp+a}=\frac{b}{c}\implies (a-b)cp=b(a-c) }[/math]

But [math]\displaystyle{ p\gt a,b,a-c }[/math] as they are digits in base [math]\displaystyle{ p }[/math] yet [math]\displaystyle{ p|b(a-c) }[/math] which means that [math]\displaystyle{ a=c }[/math] so therefore the right hand side is zero which means the left hand side must also be zero, i.e. [math]\displaystyle{ a=b }[/math], a contradiction.

Another property is that the numbers of solutions in a base [math]\displaystyle{ n }[/math] is odd if and only if [math]\displaystyle{ n }[/math] is an even square. This can be proved similarly to the above: suppose that we have a solution

[math]\displaystyle{ \frac{a||b}{c||a}=\frac{b}{c} }[/math]

Then doing the same manipulation we get

[math]\displaystyle{ \frac{an+b}{cn+a}=\frac{b}{c}\implies (a-b)cn=b(a-c) }[/math]

Suppose that [math]\displaystyle{ a\gt b,c }[/math]. Then note that [math]\displaystyle{ a,b,c\to a,a-c,a-b }[/math] is also a solution to the equation. This almost sets up an involution from the set of solutions to itself, but a problem arises when [math]\displaystyle{ b=a-c,c=a-b }[/math]. In this case, we can substitute in to get [math]\displaystyle{ (a-b)^2n=b^2 }[/math] so this only has solutions when [math]\displaystyle{ n }[/math] is a square. Let [math]\displaystyle{ n=k^2 }[/math]. Square rooting and rearranging yields [math]\displaystyle{ ak=(k+1)b }[/math]. Since the greatest common divisor of [math]\displaystyle{ k,(k+1) }[/math] is one, we know that [math]\displaystyle{ a=(k+1)x,b=kx }[/math]. Noting that [math]\displaystyle{ a,b\lt k^2 }[/math], this has precisely the solutions [math]\displaystyle{ x=1,2,3,\ldots,k-1 }[/math] i.e. it has an odd number of solutions when [math]\displaystyle{ n=k^2 }[/math] is an even square. The converse of the statement may be proved by noting that these solutions all satisfy the initial requirements.

## See also

- Mathematical joke

## References

- ↑ Weisstein, Eric W.. "Anomalous Cancellation". http://mathworld.wolfram.com/AnomalousCancellation.html.
- ↑
^{2.0}^{2.1}Boas, R. P. "Anomalous Cancellation." Ch. 6 in*Mathematical Plums*(Ed. R. Honsberger). Washington, DC: Math. Assoc. Amer., pp. 113–129, 1979.

Original source: https://en.wikipedia.org/wiki/ Anomalous cancellation.
Read more |