Dec 30, 2010

Modular division

Sorry, I've been very lazy about adding content here. In this entry I will consider modular division.

If the modulus m is not prime, some divisions have multiple results and others have none. Here, for example, is the division table for mod 10):



We see that 1, for example, is divisible only by itself, 3, 7, and 9. By contrast, 2 is divisible by every number except 5 and 0, but some of the results overlap: 2/2 equals both 1 and 6; conversely both 2/2 and 2/7 equal 6. The number 5 is rather special: It can be divided by every odd number; 5/5 can equal any odd number, and 0/5 can equal any even number; also, 5 shows up as a second quotient when 0 is divided by an even number.

In terms of regular, non-modular arithmetic, we may interpret the results as follows: 1/1=1 (the result shown in column 1, row /1) means that if an integer ending in 1 is evenly divisible by another integer ending in 1, the quotient will also end in 1, for example, 1/1, 11/1, 11/11, 111/1, and 121/11. And 6/8=2, 7 (column 6, row /8) means that means that if an integer ending in 6 is evenly divisible by an integer ending in 8, the quotient may end in either 2, as with 16/8, 36/18, and 96/8, or 7, as with 56/8, 126/18, and 136/8.

Where/how did I find these results? Well, the way I actually did it was slightly (?) messy, but the simple answer is that they can all be derived from the mod 10 multiplication table:



For example, consider the /2 row of the division table. To fill in the values, we must find 1/2, 2/2, 3/2, etc. In other words, we are looking for the values that satisfy a=1/2, b=2/2, c=3/2, d=4/2 and so forth. We can rewrite the equalities as 2a=1, b=2, 2c=3, 2d=4. etc. Having done so, we can look for a simply by running our eye down column 2 and finding the row(s) in which the result is 1, meaning that 2a=1. There aren't any. No number can be multiplied by 2 to give a result of 1 in mod 10.

With d=4/2, by contrast, if we follow the same procedure, rewriting the equality as 2d=4, and looking down column 2, we find a result of 4 in row 2 and again in row 7.

Comparing the two tables, we see that division by 1 (row /1 in the division table) is equivalent to multiplication by 1. This of course is not very surprising or interesting. Rather more interesting is that division by 3 turns out to be equivalent to multiplication by 7, and vice versa. Also, division by 9 is equivalent to multiplication by 9.

Now let's try switching to ±mod 10, meaning a notation using both positive and negative numbers (as introduced in my previous entry). This means replacing 9 with –1, 8 with –2, 7 with –3, and 6 with –4. For balance, let's add + signs to 1, 2, 3, and 4, and so as to leave no number unsigned, let's add ± signs to 5 and 0. Here's how the division table looks with this notation:


Just as with multiplication (see my previous entry), using ±mod notation gives all sorts of additional symmetry to the table. Above I wrote, "Division by 3 turns out to be equivalent to multiplication by 7, and vice versa. Also, division by 9 is equivalent to multiplication by 9." These results become less surprising here. In mod 10, 3*7 = 1, which we take as just one of the many results of multiplication. But in ±mod 10, we can easily derive (+3)*(–3) = –9 = +1. This strikes me as more satisfying, though of course it is simply a matter of using different notation. And the second result, concerning division and multiplication by 9, becomes downright trivial when presented as "division by –1 is equivalent to multiplication by –1."

So that's mod 10 division. Things get much more interesting, IMO, when we consider prime moduli, which I plan to do in my next entry.

Jun 13, 2010

More ±modular arithmetic

I have been playing around with modular arithmetic sporadically since earlier this year, and I posted a couple of entries about my observations in my old blog.

Fun with modular arithmetic (1)
Fun with modular arithmetic (2)

What is modular arithmetic? Here is the introductory sentence from the Wikipedia article about the subject:
In mathematicsmodular arithmetic (sometimes called clock arithmetic) is a system of arithmetic for integers, where numbers "wrap around" after they reach a certain value—the modulus 
Ordinary arithmetic may be thought of as using numbers on a line stretching infinitely from left to right; modular arithmetic may be thought of as using numbers wrapped around a circle.



I have noted that introducing negative numbers gives added symmetry to the modular multiplication table. With mod 10, for example, the conventional multiplication table (omitting the 0 column and row for simplicity) looks like this, with symmetry across both diagonals:



But with negative numbers, we get this:







I think the additional symmetry is beautiful—specifically, the negative mirroring left to right and top to bottom across the ±5 column and row. Nothing surprising about it, of course, but pretty nonetheless. Oh, and I would call your attention to the main diagonal (colored blue), which gives the products of numbers multiplied by themselves, i.e., squares. It turns out that all the squares are either plus or minus 1, plus or minus 4, or 5. And of course we mustn't forget 0, which is the product of 0 times 0. Using positive values, we have six possibilities: 0, 1, 4, 5, 6, and 9. In regular arithmetic, the final digit of any square number must be one of these six; i.e., no square numbers end in 2, 3, 7, or 8.

Moving right along, let's look at the multiplication table for mod 13, using both positive and negative numbers:





Here, since the modulus is odd, we don't have anything like the ±5 row and column in the ±mod 10 table, but we still have the negative mirroring of the left and right halves and top and bottom halves. And in this case it turns out that the squares, aside from 0, are limited to plus and minus 1, 3, and 4. Which may not be such an interesting observation, but note also that each row and column includes all the digits. This is because the modulus is prime. And each half row and half column includes either the positive or the negative value of all of the digits. This is a regularity that isn't be so obvious with the usual sort of notation, using positive numbers only, where the left-right and top-bottom mirroring is not to be seen:





With a prime modulus like 13 we can also present a complete division table, since every number except zero is uniquely divisible by every other number. I will show that another time. Meanwhile, here is a link to a page with many more interesting observations about modular arithmetic—which would be even better, IMHO, if it used negative numbers:

http://www.cut-the-knot.org/blue/Modulo.shtml

May 31, 2010

_Freedom Evolves_ by Daniel Dennett

A couple of days ago I finished reading Freedom Evolves by Daniel C. Dennett, 2003. From the back cover: "Can there be freedom and free will in a deterministic world? Renowned philosopher Daniel Dennett answers with an emphatic yes, showing us how we alone among the animals have evolved minds that give us free will and morality." That's an impressive claim, and I can't say it's false, but unfortunately my own mind hasn't evolved far enough to follow his train of thought. Sigh. Still, I enjoyed reading it as a diversion, and I did come away with a stronger—though still vague—sense that free will does exist, at least for practical purposes at the level at which we live.

Here are quotes of some passages that particularly caught my eye:
Our minds are just what our brains non-miraculously do, and the talents of our brains had to evolve like every other marvel of nature. (p. xiii)
That makes sense to me. And I presume that these talents are continuing to evolve!

In just one species, our species, a new trick evolved: language: It has provided us a broad highway of knowledge-sharing, on every topic. Conversation unites us, in spite of our different languages. (p. 4, emphasis added)
Some rue our isolation as individuals. I certainly know the feeling: despair mixed with panic at being utterly alone in my own head. But for whatever reason, I find it has faded away in my case. Now I am more inclined to feel joy at our ability to share thoughts, however limited the ability may be.

Now, for the first time in its billions of years of history, our planet is protected by far-seeing sentinels, able to anticipate danger from the distant future—a comet on a collision course, or global warming—and devise schemes for doing something about it. The planet has finally grown its own nervous system: us. (p. 4)
Here I disagree. That's a pretty-sounding thought, and maybe humans will develop a Gaia-consciousness in the future, but at this point I'd say we're clearly focused on ourselves. In a science-fiction scenario where the choice is between saving Earth (including some life forms but not humans) and saving the human race (by shipping out to another planet, say), I'm sure we'd pick the latter. Some sentinels! But actually I think that's the better choice: Even a single aware species seems more precious than a planet, however full of beautiful flora and fauna.

People are surprisingly good at distracting themselves from ominous prospects. (p. 9)
How true. Or from irksome responsibilities!

Our natures aren't fixed because we have evolved to be entities designed to change their natures in response to interactions with the rest of the world. (p. 9, Dennett's emphasis)

And just one more quote, the first sentence of the penultimate chapter:
Human consciousness was made for sharing ideas. (p. 259)
Voilà.

Oh, just for the record, here are a couple of posts about books from my previous blog:
Favorite lines from Ex Libris by Anne Fadiman
The Meaning of Life by Terry Eagleton

May 15, 2010

Hyperexponential complex numbers: A hasty sketch

The following is another reposting from my old blog, where it was the 11th entry. It is a quick summary of the number system I have rashly attempted to put together. It is rather (?) abrupt; for some background, combined with some false starts, see the other entries at the old blog.


A hyperexponential complex number (as I arbitrarily choose to use the term) refers to a number of the form Xn<x+iy>, where n, an integer, is the level, and x+iy, a complex number, is the locus.


The system uses the following basic definitions:

X0<x+iy> = x+iy

Xn<x+iy> = e^(Xn−1<x+iy>)


Thus,

X1<x+iy> = e^(x+iy), and

e^X−1<x+iy> = x+iy.


By extension,

Xm(Xn<x+iy>) = Xm+n<x+iy>.


Using X to represent the set of all hyperexponential complex numbers and taking the numbers of level 0 to correspond to C, the set of all complex numbers, we can write C X.


The numbers of each level can be represented on a Cartesian hyperexponential complex plane XPn where each number Xn<x+iy> is represented by the point (xn, yn).


Each point (xn, yn) on the plane XPn can be mapped down to a unique point (xn−1, yn−1) on the plane XPn−1 using the equalities

xn−1 = ƒ(xn, yn) = exp(xn) • cos(yn)

and

yn−1 = ƒ(xn, yn) = exp(xn) • sin(yn).


To express this mapping down in terms of hyperexponential numbers, let us use the sign

“\\\” (triple reverse solidus), read “maps down to”:

Xn<xn + iy n> \\\ Xn−1<xn−1 + iyn−1>


If (xn, yn) on XPn maps down to (xn−1, yn−1) on XPn−1, then we say that (xn−1, yn−1) on XPn−1 maps up to (xn, yn) on XPn. To express this mapping up in terms of hyperexponential numbers, let us use the sign “///” (triple solidus), read “maps up to”:

Xn−1<xn−1 + iy n−1>) /// Xn<xn + iyn>


If (xn, yn) on XPn maps down to (xn−1, yn−1) on XPn−1, then so do all the points (xn, yn + k•2π), where k is any integer. Conversely, if (xn−1, yn−1) on XPn−1 maps up to (xn, yn) on XPn, then it also maps up to all the points (xn, yn + k•2π), where k is any integer.


To restate the above in terms of hyperexponential numbers, if Xn<xn + iy n>) \\\ Xn−1<xn–1 + iyn–1>, then Xn<xn + i(y n + k•2π)> \\\ Xn−1<xn−1 + iyn−1> and Xn–1<xn−1 + iyn−1> /// Xn<xn + in + k•2π)>, where k is any integer.


If two hyperexponential numbers of level n map down to the same number of level n–1, we will say they are congruent modulo <2πi>. The modulus expresses the fact that the loci of such numbers differ by an integer multiple of 2πi. We can express this with the usual congruence symbol ≡ as follows:

Xn<xn + i(yn + 2π)> ≡ Xn<xn + iyn> (mod <2πi>)


What I am attempting to propose is a number system where the relationship between e^0 and e^2πi, e^2πi and e^4πi, and similar pairs with exponents differing by an integer multiple of 2πi is viewed as a type of modular congruence rather than equality.


To offer a loose analogy, the proposed relationship between these numbers (of level 1) and the complex numbers (level 0) is like the relationship between a set of unbounded date/time values in measured in days and hours, where 24 hours equals 1 day, and a set of time values measured in hours repeating in a 24-hour cycle, ignoring the number of days. For example, if i corresponds to “6 am,” then e^i(π/2) corresponds to “0 days and 6 hours,” e^i(5π/2) to “1 day and 6 hours,” e^i(9π/2) to “2 days and 6 hours,” and so forth.


By this analogy, the fact that (e^i(π/2))^i is not equal or even congruent to (e^i(5π/2))^i even though e^i(π/2) and e^i(5π/2) are congruent, both mapping down to i, is no more surprising than the fact that, say, half of “0 days and 6 hours” is not equal to half of “1 day and 6 hours” even though both original time values come out to 6 am when measured in the modular 24-hour cycle.


The road to L


For my tentative first post here I'm going to be lazy and recycle the first post from my old blog, just to see how it comes out.


(Originally posted 090502, last revised 090513)

It was with good intentions, or at least neutral intentions, that I started down the road that was to take me to L. I certainly wasn’t looking for L ; in fact, I had no idea it existed until I found it -- or rather, I should say, one of them, because there are in fact many Ls.

Here, approximated (?) to 50 digits, is the first L I found, which I rashly concluded was the only one:

0.3181315052047641353126542515876645172035176138714 +1.3372357014306894089011621431937106125395021384605i

The location of this number on the complex plane is shown roughly in the graphic above, with scale indicated by the unit circle in white.

I stumbled on it when I started evaluating log log log . . . log z for various complex numbers z. Quite to my surprise, iterating the log operation invariably led to this number, regardless of the value of z. (I started out evaluating iterations of ln with the Google Calculator, which revealed the unexpected convergence, and then I switched to Casio’s Keisan site, which allowed me to determine the value more precisely.)

I figured this must be a Very Special Number Indeed, and I decided to dub it “ L,” for “logarithmic limit. However, two mathematicians I consulted breathlessly concerning this Great Discovery patiently informed me that that it is just one of an apparently infinite set of such numbers, all satisfying the condition z = e^z. So it is far from unique. But I still think that it and its fellows are interesting and, yes, very special. I shall write more about them another day.