19

This question connects different disciplines so it's awkward to choose a SE site for it, but I'll go with this one because here (I hope) the shared culture will make information transfer easier.

So computers as we know them use electricity and I don't know what other invisible things that I don't understand. I was wondering, is this a matter of efficiency, or of necessity? Can one achieve universal computation with just "moving parts"? Perhaps "Newtonian physics" is some term for this, although I guess it includes gravity which isn't really what I mean. You know, just good old solid pieces of matter moving around.

To get some picture of what I mean, here is a "LEGO Turing machine". I'm afraid that the big gray block on top uses electricity, but could one replace it with a "mechanical" thing, powered perhaps by rotating a piece? I have no idea how such things be designed, and the state transitions for a universal TM have to be fairly complicated, so I have no intuition for whether this is possible or not.

Glorfindel
  • 754
  • 1
  • 9
  • 20
acupoftea
  • 510
  • 3
  • 10

4 Answers4

40

Sure. Electricity is unrelated to the model of computation. The only thing you can't actually build is the infinite tape, for obvious reasons. In this sense, anything that can be built is essentially equivalent to a deterministic finite automaton.

Here's a Turing Machine made of wood: https://www.youtube.com/watch?v=vo8izCKHiF0&ab_channel=RichardRidel

Shaull
  • 17,814
  • 1
  • 41
  • 67
24

Sure. Not only is it possible, the first design for a Turing-complete computer was purely mechanical. This was Charles Babbage's Analytical Engine. Babbage published its design in 1837, long before electricity was considered a practical source of energy, and even longer before electronics was even imagined.

The Analytical Engine was inspired by looms. Already in the 18th century there were looms that could be controlled by a punched tape which described the pattern to weave. Babbage had first designed a mechanical calculator, the Difference Engine, where a tape described mathematical operations. The Difference Engine could only perform prearranged calculations: it didn't have the ability to run arbitrary loops. The Analytical Engine could control the direction in which it processed its control tape, and since it also had conditional execution capabilities, it could perform arbitrary loops. The Engine had an internal memory where it could store data, which made it practically Turing-complete in the sense that an arbitrary program can be run on an engine given enough memory (which is the sense in which modern computers are Turing-complete). Everything was based on moving parts (wheels, pistons, etc.), and a complete description of the state of the engine would be a description of the position and orientation of these moving parts.

The Analytical Engine was never built. It was too complex and would have been too expensive and too slow to be worth the while. It didn't even have any direct influence on the design of the first electromechanical computers in the 1930s and 1940s, because their designers were not aware of the Analytical Engine. But it had indirect influence, partly through the work of Ada Lovelace. If Babbage was the first computer hardware designer, Lovelace was the first computer programmer. She realised that the Analytical Engine could not only make numerical calculations, but more generally could process data. Lovelace's contribution also fell into obscurity, but Babbage and Lovelace's work fostered an interest into the mathematics of computation.

Beyond looms, which translated instructions into cloth patterns, there were other mechanical engines existed with no or limited power to make numerical calculations before the first electronic computers. In particular, Herman Hollerith's mechanical tabulating machine could sort data and count records matching certain conditions; it was first used to process census data.

The progress of electronics, was what made general-purpose computers practical by the 1930s to 1940s. But the fundamental ideas of machine computation had been around for about a century. Electronics aren't the only way to design a computer, they're just (so far) the only economically viable way.

Gilles 'SO- stop being evil'
  • 44,159
  • 8
  • 120
  • 184
3

See: YouTube Matt Parker has made some small scale logic gates out of dominoes. Highly impractical, but theoretically, with enough time and space, one could build a functional computer that way. Apparently

MikeB
  • 131
  • 4
0

All computers can be though of as "mechanical", broadly speaking, be they electronic, digital or analog, even "fluid" computers. What's interesting about universal Turing machines is that they allow us to consider machines as encodings in a systematic and general way. Not unlike the numbers they're supposed to compute.

That allows us to virtualize computers, which is arguably what makes them so interesting, both theoretically and in practice.

André Souza Lemos
  • 3,296
  • 1
  • 16
  • 30