Logic in computer science

May 27, 2014 by Florian Aigner
Logic in computer science
A Turing machine built from Lego

All men are mortal. Socrates is a man. Therefore, Socrates is mortal. Logical arguments like this one have been studied since antiquity. In the last few decades, however, logic research has changed considerably: the computer sciences were born. The success of informatics would have been impossible without the groundwork provided by logicians – and, in turn, computer sciences keep posing new interesting questions, which can only be answered by formal logic. Informatics is not the modern-day successor of logic, both fields keep moving forward, hand in hand.

Calculating Logical Statements

Simple logical conclusions such as the famous syllogism about Socrates' mortality appear clear and simple to us. But is not just about formalizing the obvious. Just like in mathematics, logic allows us to construct arbitrarily complex equations, to do sophisticated calculations, to analyse the world.

Even before the first electronic calculating devices were built, research on the hypothetical possibilities of computers was done: in the 1930s, the mathematicians Alan Turing and Alonzo Church characterized the class of mathematical problems which can in principle be tackled. Turing put forward an intriguingly simple model for a calculating machine – the Turing machine: It moves on an infinitely long ribbon, reads numbers and changes it according to a given set of rules.

Such a machine can be built with mechanical gears or lego bricks. Although in practice such a machine is highly inefficient, one can show that in principle any conceivable computer calculation can be carried out by such a simple device. With the Turing machine it became possible to clearly define what "doing mathematical calculations" even means. Using this concept, Turing could show that some questions can never be answered by a computer: a computer program which reads other programs and then decides whether its calculations would ever come to a halt or go on forever is logically impossible.

Looking inward, looking outward

"Today, most of the research in logic is done by computer scientists, not by mathematicians", says Professor Helmut Veith from the Vienna University of Technology. Logic in has to fulfil several tasks. First of all, it is a tool with which can describe the world. Logic is used for databases or for creating artificial intelligence.

But logic does not only help a computer to view the world, it also offers the possibility of introspection: computer codes can check other computer codes and look for logical errors. "It is similar to the way we humans think", says Helmut Veith. "We think about the world around us, but we can also contemplate ourselves and our own mind."

Logic-based quality checks of computer codes (verification, model checking) play an important role for industry and the economy. When a user tests a program and finds that it works, this does not by all means guarantee that the program is free of errors. The crucial question is: does the code react correctly to any conceivable input, in any logically possible situation? This can only be determined by an automated program.

Such a reliable check is particularly important for security relevant code such as airplane controls. Logical checks are essential for the production of computer chips as well. Today, chips start out as a program, long before they are physically built. No human being could ever determine by hand whether the chip does indeed react correctly to any given situation. Computer programs carry out this task. With their logical checks, they ensure our safety.

Explore further: Study reveals details of logical circuits built using living slime molds

add to favorites email to friend print save as pdf

Related Stories

Kasparov versus Turing (w/ Video)

Jun 27, 2012

(Phys.org) -- For the first time in public, Mr. Kasparov played a match against Turing’s chess program live on stage at The University of Manchester’s Alan Turing Centenary Conference.

Mathematician sees artistic side to father of computer

Feb 23, 2012

This year a series of events around the world will celebrate the work of Alan Turing, the father of the modern computer, as the 100th anniversary of his birthday approaches on June 23. In a book chapter that ...

Difficulty makes Candy Crush so addictive

Mar 13, 2014

It's been said that in a city, you're never more than two metres away from a rat. But it seems more likely that you're never more than two metres from someone playing the puzzle game Candy Crush Saga. ...

Recommended for you

Who drives Alibaba's Taobao traffic—buyers or sellers?

10 hours ago

As Chinese e-commerce firm Alibaba prepares for what could be the biggest IPO in history, University of Michigan professor Puneet Manchanda dug into its Taobao website data to help solve a lingering chicken-and-egg question.

Computerized emotion detector

Sep 16, 2014

Face recognition software measures various parameters in a mug shot, such as the distance between the person's eyes, the height from lip to top of their nose and various other metrics and then compares it with photos of people ...

Cutting the cloud computing carbon cost

Sep 12, 2014

Cloud computing involves displacing data storage and processing from the user's computer on to remote servers. It can provide users with more storage space and computing power that they can then access from anywhere in the ...

Teaching computers the nuances of human conversation

Sep 12, 2014

Computer scientists have successfully developed programs to recognize spoken language, as in automated phone systems that respond to voice prompts and voice-activated assistants like Apple's Siri.

User comments : 0