CS1502 Formal Methods in Computer Science Lecture Notes 1 Course Information Introduction to Logic Part 1.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions)
Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions + solutions)
CS1502 Formal Methods in Computer Science Lecture Notes 3 Consequence Rules Boolean Connectives.
1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
Knowledge Representation Methods
Truth Trees Intermediate Logic.
1 Discrete Structures CS Johnnie Baker Comments on Early Term Test.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
FIRST ORDER LOGIC Levent Tolga EREN.
Adapted from Discrete Math
1 CS 1502 Formal Methods in Computer Science Lecture Notes 12 Variables and Quantifiers.
CS 1502 Formal Methods in Computer Science
Predicates & Quantifiers Goal: Introduce predicate logic, including existential & universal quantification Introduce translation between English sentences.
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
INTRODUCTION TO LOGIC FALL 2009 Quiz Game. ConceptsTrue/FalseTranslations Informal Proofs Formal Proofs
Intro to Discrete Structures
CSE 311 Foundations of Computing I Autumn 2012 Lecture 1 Propositional Logic 1.
MATH 310, FALL 2003 (Combinatorial Problem Solving) MoWeFr 1:20 McGregory 214.
CS 103 Discrete Structures Lecture 01 Introduction to the Course
CST 229 Introduction to Grammars Dr. Sherry Yang Room 213 (503)
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
CS1502 Formal Methods in Computer Science Lecture Notes 16 Review for Exam2 continued Theory of Computation Introduction.
PHIL012 Class Notes 1/12/2001. Outline Announcements, web page Names and Predicates Sentences, claims, and truth value Atomic sentences Homework Problems.
Atomic Sentences Chapter 1 Language, Proof and Logic.
Michaelmas Term 2004 Discrete Mathematics CSC 141 Discrete Mathematics Dr. Corina Sas and Ms. Nelly Bencomo
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
Many Sorted First-order Logic Student: Liuxing Kan Instructor: William Farmer Dept. of Computing and Software McMaster University, Hamilton, CA.
September 8, 2009Theory of Computation Lecture 1: Introduction and Preliminaries 1 Welcome to CS 620 – Theory of Computation Fall 2009 Instructor: Marc.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Welcome to CMPSC 360!. Today Introductions Student Information Sheets, Autobiography What is Discrete Math? Syllabus Highlights
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
CPSC 121: Models of Computation Unit 0 Introduction George Tsiknis Based on slides by Patrice Belleville and Steve Wolfman.
INTRODUCTION TO LOGIC Jennifer Wang Fall 2009 Midterm Review Quiz Game.
PHIL012 Class Notes 1/15/2001. Outline Announcements, web page Review Homework Problems (1-7) Set Theory Review & Problem 8 (if time) Assignment for Wednesday.
CompSci 102 Discrete Math for Computer Science
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Section 3.4 Boolean Algebra. A link between:  Section 1.3: Logic Systems  Section 3.3: Set Systems Application:  Section 3.5: Logic Circuits in Computer.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
1 CS 381 Introduction to Discrete Structures Lecture #1 Syllabus Week 1.
Copyright © Peter Cappello 2011 Predicates & Quantifiers.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Course Overview Stephen M. Thebaut, Ph.D. University of Florida Software Engineering.
Announcements  Upcoming due dates  Thursday 10/1 in class Midterm  Coverage: everything in lecture and readings except first-order logic; NOT probability.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Chapter 1 Propositional Logic
Computer Science 210 Computer Organization
Lecture 1 – Formal Logic.
Principles of Computing – UFCFA3-30-1
CS201: Data Structures and Discrete Mathematics I
CS 1502 Formal Methods in Computer Science
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
CS201: Data Structures and Discrete Mathematics I
Computer Science 210 Computer Organization
3.5 Symbolic Arguments.
CS201: Data Structures and Discrete Mathematics I
Logical and Rule-Based Reasoning Part I
CS201: Data Structures and Discrete Mathematics I
Representations & Reasoning Systems (RRS) (2.2)
3.5 Symbolic Arguments.
Presentation transcript:

CS1502 Formal Methods in Computer Science Lecture Notes 1 Course Information Introduction to Logic Part 1

Content  70% logic and proofs Pervades computer science, e.g., hardware circuit design, artificial intelligence, knowledge representation, database systems, programming languages, software engineering (design, verification, specification), … Will help you understand proofs in math, science, theoretical CS

Content  30% Abstract models of computation Needed for hardware design, compilers, computational complexity analysis, … Interesting proofs; you will use what you learn in the first part of the course to understand them

Logistics  Prerequisites: CS441 Discrete Structures for Computer Science CS445 Data Structures  Materials on course website, reachable from Schedule of readings, homeworks, exams Lecture notes, available before class Support for lectures; filled in in class

Logistics  The TA will go over exercises and answer questions in recitation.  He will also cover logistics of submitting homeworks, and will post solutions to the homework.

Logistics  Workload is steady throughout the course  3 exams  Weekly homeworks (no projects) Many are graded electronically You can submit solutions as many times as you like Get feedback without having to wait for instructor grading Purpose is to help you master the material for the exams  Exams 90% Homework 10%

Logistics  Exams Challenging, but not devious All of the questions will be related to an example worked out in the text, a homework exercise, or a problem we did in class.

Logistics  Work is steady throughout the course  If you keep up, you will likely do OK  The work gets harder!  Please ask questions (lectures, recitations, office hours) My office hours are T,TH 1:30-2:30 and by appointment – just send mail to set up a time

Logistics  Do readings before lecture  Do the “you try it” exercises as you read the logic text

Software with LPL Text Fitch  Named for Frederic Fitch  Construct formal proofs  Prove an argument is valid

Software with LPL Text Boole  Named for George Boole  Construct truth tables  Verify a sentence is a tautology  Verify two sentences are tautologically equivalent  Prove an argument is valid

Software with the Text Tarski’s World  Named for Alfred Tarski  Construct sentences in first-order logic  Determine if a sentence is true wrt a world  Create a world that shows that an argument is invalid

Software with Text Submit  Verify your solutions are correct (without instructor seeing)  Submit homework for final grading to TA (by due date)

More Notes on Homework  Many exercises will be submitted to the grade grinder  Please request that your grade assessments be sent to the TA (not to me!)  You may submit your solutions as many times as you like, but please send your TA only a single report per assignment  Now, let’s look at the webpage and syllabus…

Introduction to Logic

Examples All x All y ((cube(x) ^ tet(y))  (leftof(x,y) ^ frontof(x,a))) circle(a) small(a) feed(max,scruffy) All x All y ((pet(x,y) ^ hungry(y))  feed(x,y))

Logic  A simple grammar. Each sentence has a single interpretation (unlike English!)  Used to describe a world, which we define.  Once we define the world, we can say what things names refer to, and whether a logical sentence is true or false.

Names  Constants are used to name existing objects a, b, c, d, e, f max, claire, carl  No constant can name more than one object  An object can have more than one name or no name at all

Predicates  A property possessed by an object Shape (e.g., Tet, Cube) Size (e.g., Small, Large)  A relationship among objects Shape relationship (e.g., SameShape) Size relationship (e.g., Smaller) Positional relationship (e.g., Between, LeftOf) Equality =

Quick Example  Ackermann’s sentences and world in Tarski  Properties: Cube, Tet (4 faces), Dodec (12 faces), Medium  Relations Backof, Leftof  (Click verify, and you see that one of the sentences is false about the world)

Predicates  Each predicate has a fixed number of arguments or “arity”. This is the number of constants the predicate needs to form a sentence.  In English, OK, but not in logic: Susanna is taller than Dimitri Susanna is taller than Dimitri and Jerome

Predicates  Predicates must be “determinate”  Suppose p is an n-ary predicate.  For every n-tuple of objects, p(o1,o2,…,oN) is true or false (not kind of true).  What’s an n-tuple?  An n-tuple is a collection of n objects where order matters. Duplicates are allowed. In contrast, sets may not have duplicates, and the members of sets are not ordered.

Atomic Sentences (so far)  A sentence formed by a single predicate followed by one or more names Max is tall Tall(max) e is larger than b Larger(e,b) e is identical to a e = a  A sentence expresses a claim that is either true or false

Atomic Sentences (so far)  Predicate(arg 1, arg 2,…, arg n ) Predicates have names beginning with an uppercase letter or are represented by an operator symbol The number of arguments is called the predicate’s arity The order of the arguments is important Larger(e,c) – e is larger than c Larger(c,e) – c is larger than e Between(a,b,e) – a is between b and e Between(b,a,e) – b is between a and e  =(a,b) a and b are identical Usually, written in infix form a = b

Function Symbols  A function is used to express complex names (a reference to an individual without using a name) father(b) – b’s father Used in a sentence: Tall(father(b)) password(c) – c’s password Used in a sentence: Long(password(c))  A function may be nested father(father(max)) Used in a sentence: Short(father(father(max)))  Can’t nest predicates Tall(Tall(max)) * not a legal sentence*

Functional Expressions  Function(arg 1, arg 2,…, arg n ) Function names begin with a lowercase letter or are expressed with a symbol father(max) Max’s father father(mother(max)) Max’s mother’s father youngestChild(max,ann) Max and Ann’s youngest child *(5,+(2,4)) 30

Atomic Sentences (so far)  A sentence formed by a single predicate followed by one or more terms  A term is either a constant or a functional expression

Example Atomic Sentences (which are functions and which are predicates?) Predicate(term1,term2,…,term-n) Happy(bossof(sally)) Father(bill) Tall(fatherOf(motherOf(sally))) Happier(motherOf(bill),bossof(fatherOf(max))) Fake(santa(rossParkMall))) Real(santa(robinsonTownCenter)))

Connectives Apply to sentences to create more complex sentences.  Not   And, Or ,   Material Conditional   Biconditional 

Examples   Larger(e,c)  Cube(b)  Large(b)  SameRow(e,c)  BackOf(e,b) e is not larger than c b is a cube or b is large e and c are in the same row and e is in back of b

First Order Logic  Names  Predicates  Functions  Connectives Are there more?

Example FOL

Translation  Brando is Nancy’s favorite actor.  brando = favoriteActor(nancy)  BetterActor(favoriteActor(nancy), favoriteActor(max))  Nancy’s favorite actor is better than Max’s favorite actor.  sean = favoriteActor(sean)  Sean is his own favorite actor.  Brando is someone’s favorite actor.   x(brando = favoriteActor(x))

Quantifiers and Variables  For every x  x  x (man(x)  mortal(x))  There exists y  y  x(brando = favoriteActor(x))

First Order Logic  Names  Predicates  Functions  Connectives  Quantifiers and variables Revised List