One solution to the puzzle.
I’ve written a lot lately about the physical versus the virtual. I’ve also written about algorithms and the role they play. In this post, I revisit both by exploring what is, for me, an old friend: The Eight Queens Puzzle. The goal is to place eight chess queens on a chessboard such that none can take another in a single move.
The puzzle is simple enough, yet just challenging enough, that it’s a good problem for first-year student programmers to solve. That’s where I met it, and it’s been a kind of “Hello, World!” algorithm for me ever since.
I thought it might be a fun way to explore a simple virtual reality.
Math version 1.0
This image here of the Mandelbrot fractal might look like one of the uglier renderings you’ve seen, but it’s a thing of beauty to me. That’s because some code I wrote created it. Which, in itself, isn’t a deal (let alone a big one), but how that code works kind of is (at least for me).
The short version: the code implements special virtual math for calculating the Mandelbrot. That the image looks anything at all like it should shows the code works.
Yet according to that image, something wasn’t quite right.
In the last post I explored how algorithms are defined and what I think is — or is not — an algorithm. The dividing line for me has mainly to do with the requirement for an ordered list of instructions and an execution engine. Physical mechanisms, from what I can see, don’t have those.
For me, the behavior of machines is only metaphorically algorithmic. Living things are biological machines, so this applies to them, too. I would not be inclined to view my kidneys, liver, or heart, as embodied algorithms (their behavior can be described by algorithms, though).
Of course, this also applies to the brain and, therefore, the mind.
There’s a discussion that’s long lurked in a dusty corner of my thinking about computationalism. It involves the definition and role of algorithms. The definition isn’t particularly tricky, but the question of what fits that definition can be. Their role in our modern life is undeniably huge — algorithms control vast swaths of human experience.
Yet some might say even the ancient lowly thermostat implements an algorithm. In a real sense, any recipe is an algorithm, and any process has some algorithm that describes that process.
But the ultimate question involves algorithms and the human mind.
Previously, I wrote that I’m skeptical of interpretation as an analytic tool. In physical reality, generally speaking, I think there is a single correct interpretation (more of a true account than an interpretation). Every other interpretation is a fiction, usually made obvious by complexity and entropy.
I recently encountered an argument for interpretation that involved the truth table for the boolean logical AND being seen — if one inverts the interpretation of all the values — as the truth table for the logical OR.
It turns out to be a tautology. A logical AND mirrors a logical OR.
Back at the start of March Mathness I promised the math would be “fun” (really!), but anyone would be forgiven for thinking the previous two posts about Special Relativity weren’t all that much “fun.” (I really enjoy stuff like that, so it’s fun for me, but there’s no question it’s not everyone’s cup of tea.)
Trying to reach for something a bit lighter and potentially more appealing as the promised “fun,” I present, for your dining and dancing pleasure, a trio of number games that anyone can play and which might just tug at the corners of your enjoyment.
We can start with 277777788888899 (and why it’s special).
Credit where credit is due, both the major ideas in this post come from Fareed Zakaria on his CNN Sunday program, GPS. If you follow TV news at all, you know Sunday mornings have such long-running standards as Meet the Press (on NBC since 1947!) and Face the Nation (on CBS since 1954). (Or was it Meet the Nation and Face the Press?)
Zakaria is one of the good ones: very intelligent, highly educated, calm and measured. He’s well worth listening to. (I’ve realized one attraction to TV news is the chance to — at least sometimes — hear educated, intelligent talk. It’s a nice respite from most TV entertainment.)
Two things on Zakaria’s last episode really rang a bell with me.
No, sorry, I don’t mean the Bletchey Bombe machine that cracked the Enigma cipher. I mean his theoretical machine; the one I’ve been referring to repeatedly the past few weeks. (It wasn’t mentioned at the time, but it’s the secret star of the Halt! (or not) post.)
The Turing Machine (TM) is one of our fundamental definitions of calculation. The Church-Turing thesis says that all algorithms have a TM that implements them. On this view, any two actual programs implementing the same algorithm do the same thing.
Essentially, a Turing Machine is an algorithm!
The ultimate goal is a consideration of how to create a working model of the human mind using a computer. Since no one knows how to do that yet (or if it’s even possible to do), there’s a lot of guesswork involved, and our best result can only be a very rough estimate. Perhaps all we can really do is figure out some minimal requirements.
Given the difficulty we’ll start with some simpler software models. In particular, we’ll look at (perhaps seeming oddity of) using a computer to model a computer (possibly even itself).
The goal today is to understand what a software model is and does.
We started with the idea of code — data consisting of instructions in a special language. Code can express an algorithm, a process consisting of instruction steps. That implies an engine that understands the code language and executes the steps in the code.
Last time we started with Turing Machines, the abstract computers that describe algorithms, and ended with the concrete idea of modern digital computers using stored-programs and built on the Von Neumann architecture.
Today we look into that architecture a bit…