±«Óătv

What is logical reasoning?

Another word for is sensible.

We can say an idea, or answer is logical if it follows rules that make sense.

Another word for is thinking, coming up with ideas and answers to problems.

We can say that is just sensible thinking.

It's about knowing the rules and working out what will happen if you follow them.

Back to top

What are the rules?

Let's look at an example. Suppose your friend says that they want to wear a spacesuit to school tomorrow. Your friend says no-one will notice.

The school rules say that a school uniform should be worn.

Everyone else in school will be wearing the proper uniform and your friend will look very different from everyone else in their shiny spacesuit.

What do YOU think will happen?

Will they be asked to change into their uniform?

It's sensible to think that they will be noticed by the teachers and will be asked to change into their uniform.

That's sensible thinking based on the rules. In other words, that's logical reasoning.

Back to top

How can logical reasoning help in the real world?

Let's look at a real-world situation.

This rollercoaster is only safe for people whose height is 1.5m or more.

The entry gate is controlled by a .

The rollercoaster system has a set of logical rules in place to ensure the safety of riders.

Back to top

How do we use logical reasoning in a computer program?

The controlling the entry gate is programmed to open if your height is greater than 1.5m and close if your height is less than 1.5m.

This shows the way the program has been written.

The rules in the will ensure that only people who are tall enough will get through the gates and ride the rollercoaster.

Back to top

Predicting what will happen

We can use logical reasoning to help us predict what will happen when these people try to go through the gate.

Molly is 1.4m tall.

Will Molly get through?

Ben is 1.7m tall

Will Ben be allowed through?

Back to top

Using logical reasoning to solve problems

We can use logical reasoning to solve problems and debug programs in a computer-controlled device or system.

We can look carefully at the rules, decide if they are logical and make changes if we think that will solve the problems.

Let's see what happens when Leon tries to ride the rollercoaster.

Remember the safety rule for riders is that they have to be 1.5m taller or more.

Leon is exactly 1.5m tall so he's tall enough to safely go on the ride.

The program rule says: If height is less than 1.5m gate will close.

Leon is not less than 1.5m so the gate should open.

But there is a problem. The other rule says the gate will only open if the height is greater than 1.5m.

Leon is not greater than 1.5m, so the gate won't open.

The program has a and the gate system doesn't know whether to open or close.

Can you find the bug in the program using logical reasoning?

Back to top

Changing a program using logical reasoning

We need to use our logical thinking skills to work out how to change the program rules so that people who are exactly 1.5m tall can ride.

We need to include them in the rule.

We can change the rule to say:If the height is greater or equal to 1.5m then open the gate.

This is what the new flowchart would look like:

Do you think Leon will be able to ride the rollercoaster now?

Why not have a go at measuring your family and friends - can you work out if they are tall enough to ride the rollercoaster?

Use the same rule for the rollercoaster:

If the height is greater or equal to 1.5m then open the gate.

Back to top

Watch: Logical reasoning

You can find out more about logical reasoning in this video from ±«Óătv Teach.

Back to top

Activities

Back to top

Computing - Dance Mat Typing. game

Build and test your computing skills with different levels of touch type challenges

Computing - Dance Mat Typing
Back to top

More on Computer science

Find out more by working through a topic