











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to computational methods, a type of problem-solving approach using a finite set of steps that operate on inputs and produce outputs. The concept of computational methods, its effectiveness and definiteness, and refinements such as algorithm, algorithm specialized by input, and algorithm specialized by strategy. It also discusses specific types of algorithms like divide-and-conquer, dynamic programming, greedy, and iterative algorithms.
Typology: Study Guides, Projects, Research
1 / 19
This page cannot be seen from the preview
Don't miss anything!












Click here for printer-friendly version
This document contains Section 1 of Algorithm Concepts, a collection of algorithm concept descriptions in both Web page and print form under development at Rensselaer Polytechnic Institute by David R. Musser, with the aid of graduate research assistants Brian Osman, Michael LaSpina, and Mayuresh Kulkarni, and with significant participation also of students in the āAdopt an Algorithmā project in CSCI-4020 Computer Algorithms, Spring 2002 and Spring 2003.
Computational Method
Algorithm 1.
Input- Specialized 1.
Strategy- Specialized 1.
A computational method is a method for solving a specific type of problem by means of a finite set of steps operating on inputs, which are quantities given to it before execution of the steps begins or during executing, and producing one or more outputs, which have a specified relation to the inputs. The number of steps in the method is required to be not only finite but also independent of the inputs. (The program does not grow or shrink in response to the inputs, but it might have different variations for different types of inputs.) The method is also required to be resource constrained, which means there are requirements on all operations of all
Definiteness of a computational method is the property that each step of the method āmust be precisely defined; the actions to be carried out must be rigorously and unambiguously specified for each caseā [1]. This includes the property that it must be unambiguous which step, if any, follows the current step in any execution of the method.
Again, resource-constraint requirements place some limitations on just how āindefiniteā the steps of a method may be.
Refinements: Algorithm (§1.2)
Computational Method 1.
Algorithm
Specialized 1.3^ Input- Specialized 1.4Strategy-
Algorithm 2.1Sequence Algorithm 3.1Graph Conquer 1.5Divide & Programming 1.6Dynamic Greedy 1.
Refinement of: Computational Method (§1.1)
Finiteness of a computational method is the property that the number of steps in any execution of the method must be finite. The finiteness property is also called termination, and the method is said to be ter- minating. Algorithm is a synonym for finite computational method, a computational method (§1.1) with the additional property of finiteness. Every abstraction that belongs to an algorithm concept must have the termination property.
Computational Method 1.
Algorithm 1.
Input- Specialized
Strategy- Specialized 1.
Sequence Algorithm 2.
Graph Algorithm 3.
Refinement of: Algorithm (§1.2)
This concept is a narrowing of the algorithm (§1.2) concept by restrictions on the form of input. Subconcepts restrict their input to some particular domain, such as sets, graphs, or linear sequences.
Refinements: Set Algorithm, Sequence Algorithm (§2.1), Polynomial Algorithm, Matrix Algorithm, Graph Algorithm (§3.1)
Algorithm 1.
Input- Specialized 1.
Strategy- Specialized 1.
Divide andConquer Programming 1.6^ Dynamic Greedy 1.7 (^) Iterative 1.
A divide-and-conquer algorithm is an algorithm (§1.2) whose steps are structured according to the following strategy:
This concept is one of many known ways of narrowing the algorithm concept in terms of a strategy (§1.4), which gives a specific structure to the steps of the algorithm.
solutions to the contained subproblems.
Overlapping subproblems: A problem exhibits overlapping subprob- lems if the total number of subproblems required to assemble and solve the complete problem is āsmall,ā generally polynomial in the input size. In other words, a naive recursive (top down) approach to the problem would recompute the solution to the subproblems many times.
Taking advantage of the above properties, a dynamic programming al- gorithm functions in a bottom up fashion. The overall strategy can be descibed as:
(a) Combine the solutions to the subproblems of a given size to compute and store the solutions to the next largest subprob- lems.
As can be seen, the solutions to the various subproblems are stored for repeated access in computing the solutions to larger subproblems. This
storage is often done in some table, and dynamic programming is some- times referred to as a tabular method.
This concept if one of many known ways of narrowing the algorithm concept in terms of a strategy (§1.4), which gives a specific strategy to the steps of the algorithm.
cally optimal decisions at every decision point. In other words, the subproblems which would result from various decisions, and their resulting solutions to the whole problem, are irrelevant.
Optimal substructure: A problem is said to have optimal substruc- ture if the optimal solution to the problem contains within it optimal solutions to the contained subproblems.
Having seen this, a greedy algorithm is simply an algorithm which makes a sequence of locally optimal decisions. Generally, the structure of the algorithm follows this pattern:
(a) Augment the solution in some locally optimal fashion. (b) Apply the local choice made to reduce or contract the problem.
This concept if one of many known ways of narrowing the algorithm concept in terms of a strategy (§1.4), which gives a specific strategy to the steps of the algorithm.
Algorithm 1.
Input- Specialized 1.
Strategy- Specialized 1.
Conquer 1.5Divide and Programming 1.6Dynamic Greedy 1.7^ Iterative
Refinement of: Algorithm Specialized by Strategy (§1.4)
An iterative algorithm is an algorithm which, throughout the course of execution, maintains some approximate output. As the name implies, the primary step in the strategy is to recalculate a new approximate output based on the previous approximation. In general, the approximate output grows closer to the final output (or solution) with each iteration, but this condition is not necessary.
References
[1] Donald E. Knuth, The Art of Computer Programming, Vol. 1: Fun- damental Algorithms, Third Edition, Addison-Wesley, Reading, MA,