In our discussion, we consider well defined precise algorithms (in flowcharts or pseudocode) as compared with narrative algorithms.
Some of the reasons why algorithms are beneficial or important to the problem solving process are:
- Algorithms serve as a blueprint for other programmers to follow
- When problems are complex, an algorithm’s precise structure allows for an accurate development of a solution in parts. This documentation (the algorithm itself) is useful since it is difficult for the problem solver to remember many sub-processes , procedures and inputs/outputs to the problem.
- Because algorithms are intended for a computer system and programming language, it allows us to design for that particular programming language’s structure and for efficiency ,given the limitations of system resources.
For example, an algorithm which processes DNA sequence information for matching DNA strands together (see Longest common sub sequence) can be developed strictly for solving the problem without considering system resources. In this case the algorithm still resembles programming language.
Usually in this type of general solution, array sizes are allowed to be very large or of infinite size. If memory becomes a constraint, we can now modify the algorithm to use say, array sizes at a maximum of 1000 to allow for the intended program to run within the limitation of our system resources.
- Algorithms are easily testable when using dry runs and trace tables.
© 2019 Vedesh Kungebeharry. All rights reserved.