math, short, thought experiment

Short: Probabilities

For this thought experiment, let’s equate a probability of 1 (100% chance, a certainty) with the diameter of the observable universe. The diameter of the observable universe is about 93 billion light-years (because, during the 13.8 billion years since it started, the universe has been steadily expanding). With this analogy, let’s consider some probabilities!

According to the National Weather Service, your odds of being struck by lightning this year (if you live in the US, that is) are 1 in 1,042,000. Less than one in a million. One part in a million of the diameter of the universe is 93,000 light-years, which is far enough to take you outside the Milky Way, but on a cosmic scale, absolutely tiny.

The odds of winning the jackpot with a single ticket in the U.S. Powerball lottery are around 1 in 292 million. That’s like 318 light-years set against the diameter of the universe. 318 light-years is a long way. Even so, it’s an almost-reasonable distance. Most of the brighter stars you see in the night sky are closer than that. That’s almost the Sun’s neighborhood. Compared to the entire universe. Maybe that’s why they say the lottery is for suckers…

The odds of being struck by lightning three times in your lifetime are, mathematically, 1 in 1,000,000,000,000,000,000. The actual odds are even lower, since there’s a non-zero chance that you’ll be killed by a lightning strike, making getting another impossible. If your odds of dying in a lightning strike are 10%, then your odds of surviving are 9/10, and your odds of surviving the first two so you can get the third are (1 in a million) * (9/10) * (1 in a million) * (9 in 10) * (1 in a million), or about 81 in one hundred million trillion.That’s 81 in 100,000,000,000,000,000,000. That’s roughly the diameter of the Earth-moon system compared to the diameter of the universe.

The odds of putting 100 pennies in a cup, shaking them up, and scattering them so they all land flat, and then having every single coin come up heads, are 1 in 1, 267, 650, 600, 228, 229, 401, 496, 703, 205, 376. That’s the diameter of a grain of sand compared to the entire universe. Literally.

Get a standard deck of cards. Take out the jokers and the instructions. Shuffle the deck and pick a card at random. Do this 25 times. The odds of picking the jack of clubs every single time are like a proton compared to the visible universe.

If you pick 43 letters at random, the odds of forming the string

actisceneielsinoreaplatformbeforethecastlef

(that is, the first 43 letters of Hamlet) are as small as one Planck length (which is the smallest unit of distance that ever gets used in actual physics) compared to the visible universe. For reference, a Planck length is ten million trillion times smaller than a proton, which is itself a trillion times smaller than a grain of salt.

Incidentally, if you assembled random 43-letter strings, you would have to do it

32, 143, 980, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000

times to have a 99% chance of producing the first 43 letters of Hamlet in one of them. But a human bard did it in, at most, a couple hundred tries. Isn’t that weird? More probability stuff (and black hole stuff) to come!

Standard
Uncategorized

How Many Novels Can There Be?

I like reading. I like writing. When you’ve been writing for a while, you start to get really obsessed with word counts. Anybody you talk to about publishing something you’ve written will want to know your word count. For short fiction, you sometimes get paid by the word. And the number of words in the thing you’ve written determines whether it counts as a short story, a novella, a novel, as War and Peace, or as an encyclopedia.

Every year, I participate in National Novel-Writing Month. Unless, you know, I don’t feel like it. But I’ve participated more years than not, and I’ve produced a surprising number of novels. Every single one of them terrible, but that’s not NaNoWriMo’s fault. The goal in NaNoWriMo is to write a novel of at least 50,000 words in 30 days. And I got to thinking: how many novels that length are there?

Well, in the English language, there are somewhere between 100,000 and 1,000,000 words. But you’ll be able to understand 95% of everything written in English by knowing only the 3,000 most common ones. After all, even though it’s a valid word, people generally don’t go around calling each other antipodean anymore.

The question is: “How many 50,000-word novels are possible, using mostly the 3,000 most common words?” The naive answer is to allow each word to be any of those 3,000, which means the number of possible novels is 3,000^(50,000). That’s 1.155 x 10^173,856. You’ll be happy to know that this number is so large that, when I tried to copy and paste it into this article, it crashed my browser.

Of course, this will include novels that consist entirely of the sentence “Anus anus anus anus anus!” over and over again, which is so avant-garde it makes me want to go pee on Samuel Beckett. The list will also contain more coherent, although still somewhat dubious works, like Stuart Ashen’s peerless desk reference, Fifty-Thousand Shades of Grey. But Fifty-Thousand Shades of Grey is actually constructed of coherent sentences. (Well, one coherent sentence, at least…) Most of the novels in this ridiculously long list will be more along the lines of “Him could carpet but also because you die but but the but the but the butt.”

We’re working from a flawed assumption: that a text is just a bunch of words stuck together. But unless you’re James Joyce (or, to a lesser extent, Stephanie Meyer), that’s not how it works. A novel is a bunch of words stuck together in a particular way. Although “that that” is grammatically valid (even though it looks weird on the page), “the the” isn’t, and “centipede cheese carpet muffin” is the kind of thing I say when I haven’t been getting enough sleep.

We’ve been working from the assumption that any word is equally likely to follow any other word. That is, that all word-pairs are equally likely. They’re not. “Our way” is a lot more common than “our anus,” for instance. Naively, the probability of any two-word combination is (1 / 3,000)^2, or 1 in 9,000,000. To put it another way, there are 9,000,000 two-word pairs, 25,000 of which would make up our nonsensical novel. It’d be much closer to reality to assume that, on average, there are only 50 words that make sense after a given word (the number will be much higher (in the thousands, I’d imagine), for words like “the”, and lower for words like “hoist.”) So, in reality, there are only 150,000 two-word combinations that make sense.

We could extend this to three-word combinations, but there are two problems with that: 50,000 isn’t evenly divisible by three, and that repeating decimal will drive me crazy. More importantly, the longer your word-block, the more words become possible at the end, until you’re getting close to 3,000 possibilities again. For example: “The” could be followed by any noun in our 3,000-word list. “The man” must be followed by a verb, the start of an adjective phrase (example: “The man I met last summer“), or something like that. “The man talked” will likely be followed by a word like “to” or “about.” But there’s an enormous range of things that the man could be talking to or about, so pretty much any noun or participle is fair game, bringing the number of possibilities back up into the thousands again.

So how many novels can there be? Well, the upper bound is probably (as we’ve seen), (3,000 * 50)^25,000, which is 1.912 x 10^129,402. That’s still a number so large there’s no name for it, but it’s smaller than our first number by almost fifty thousand orders of magnitude, which is something.

But let’s take it one step further. To simplify the math, I’m going to skip right to four-word combinations. And let’s say that any two-word combination forms the start of a phrase, and that the third word in the phrase can only be one of 10 words, on average. And, to take into account the fact that the number of choices start rising again with a long enough phrase, let’s say the fourth word can be any one of 500 words. The number of possible 50,000-word novels is now (3,000 * 50 * 10 * 1,000)^(12,500), or 1.382 x 10^114,701. So we’ve chopped off another ten thousand orders of magnitude. Still, that’s a big number. And, although I don’t have the math or linguistics background to prove it, I’m guessing that’s pretty close to the number of actual, sensible novels you could construct with 50,000 words: it takes into account the rough structure of the English language. This is related to the idea of a Markov Chain, which is a mathematically-formal way of saying “where you’re likely to go next depends on where you’re at now.”

For your amusement, I’m going to back up this post, and try to copy and paste (3,000 * 50 * 10 * 1,000)^(12,500) just below. If you see a horrific salad of numbers, you’ll know it worked. If you see an apology, you’ll know it crashed my browser again. Wish me luck!

Sorry. It didn’t work. Browser crashed again. But that’s probably good news for you, the reader, since, when I pasted the number of possible sensible novels into my word processor, it produced a document 32 pages long consisting of nothing but digits in 12-point Helvetica. I think that’d make most people’s eyes bleed. Or explode. Or sprout wings and fly away.

The moral of this story is: don’t worry about machines taking over the writing of novels. If a computer could output one word of its current novel every Planck time (which is generally agreed to be close to the shortest time interval that makes sense in our physics), the time it would take would be larger than the current age of the universe. And that’s an understatement. It would actually be so much larger than the current age of the universe, that if I were to express it as a multiple (in the same way I say 10^24 is a trillion trillion times larger than 1), then I’d have to write out the word “trillion” 9,558 times just to express it. If I allow the convention that 1 googol googol is (10^100) * (10^100), or 10^200 times bigger than 1, then I’d need to write “googol” over 1,100 times. There is simply no good way to express the size of this number. It’s 10^110,000 times larger than the age of the universe in Planck times, the diameter of the observable universe in Planck lengths, and the number of particles in the universe.

Boy oh boy. I started out talking about novels, and now I’m getting into numbers that trip the circuit breakers in my brain. Math can be scary sometimes. And you wanna know the scariest thing? There are numbers, like Graham’s number and the outputs of the Ackerman function for inputs larger than (6,6), that make the number of possible novels look exactly like zero by comparison, for any practical definition.

…I need to go lie down now. Although I’m probably going to come back later and talk about really enormous numbers, because part of my brain seems to want me to have a stroke.

Standard
Uncategorized

Give me a Trillion of Everything!

I think one trillion is my favorite number. The word “trillion” just has a nice sound to it. It could be the name for a classy British stripper. But it’s also a good number for bridging the gap between “numbers human beings can kinda get their heads around” and “numbers that make human beings’ eyes glaze over.” One trillion certainly isn’t as intuitive as three, or one thousand, but it’s more intuitive than something like 10^80. So today (in a slight nod to an earlier post), I want to see what it’s like to have a trillion of various things just lying around.

Gold atoms. Who wouldn’t want a trillion gold atoms? If you just stack them in a cube, that cube will have edges 10,000 atoms long. That works out to a cube 2.72 microns on an edge. Okay, so a trillion atoms of gold isn’t as impressive as I thought. I don’t think it’ll ever catch on as a currency, seeing as if you handled it too roughly, it’d slip between the cells of your finger and disappear into your bloodstream.

But actually, gold atoms don’t stack in a neat cubic lattice. They, like many other metal atoms, arrange themselves in a face-centered cubic lattice, which is also the most efficient way to stack oranges or cannonballs (hands up everybody who can’t help but think of Kurt Vonnegut). So a real trillion-atom gold bar (still measuring 10,000 atoms along every edge) would actually be 2.72 microns long, 2.36 microns wide, and 2.22 microns thick. My entire investment could be eaten by a particularly zealous amoeba.

Bacteria. E. coli is a useful bacterium. For one thing, it’s easy to grow in the lab, which lets scientists observe bacteria without the hassle of giving them weird shit like quaternary ammonium salts or whatever those other stubborn bacteria like. For another, their dimensions are conveniently close to nice, round numbers: the average E. coli bacillus is about 1 micron in diameter and 2 microns long. So what if you had a trillion of them? Well, let’s stack them in a 10,000 x 10,000 x 10,000 cube again. This bacterial block would be one centimeter wide, one centimeter high, and two centimeters long. It would be a slimy, milky mass the color of bad mozarella. You could eat it on a cracker. (Sorry.)

Human cells. I don’t like human cells, because they’re all lumpy and irregular and hard to measure. Lucky for me, there’s a kind of tissue called simple cuboidal epithelium, found in the ovaries, the thyroid glands, and, as pictured below, the little pee-secreting tubules of the kidney:

(Source.)

In addition to being nicely-shaped, keeping our bodies from filling with urine (that’s how kidneys work, right?), and having a cool name (“Cuboidal” is a great word. Even better than “furan.”), they’re also pretty regular in size: about 10 microns on an edge. And being cubes, I don’t have to bother with all that hexagonal-close-packing math. I can just multiply 10 microns by 10,000. One trillion human cells would form a gelatinous cube (no, not that kind) ten centimeters on an edge. It would be a horrible meaty cube weighing around a kilogram. You could eat the whole thing if you were really hungry (it’d weigh the same as a 35-oz porterhouse). I don’t recommend that, though: I tried some cooked kidney once, and I couldn’t quite get over the fact that, with every bite, I got the stench of one of those public urinals that hardly ever gets flushed.

Eugh. Let’s move on to something less horrible.

(Left picture source. Right picture source.)

I might have been lying about that. These are Dust mites, which I never realized bear a very suspicious resemblance to the headcrabs from Half-Life 2. I honestly think the one on the right is cute, but then again, I’ve probably got so many holes in my brain a squirrel could use it to store nuts for the winter. I had to include both of these pictures because the one on the right is a classic well-proportioned dust mite (lovely eyeless arachnids that they are). But the one on the left is posing with a motor and gearbox whose gears are the size of blood cells. How could I not include that?

But back to the matter at hand: I want a trillion dust mites. (Leave them at the corner of 7th and Walthrop and we’ll release your mother unharmed.) An average dust mite measures around 300 microns wide, 300 microns tall, and 400 microns long. My trillion-mite brick measures 2 meters by 2 meters by 4 meters. In other words, I’ve now got a heap of creepy-crawlies big enough to fill a medium-sized closet. I’d be concerned about them giving me allergies, but imagining a cube of mites larger than me has made me pee my pants, which is a more immediate concern.

Peas. (I was tempted to use a horrible pun as a segue, but the thought made me throw up in my mouth.) I really like peas. My parents never had to tell me to finish my peas. I ate the little buggers right up. Plus, they’re another conveniently uniform object we can use to demonstrate just how massive a trillion is. According to this USDA pea-grading document (the existence of which pleases me), a green pea averages 8 millimeters in diameter. Since peas are irregular and don’t stack as neatly as gold atoms, I’m going to come up with the volume of my trillion-pea cube a different way. We’ll assume they’re roughly hexagonally-close-packed, which means that only 74% of the volume will be occupied by peas. The rest will be air. We end up with about 362,300 cubic meters of peas. They would form a cube big enough to span the width of a football field (either kind), and most of the length: 71 meters on an edge. The peas would weigh 180,000 metric tons, apparently half as much as the Empire State Building. Here’s the kind of vehicle you’d need to transport that much stuff:

(Source.)

I’m now imagining an alternate reality in which the Persian Gulf is a global center of pea production. In which the economic fate of the world is determined by the price of a barrel of green peas. In which pea tankers with armed guards criss-cross the Pacific. It wouldn’t be any weirder than this reality.

 People. There are not a trillion human beings on Earth. According to most of the estimates I’ve ever read, the Earth can’t support a trillion people. But that doesn’t mean we couldn’t make a trillion clones and plop them down. Let’s be all sociological and assume that every human being belongs to a family of five, and that one hectare (10,000 square meters) is enough space for their house and enough crops to keep them alive. (One hectare is about the area of the grassy center of a standard athletic track, or the area of a rugby field, or the area of a square that could enclose the base of the Statue of Liberty.) So we have 200 billion families, each requiring 10,000 square meters.

People can live in the ocean, right? And you can grow a pretty good selection of crops in Antarctica, right? Because it turns out that a trillion humans requiring a fifth of a hectare each would require thirteen times the Earth’s land area (arable or not). They’d require ten times the Earth’s surface area. Probably not going to happen, although I really, really like the image of farmers in wetsuits paddling around their kelp fields with rakes.

But if it was just a trillion-person crowd (doomed to starvation), what would that look like? We’ll assume they’re all pretty friendly, and so they only require a square one and a half meters on a side. Whether they assembled in a square, a circle, or some other roughly-symmetric shape, the crowd would be about 1500 kilometers across. That’s a quarter of the size of the United States, China, or the Roman Empire at its peak (thanks, Wolfram Alpha).

Now, a human being breathes something like 11,000 liters of air in a day. That means our crowd is going to be breathing the volume of Lake Superior daily. An average resting adult requires something like 210 milliliters of oxygen per minute. Taken together, they’d require sixteen Amazon Rivers’ worth of oxygen flow. Much to my surprise, they probably wouldn’t suffocate. If we assume each person has access to the air in their square from sea level to the “death zone” (an altitude of about 8,000 meters, where the oxygen concentration is low enough to become acutely lethal), they’d all be able to breathe for about 20 years. Plenty of time for photosynthesis to replace the oxygen. And plenty of time for that crowd to become very, very smelly. And hungry. And violent. We probably shouldn’t have made a trillion clones. I blame you for giving me the idea.

And now, we’ve hit another limit. We’re already talking about continent-scale collections of objects, and like I said, human beings aren’t all that good at understanding things on really large scales. So I’ll stop at our trillion-person Woodstock before I start imagining the stink of two trillion unwashed feet.

Standard
Uncategorized

Fun with logarithms 2: A race between a snail and a beam of light.

In my last post, I mentioned how cool logarithmic scales were. A logarithmic scale, for instance, takes two numbers that differ by a factor of one trillion (say 0.001 and 1,000,000,000, which differ by 999,999,999.999) and reduce their difference to a much more manageable number: 12.

Logarithmic scales are handy in the universe we happen to live in, because, as you might have noticed, this universe contains a lot of very tiny things and a lot of ridiculously large things. It contains both bacteria and galaxies, which differ in scale by a factor of 950,000,000,000,000,000,000,000,000. But today, we’re not talking about distances. Today, we’re talking about speeds. Some things in the universe move very quickly. Others move very slowly. Continents drift together (and apart) at speeds of around 1.585×10^-9 meters per second, which is less than the diameter of a DNA helix every second. Light, on the other hand (which, as far as we know, moves as fast as it is physically possible to move) travels at 299,792,458 m/s. This is the perfect place for a logarithmic scale.

Therefore, I present to you, the Bolt, a logarithmic scale named in honor of Usain Bolt, who is the fastest Jamaican in the world. He’s also the fastest human in the world. To get a measurement of an object’s speed in Bolts, divide that speed by our reference speed (1 meter per second, which is about walking speed), and take the base-10 logarithm of the result.

But actually, the Bolt is kind of a large unit. Ironically, we’ve gone from too large a scale (0.0000000015 m/s to 299,792,458 m/s) to too narrow a scale. So let’s take inspiration from the decibel, and multiply the result of our logarithmic calculation by 100, which gives us a measurement in centiBolts (cBo).

Let’s work an example before I get to the list, which is the fun part. The land speed record for a garden snail (which record, apparently, you can only challenge at the World Snail Racing Championships in Congham, England) is 0.002752 meters per second. To get the speed in centiBolts, we calculate 100 * log10((0.002752 m/s) / (1 m/s)), which works out to -256.035 centiBolts. Now that you know how the math is done, let’s compute the centiBolt rating for some ridiculously low and ridiculously high speeds!

With a helium-neon laser and a Michelson interferometer, you could (probably) measure a change in distance of 300 nanometers over the course of an hour, which is 0.00000000009 m/s or -1005.61 centiBolts.

Continents drift apart (or together) at a speed of about 3 centimeters per year, or -902.2 cBo.

Because it loses orbital energy by stretching the Earth (making tides) and slowing Earth’s rotation, the Moon’s orbit is very gradually getting larger. The moon, therefore is receding at about 3.8 cm/year, or -891.9 cBo.

Human hair grows at about 15 cm/year, or -832.3 cBo.

Bamboo grows at a rate of about 14 microns per second (meaning it can grow several feet in a day), giving it a speed of -485.4 cBo.

Jakobshavn Isbræ glacier, in Greenland, reaches a maximum speed of 12,600 meters per year, which comes out to -339.8 cBo.

As I mentioned before, the land speed record for a garden snail is 0.00275 m/s or -256.07 cBo.

A wind speed of 1 mile per hour (MPH) would just barely be detectable by the drift of smoke. It wouldn’t even move weather vanes. It gets a speed rating of -34.97 cBo.

1 m/s, being our reference point, gets a rating of 0 cBo.

Usain Bolt, for whom we named this unit, ran at an average speed of 10.438 m/s when he broke the 100 m world record. He was running at 101.9 cBo…

…but his maximum speed was 12.42 m/s, or 109.41 cBo.

In the United Sates, most non-residential roads have a speed limit of 45 MPH. In my experience, no matter the speed limit, people usually drive around 50 MPH, which is 134.9 cBo.

I once drove my car at 105 MPH (don’t tell anybody). I was moving at 167.2 cBo.

The Bugatti Veyron, the world’s fastest street-legal production car, can get up to 267.856 MPH (431.072 km/h), or 207.825 cBo.

The fastest wheel-driven car on record (as of May 2014) got up to 403.10 MPH (648.73 km/h), which is a terrifying 225.58 cBo.

The land speed record (again, as of May 2014, set by the ThrustSSC, the first land vehicle to break the sound barrier) is 760.343 MPH (1223.657 km/h), or 253.1356 cBo.

The F-22 raptor can supposedly reach Mach 2 (the actual top speed is probably classified), which is 277.093 cBo.

The awesome-looking (and sadly retired) SR-71 Blackbird could manage 2,193.2 MPH, or 299.1 cBo.

The even more awesome rocket-powered X-15 could do 4,160 MPH (6,695 km/h), or 326.9 cBo.

At this point, we’re moving from the realm of really fast aircraft to the realm of really slow spacecraft.

The International Space Station orbits at 7.656 km/s, which is 388.4 cBo. It moves so fast, that it only takes 14 milliseconds to travel its own length. Curious about what 14 milliseconds sounds like? So was I. It sounds like this: https://soundcloud.com/hobo-sullivan/the-iss-passes. Which is just barely long enough for my ears to recognize as an actual sound.

The human speed record (relative to the Earth) was set by the crew of Apollo 10, who reached 24,791 mph, or 404.5 cBo. At these speeds, which are frankly quite ridiculous, the spacecraft was covering 1 kilometer every 90 milliseconds. To give you an idea how fast that is, here’s a 90-millisecond tone: https://soundcloud.com/hobo-sullivan/apollo-10-travels-1-kilometer.

The light gas gun at Sandia Labs (which, it has been noted, is essentially a high-tech BB gun) can fire projectiles at a silly 36,000 MPH, or 420.7 cBo. At these speeds, a small plastic projectile can make a hand-sized crater in a block of aluminum.

The Helios 2 solar probe holds the record for the fastest human-made object. When it swung by the sun (getting slightly closer to the Sun than Mercury), it hit 157,100 MPH, or 484.7 cBo.

But, as all physics geeks know, 157,100 MPH isn’t all that fast. It’s only 0.00023 times the speed of light, or 0.00023 c (as science-fiction authors put it). There are much faster things in this crazy-ass universe.

Like, for instance, the brightest component of a lightning bolt, the return stroke, which, according to some measurements, reaches 220,000,000 MPH, or 0.3281 c, or 799.3 cBo.

The Large Hadron Collider can accelerate protons much faster. It can get them up to 670,615,282 MPH, 0.999999991 c, or 847.7 cBo.

Which is not far from the maximum speed any object can attain, the speed of light itself: 670,616,629 MPH, 299,792,458 meters per second, or 847.7 cBo.

Sorry, Mr. Bolt. You’re going to have to train harder. You’re still running 29,979,246 times slower than you could be. Are you even trying? Come on!

Standard
Uncategorized

The curse of dimensionality.

(The coolest part of this article will be that “The Curse of Dimensionality” is an actual legitimate term from computer science, even though it sounds like something from H.P. Lovecraft’s nightmares. But it’s a real scientific thing. Take a look.)

I like cellular automata. A cellular automaton is a bunch of cells arranged on some kind of grid. Each cell has a “state” variable. Each time-step, it decides which state to go into next according to a rule which looks at its current state and the state of all the cells around it. It’s about as simple as a computer simulation gets, but even in one dimension, it can produce amazing psychedelic patterns like this one:

Image

(The picture is two-dimensional, of course. Each timestep, the one-dimensional line of cells is rendered as a line of colored pixels, with its distance from the top increasing as time goes on. Click on the picture to get a version that isn’t all compressed and horrible.)

It doesn’t take much processing power to run a program like this. For instance, a 1-D cellular automaton with 1,000 cells and 8 possible states would only require 1,000 bytes of memory.

2-D automata take up a little more space, but they can still run smooth as butter on most computers, especially with neat, streamlined code. In two dimensions, an 8-state cellular automaton on a grid measuring 1,000 by 1,000 (1,000,000 cells) would only require a megabyte.

But you know me. I don’t like it when things are easy. I like it when things are weird. What if, for instance, we imagined a 3-dimensional cellular automaton? Here, each cell has 27 neighbors (itself and the cells adjacent to it and touching its corners and edges). If this cube of cells measured 1,000 cells on an edge (and each cell could still be in one of 8 states), then the cellular automaton would need 1 gigabyte of memory. I’m old enough to remember when that was an impressive amount, and indeed, processing a gigabyte of at 30 frames per second takes a bit of power. More power than a Pentium III chip had in 1999, at least.

But couldn’t we go bigger? OF COURSE! In a 4-dimensional cellular automaton, every cell has 81 neighbors, we’ve got a trillion cells, a terabyte of data (you’re probably going to need an extra hard drive), and our throughput would strain even a modern graphics card.

But let’s go BIGGER! I like the number 6, so let’s imagine a cellular automaton in 6 dimensions. Every cell has 729 neighbors adjacent to it. (Remember the good old days, back in 2 dimensions, when every cell had a measly 9 neighbors?). We’re going to need 1 million hard drives to store all those 8-bit numbers (there are 1,000,000,000,000,000,000 of them, after all), and we’re going to need a supercomputer more powerful than any currently in existence to handle the 60 exaFLOPS needed to maintain a smooth 60-FPS framerate. We will also need an air conditioning unit the size of a house, but don’t we always when I’m around?

But this is baby stuff. When scientists talk about high-dimensional mathematics, they’re not talking about hypercubes in 4 or 6 dimensions. They’re talking about crazy curves and datasets in, say, 256 dimensions! 256-D sounds like fun, so let’s go there!

Okay. I think I went too far. Again. For a start, every cell in our 256-D automaton will have 139008452377144732764939786789661303114218850808529137991604824430036072629766435941001769154109609521811665540548899435521 neighbors, which is more than a googol, which is a LOT. Second, the full 1,000 by 1,000 by 1,000 (by 1,000 until you hit 256) automaton would require

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

bytes to store. That’s 768 zeroes. We’re talking numbers without names here.

What the hell happened? I mean, 256 isn’t exactly a small number. It’s certainly larger than the number of pounds of cilantro you’d want to eat, but it’s hardly huge.

Well, that’s the Curse of Dimensionality. A cube’s N-dimensional “content” (which is an analogue for 3-dimensional volume or 2-dimensional area) is equal to S^N, where S is the length of an edge. And as anybody who’s ever played with numbers knows, throwing exponents into things makes numbers get scary very fast.

And there’s another odd problem that you don’t notice much in two or three dimensions. A circle with a diameter of 2 has an area of (approximately) 3.142, while a square with an edge length of 2 has an area of 4. The ratio of square area to circle area is 1.273. A sphere with a diameter of 2 has a volume of 4.189, while a cube with an edge length of 2 has a volume of 8. The ratio is now 1.910. Well, the ratio keeps going up. And it goes up FAST. A 256-dimensional cube with edge length 2 has a hyper-volume (content) of 115792089237316195423570985008687907853269984665640564039457584007913129639936, which is a lot. Meanwhile, a 256-dimensional sphere with a diameter of 2 has a content of 1.1195×10^-152. That’s an absurdly small number. 1.1195×10^-152 universe diameters (and in case you forgot, the universe is so large that trying to fit its size into your head would probably physically kill you) is ten million trillion trillion trillion trillion trillion trillion trillion times smaller than the smallest distance which makes any physical sense (Side note: isn’t it weird that there’s a smallest physically-sensible distance? Reality has a finite resolution!)

What this all boils down to is that the vast majority of a hyper-cube’s content is in its corners. And, as anybody who’s ever tried to dust a room knows, corners are a pain in the ass. Which is why it’s so hard to work on data-sets in high-dimensional space.

Here’s another interesting fact. I was talking about Lovecraftian horrors at the start. And, although he gets binned as a horror writer, he was actually kind of a horror/sci-fi writer. He liked thinking about non-Euclidean geometry and extra dimensions and other such stuff that was wild and revolutionary at the time. Before I go get some much-needed sleep (I keep having weird dreams about having to take tests so I can work at a pizza parlor. Trust me, they’re exhausting.), let’s work out just how large a 256-dimensional creature would be.

A human being contains approximately 7×10^27 atoms. That’s a lot. If we take (7×10^27)^(1/3) (the cube root), we get how many atoms would lie along the edge of a cube with that many atoms. A cube about the density of a human containing about the same amount of stuff as a human would be 40 centimeters on an edge (Don’t try to imagine ways to make a human into a perfect cube. None of them are nice.) What about a 6-dimensional human? Well, because you can pack so much stuff into a 6-cube, a creature with as many atoms as a human and the same approximate atom-to-atom distance as a human would form a cube 8.7 microns on an edge, about as large as a medium-large bacterium or a human cell. In 256 dimensions, you’d actually run out of atoms before you ran out of places to put them. Imagine you put down one atom at one corner of a big 256-D grid. Then, you start putting atoms in the neighboring cells. Well, in 256-D, there are 115792089237316195423570985008687907853269984665640564039457584007913129639935 neighboring cells, which is more than the number of atoms in a person, so our 256-D human would be no more than two atoms across (no larger than a molecule, in other words) along any dimension.

I don’t know about you, but I’ve succeeded in tripping all the circuit breakers in my head. I’m going to lie down. But I’ll see you again soon, after I find something else headache-inducing to think about.

Standard