Feeds:
Posts
Comments

Posts Tagged ‘Mathematics’

A very dreary day here in Boston, and rather quiet. The local universities are closed because of the potential, largely unrealized, for heavy snow. But it makes for a welcome and unexpected holiday feeling.

screenshot2

Screen shot #2

To pass the time, I have been working with my friend on our as yet unnamed and undisclosed app. And he, I must say, is working from an undisclosed location. Better for concentration, he says. Anyway, we are supposed to meet with friends tonight at the local bar. It will be good to get out of the house after a day inside with the cat and the computer. And I must stay true to my vow: no coding after sundown!

Our aim with this app is (a) to have some fun, (b) to make beautiful images, (c) make a little money, in roughly that order. With (a) we have succeeded, and we think (b) is realistic. About (c) … well, um, if it pays for a few good books, that will be some satisfaction. A trip to warm place would be even better!

We will reveal the not so secret sauce that makes the app work at our forthcoming launch event. Suffice to say that an essential ingredient is a bit of mathematics. Rather simple mathematics, in fact. My friend and I argue about where the beauty in all this really lies. Let us stipulate, for the sake of argument, that this image, or some other image produced by the app, is a thing of beauty. Now the image depends on the code, and the code on the mathematics. So if beauty is in the image, is it not also in the code, and therefore also in the mathematics? This is clearly a deep philosophical question. Perhaps we can resolve it tonight at the bar in our weekly “symposium.” (Inside joke: my more learned friends tell me that a symposium is derived from Greek sym = together and pinein = to drink. Plato and his friends knew a good thing when they saw it!)

As for our product launch, I do hope that we manage to do it in the too far distant future. For me the perfect has always been the enemy of the good, or at least of the satisfactory. I am always driven to make the code as clean, elegant, even beautiful as I can, even though it will likely never be seen by more than two sets of eyes. Alas, I did spend a large part of today refactoring the code so as to achieve just these lofty aims. It makes no difference to the user, but somehow it makes me feel happier. I guess that is justification enough.

Well, I have produced more text than needed to frame the image, which was really the whole point. Time to do something different for a while!

HH

Advertisements

Read Full Post »

Today a friend sent me the image you see below. At first glance I thought it might have to do with a terrible chemical spill, or perhaps a new kind of Rorschach test for geographers. But the text he sent along with it, an opinion piece by Thomas Friedman, brought everything into instant focus. The subject was politics. Or, more precisely, how to make democracy work by outlawing these bizarre and diseased shapes.

Fig. 1. Fourth Congressional District, Illinois

The image depicts the Fourth Congressional District of Illinois, not the subject of a chemical or psychological investigation. Why the strange shape? Why not a square or something chunky? Why these amoeba-like projections of political protoplasm? Well, once you think “amoeba,” you find the answer: the political protoplasm is protecting itself by a process known as “redistricting.” The result is a “gerrymandered district.”

The process works this way. An election is held. If the protoplasm wins an election, it gets to add surrounding territory to itself where there is food, that is, territory with voters that like it. This is called “ingestion.” Moreover, when the protoplasm covers dangerous territory, where voters live who do not like it, it can withdraw. This is called “rejection.” It is as distasteful and hurtful a process as it sounds. After each election, the amoeba changes shape, adding territory here, withdawing from territory there. Each time it wins, it becomes stronger, and so more likely to win again.

If this reminds you of the Blob, the movie, it should. And if it scares you, it should. Driven by its instinct to survive, our shape-shifting protoplasmic political animal can assume quite odd forms, with tentacles, antennae, and all manner of misbegotten pseudopods: protuberances, protrusions, and projections.

Fig. 2. Amoeba, from Mr. Lazaroff's Biology Class

The consequences of gerrymandering are well-known: a political ecology low in species diversity, a dysfunctional democracy where the nutcases rule. Hmmm…, this sounds familiar!

You ask, “fine, but where, dear blogger, is the advertised geometry? This is biology!” Well, it is simple. Those protuberant projections of political protoplasm are the problem. They must be eliminated by means seen to be fair by all: left, right, center, up and down. This is where the mathematics comes in. Mathematics gives a way of rating Congressional districts, a way of computing a numerical score of fairness, of lack of willful bias based solely on shape. The score is a number between 0 and 100, just like the test scores we used to get in school. A score of 100 is perfect; a score of 70 is OK, but anything too low we deem unacceptable.

To apply geometry to politics, we form a citizens’ commission, or whatever the law designates, to choose the district boundaries. They may do as they wish, subject to one proviso. The choice must conform, just as ours do, to a Higher Law. The Higher Law says: the score cannot too small, say, smaller than 20.

Fig. 3. Amoeba, score = 22

The rule for computing the score not a secret — there are ultimately no secrets in politics. But we want to keep up the suspense and so will divulge it only at the end of this article. A reward for the diligent reader!

Pending this revelation, let’s look at examples. Consider first a circle — an excellent shape for a Congressional district. Large or small, it is rated 100. Consider next a square, any square, small, medium, large, or humongous. Also a good district shape. It has has a rating of 78, regardless of size. What about the Fourth Congressional District? Well, I am working on that one. But preliminary estimates tell me that its score is veeery small. I did, however, do the computation — an estimate, really — for the amoeba, leaving out the vacuoles and two of the overlapping pseudopods. According the the worksheet (the figure with the grid, click to enlarge), the score is about 22. Much lower than the circle or square! Barely a pass!! In general, the more protuberances, protrusions, and projections, the skinnier the shape is overall, the smaller is its score

By Our Law, the amoeba-district is Approved. As for the Fourth Congressional District, No Way!

I very much like Thomas Friedman’s opinion piece. Let the center rise. Let it hold — indeed, let it hold sway! Let the nutcases fall by the wayside, to the left and the right of the road, where they can prattle, babble, and gesticulate to their heart’s content. But let’s bring some reason to public life, for God’s sake!

To end this essay we reveal the secret of computing the score. Take a shape in the plane, any shape. Find its perimeter, P. Find its area, A. Divide A by P-squared. Multiply by four times Π = 4 times 3.1416 = 12.5664. Then multiply by 100. The result is the score. A simple, apolitical formula. Let’s use it! Write your congressperson!!

[For more mathematics, you can also take a look at these highly recommended articles by Steve Strogatz]

Other links: Amoeba in Camille’s Sketchbook

Read Full Post »

A friend asked: “how can you blog a poem? Facebook does not respect line breaks!” ¬†Fortunately WordPress does show respect, besides giving the possibility of good graphics design — the WordPress themes.

To blog poetry: choose the HTML tab in the WordPress editor, then just type the lines as you normally would, as in the poem below by Lewis Carroll. Stanza structure is respected as well. (Am I using this as a pretext for posting the poem, my favorite since childhood? It must have already have been posted on the web n umptillion times. The answer is, Yes! I could not resist:-)

‘Twas brillig, and the slithey toves
Did gyre and gimble in the wabe:
All mimsy were the borogroves,
And the mome raths outgrabe.

“Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious Bandersnatch!”

He took his vorpal sword in hand;
Long time the manxome foe he sought —
So rested he by the Tumtum tree,
And stood awhile in thought.

And, as in uffish thought he stood,
The Jabberwock, with eyes of flame,
Came wiffling through the tulgey wood,
And burbled as it came.

One, two! One, two!
And through and through
The vorpal blade went snicker-snack!
He left it dead, and with its head
He came galumphing back.

“And hast thou slain the Jabberwock?
Come to my arms, my beamish boy!
O frabjous day! Callooh, Callay!”
He chortled in his joy. ‘

Twas brillig, and the slithey toves
Did gyre and gimble in the wabe:
All mimsy were the borogroves,
And the mome raths outgrabe.

HH

PS. Lewis Carroll, the famous author of Alice in Wonderland, aka Charles Lutwidge Dodgson, was a lecturer in mathematics at Oxford. See Modern Mechanix for an interesting post and reference to a 1956 Scientific American article on Carroll-Dodgson.

Read Full Post »

The aim of this post is to convince you that

   Yes you can!

Yes what? Yes you can understand mathematics. Even if you thought you couldn’t!

I am going to take you gently by the hand and lead you to the frontier of research. You will be able to understand a problem that to this day no mathematician has solved. Many good ones, even great ones, have tried to solve it.

[For more mathematics, you can also take a look at these highly recommended articles by Steve Strogatz].

Now to my story, and to the unsolved problem. As a child growing up in Reykjavik, I was fascinated by numbers. The whole idea of counting was wonderful. I could count stairs, the number of seconds I had to wait before searching for my friends in a game of hide-and-seek, the number of grains of sand on the beach … well, I didn’t count the grains, but I thought about whether and how I could do this!

That was when the question of whether there was a biggest number came up, and whether there were numbers big enough to count the grains of sand on the beach, or the stars in the sky. I later found out that Archimedes wrote a book, The Sand Reckoner, on this subject about fifty years after Euclid’s Elements. Archimedes was the Greek mathematician who jumped out of his bath shouting “Eureka!”

From this modest beginning, I always found mathematics to be fun and fascinating. How many of something or other are there? A pretty basic question, whether it has to do with stars, grains of sand, atoms, or numbers.

Let’s go back to the biggest number problem that troubled me long ago. It wasn’t too hard to solve: if you think you have the biggest number in the universe, think again. Because you can always add one to it to get a bigger number. Conclusion? There are infinitely many numbers. Plenty for the grains of sand on all the beaches, the stars in the skies, the atoms inside the stars, and plenty left over for fun, games, and mathematics!

So let’s think about something harder: the prime numbers. These are the numbers 2, 3, 5, 7, 11, 13, etc. They are the numbers that cannot be written as a number times another one. (Okay every number is one times itself, but that is not what we had in mind.) Thus 6 = 2×3 is not prime, and neither is 60 = 2x2x3x5. But the next number, 61, is prime.

Well, it is not so hard to find more prime numbers. But how many are there? Turns out that the answer is: infinitely many. The infinity was hiding in the etc! (Joke)

The existence of infinitely many prime numbers was known at least as far back as Euclid, who worked in Alexandria around 300 B.C. The proof of this fact is just a paragraph long. It is a truly elegant and beautiful proof.

Next question. You have probably noticed that there are pairs of primes like 5, 7 and 11, 13 that are spaced very closely. As closely as primes can be spaced, except for 2 and 3, which is an oddball case (no pun intended) that is never, ever repeated.

Again, it is easy to find more of these “twin primes.” For example, 17, 19. It is also easy to write a computer program to search for twin primes — just a few lines of code. A short paragraph. Elegant, just like Euclid’s proof. Wherever you look, you find twin primes, if you look hard enough — that is, run our computer program long enough.

How many twin primes are there? We don’t know! All of my mathematician friends (I have several, along with my old physics buddies from Reykjavik) think that there are infinitely many twin primes. But none of them know for certain if this is a true statement. No one has found a proof, despite centuries of looking for one.

So there you have it! You understand an unsolved problem at the frontiers of research! Time to head for the nearest cocktail party and spread the word!!

PS. There are many, many more unsolved problems. There are big problems, like the Clay Millennium Problems, one which has recently been solved by the Russian mathematician Grisha Perelman. This is the Poincaré conjecture. But my mathematician friends tell me that their field is like the wild west. Big, open frontiers. Many things to explore. Of course, that’s their thing. For now software and music are mine. But do I enjoy mathematics from the sidelines, or, to be more precise, my armchair. Time for a beer!

Read Full Post »