Logical reasoning is the process of applying rules to problem solving. Algorithms are designed as a set of steps to follow to solve a problem. At the same time, a set of rules is determined. For example, selection is based on rules:
These rules govern the path that is followed through the algorithm.
Rules are built using logical reasoning to ensure that the algorithm performs correctly.
Algorithms are step-by-step instructions to solve a problem, created along with rules that decide which path to take when a decision is faced.
When trying to solve a problem, it may be that more than one solution is found. A different algorithm can be built from each solution. Logical reasoning determines if algorithms will work by predicting what happens when the algorithm’s steps - and the rules they consist of - are followed.
Predictions from each algorithm can be used to compare solutions and decide on the best one.