Sideband #56: Spelling Numbers

mathsWe’re still motoring through numeric waters, but hang in there; the shore is just ahead. This is the last math theory post… for now. I do have one more up my sleeve, but that one is more of an overly long (and very technical) comment in reply to a post I read years ago. If I do write that one, it’ll be mainly to record the effort of trying to figure out the right answer.

This post picks up where I left off last time and talks more about the difference between numeric values and how we represent those values. Some of the groundwork for this discussion I’ve already written about in the L26 post and its followup L27 Details post. I’ll skip fairly lightly over that ground here.

Essentially, this post is about how we “spell” numbers.

 We spell it: ‘N’, ‘U’, ‘M’, ‘B’, ‘E’, ‘R’, ‘S’.  See how easy that was?

[Sorry, sometimes I can’t help myself! Puns and I are like bright lights and moths. Often with similar results. I used to have a good friend with the same evil streak, and once he and I got really going people would flee the room screaming and seeking urgent medical aid for their bleeding ears. Severe brain damage is the mark of a Victorious Pun!]

Tori Spelling, meh. Tori Amos, mos def!

Tori Spelling, meh.
Tori Amos, mos def!

It might seem odd to refer to “spelling” numbers. This is not about misspelling versus correct spelling. Or Tori Spelling. [Oops: sorry again!] The usage is something I picked up off the USENET street decades ago and is just a metaphor for ‘different ways to say something.’

In this context, the “spelling” is assumed to be correct, but has the idea that there is more than one way to correctly write an expression (for a fairly broad definition of “expression” — computer programmers use it to refer to different ways of writing code that accomplishes the same task).  The word “spelling” also implies we’re talking about writing things (or listening to interesting music).

As an illustration, USAnians spell what a rainbow has as “color,” but people in some other regions spell it “colour” (for some reason USAnian’s loath extra letter’s, but love adding extra apostrophe’s). And there are other spellings such as “цвет” or “रंग” or “warna” or “顏色” (depending again on Google Translate; I only wish I spoke those languages).

The crucial distinction I want to make concerns the difference between the reality of a number and how that number is represented. These are two entirely different things.

SheepIn the case of the natural numbers — the counting numbers — the count of something is a real thing.

The shepherd has that many sheep; there are that many boats in the harbor; there are that many roads a person must walk down (before they need new shoes).

half loafIn the case of the rational numbers — which we use for fractions of things — the part of something is real.

On the table is part of a loaf (better than no loaf); on the plate you left most of your vegetables (no dessert for you); I’m only partly certain anyone is reading this.


Now, I ask you, does this seem very rational to you?

Even the irrational numbers can represent real things, although they are more frequently abstract or [cough, cough] “imaginary.”

The ratio between the diameter of a circle and its circumference is a physical reality — one that we usually spell pi or π. (That said, many ratios are only rational numbers. For most people, the ratio of noses to fingers is a simple fraction, in the typical case: 1/10. Your mileage may vary.)

[Incidentally, pi is special in being founded on something so simple — the path across a circle versus the path around it — and yet is not only irrational but transcendental, which means there is no formula for pi. There are only formulas that converge on its true value.]

Loepold Kronecker

Herr Kronecker

Admittedly, as one progresses from the natural numbers to the rationals to the irrationals to the transcendentals and complex numbers, it seems harder to see the reality of the number.  The German mathematician, Leopold Kronecker, once wrote that, “God made the natural numbers; all else is the work of man.” (Speaking of spelling, what Kronecker actually wrote was, “Die ganzen Zahlen hat der liebe Gott gemacht, alles andere ist Menschenwerk.”)

But one can’t deny the reality of parts of things. Even the almost mystical ratio pi has a reality, although it does depend on the abstraction of a perfect circle — something that doesn’t exist in the real world. (But half a pint sure does, and probably sounds good about now.)

Back in the Infinity is Funny post I took you through the progression from the recognition of having that many of something (sheep, ships, barrels of wine) and the need for some convenient way to keep track of how many things.

One simple way just uses smaller objects, or even marks of some kind, to directly represent that many larger objects. Pebbles in a bag, knots in a rope, or marks in a clay tablet, are much easier to carry around than that many sheep or ships.

Hash marking time!

Hash marking time!

The prisoner traditionally scratching out the count of days uses a similar system, but recall how the hash mark system groups those marks into bunches of five. These bunches make it easier to tally the count. Just multiply the number of bunches by five and then add any left over marks in the last unfinished bunch.

These bunches illustrate how numeric representation can be “compressed” into a more compact form that’s easier to work with. And the compression is important; it takes a lot of marks to represent, say, the population of the world!

At this point, if you’re not clear on positional notation (and assuming you want to be), you should go back and read the L26 and L27: Details posts. [Insert usual cliché here about how I’ll “wait” while you do.]

The “basics” [hee, hee] are “basically” this: Positional Notation starts with some set of symbols — called digits — and the number base is just the count of how many individual symbols we’re using. Our familiar base ten notation uses ten symbols, the digits “0” through “9”.

I used to have a sign like this hanging outside my cube. It was fun to watch people read it and then walk away either grinning or puzzled.

I used to have a sign like this hanging outside my cube. It was fun to watch people read it and then walk away either grinning or very puzzled.

Other bases use fewer or more. Binary is base two, so it only uses two symbols: “0” and “1”. Octal (used by computer programmers in the dawn of time) is base eight, so it uses the digits “0” through “7”. Any given base never uses the digit it’s named after. Binary doesn’t use “2”; octal doesn’t use “8”; and we have no digit for ten in base ten.

Bases higher than base ten require new digits. Base twelve is a useful base, and it does require digits for both ten and eleven. Computer programmers from the middle ages use hexadecimal, which is base sixteen. That requires digits for the numeric values ten through fifteen. Usually, we start with “A” (ten) and use letters as needed. Hexadecimal uses the digits “0” through “9” and “A” through “F” after that (for the needed total of sixteen).

Positional Notation is called “positional,” because the position of a digit in a number acts as a multiplier. The value of each digit positions is determined by the base. The first position away (left or right) is the base (e.g. ten) to the power of one. If you’re moving left, the powers are positive; if you’re moving right (into the decimal points) then the powers are negative. The second position is to the power of two. The third position is power of three, and so on.

ZeroInterestingly, part of the reason the digit zero had to be invented is that it’s required as a place holder to keep the other digits in their proper places.

When it comes to counting things, no number base is any better than any other number base. There is a tradeoff in number of symbols versus length of the number string, but all bases can spell all natural numbers with total precision. Binary, with only two symbols, makes long number strings. Hexadecimal, with sixteen symbols, makes much shorter strings. For example: “1111111001100011” (2) versus “177143” (8) versus “65123” (10) versus “FE63” (16). All these are spellings of the same number.

On the other hand, different bases do have certain advantages when it comes to rational numbers. For example, 1/10 has a simple representation in base ten (0.1), but in binary it has a repeating pattern (0.000110011…). On the other hand, 1/3 has a repeating pattern in both base ten (0.333…) and base two (0.010101…), but not in base three (where it’s just 0.1).

All bases have this property that the digit pattern to the right of the “decimal” point may have an infinite (but repeating) pattern for various rational numbers. It’s just that different bases have different numbers that do that. This does have some consequences with regard to how computers use numbers.

GatewayI’ll leave you today with a fanciful (non-positional!) way of spelling natural numbers from a science fiction novel (Frederik Pohl‘s Heechee series).

The Heechee are a hyper-advanced alien race, and you’d have to be hyper-advanced to use this system. The symbols they use represent the prime numbers (which means they needed a lot of symbols). Natural numbers are expressed as a set of symbols (primes) whose sum is the number’s value. The number one is usually not considered a prime, but (like we need zero) is required to make the system work.

To give you a flavor of this, let’s use the following notation for the first dozen primes: {1}, {2}, {3}, {5}, {7}, {11}, {13}, {17}, {19}, {23}, {29} and {31}. Now let’s represent (some numbers):

10 = {7}{3} = {3}{7}
15 = {13}{2} = {2}{13}
20 = {19}{1} = {1}{19}

That’ll give you the idea. Further exploration is left to the curious reader as an exercise (which,… you know,… is good for you).

pi and i

pi and i

Notice that the order doesn’t matter, and there is no need for zero (unless you wanted to represent zero itself).

Notice also that there are alternate, longer, ways to represent the numbers. For example, 15 can also be {11}{3}{1} as well as {7}{5}{2}{1}. On might assume the Heechee use the minimal-length version and equally assume they order the symbols, big to small (or vice versa).

And on that note, “Land, ho!  All ashore!”

About Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts. View all posts by Wyrd Smythe

And what do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: