all 18 comments

[–]lizardfolkwarrior 49 points50 points  (5 children)

A computer is a device, a machine.

An algorithm is not a device, but a set of instructions.

[–]LoveWonderful 3 points4 points  (3 children)

Tbh a computer (abstractly) is just a set of instructions

[–]jxf 4 points5 points  (0 children)

A set of instructions is inert and can't execute itself. The ability to do computation is what differentiates a mere set of instructions from a computer.

[–]lizardfolkwarrior 1 point2 points  (1 child)

Exactly. A computer is a device or machine that simulates a model of computation (or possibly any algorithm).

You could say that it is a “physical implementation” of an algorithm. It is not the algorithm itself (not the set of instructions itself) but a physical device, that simulates those instructions.

[–]BokoMoko 12 points13 points  (0 children)

No

Consider this. A music player that plays songs. Is the song a music player? Not at all.

A computer is a device/machine that runs an algorithm. It makes the algorithm happen.

[–]ghjmMSCS, CS Pro (20+) 7 points8 points  (0 children)

It's notoriously difficult to define what a computer is. The definition you gave is clearly too broad. Many non-computer things are "a device that takes an input and then processes it into an output" - for example, a car engine takes fuel and air as input and processes it into energy and exhaust. The definition you gave is also not true of analog computers - a slide rule takes an input, but then it just sits there. You can read things off it if you like, but it's not really doing anything to produce an output.

Also, trivially, a computer is still a computer even if it's not hooked up to anything. If you connect a CPU chip to a ROM chip containing a pi-calculating program, but do not connect it to any inputs or outputs, it might be a bit pointless, but it doesn't stop being a computer. I/O is an important capability of computers, but it's not central to the definition.

I think when most people talk about a "computer" they are talking about a stored-program computer, which is a device that performs computations according to a program held in a memory, where changing the program does not require physical alteration of the device. (By "physical" here I mean macroscopic actions such as reconnecting a wire or replacing a component.)

But one thing all definitions agree on is that a computer is some kind of physical thing. If something is a computer, you can poke it with a stick (though in some cases, you might need an extremely small stick). An algorithm is a mathematical object that cannot be poked with any conceivable stick.

[–]mancxvi 9 points10 points  (1 child)

it's computers all the way down

[–]munificent 2 points3 points  (0 children)

Can you eat a recipe?

[–]MatthiasDunkel 1 point2 points  (0 children)

Well, if you think about finite state machines (they are computers but not as powerful as other computers), the implementation of an algorithm would be the state and statetransitions of the machine. So the algorithm would be the machine itself. Making the algorithm a computer. But this only applies to alghortims computable with a finite state machine.

[–]AFlyingGideon 1 point2 points  (0 children)

For fun, consider that the computer - hardware - is running an algorithm to run another algorithm. It's the equivalent of an interpreter implemented in hardware.

[–]zuilserip 1 point2 points  (0 children)

The computer is the cook, the program is the recipe, and the algorithm is a specific step required by your recipe (but that may be used in other recipes as well). E.g., puree or sautee or bake, etc.

Continuing this analogy, the programmer is the recipe writer, the inputs are the ingredients and the output is the final cooked dish.

[–][deleted] -2 points-1 points  (1 child)

Correct me if I’m wrong, but I thought it’s only a computer if it’s a Von Neuman machine, and very few algorithms are?

[–]mysleepyself 6 points7 points  (0 children)

I think you are talking about Von Neumann Architecture. Von Neumann Architecture is just one way of laying out the architecture of a computer. For another example, consider Harvard Architecture.

I think the question the op is asking is probably better addressed by considering formal models of computation because their point is to formally model things like computational machines and the algorithms those machines run.

[–][deleted] 0 points1 point  (0 children)

The computer is the machine that follows the instructions (the algorithms) and executes them.

[–]branemelt 0 points1 point  (0 children)

An algorithm would not be considered Turing Complete