0% found this document useful (0 votes)
19 views

Algorithm Design Refers To A Method or A Mathematical Process For Problem

Algorithm design refers to methods for solving problems and engineering algorithms. Key aspects of algorithm design include efficiency and analyzing runtime. Typical algorithm development steps include defining the problem, developing a model, specifying and designing the algorithm, checking correctness, analyzing performance, implementing, testing, and documenting the algorithm. Strategies for algorithm design include iteration, recursion, brute force, backtracking, greedy methods, divide and conquer, dynamic programming, branch and bound, two pointers, and sliding windows.

Uploaded by

Irish Jen Marco
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Algorithm Design Refers To A Method or A Mathematical Process For Problem

Algorithm design refers to methods for solving problems and engineering algorithms. Key aspects of algorithm design include efficiency and analyzing runtime. Typical algorithm development steps include defining the problem, developing a model, specifying and designing the algorithm, checking correctness, analyzing performance, implementing, testing, and documenting the algorithm. Strategies for algorithm design include iteration, recursion, brute force, backtracking, greedy methods, divide and conquer, dynamic programming, branch and bound, two pointers, and sliding windows.

Uploaded by

Irish Jen Marco
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Algorithm design refers to a method or a mathematical process for problem-solving and engineering

algorithms. The design of algorithms is part of many solution theories, such as divide-and-
conquer or dynamic programming within operation research. Techniques for designing and
implementing algorithm designs are also called algorithm design patterns, [42] with examples including
the template method pattern and the decorator pattern.
One of the most important aspects of algorithm design is resource (run-time, memory usage)
efficiency; the big O notation is used to describe e.g. an algorithm's run-time growth as the size of its
input increases.
Typical steps in the development of algorithms:

1. Problem definition
2. Development of a model
3. Specification of the algorithm
4. Designing an algorithm
5. Checking the correctness of the algorithm
6. Analysis of algorithm
7. Implementation of algorithm
8. Program testing
9. Documentation preparation

Algorithm- Wikipedia- https://en.wikipedia.org/wiki/Algorithm#Design

Strategies in Algorithm Design

One very important aspect of problem-solving is devising good strategies. Indeed there are many

strategies for algorithm design. This post elaborates more on just a few of them.

The outline of this post is based somewhat on the third chapter of the book Computer Science

Distilled [1]. As noted earlier, there are many strategies for algorithm design. A quick run-through

of the essential strategies are:

 Iteration
 Recursion
 Brute force
 Backtracking
 Greedy Method (Heuristics)
 Divide and Conquer
 Dynamic Programming
 Branch and Bound
 Two Pointer
 Sliding Window

The focus of this post is to expatiate on the first four: iteration, recursion, brute

force and backtracking.

Algorithm and Strategy

Algorithm: An algorithm is a sequence of computational steps that transform the input to an

output. It is a tool for solving a well-specified computational problem. [2]

Strategy: A strategy is an approach (or a series of approaches) devised to solve a

computational problem.

 A strategy might yield incorrect results, but a correct algorithm will always produce
correct results.
 Strategies are invented, algorithms are more or less tested and trusted standards
 Strategies are flexible, but algorithms are rigid i.e. they follow only one set of
procedures
1. Iteration

Iteration involves repeating a block of code until a condition is false. During iteration, the program

makes multiple passes through a block of code.

Iteration can be achieved using loops or recursion (more on this later). The basic loop constructs

are:

 The for loop
 The for-each loop
 The while loop
 The do-while loop

Some functions based on the above loop constructs are the filter, findAny,

and reduce functions.

2. Recursion

Recursion is repetition achieved through method calls. A recursive method makes repeated calls

to itself before returning a result. A result is returned if and only if a base case exists.

This base case ensures that the solution converges otherwise an infinite recursion occurs which

in turn leads to a Stack Overflow.

Recursion is intuitive because each new method call works on clones of the original problem

leading to a final result (if it converges).

You might also like