You are on page 1of 11

Logic in Computer Science

Dr. Tathagata Ray


Associate Professor, BITS Pilani, Hyderabad Campus
rayt@hyderabad.bits-pilani.ac.in
BITS Pilani
Hyderabad Campus
Answer This!

Assume that the following statements are true:


1. There are more residents in New York City than there
are hairs on the head of any resident.
2. No resident is totally bald.

What is your conclusion:


Is it true that at least two residents have the same number
of hairs? (R. M. Smullyan, 1978)

BITS Pilani, Hyderabad Campus


Lets look into Handout

1. Why Logic for Computer Science?


2. Topics Covered.
3. Evaluation components.
4. No makeup for quizzes.
5. How assignments will be done?

BITS Pilani, Hyderabad Campus


The Paradox of the Court

It is said that the famous sophist Protagoras took on a pupil,


Euathlus, on the understanding that the student pay Protagoras
for his instruction after he wins his first court case. After
instruction, Euathlus decided to not enter the profession of law,
and Protagoras decided to sue Euathlus for the amount owed.
Protagoras argued that if he won the case he would be paid his
money. If Euathlus won the case, Protagoras would still be paid
according to the original contract, because Euathlus would
have won his first case.
Euathlus, however, claimed that if he won, then by the court's
decision he would not have to pay Protagoras. If, on the other
hand, Protagoras won, then Euathlus would still not have won
a case and would therefore not be obliged to pay.
The question is: which of the two men is right?

BITS Pilani, Hyderabad Campus


The Legendary.
Aristotle [384322 BC]

Aristotles logical works contain


the earliest formal study of logic.

A deduction is speech (logos) in


which, certain things having been
supposed, something different
from those supposed results of
necessity because of their being
so. (Prior Analytics I.2, 24b18
20)

Source:http://plato.stanford.edu/entries/aristotle-logic/#SubLogSyl

Source:https://en.wikipedia.org/wiki/Aristotle#/
media/File:Aristotle_Altemps_Inv8575.jpg

BITS Pilani, Hyderabad Campus


Frege.

Friedrich Ludwig Gottlob Frege (8 November 1848 26 July


1925)
German philosopher, logician, and mathematician.
responsible for the development of modern logic and making
contributions to the foundations of mathematics.
understood by many to be the father of analytic philosophy,
where he concentrated on the philosophy of language and
mathematics.
Though largely ignored during his lifetime, Giuseppe
Peano (18581932) and Bertrand Russell (18721970)
introduced his work to later generations of logicians and
philosophers.

BITS Pilani, Hyderabad Campus


Peano
Giuseppe Peano (27 August 1858 20
April 1932) was
an Italian mathematician.
a founder of mathematical
logic and set theory, to which he
contributed much notation.
The standard axiomatization of
the natural numbers is named
the Peano axioms in his honor.

BITS Pilani, Hyderabad Campus


Famous Paradox

The barber is the "one who shaves all those, and those
only, who do not shave themselves." The question is,
does the barber shave himself?

Answering this question results in a contradiction. The


barber cannot shave himself as he only shaves those
who do not shave themselves. As such, if he shaves
himself he ceases to be a barber. If the barber does not
shave himself then he fits into the group of people who
would be shaved by the barber (and, so, as the barber
he needs to shave himself).

BITS Pilani, Hyderabad Campus


Bertrand Russell

Consider the set R of all sets that do not


contain themselves as members.
In set-theoretic notation: = {| }

Question: Whether R is an element of itself?

If R is an element of R, then according to


the definition, R is not an element
of R; if R is not an element of R, then R has
to be an element of R, again by its very
definition: Hence a contradiction.

BITS Pilani, Hyderabad Campus


Some more Noteable People
Bernhard Bolzano (1781-1848)
George Boole (1815-1864)
Georg Cantor (1845-1918)
Edmund Husserl (1859-1938)
David Hilbert (1862-1943)
Ernst Zermelo (1871-1953)
..
Alonzo Church (1903-1994)
Kurt Gdel (1906-1978)
Alan Turing (1912-1954)
https://consequently.org/writing/logicians/

BITS Pilani, Hyderabad Campus


Logic and Computer Science

Logic is applied in the area of Theory of Computation.

Church first showed the existence of algorithmically


unsolvable problems using his notion of lambda-
definability.

Logic is integral part of AI and used as Analytical Tool,


Knowledge representation formalism and method of
reasoning, and programming language.

Software verification and validation.

BITS Pilani, Hyderabad Campus

You might also like