Re: math:gcd is incorrect
- Posted by jimcbrown (admin) May 07, 2012
- 1733 views
Technically, this is correct. Sometimes GCD(0, 0) is
explicitly considered being equal to zero for similar
reasons that 0^0 is considered equal to 1.
The situations are not similar.
They are in the sense that in both cases the functions are redefined by mathematicians such that they return a value.
2. GCD is a divisor: by definition 0 is not a divisor
Well, division is the inverse of multiplication. It's true that it's common to define division (at least in basic arthimetic) excluding zero as a divisor, this leads arthimetic to be incomplete.
Alternatively, you could allow division by zero, but then you'd have contradictions. This seems like a deal-breaker, and it is most of the time, but probability works pretty well in spite of it. For example, the probability of hitting a smaller area within a larger one (e.g. hitting the 1-square inch bulls eye of a much larger dart board) is the area of the smaller divided by the area of the larger. However, the probability of hitting a single point overall in the larger area is zero, so if you attempt to compute the probability of hitting the larger area (out of the entire larger area, so larger area / larger area or P(1) )by summing up the probability of hitting any individual point, this infinite summation will lead you to a probability of 0% instead of 100%!
Back to division by zero. 1 / 0 = some imaginary number z, but then 0 * z would equal 0 and not 1, leading to a contradiction.
Even worse, 0 / 0 could equal any number. After all, 0 * z = 0, so 0 / 0 = z, but 0 * 1 = 0, so 0 / 0 = 1, and 0 * 0 = 0, so 0 / 0 = 0, 0 * i = 0, so 0 / 0 = i, etc. This makes 0 / 0 indeterminate.
1. 0^0 is def = 1 because lim x->0 x^x = 1 and x^x is continuous on all real x != 0
So? x to the power of x is not continuous when x equals 0, and the limit of a value is different from the value.
Additionally, the limit of 0 to the power of x as x approaches 0 is 0. This gives a different answer than your formula, which means the value of 0 to the power of 0 is indeterminate.
0 to the power of 0 is itself indeterminate. One way to define power of zero is like this:
x^0 = x^-1 * x^1
Of course, by definition
x^-1 = 1/(x^1)
This gives
x^1 / x^1 = x/x
When x is not equal to zero, it's obvious that this is equal to one. But when x is equal to zero, then this ends up as 0/0 which is indeterminate as discussed above.
Following this definition, 0 to the power of 0 can be argued to be anything (e.g. 0, 1, i, -264, etc...), the same way 0/0 is.
The real reason that 0 to the power of 0 is considered as equal to 1 is because it is useful to do so as it simplifies things like the binomial theorem by removing special cases.
Likewise, and to quote Wikipedia,
It is useful to define gcd(0, 0) = 0 and lcm(0, 0) = 0 because then the natural numbers become a complete distributive lattice with gcd as meet and lcm as join operation. This extension of the definition is also compatible with the generalization for commutative rings given below.
3. Normalisation: Q(0,0) = 0: Q(x,y) = (x/gcd(x,y), y/gcd(x,y))
By normalization, are you refering to normalized vectors, normalization property, or statistical normalization? None of these seem to fit.
Perhaps you mean something like "to make the function seem normal, as applies to common sense, by replacing its undefined and indeterminate cases with values that seem to make sense, according to common sense".
In that case, I'm fine with your definition, but I'd argue:
Normalization: POW(0,0) = 1: POW(x,x) = x^x