What is logical reasoning?

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:

  1. if a condition is met, do this
  2. if not, do that

These rules govern the path that is followed through the algorithm.

Rules are built using logical reasoning to ensure that the algorithm performs correctly.

Selection is making a decision on which logical path to follow. In a theme park, the queuing system for a roller coaster might read 'IF front row, queue here, else, all other rows queue here'.

Why use logical reasoning?

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.