Method, Approach, Model, Algorithm: The difference

I was sometimes confused by the words: method, approach, algorithm and model. What are the differences? 

Let's see the definitions of these words in the Google Dictionary

  • Method: A particular form of procedure for accomplishing or approaching something, esp. a systematic or established one. 
  • Approach: A way of dealing with something.
  • Algorithm: A process or set of rules to be followed in calculations or other problem-solving operations, esp. by a computer.
  • Model: A simplified description, esp. a mathematical one, of a system or process, to assist calculations and predictions

As we can see, a method/approach is a more general concept than algorithm and can be more or less anything, e.g. writing data to a file. Just about anything that should happen due to an event or to some logical expression. Also, the meaning of the words "method" and "algorithm" can vary depending on in what context they are used. They might be used to describe the same thing.

In general programming speak, algorithms are the steps by which a task is accomplished. According to Wikipedia,
an algorithm is a finite sequence of instructions, an explicit, step-by-step procedure for solving a problem, often used for calculation and data processing. It is formally a type of effective method in which a list of well-defined instructions for completing a task, will when given an initial state, proceed through a well-defined series of successive states, eventually terminating in an end-state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as probabilistic algorithms, incorporate randomness. <
In computer science, a method or function is part of the Object-Oriented philosophy to programming where programs are made out of classes that contains methods/functions to perform specific tasks. Once again, quoting Wikipedia
In object-oriented programming, a method is a subroutine that is exclusively associated either with a class (called class methods or static methods) or with an object (called instance methods). Like a procedure in procedural programming languages, a method usually consists of a sequence of statements to perform an action, a set of input parameters to customize those actions, and possibly an output value (called the return value) of some kind. Methods can provide a mechanism for accessing (for both reading and writing) the encapsulated data stored in an object or a class. <
In short, the algorithm are the steps by which we do something such as turning a light bulb on:
1) Walk to switch 2) Flip Switch 3) Electrons Flow 4) Light generated
Methods are where we actually code actions inside a class.

Algorithm is just like a formula to solve any particular problem step by step,with no ambiguity to any step, and must have some ending point. methodology is more general form of any solution. it provided a way how to solve any problem but in algorithm the way is more precisely formulated towards solution.

A procedure can go on forever. Where as an Algorithm, will eventually terminate and will have each step precisely defined.

algorithm (n.) Look up algorithm at
1690s, from French algorithme, refashioned (under mistaken connection with Greek arithmos "number") from Old French algorisme "the Arabic numeral system" (13c.), from Medieval Latin algorismus, a mangled transliteration of Arabic al-Khwarizmi "native of Khwarazm," surname of the mathematician whose works introduced sophisticated mathematics to the West (see algebra). The earlier form in Middle English wasalgorism (early 13c.), from Old French.

method (n.) Look up method at
early 15c., "regular, systematic treatment of disease," from Latin methodus "way of teaching or going," from Greek methodos "scientific inquiry, method of inquiry, investigation," originally "pursuit, a following after," from meta- "after" (see meta-) + hodos "a traveling, way" (see cede). Meaning "way of doing anything" is from 1580s; that of "orderliness, regularity" is from 1610s. In reference to a theory of acting associated with Russian director Konstantin Stanislavsky, it is attested from 1923.


Post a Comment