FEATURES OF A GOOD ALGORITHM:
- Clarity
- Simplicity
- Correctness
- Efficiency
- Thoroughness
- Flexibility
- Portability
- Maintainability
Whenever we are developing an algorithm that solves a particular problem, we aim at developing the best algorithms among the algorithms that can be developed to solve that problem.
Features of a good Algorithm are as follows:
1. Clarity:
As much as possible, make the algorithm that you are developing to be easy to read and understand. To achieve these in your algorithm, use pseudocode (language that we use to develop algorithm) that every body understands, so that they can easily read it and understand it. Also, use orderly numbering convention, especially, whenever you split major step into smaller steps.
2. Simplicity:
As much as possible, make the algorithm that you are developing to be very simple. Any thing that makes the algorithm to be complex must be removed. We consider simple things as the best things.
3. Correctness:
Correctness as algorithm development criteria means the ability of an algorithm to produce the correct and accurate result. Whenever you are developing an algorithm, make sure that the algorithm that you have developed solves the problem correctly. The correctness of an algorithm cannot be compromised with any other thing. The reason for this is because your aim is to solve the problem. The correctness of an algorithm can be verified by using empirical data to manually test the result that the algorithm will produce. If the result that your algorithm produces is not correct, then you have to look at the algorithm again, with the aim of modifying it so that it can give the correct result.
4. Efficiency:
Efficiency is an important criterion that we can use in order to develop a good algorithm. The best algorithm that solves a particular problem should be very effective in every area. This means that the algorithm should be better than others in terms of time taken by the computer to solve the problem. The most efficient algorithm is one that takes the minimum amount of computer time and one that uses the minimum amount of computer resources, like memory spaces.
5. Thoroughness:
When developing an algorithm, make sure that the algorithm is thorough. A thorough algorithm is one that considers all the possible cases and situations that may arise, with respect to the problem being solved.
6. Flexibility:
A good algorithm should be flexible and adaptable to changing requirements or new constraints.
7. Portability:
The algorithm should be platform-independent and able to run on different hardware or software environments.
8. Maintainability:
The algorithm should be easy to maintain, modify, or extend, reducing the overall cost of ownership.
1 comment