Skip to main content icon/video/no-internet

Algorithm is a computer science term for a way of solving a problem and also refers to the instructions given to the computer to solve the problem. The study of algorithms is central to computer science and is of great practical importance to data analysis in the social sciences because algorithms are used in statistical programs.

An algorithm can be thought of as any step-by-step procedure for solving a task. Imagine five playing cards face down on a table and the task of sorting them. Picking them up one at a time with the right hand and placing them in the left hand in their proper place would be one way to solve this task. This is an algorithm, called insertion sort in computer science.

It is worth noting the subtle distinction between the concept of an algorithm and the concept of a method or technique. For example, a method would be least squares, matrix inversion would be a technique used therein, and LU decomposition and Strassen's algorithm would be alternative algorithms to accomplish matrix inversion. A single data analysis method may use more than one algorithm.

None

Figure 1 Two Possible Digraph Depictions of the Same Network Data

It is impossible to write statistical software without using algorithms, so the importance of algorithms to quantitative methodologists is ensured. However, user friendly statistical software packages eliminate the need for end users to construct their own algorithms for most tasks. Nonetheless, at least a basic understanding of algorithms can be useful. For example, maximum likelihood estimation methods can use an initial estimate as a starting point, and in some cases, failure to converge may be remediated by trivially altering the initial estimate. Without some familiarity of the underlying algorithm, a researcher may be stuck with a nonconverging function.

Another setting where some knowledge of algorithms is useful is presented in Figure 1, which shows two possible digraph depictions of the same network data. The left panel uses the multidimensional scaling algorithm, and the right uses simulated annealing. The data are identical, which may be verified by observing who is connected to whom, but the appearance of the graphs is different. Algorithms are important here because interpretation of the network data is affected by the appearance of the graph, which is affected in turn by the choice of algorithm. Although in many cases, different algorithms will produce the same result but differ in speed, in this case, different algorithms produce different results.

The term algorithm is sometimes used more broadly to mean any step-by-step procedure to solve a given task, whether or not a computer is involved. For instance, matching historical records from more than one archival source can be done by hand using an algorithm.

Andrew Noymer
10.4135/9781412950589.n10

References

Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C.(2001).Introduction to algorithms (2nd ed.).Cambridge, MA: MIT Press.
Knuth, D. E.(1997).Fundamental algorithms: The art of computer programming (Vol. 1, 3rd ed.).Reading, MA:

...

locked icon

Sign in to access this content

Get a 30 day FREE TRIAL

  • Watch videos from a variety of sources bringing classroom topics to life
  • Read modern, diverse business cases
  • Explore hundreds of books and reference titles

Sage Recommends

We found other relevant content for you on other Sage platforms.

Loading