Sem. I, Ioana Leustean FMI, UB

Similar documents
Logică avansată pentru informatică Master Anul I, Semestrul I

Ce este logica? Aristotel (IV î.e.n.) Gottfried Wilhelm Leibniz ( ) Visul lui Leibniz. raţionament

Anul I, Semestrul I 2017/2018

Teoria Modelelor Master Anul I, Semestrul II 2016

ON THE QUATERNARY QUADRATIC DIOPHANTINE EQUATIONS (II) NICOLAE BRATU 1 ADINA CRETAN 2

Logic in Computer Science. Frank Wolter

Teorema Reziduurilor şi Bucuria Integralelor Reale Prezentare de Alexandru Negrescu

The universal computer

The Legacy of Hilbert, Gödel, Gentzen and Turing

Sisteme cu logica fuzzy

Soluţii juniori., unde 1, 2

Friendly Logics, Fall 2015, Lecture Notes 1

Church s undecidability result

Gradul de comutativitate al grupurilor finite 1

The Limit of Humanly Knowable Mathematical Truth

Procedeu de demonstrare a unor inegalităţi bazat pe inegalitatea lui Schur

Pentru clasa a X-a Ştiinţele naturii-sem II

Divizibilitate în mulțimea numerelor naturale/întregi

Avem 6 tipuri de simboluri in logica predicatelor:

What is logic, the topic of this course? There are at least two answers to that question.

Towards a Contemporary Ontology

The roots of computability theory. September 5, 2016

FORMULELE LUI STIRLING, WALLIS, GAUSS ŞI APLICAŢII

Automata Theory. Definition. Computational Complexity Theory. Computability Theory

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

Teoreme de Analiză Matematică - I (teorema Weierstrass-Bolzano) 1

Discrete Mathematics

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

The Search for the Perfect Language

LOGIC. Mathematics. Computer Science. Stanley N. Burris

Arhitectura sistemelor de calcul

COMPARATIVE DISCUSSION ABOUT THE DETERMINING METHODS OF THE STRESSES IN PLANE SLABS

the logic of provability

Gödel s Incompleteness Theorems

CHAPTER 11. Introduction to Intuitionistic Logic

Barem de notare clasa a V-a

O V E R V I E W. This study suggests grouping of numbers that do not divide the number

THE LOGIC OF COMPOUND STATEMENTS

Propositions as Types

INDICATIVE PROPOSITIONS

Class 29 - November 3 Semantics for Predicate Logic

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

Formal Logic and Deduction Systems

Computer Science and Logic A Match Made in Heaven

MAGIC Set theory. lecture 1

utomated Reasoning 2 What is automated reasoning? In one sense we'll interpret our title narrowly: we are interested in reasoning in logic and mathema

COMP 2600: Formal Methods for Software Engineeing

Logic. Propositional Logic: Syntax. Wffs

1.3. OPERAŢII CU NUMERE NEZECIMALE

Gödel s Theorem: Limits of logic and computation

An Introduction to Symbolic Logic

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

Philosophies of Mathematics. The Search for Foundations

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

MATEMATICĂ 3 PROBLEME DE REFLECŢIE

Algebraic Properties of Rules of Frege-Hilbert Calculi. Elmar Eder. Technical Report August Department of Scientific Computing

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

UNITATEA DE ÎNVĂȚARE 3 Analiza algoritmilor

1994, Phd. in mathematics, Faculty of mathematics and informatics, University of Bucharest.

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Int. J. of Computers, Communications & Control, ISSN , E-ISSN Vol. V (2010), No. 5, pp C. Chiriţă

An Introduction to Modal Logic. Ordinary logic studies the partition of sentences1 into two categories, true and false.

Chapter 2: Introduction to Propositional Logic

Better Logic Through Algebra, Probability, and. Joseph W. Norman, M.D., Ph.D. University of Michigan, Ann Arbor

4-3. Physics ~ Metaphysics. Meta-physics

ANOVA IN THE EDUCATIONAL PROCESS

cse541 LOGIC FOR COMPUTER SCIENCE

Applied Logics - A Review and Some New Results

CS 275 Automata and Formal Language Theory

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson

Theory of Computation CS3102 Spring 2014

A GENERALIZATION OF A CLASSICAL MONTE CARLO ALGORITHM TO ESTIMATE π

Seminar Topic Assignment


02 Propositional Logic

03 Review of First-Order Logic

HoTT seminar organization

Gödel s Incompleteness Theorems

Câteva rezultate de algebră comutativă

Theory of Languages and Automata

Marie Duží

Gottfried Wilhelm Leibniz (1666)

Computational Logic. Introduction. Damiano Zanardini

Poincaré s Thesis CONTENTS. Peter Fekete

CS 275 Automata and Formal Language Theory

Logică și structuri discrete. Marius Minea 25 septembrie 2017

PLANIFICAREA TEMELOR LA GRUPELE DE EXCELENȚĂ DISCIPLINA MATEMATICĂ AN ȘCOLAR

DEFINITE DESCRIPTIONS: LANGUAGE, LOGIC, AND ELIMINATION

Bootstrapping Mathematics

O1 History of Mathematics Lecture XII 19th-century rigour in real analysis, part 2: real numbers and sets. Monday 13th November 2017 (Week 6)

10.4 THE BOOLEAN ARITHMETICAL RESULTS

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem

Propositional Calculus - Hilbert system H Moonzoo Kim CS Division of EECS Dept. KAIST

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

GENERATOARE DE SEMNAL DIGITALE

APLICAŢII ALE FORMULELOR LUI NEWTON PENTRU POLINOAME SIMETRICE

1. A motivation for algebraic approaches to logics

Part I, Number Systems. CS131 Mathematics for Computer Scientists II Note 1 INTEGERS

Transcription:

LOGICA MATEMATICĂ ŞI COMPUTAŢIONALĂ Sem. I, 2017-2018 Ioana Leustean FMI, UB

Ce este logica? logike tekhne = ştiinţa raţionamentelor logos = cuvînt, raţionament 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. (Aristotel, Prior Analytics) Smith, R., Aristotle s Logic, SEP (Spring 2014), Ed. N. Zalta (ed.) Contrariwise [...] if it was so, it might be; and if it were so, it would be; but as it isn t, it ain t. That s logic. Lewis Carroll, Through the Looking-Glass, and What Alice Found There Logic is the beginning of wisdom, [...], not the end. Captain Spock, Star Trek VI: The Undiscovered Country (1991)

Logica matematică O logică este un sistem formal cu două componente: sintaxa şi semantica. Orice sistem logic are un mecanism de deducţie. Exemple din logica clasică: Sintaxa: p q Deducţia: p q, p q Semantica: (modus ponens) p q p q 0 0 1 0 1 1 1 0 0 1 1 1

Logică şi Informatică Computing and Computing Science unavoidably emerge as an exercise in formal mathematics or, if you wish an acronym, as exercise in VLSAL (Very Large Scale Application of Logic). Dijkstra, E.W. The next fifty years (EWD1243a). E.W. Dijkstra Archive. Center for American History, University of Texas at Austin. Logic is the calculus of computation. Aaron R. Bradley, Zohar Manna, The Calculus of Computation Decision Procedures with Applications to Verification, Springer,2007 Computer science is the continuation of logic by other means. Georg Gottlob: Logic and Artificial Intelligence, Media Seminar, VSL 2014

Logică şi Informatică Aplicatii ale logicii în informatică: arhitectura calculatoarelor (circuite logice) software engineering (testare şi verificare) limbaje de programare (semantică, programare logica) baze de date (algebre de relaţii) inteligenţă artificială (demonstrare automată) calculabilitate şi complexitate J. Y. Halpern, R. Harper, N. Immerman, P.G.Kolaitis, M.Y. Vardi, V.Vianu, On the Unusual Effectiveness of Logic in Computer Science Bulletin of Symbolic Logic 7(2), 2001, 213-233

... a computing machine is really a logic machine. Its circuits embody the distilled insights of a remarkable collection of logicians, developed over century. Nowdays, as computer technology advances with such breathtaking rapidity, as we admire the truly accomplishments of the engineers, it is all too easy to overlook the logicians whose ideas made it all possible. This book tells their story.

M. Davis, The Universal Computer Cuprins 1 Leibnizs Dream 2 Boole Turns Logic into Algebra 3 Frege: From Breakthrough to Despair 4 Cantor: Detour through Infinity 5 Hilbert to the Rescue 6 Gdel Upsets the Applecart 7 Turing Conceives of the All-Purpose Computer 8 Making the First Universal Computers 9 Beyond Leibnizs Dream

Logică şi Informatică în România Grigore C. Moisil (1906-1973) As a professor of the Bucharest University, he was the first to teach there mathematical logic. Articulating logic and automata, Moisil was well prepared to organize the Romanian development in the emergent field of Computer Science...we can say that 1957 is the date of birth of Romanian Computer Science, under the guidance of Professor Moisil and with the collaboration of engineers and mathematicians. S. Marcus, Grigore C. Moisil: A life becoming a myth, IJCCC 1, 73-79, 2006. Gr.C. Moisil - Computer Pioneer Award of IEEE Computer Society

Sisteme de logică Logica clasică Logica modală Logica temporală, Logica dinamică, Logică epistemică Logica intuiţionistă Logica liniară Logica cu mai multe valori Logica fuzzy Logici pentru corectitudinea programelor Logica Hoare, Logica dinamică, Separation Logic, Matching Logic Logica descrierii (Semantic Web) etc.

Conţinutul cursului

Continutul cursului Multimi, Relatii, Functii Operatii cu multimi. Functia caracteristica. Operatori de inchidere. Relatii binare. Relatii de echivalenta. Relatii de ordine. Latici si Algebre Boole Laticea ca strutura algebrica. Algebre Boole. Teorema de reprezentare a lui Stone. Calculul propozitional clasic Sintaxa. Semantica. Satisfiabilitate. Teorema de completitudine. Forma normala conjunctiva. Rezolutie. Introducere in calculul cu predicate Limbaj de ordinul I. Structura de ordinul I. Sintaxa. Semantica. Rezolutie.

Bibliografie V. E. Cazanescu, Curs de bazele informaticii, Tipografia Universitatii din Bucuresti, 1976. G. Georgescu, Elemente de logica matematica, Academia Militara, Bucuresti, 1978. G. Georgescu, A. Iorgulescu, Logica matematica, Editura ASE, Bucuresti, 2010. Gr. C Moisil, Elemente de logica matematica si de teoria multimilor, Editura Stiintifica, Bucuresti, 1968. S. Rudeanu, Curs de bazele informaticii, Tipografia Universitatii din Bucuresti, 1982.

Bibliografie M. Huth, M. Ryan, Logic in Computer Science: Modelling and Reasoning about Systems, Cambridge Univ. Press, 2009 A.R. Bradley, Z. Manna, The Calculus of Computation Decision Procedures with Applications to Verification, Springer,2007 M. Ben-Ari, Mathematical Logic For Computer Science, Springer, 2003 S. Burris, Logic for Mathematics and Computer Science, Prentice Hall, 1998 H.R. Lewis, C.H. Papadimitriou, Elements of the Theory of Computation, Prentice-Hall, 1981. J.D. Monk, Mathematical Logic, Springer Verlag, 1976.

Inceputurile logicii Aristotel (IV i.e.n.) primul studiu formal al logicii a studiat silogismele, deductii formate din doua premise si o concluzie. Premisa Premisa Concluzie Totii oamenii sunt muritori. Grecii sunt oameni. Deci grecii sunt muritori.

Silogismele Patru tipuri de enunţuri (AffIrmo nego) A: Toţi X sunt Y. (universal afirmativ) E: Nici un X nu este Y. (universal negativ) I: Unii X sunt Y. (particular afirmativ) O: Unii X nu sunt Y. (particular negativ) Un silogism este format din doua premize şi o concluzie, fiecare având una din formele A E I O. Premiză majoră Premiză minoră Concluzia

Silogismele Barbara Festino Premiză Toţi oamenii sunt muritori. Nici un câine nu este pisică. Premiză Toţi grecii sunt oameni. Unele carnivore sunt pisici. Concluzie Toţi grecii sunt muritori. Unele carnivore nu sunt câini. Felapton AIO Premiză Nici un X nu este Y. Toţi X sunt Y. Premiză Toţi X sunt Z. Unii Z sunt Y. Concluzie Unii Z nu sunt Y. Unii Z nu sunt X. Adevărat pentru X Fals 256 silogisme, 15 valide, 24 valide dacă X, Y, Z

Gottfried Wilhelm Leibniz, 1646-1716 lingua characteristica universalis, calculus ratiocinator If controversies were to arise, there would be no more need of disputation between two philosophers than between two accountants. For it would suffice to take their pencils in their hands, and say to each other: Calculemus - Let us calculate. George Boole, 1815-1864 The Mathematical Analysis of Logic (1847) The design of the following treatise is to investigate the fundamental laws of the operations of the mind by which reasoning is performed; to give expressions to them in the symbolic language of calculus, and upon this foundation to establish the science of logic and constructs its methods.

G. Boole: Logica claselor Analiza raţionamentelor prin metode asemănătoare calculului algebric. x mulţimea oamenilor, y mulţimea muritorilor, z mulţimea grecilor. Barbara Premiză Toţi oamenii sunt muritori. x(1 y) = 0 x = xy Premiză Toţi grecii sunt oameni. z(1 x) = 0 z = zx Concluzie Toţi grecii sunt muritori. z(1 y) = 0 z = zy Dem. z = zx = z(xy) = (zx)y = zy

Logica matematică Friedrich Ludwig Gottlob Frege, Begriffsschrift, 1879 (a formula language, modeled upon that of arithmetic, for pure thought) Giuseppe Peano, Formulario Mathematico, 1894-1908 Bertrand Russell şi Alfred North Whitehead Principia Mathematica, 1910-1913 David Hilbert, Hilbert s Pogram, 1921 Once a logical formalism is established one can expect that a systematic, so-to-say computational, treatment of logic formulas is possible, which would somewhat correspond to the theory of equations in algebra. Kurt Gödel Teorema de completitudine a calculului cu predicate (1929), Teoremele de incompletitudine (1931) Alfred Tarski The Concept of Truth in Formalized Languages (1935), On the Concept of Logical Consequence (1936)

Calculul propozitional clasic O propozitie este un enunt care poate fi adevarat(1) sau fals(0). Propozitiile sunt notate simbolic (p, q, r, ) si sunt combinate cu ajutorul conectorilor logici (,,,, ). Fie p propozitia: Azi este joi, deci avem curs de logica. Cine este p? Propozitia p este: Azi este joi si nu avem curs de logica.

Puzzle-uri logice Propozitia falsa Cele trei premii Cei trei frati gemeni R. Smullyan, To mock a mocking bird, Oxford University Press, 2000.

Propozitia falsa Dintre urmatoarele propozitii, numai una singura este falsa. Aflati propozitia falsa. a. Propozitia d este adevarata. b. Propozitia a este falsa. c. Propozitia b este falsa d. Propozitia c este adevarata. Propozitia falsa este b.

Cele trei premii Presupuneti ca vreau sa va ofer unul din premiile: A B C Voi trebuie sa enuntati o propozitie p. Daca p este adevarata atunci primiti unul din premiile A sau B. Daca p este falsa atunci primiti premiul C.

Cele trei premii Enuntati o propozitie p astfel incat: sa luati cu siguranta unul din premiile A sau B; p: 2 + 2 = 4 sa luati cu siguranta premiul C; p: 2 + 2 4 sa luati cu siguranta premiul A. p: Nu voi lua premiul B.

Laurentiu, Leo si Teodor Laurentiu, Leo si Teodor sunt trei frati gemeni. Laurentiu, Leo mint intotdeauna (liars), iar Teodor spune intotdeauna adevarul (truth-teller). Intr-o zi intalniti pe strada unul din cei trei frati. Aveti voie sa ii puneti o singura intrebare, formata din cel mult trei cuvinte, la care el va raspunde Da sau Nu. Care din urmatoarele intrebari va permite sa decideti daca persoana cu care vorbiti este Leo?

Laurentiu, Leo si Teodor Esti tu Teodor? Raspunsul Nu este imposibil. Raspunsul Da il poate da oricare din cei trei frati. Nu putem decide daca vorbim cu Leo. Esti tu Leo? Raspunsul Da il poate da numai Laurentiu. Raspunsul Nu il pot da numai Teodor si Leo. Nu putem decide daca vorbim cu Leo. Esti tu Laurentiu? Raspunsul Da il poate da numai Leo. Raspunsul Nu il pot da numai Teodor si Laurentiu. Daca raspunsul este Da, atunci vorbim cu Leo. Daca raspunsul este Nu, atunci nu vorbim cu Leo. Putem decide daca vorbim cu Leo.

Calculul cu predicate Introduce predicatele si cuantificatorii. Un predicat este o functie cu valori booleene P : X {0, 1}. Exista doi cuantificatori: existential ( ) si universal ( ). Formalizati in teoria grafurilor urmatoarele proprietati: varful x are cel putin doi vecini diferiti, y z( (y = z) E(x, y) E(x, z)) fiecare varf are cel putin doi vecini diferiti. x y z( (y = z) E(x, y) E(x, z)) unde V este multimea varfurilor grafului, E : V V {0, 1} si E(x, y) = 1 ddaca x si y sunt vecini

Calculul cu predicate Fie X o multime nevida si presupunem ca pentru fiecare x X, sunt definite doua predicate P(x) si Q(x). Cercetati daca urmatorul enunt este intotdeauna adevarat. (( x P(x)) ( x Q(x))) ( x(p(x) Q(x))) Enuntul nu este intotdeauna adevarat. Contraexemplu: X = N P(x) : x este numar par, Q(x) : x este multiplu de 3. Atunci x P(x) este falsa, deci ( x P(x)) ( x Q(x)) este adevarata. Pe de alta parte, P(2) Q(2) este falsa, deci x(p(x) Q(x)) este falsa. Obtinem o implicatie cu premisa adevarata si concluzia falsa (1 0), care este falsa.

Succes!