On computing and word magic.

On computing and word magic.
Art by Bryan Alexander Davis.
Art by Bryan Alexander Davis.

While reading Louisa Hall’s Speak, I was reminded of an essay on the connection between golems & computers that I’d intended to write.  Hall acknowledges George Dyson’s Turing’s Cathedral as providing inspiration for her project, and I’d also hoped to draw material from Dyson’s book for my essay.

I’d been convinced by William Poundstone’s review of Turing’s Cathedral that there would be a lot about words in it: “For the first time, numbers could mean numbers or instructions.  Data could be a noun or a verb.”

Unfortunately, Turing’s Cathedral did not match my expectations.  Not that it wasn’t good.  I simply had in mind a very specific thing that I wanted the book to say: something about words summoning forth the universe, maybe paralleling Max Tegmark’s idea (described in Our Mathematical Universe) that the underlying descriptive mathematics create the world.  His idea was, in effect, “we exist because numbers can describe us.”

Of course, Tegmark is a physicist, a math brain, so it makes sense that he’d propose that numbers would create reality.  Hall, the author of Speak, has a Ph.D. in English, and so, in her book, words do it.

Ales_golemIndeed, within the context of novels, words do create reality.  Her characters exist because her descriptive language make them so.  For some twelve thousand years at least, Homo sapiens have been spinning myths with language.  Creating worlds, and in the meantime reshaping our own.

I wanted to write about that generative power.  Several years ago I filled three pages of my notebook (my handwriting is very small, so this took me several days) with notes for an elaborate analogy between Turing machines and golems, linguistically-created life forms both. And I wanted so badly to cram it into my novel, but there was simply no way for it to fit it in without risking the adjective “sprawling,” which I don’t see as a positive characteristic in literature.

In brief, Turing machines are lent life because their data also serves as words.  Although the commands are written in a partial script (a numerical versus verbal language), each command can also be treated as a thing to be manipulated.  Golems are also given life by the power of a word.  Plus, the traditional golem myth prominently features the compelling power of the word death, which nicely mirrors the Ramayana — can you tell how badly I wanted all of this to fit in my book?  Math and words and robots and the Ramayana!

Art by Philippe Semeria.
Art by Philippe Semeria.

I suppose I have a bit of explaining to do.  Here’s a summary of the golem story: Clay man was built. Clay man was inscribed with the word truth (in Hebrew, “emet”) on his forehead. Clay man, computer-like, would follow instructions with no flexibility or human intuition. This led to problems, clay man had to be killed, a letter on his forehead was erased (leaving the Hebrew “met,” death or dead), clay man was a man no more.

And here’s a summary of the original invocation of the Ramayana, also featuring the word death: A brigand was robbing and killing to support his family.  One day he was about to kill some monks and one asked, “Your family shares the money you bring home, do they also share your guilt?”

Obviously, I think they should — prospering from evil should transitively mark you with that evil, which in my opinion is the wellspring of the argument that reparations should be paid even now, many years after the end of the most egregious abuses — but the brigand went home and asked his family their opinion and they said, “No.  You do the killing.  Your soul is tarnished.  We simply eat the food you bring.  We are still good.”

The brigand didn’t like the sound of that so he gave up killing (and abandoned his family) and became a traveling bard.  He was chosen by the gods to sing the most glorious epic myth, The Ramayana, but to summon this story from wherever myths live he needed to chant the hero’s name.  This chant would apparently infuse his mind with all the necessary details and plot twists and whatever.  His job was to say “Rama Rama Rama” until, bam!, he knew the story well enough to rattle it off in metered verse.

But he said he couldn’t.  He’d done all that killing and whatnot, remember?  So he told the gods, “It would be an honor, but, no, I am too impure to speak his name.”  Couldn’t chant Rama.  So the gods instructed him to chant “death death death” instead (in Sanskrit, “mara mara mara”), and the syllables bled into one another and, “mara mara ma ra ma ra ma rama rama rama,” he found himself chanting the name by accident and the story came to him.

To the best of my knowledge, computers cannot be manipulated this way.  As far as I know, trying to trick your computer with a palindromic pointer might cause the wrong area of memory to be modified, which could cause further instructions to be mistargeted, and the entire hard drive could be made fubar… but maybe it’s my ignorance that gives me this suspicion.  Maybe computer scientists know secret power words to summon forth the magic.

On perpetual motion machines (and where to find them).

The invention of a perpetual motion machine will revolutionize the world, and Dr. Harvey Trussbloom has done it!  Well, perhaps he didn’t invent it, but he found it.  Or, no, not quite found it, but he knows where it is.  Roughly.  Although perhaps it isn’t entirely accurate to refer to it as a “perpetual motion machine.”  Because it will stop, eventually.  But if you’re looking for a machine that behaves as though it were a perpetual motion machine for a length of time X, continuing to do work without loosing any internal energy, where X can be as large a number as you desire, well, Dr. Trussbloom knows where that machine is!  Roughly.  And that machine will revolutionize the world just as resoundingly as would a true perpetual motion machine.  Although, yes, it’s true, Dr. Trussbloom did not quite pin down the location of this ingenious device.  But if you tell him your number X, any number, pick a number, he has written an equation that will tell you the radius of a sphere centered around your current location in which a device that operates for time X will almost assuredly (>99.9% probability) be.  For this press release, we started small.  We chose one hour, a single glorious hour of work extracted from the universe for free.  And as it happens, such a device is only ________ kilometers away.


Perpetual_Motion_by_Norman_RockwellI launched myself out of bed in the middle of the night to type the preceding passage.  It seemed like a good story at the time; sounds ridiculous despite the basic content of the story being realistic, which is something I like.  After hacking it out, I trundled back to bed feeling rather pleased.

When I read it again in the morning, though, I realized that the story probably fails for a general audience.  Because there are a few scientific concepts underlying it that (hopefully) the average person doesn’t spend much time obsessing about.

The first important idea for the story comes from the Second Law of Thermodynamics (often written with capital letters, I guess to show off how important thermodynamics is — and maybe people involved with the field feel like they have something to prove, because chemistry majors everywhere seem to dread thermodynamics as their most boring required class.  For undergraduates, that is.  At the grad level, statistical mechanics probably wins the “most boring” ribbon; coincidentally, stat mech is the course where you learn a more rigorous formulation of thermodynamics).

There are many ways to phrase the second law, but the most popular

(yes, I realize this is perhaps equivalent to the dudes at the nerd table in a high school cafeteria debating amongst themselves who is most popular, but we all fight for what accolades are within our grasp)

is probably Max Planck’s formulation, which states (roughly) that entropy is always increasing.

Okay, here’s thermodynamics in brief: there are two factors that decide what’s going to happen.  One factor is how easy a thing is; easy things happen more often (this is “enthalpy”).  The other factor is how abundant an outcome is; abundant things also happen more often (this is “entropy”).  When these factors are aligned, it’s simple to guess what’s going to happen; when they’re opposed, we have to think.

Sipping_BirdImagine there’s an assignment in high school where the teacher brings in a big sack of hundreds of books and dumps them on the floor and says, “Each student has to pick a book, read it, and write a report.”  If there are, oh, thirty or so students, and the books all appear to be roughly the same length, they might each just pick a book at random.  If the teacher had a hundred copies of To Kill a Mockingbird and only one copy of each of a few other books, it’s probably reasonable to guess that the outcome will be many reports on To Kill a Mockingbird.  But then, if there are hundreds of copies of Ulysses and only a few copies of To Kill a Mockingbird, we have to consider how hard the students are willing to search through the pile in order to find a book they might enjoy reading.

With something like an ideal gas in a box, the situation is dictated almost entirely by entropy.  It’s just as easy for each molecule of a gas to move upward as opposed to any other direction.  But there’s only one possible permutation that has every molecule moving upward simultaneously, and there are many, many, many arrangements that has them moving every which way, unproductively.

The Second Law of Thermodynamics states that, for a bunch of randomly-oriented gas in a box, the molecules won’t all suddenly find themselves moving in the same direction. All moving upwards, say, which means they could press on the top lid together and do thermodynamic work.  The second law says you don’t get work out of a system for free.

WaterScrewPerpetualMotionBut in my story, Dr. Trussbloom found a machine that does get work for free.  Because it isn’t actually disallowed.  It’s just very, very, very unlikely.

To begin, imagine two molecules, randomly moving.  If we pixelate their world such that each can move in only six directions (up down, forward back, left right), then the chance they’ll be moving in the same direction is 17%; the first molecule has to go in a direction, the second has a one in six chance of moving the same direction.  For three molecules, the chance they’ll be moving in the same direction is 3%.  For N molecules, (1/6)^(N-1).

Of course, our world, if it is course-grained at all, has more than six directions to move in at any time.  So instead you’re looking at something like (1/an almost-if-not-actually-infinitely-large-number)^(very large power).  Which is small.  So small that the second law rounds it off to zero.

And if space is actually continuous, in which case there would be an infinite number of directions that any molecule could move in, the probability of a mere two molecules moving in exactly the same direction is in fact zero.  But near-alignment will allow work to be extracted almost as well as perfect alignment, so we could imagine a cone of directions centered around the movement vector for our first molecule that we would want the movement of the second, and third, and fourth, and so on, to fall within.  Then the probability won’t be zero, even if it’s very small.

That’s half the background that I think would’ve been necessary for a general audience to think the story was funny.  The other half is simpler, conceptually — not about the nitty-gritty of extracting work from our perpetual motion machine, but about the likelihood of finding the machine somewhere.  This, you could read about in Max Tegmark’s Our Mathematical Universe (which, sure, I’ve offered some criticism of in the past, and which does devolve into non-science toward the end, but the first two-thirds of the book really is a high-quality, very accessible description of some cool ideas from physics).

The basic idea is that, if space is unbounded, there’s a high probability that an arrangement of particles equivalent to your immediate surroundings will arise again somewhere in the far-off distance.  There should be a room virtually identical to the room you’re sitting in, and then many rooms that are quite close but with some strange deviations — the flowerpot is to the right of your computer, not the left, or the flowerpot is full of luminescent fungi instead of ornamental moss, or the flowerpot is a hammer dull red with encrusted gristle — and then many more that are increasingly bizarre as compared to your current environs.

The basic idea being quite similar to the above explanation of entropy; there is only one arrangement of particles that will match an environment exactly, but many more arrangements that seem similar but somehow strange.

“Schroedingers cat film” by Christian Schirm – Own work. Licensed under CC0 via Wikimedia Commons.

So, we imagine a room with our prototype perpetual motion machine sitting inside.  Activate the thing, and, voila!  It gives us no work for free.  It is not, in fact, a perpetual motion machine.


But then we translate laterally through the universe, looking for near-identical copies of that room.  In most of those copies, the machine gives us… no free work.  But if we look at enough copies — and we should be able to look at infinitely many, if the universe is infinitely large — we will eventually find one where, as unlikely as it may be, the motions of randomly moving particles align, heat flows from a cold object to a warm one, work is done for free, our perpetual motion machine continues operating for whatever your chosen length of time.

And, uh, I didn’t bother trying to estimate the distance for the story above.  But it is very large.  Large enough that I’m not really sure what adjective to use; often when I’m trying to describe a large distance I’ll write something like “astronomically far away,” but it’d be silly to use the word “astronomical” for this.  Because astronomy can’t really address distances larger than 14 billion light years.  We are trapped within a sphere where the radius is defined by the product of the speed of light and the age of matter in our corner of the universe.  Anything outside that sphere, we can’t see, we can’t hope to interact with (as far as we know).

That perpetual motion machine?  It is well outside our sphere.  Many orders of magnitude farther away.

K did suggest that there was a reading of the story that might seem (slightly) humorous from a non-scientist’s perspective, though.  The idea that scientists often get quite excited about advancements in their narrow fields, despite their findings having little to no impact on the rest of the world.  Like, hey, a perpetual motion machine!  But it’s… where?  Then, why?  Why is this what you’re studying?

Hell, you could even extend that last question to my own work.  Why is this what you’re writing?

On the grain size of reality and, eventually, creative work.

rb0035_enlargeI thought Max Tegmark’s Our Mathematical Universe was fun – he describes some good thought experiments, such as a suicidal contraption to test an idea that wavefunctions don’t collapse and we instead experience randomness due to a bifurcation of realities with perceptual continuity in only one of them – but I didn’t like that he waited until so late in his book to mention that the theories describe depend upon space being coursegrained.  I just flipped through his book again – I first read it a little over a year ago, and was pleased that it fell into two categories of research that I was doing, “theories on whether or not humans have free will” and “ways in which modern science is like mythology” – and in the copy I have he doesn’t discuss coursegraining of reality until page 368 of a 398 page book, or maybe page 316, when the idea is mentioned but not discussed.  Which I felt was disingenuous.  Not intentionally so, I don’t believe – he was cramming a lot of stuff into the book, and it must have been hard to decide how to organize it.  But even if his intentions were good, I feel displeased, because this was a book for general audiences, and would someone who hasn’t thought about this before know to keep that caveat in mind?

And it’s possible that the idea of a coursegrained reality is sufficiently popular in the field that this didn’t seem like something that needed to be highlighted: in a footnote at the bottom of page 130 there is an impressive list of physicists whose ideas support the idea that our universe contains a finite amount of information (I haven’t read / even glanced at their work – someday, someday soon, I’ll resume studying physics and mathematics!).  But from the perspective of someone who studied physical chemistry, including quantum mechanics but neither nuclear physics not astrophysics, I don’t see any a priori reason to expect finite information or coursegrained reality (which, tiny aside – if there is finite information content, that implies reality is coursegrained.  Without coursegraining, every pairwise distance contains infinite information, and our universe has, um, quite a few pairwise distances).

Yes, the lack of defined boundaries on matter means there’s no way to test this theory (except, in Tegmark’s defense, a cute theory that could be testable over the course of many, many years – if reality is coursegrained, and our universe is expanding, the effective pixel size might grow to the point where it would one day be noticeable – not something I had ever thought about before reading his book) because every measurement we make is limited in precision to the wavelength of the interacting pairs in our experiment.  But I think there’s a tiny bit of hubris in imagining that a thing being unmeasureable (infinite detail in location, for instance) implies it isn’t there.  And that’s not hubris as in “pride at being a conscious observer that can make and interpret measurements,” it’s hubris as in “pride at being composed of matter and able to interact with other matter.”

Although maybe being made of matter isn’t even part of that pride – if reality were coursegrained, even fields, which most people think of as continuous, would need discontinuities, blipping from one field strength to another as you progress stepwise through space.

I’d rather believe reality is smooth.

Not that all the theories of the book are invalidated by smoothness.  For instance, there is the idea that in a very large space, many copies of something resembling you, in a world resembling yours, would exist.  If reality were coursegrained, exact duplicates could exist in a large enough space.  But even with smoothness, you could discuss near-duplicates in which the center of every wavefunction in that version was inside a ball of radius x, where x could be very, very small, as compared to our world.  Eventually, that reality would deviate from our own, so it would not be identical if you looked far enough back or far enough forward in time.  But with small enough x, every interaction would transpire almost the same way in that universe as it would in ours, and so you’d have to look very far into the future to see any difference.  Long enough into the future that the copy of you might be dead, the sun might’ve gone dim, etc.

So in my opinion he could’ve written about these theories but discussed that caveat earlier.  Because I do think it’s important.  There’s a difference between infinity and very, very big numbers.

Like, I’m sitting here writing.  And I’ve spent, what, three and a half years now working on writing a book?  And when I write, I feel as though I’m creating something.  But that same thing that I imagine I’m creating is already there, waiting to be pulled down from the shelf in Borges’s library.  Which sounds a little depressing.  So naturally, in order to cheer my brother up, I babbled at length about this in the car recently.

My brother is working on recording music, not writing.  So in a way what I said to him was cheering.  Honest!  Because actually, a piece of recorded (um… analogue-recorded, in a non-coursegrained universe) music is one of infinitely many.  Or a live music performance.  And even if you wanted to bin frequencies at some scale that would seem indistinguishable to most listeners, and set upper and lower bounds for allowable frequencies based on hearing range, and bin times, and amplitudes, you’d have more possible three-minute “songs” than you could have 300-page books.  Borges might not have been able to build a library to hold his whole vinyl collection.

Still, he could’ve waited and built the music wing of his library in the 1990s, once he switched his collection over to CDs.