When to use algorithms
Algorithms are like tools in a practitioner’s toolbox. First, we need to understand which tool is the best one to use under the given circumstances. Sometimes, we need to ask ourselves whether we even have a solution for the problem we are trying to solve and when the right time to deploy our solution is. We need to determine whether the use of an algorithm can provide a solution to a real problem that is actually useful, rather than the alternative. We need to analyze the effect of using the algorithm in terms of three aspects:
- Cost: Can use justify the cost related to the effort of implementing the algorithm?
- Time: Does our solution make the overall process more efficient than simpler alternatives?
- Accuracy: Does our solution produce more accurate results than simpler alternatives?
To choose the right algorithm, we need to find the answers to the following questions:
- Can we simplify the problem by making assumptions...