- Statement of Purpose
- Computer Science Questions and Answers P 2
- Book
- Undergraduate Prospectus 08
- GENED Clusters Formation Dec 232016
- Cats Cif Bscms-s Live
- csc111 - mt2 - 2012-2013 - fall - sol
- Problem Management Process
- honors100assign5
- Lab4_RepetitionEdit1
- Resume (3)
- What is Computer Science.rtf
- Satyajit Das
- Formato Plan de Tesis
- Test1-P-sample-2012
- IT 23 Project
- Indiana University BSCS
- ITC Module Handbook
- FUZZY NEUTROSOPHIC SOFT SET MEASURES
- Software Engineering Complete
- Technical CV Sample
- IJITMC
- 485syllabus
- CSE catalogue.pdf
- ijitmc.docx
- ram_bio1
- NetworkingSecurity_0
- list-2015
- Philosophy
- stinson assesment rubric 2015
- 02 Interrupt
- 01 Pemeliharaan Preventif
- 01. Arsitektur dan Orgasnisai Komputer.pptx
- Total Productive Maintenance
- Week 01
- Twos complement division operation
- Upload Document
- Untitled
- Pedoman Ejaan Yang Disempurnakan
- Kalibrasi
- Mesin sinkron
- Proposal Yang Baik
- Electrical Wiring Design
- Kuliah ALU H-4
- Sistem Distribusi Tenaga Listrik
- Crack Windows 2

Lecturer: Rahul Santhanam (rsanthan@inf.ed.ac.uk) TA: Areti Manataki (A.Manataki@ed.ac.uk) All notes and tutorials are on the course Web site at: www.inf.ed.ac.uk/teaching/courses/inf1/cl/ Tutorial each week Lecture slides will be on course web site Schedule of lectures in weeks 2-5 rather non-standard: refer to First Year Handbook for details

1

Informatics 1 School of Informatics, University of Edinburgh

**Describing Information Systems in Logic
**

Logic is the ``calculus of computer science'' [Manna & Waldinger 85]. In the next seven lectures you will encounter a way of describing information and the processing of information that is precise while remaining independent of any particular computing machine.

This lecture starts you describing information in logic. In the remaining six lectures we solve problems via inference.

Informatics 1 School of Informatics, University of Edinburgh

• mid-late 19th Century: Logic begins to be understood as a mathematical language. • mid 20th Century – date: Logic in informatics. University of Edinburgh . • late 19th .mid 20th Century: Study of mathematical proof and its limitations.19th Century: Logic as discipline in human argument. Informatics 1 School of Informatics.A Brief History of Logic • 500 BC .

but we can explore these problems in logic. University of Edinburgh . database query languages) are close to logic. • Some problems resist solution no matter how fast we build our computers. • Logic is used in verifying systems and security protocols. • Some programming languages (e.What Use is Logic? • The gates in computer circuits implement Boolean logic. Informatics 1 School of Informatics. • Logic is used to define semantics of languages so these can be compared.g. • The lingua franca for many areas of informatics research is logic.

University of Edinburgh .Motivating Problem Informatics 1 School of Informatics.

University of Edinburgh .'Jack Nicholson') actor('Mars Attacks'. P) means that person P acted in film F director(F.'Glenn Close') oscar('Jack Nicholson') oscar('Glenn Close') Informatics 1 School of Informatics.'Tim Burton') actor('Mars Attacks'. P) means that person P directed film F oscar(X) means that X got an Oscar film('Mars Attacks') director('Mars Attacks'.Motivating Problem (Data) film(F) means F is a film actor(F.

Motivating Problem (Query) How could we describe precisely the following questions about our data? • Which Oscar-winning films were directed by an actor? • Which Oscar winning actors have directed themselves? • Which directors have directed more than one film? • Which films have more than one director? • Have all directors been actors? Informatics 1 School of Informatics. University of Edinburgh .

Notation X. s is true not P P and Q P or Q PQ PQ X.X) p is a predicate name a is a constant X is a variable Negation of P P and Q are true (conjunction) P or Q is true (disjunction) P implies Q P and Q are equivalent For all X. University of Edinburgh . Y) p(a. X) and q(X) Y.r(X. s(X) X. s is true For some X. s(X) Informatics 1 School of Informatics.p(a.

• ‘and’ and ‘or’ are next most dominant. the operator on the right dominates. • If equal dominance.Precedence of Operators We take the precedence ordering to be the following: • ‘’ and ‘’ dominate most. So we can write: ((a and b) or c) d as a and b or c d Informatics 1 School of Informatics. University of Edinburgh . • ‘not’ is least dominant.

University of Edinburgh .Why There are Many Ways to Describe the Same Concept • Ambiguity in Understanding the World • Boundary Choices • Equivalences Between Formal Expressions • Differences in Logical Systems Informatics 1 School of Informatics.

Is it: • Full? • Almost full? • At over 80% of capacity? • Being held to ransom by a geek who believes in ruminating over logic at lunchtime? Informatics 1 School of Informatics. University of Edinburgh .Ambiguity in Understanding the World You observe that this classroom is crowded.

Doesn't tell us which film. F. however. T) oscar_winner(P. F) At some stage. T. F) oscar(P) or which time.Boundary Choices oscar(P) means that P got an Oscar. F oscar_winner(P. oscar_win(P. University of Edinburgh . Informatics 1 School of Informatics. we must choose a level of description adequate for the task we wish to undertake and consider other information to be outside the boundary of our model.

Equivalences Between Formal Expressions ab is equivalent to not(a) or b So which is it better to say? Depends on how you want to use it to solve a problem and who has to read it. University of Edinburgh . Informatics 1 School of Informatics.

Differences between Logical Systems Propositional logic or predicate logic? – In propositional logic. easier to decide truth or falsity of statements – However. University of Edinburgh . predicate logic provides richer framework for representing data Various other logics to choose from as well Informatics 1 School of Informatics.

Informatics 1 School of Informatics.Similarity Between Expressions Exploring dualities between common forms of expression to deepen our understanding of what the expressions mean. In a later lecture you find out how to prove the dualities we introduce now. University of Edinburgh .

Implication Versus Conjunction With Negation ab is equivalent to not(a) or b (Suggested read: “What the Tortoise Said to Achilles” by Lewis Carroll) Informatics 1 School of Informatics. University of Edinburgh .

Conjunction Versus Disjunction a and b a or b is equivalent to is equivalent to not(not(a) or not(b)) not(not(a) and not(b)) Informatics 1 School of Informatics. University of Edinburgh .

… an then X. University of Edinburgh . p(X) is equivalent to p(a1) and p(a2) and … p(an) Informatics 1 School of Informatics.a2.Universal Quantification Versus Conjunction If all instances of X are a1.

… an then X. University of Edinburgh . p(X) is equivalent to p(a1) or p(a2) or … p(an) Informatics 1 School of Informatics.Existential Quantification Versus Disjunction If all instances of X are a1.a2.

F. P) Informatics 1 School of Informatics.P) and F1. oscar(F) and director(F.actor(F1.Solving Our Problem (Query 1) Which Oscar-winning films were directed by an actor? Prove that there exists an Oscar winning film and its director and there exists a film in which that director was a film actor. University of Edinburgh .P.

F.P) and director(F. P) Informatics 1 School of Informatics.Solving Our Problem (Query 2) Which Oscar winning actors have directed themselves? Prove that there exists a film and an oscar winning actor in it and the same person is a director of that film. University of Edinburgh . oscar(P) and actor(F.P.

P) and director(F2. F1.F2.P. University of Edinburgh .Solving Our Problem (Query 3) Which directors have directed more than one film? Prove that there exists two films with the same director and these are not the same film. director(F1. P) and not(F1 = F2) Informatics 1 School of Informatics.

University of Edinburgh . director(F.P1.P2. P2) and not(P1 = P2) Informatics 1 School of Informatics. P1) and director(F.Solving Our Problem (Query 4) Which films have more than one director? Prove that there exists a film for which there exists two directors and these are not the same person. F.

actor(F2.Solving Our Problem (Query 5) Have all directors been actors? Prove that all directors of films are actors in some film P.F1.P) Informatics 1 School of Informatics. University of Edinburgh .director(F1.P) F2.

- Statement of PurposeUploaded byabhijit52
- Computer Science Questions and Answers P 2Uploaded byRajeev Kumar
- BookUploaded byhappy2011
- Undergraduate Prospectus 08Uploaded byShairyarShan
- GENED Clusters Formation Dec 232016Uploaded bybbkbkukb
- Cats Cif Bscms-s LiveUploaded byVlad Mihăiţă
- csc111 - mt2 - 2012-2013 - fall - solUploaded byاذيل للعديف
- Problem Management ProcessUploaded bySrinivas Sanjay
- honors100assign5Uploaded byapi-339864529
- Lab4_RepetitionEdit1Uploaded byzieraS
- Resume (3)Uploaded byMartin Winton
- What is Computer Science.rtfUploaded byChristopherLim
- Satyajit DasUploaded bySatyajit Das
- Formato Plan de TesisUploaded byPaúl Gonzáles
- Test1-P-sample-2012Uploaded bykirmangik
- IT 23 ProjectUploaded bypaul andrew laranjo asuncion
- Indiana University BSCSUploaded byivan7344
- ITC Module HandbookUploaded byjunaidakhtar81
- FUZZY NEUTROSOPHIC SOFT SET MEASURESUploaded byMia Amalia
- Software Engineering CompleteUploaded byJung Yoon Hwang
- Technical CV SampleUploaded bydanish007
- IJITMCUploaded byAlejandro Carver
- 485syllabusUploaded byKu Zijie
- CSE catalogue.pdfUploaded byssn
- ijitmc.docxUploaded byAlejandro Carver
- ram_bio1Uploaded byengineeringwatch
- NetworkingSecurity_0Uploaded byhilman
- list-2015Uploaded byMurdoko Ragil
- PhilosophyUploaded byNess
- stinson assesment rubric 2015Uploaded byapi-285576659

- 02 InterruptUploaded bystudyuntildie
- 01 Pemeliharaan PreventifUploaded bystudyuntildie
- 01. Arsitektur dan Orgasnisai Komputer.pptxUploaded bystudyuntildie
- Total Productive MaintenanceUploaded bystudyuntildie
- Week 01Uploaded bystudyuntildie
- Twos complement division operationUploaded bystudyuntildie
- Upload DocumentUploaded bystudyuntildie
- UntitledUploaded bystudyuntildie
- Pedoman Ejaan Yang DisempurnakanUploaded bystudyuntildie
- KalibrasiUploaded bystudyuntildie
- Mesin sinkronUploaded bystudyuntildie
- Proposal Yang BaikUploaded bystudyuntildie
- Electrical Wiring DesignUploaded bystudyuntildie
- Kuliah ALU H-4Uploaded bystudyuntildie
- Sistem Distribusi Tenaga ListrikUploaded bystudyuntildie
- Crack Windows 2Uploaded bystudyuntildie