# What is logical reasoning?

Logical reasoning is the process of applying rules to problem solving. 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, 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.

## Why use logical reasoning?

Algorithms are step-by-step 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.