Cloudy, 52° Complete Forecast
Rate this
Weekly Brain Teaser: Self-Descriptive Number

A self-descriptive number in base b is a whole number (in base b) with exactly b digits such that the first digit represents the amount of zeros in the number, the second digit represents the amount of one's in the number, and so on. For example, in base 4, 1210 is self-descriptive because there is exactly 1 zero, 2 ones, 1 two, and 0 threes. Find a self-descriptive number in base 10.

Before jumping into the solution of this problem, a discussion of number bases is in order. Our notational system for representing numbers is in decimal, which means "base 10". All this means is that each digit in a particular number represents a certain quantity of a particular power of 10. For example, the number 3,609,543 is simply a shortened notation for the sum

3(10)^6 + 6(10)^5 + 0(10)^4 + 9(10)^3 + 5(10)^2 + 4(10)^1 + 3(10)^0

(Recall that the symbol ^ means "to the power of"). Notice that the largest any possible digit can be is 9. The reason for this should be obvious. Consider the sum

7(10)^2 + 11(10)^1 + 8(10)^0

This sum would seem to be the long way of writing a number in base 10. However, the term 11(10)^1 represents the digit in the tens place, which means it should be equal to a two-digit multiple of 10. However, it is equal to 110. Thus, it "overlaps" with the hundreds place, meaning it doesn't translate directly into decimal notation.

Our choice of 10 as a number base actually has no mathematical significance. In fact, evidence suggests that the only reason we developed 10 as our number base is because we have ten fingers (primitive societies made extensive use of finger counting). So, there are plenty of other ways to represent a number, simply by choosing a different base. For example, 2043 in base 8 represents the sum

2(8)^3 + 0(8)^2 + 4(8)^1 + 3(8)^0

The same facts about numbers in base 10 carry over to numbers in any base. Specifically, if we have a number in base b, there will be exactly b possible digits to choose from, specifically, the digits 0 through b-1. So, the number 43,216, while being a perfectly valid number in our familiar base 10, has absolutely no meaning in base 5, since the only digits that can be used in base 5 are 0 through 4. When using number bases that are larger than 10, we have to choose alternate symbols to represent digits larger than 9. Typically, these digits are chosen to be capital letters, with A = 10, B = 11, C = 12, and so on. So, in hexadecimal (base 16), the number C4B represents the sum

12(16)^2 + 4(16)^1 + 11(16)^0

Now that we have a basic understanding of number bases, we can move on to the concept of self-descriptive numbers. The definition of a self-descriptive number requires the amount of digits to equal the base of the number. For example, 1210 is a self-descriptive number in base 4, because it has 1 zero, 2 ones, 1 two, and 0 threes. Notice that 1210 is thought of as a number in base 4, and it has exactly 4 digits. The necessity of this restriction should be clear. What if we had a 5 digit number in base 4, could it be self-descriptive? Well, in a five digit number, the final digit would represent the number of fours in the number, but it is impossible to have a digit of 4 in a base 4 number. So, we require a self-descriptive number in base b to have exactly b digits, as the concept makes no sense otherwise.

Bringing our focus back to base 10, how can we find a self-descriptive number exactly 10 digits long. Simply guessing and checking with no real direction probably won't get us anywhere, seeing as how there are 900 million ten-digit numbers to check. So, we'll attack this logically.

First of all, notice that the sum of the digits of this number must be 10. This is because each digit represents the amount of some other digit in the number, and there are exactly 10 digits to account for. With this in mind, we see that it is impossible for our last digit to be anything other than zero.

Suppose for a moment that our final digit was something other than zero. If it were 2 or greater, this would mean we have at least 2 nines in the number, which means the sum of our digits would be no smaller than twenty (9+9+2). This is impossible, so the final digit must be 1. However, this means there is exactly 1 nine in the number. Since we now have a nine and a one in the number, our digits already add up to ten, meaning all other digits must be zero. In other words, we have 1 one, 8 zeros, and 1 nine. However, this is also impossible. A 9 showing up means there is exactly nine of some particular digit in the number, which we have demonstrated to be false. So, it makes no sense for a last digit to be anything other than zero.

Now, if our last digit is zero, then our first digit must be at least 1 (since it counts the amount of zeros in our number). But can our first digit be exactly 1? Suppose for a moment that it was. This would mean there is exactly 1 zero in the number, which we already know to be the final digit. Thus, the remaining 8 digits must be nonzero. With the restriction that the sum of all our digits must be equal to ten, it is not hard to see that of the 8 remaining digits, exactly 1 needs to be a two, while the rest are ones. This, however, is impossible, since we would have at least a 1 as our fourth digit, meaning we have at least 1 three in the number, which we've already ruled out. So, the first digit must be greater than 1.

Similar logic will show that using other very small values for the first digit probably won't work, so one might be led to believe that large values are the way to go. Since the final digit is a zero, there are no nines in the number, which means the largest value our first digit can be is 8. If we have an 8 as our first digit, then we have a total of 8 zeros in the number. This means there must be a 2 somewhere (we can't have 2 ones, as this would only allow for 7 zeros). However, this would mean we have an 1 eight, 8 zeros, and 1 two in the number, meaning there isn't exactly two of any digit. This is, of course, a contradiction.

From the facts gathered so far, it seems that our first digit can't be too large or to small. Instead, we are aiming for the middle, probably a 5 or a 6. Consider the implications this has on our number. If our first digit is a 5, we have exactly 5 zeros in the number, meaning there is room for, at most, 5 of some other digit. However, this means we must have zeros as our seventh through tenth digits, as these represent the number of 6's, 7's, 8's, and 9's in the number, which we can't have any of. So, our investigation seems to be leading us to a number consisting of several zeros which are concentrated mostly toward the second half of the number.

We could continue using the same sort of logic to narrow down our choices even further. If we were to continue, we would eventually find the number we are looking for: 6210001000

There are a couple of things worthy of mention regarding this answer. First, it has been proven (elsewhere) that this is the only self-descriptive number in base 10. Second, the thought process we used here could easily be applied to the search for self-descriptive numbers in other bases as well, suggesting that such numbers may have a somewhat similar appearance. The following is a list of self-descriptive numbers in other bases.

Base 4: 1210, 2020

Base 5: 21200

Base 7: 3211000

Base 8: 42101000

Base 9: 521001000

Base 10: 6210001000

Base 11: 72100001000

Base 12: 821000001000

First, it should be noted that there are two self-descriptive numbers listed for base 4. Currently, base 4 is the only number base for which more than one self-descriptive number is known to exist. Second, notice that no self-descriptive numbers appear for bases 2, 3, or 6. It has been proven that no such numbers exist. Finally, there is a very distinct pattern appearing, particularly from base 7 onward. In a given number base b, the first digit is always equal to b-4, the second digit is always 2, the third is always 1, the (b-3)th is 1, and the rest are 0's. It is easy to see that this pattern determines an algorithm that will work for every number base greater than or equal to 7. We can represent this mathematically as follows: if b > 6, then

(b-4)b^(b-1) + 2b^(b-2) + b^(b-3) + b^3

is a self-descriptive number in base b.

-Nick Dale, Instructor

E-mail this
Report this

Comments

Change Location:
Even two years later, Brad DeHaven has to turn away when he plays videos of his son shaking and …
The deadline for returning mandated steelhead and sturgeon report cards …
One doctor decided to use his profession to better the lives of some young …
In September 2010, I did the unthinkable: I opened a gourmet cupcake shop …

Contents of this site are all Copyright © 2008, Gold Country Media. All rights reserved. Powered By: Creative Circle Advertising Solutions, Inc.

Privacy Policy  Terms of Service