8

What is the difference between an algorithm and a programming model (or paradigm)?

nbro
  • 15,395
  • 32
  • 113
  • 196
boffin
  • 639
  • 2
  • 13
  • 26
  • 4
    I am not sure if you refer to a [programming paradigm](http://en.wikipedia.org/wiki/Programming_paradigm) (OOP, procedural, functional) or to a [computation model](http://en.wikipedia.org/wiki/Model_of_computation) (turing machine, RAM machine, DFA)? Or something entirely different? – amit Sep 24 '12 at 14:52

2 Answers2

7

An algorithm is a predetermined set of rules for conducting computational steps that produce a computational effect. A programming model is a framework for expressing algorithms, but is not an algorithm itself.

For example, quicksort is an algorithm as it has a predetermined set of rules for carrying out steps to sort an array. Event-driven programming is a programming model; in itself, it does not tell how to carry out steps to solve an actual problem but it provides a framework for expressing algorithms (in an event-driven manner).

nbro
  • 15,395
  • 32
  • 113
  • 196
Antti Huima
  • 25,136
  • 3
  • 52
  • 71
0

If you want its definition, just look for Computational Model on Wikipedia. There you find

A computational model is a mathematical model in computational science that requires extensive computational resources to study the behavior of a complex system by computer simulation

In other words, suppose you have a physical system, from a bullet to an aircraft, and you want to study its effects on the environment via simulation. You must build a proper mathematical model (ie. combine Newton's laws with fluid mechanics) and then translate that model, based on equations, into another kind of model that is suitable for a computer.

In the case of nonlinear differential equations (a bullet's trajectory is linear AFAIK) this has a greater sense because there is no algorithm that extracts the exact mathematical solution from a nonlinear differential problem.

usr-local-ΕΨΗΕΛΩΝ
  • 26,101
  • 30
  • 154
  • 305