Wikipedia:Reference desk/Archives/Mathematics/2015 October 6

= October 6 =

Positional notation
The question might seem silly, but...how can one prove that each number has a unique representation in positional notation (in certain base b)? I guess it's somehow derived from the definition, but don't understand how. Thanks! — Preceding unsigned comment added by 212.179.21.194 (talk) 08:27, 6 October 2015 (UTC)
 * There is a slight non-uniquness, see 0.999.... Dmcq (talk) 08:35, 6 October 2015 (UTC)
 * It's not a silly question at all. I assume you mean only for integers using positions to the left of the radix, because otherwise it's not always true.
 * It comes down to the fact that $$(b-1)1 + (b-1)b + (b-1)b^2 + \dots + (b-1)b^n = b^{n+1} - 1$$. You can verify this equality by distributing the multiplications and then canceling terms.
 * Now, to show that every integer has a representation, suppose not. Let $$x$$ be the least integer without a representation.  We know 0 has a representation, so $$x > 0$$.  So $$x-1$$ has a representation.  Now look at the rightmost entry in the representation for $$x-1$$.  If it's less than $$b-1$$, we can add one to the representation by replacing the rightmost entry with the symbol which is 1 greater.  If the rightmost entry is $$b-1$$, then we can add one to the representation by replacing a stream of $$b-1$$s with $$0$$s and then incrementing the first entry which is not $$b-1$$.  This uses the equality.  Either way, we get a representation for $$x$$.
 * Next, to show that no integer has two representations, suppose not. Let $$x$$ be the least integer with two representations, and consider those two representations.  If they agree on the leftmost entry, then by replacing the leftmost entry with 0 we get two distinct representations for a smaller number, contrary to choice of $$x$$.  So they disagree on the leftmost entry.  Call that position $$n$$.  Suppose the first representation has the larger value in the leftmost position.  Then the smallest the first representation could be is if every value other than the leftmost is 0, and the largest the second representation could be is if every value other than the rightmost is $$b-1$$, but by the above equation, this still means that the first representation is at least 1 larger than the second, so they don't represent the same number after all.--130.195.253.11 (talk) 08:43, 6 October 2015 (UTC)
 * Thanks! the explanation may be worth adding to the article. 212.179.21.194 (talk) 11:58, 6 October 2015 (UTC)