Course Staff. Textbook

Similar documents
Math.3336: Discrete Mathematics. Applications of Propositional Logic

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Introduction Propositional Logic

CSE 311: Foundations of Computing I. Lecture 1: Propositional Logic

CSE 240 Logic and Discrete Mathematics

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

CHEM 2401 / QUANTITATIVE CHEMICAL ANALYSIS (QCA)

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

AS The Astronomical Universe. Prof. Merav Opher - Fall 2013

CSC Discrete Math I, Spring Propositional Logic

CS Module 1. Ben Harsha Apr 12, 2017

EECS 1028 M: Discrete Mathematics for Engineers

Math.3336: Discrete Mathematics. Propositional Equivalences

Math.3336: Discrete Mathematics. Nested Quantifiers

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

CSE 311: Foundations of Computing I. Lecture 1: Propositional Logic

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

ICS141: Discrete Mathematics for Computer Science I

A statement is a sentence that is definitely either true or false but not both.

CS 340: Discrete Structures for Engineers

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Discrete Mathematics and Its Applications

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

AS 101: The Solar System (Spring 2017) Course Syllabus

CSE 311: Foundations of Computing I. Spring 2015 Lecture 1: Propositional Logic

Chemistry 110 General Chemistry, Course Lecture MWF 8:30 am 9:50 am Room NSM C221 Laboratory M or W 1:00 pm 3:50 pm Room NSM B340

Compound Propositions

Mathematical Logic Part One

Logic. Def. A Proposition is a statement that is either true or false.

CHEM 115 Lewis Structures Model

Discrete Structures for Computer Science

CS173 Lecture B, September 10, 2015

NP-Completeness Part II

Introduction to Decision Sciences Lecture 2

Math/EECS 1028M: Discrete Mathematics for Engineers Winter Suprakash Datta

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

An Introduction to Logic 1.1 ~ 1.4 6/21/04 ~ 6/23/04

Linear Algebra. Instructor: Justin Ryan

CSE 311: Foundations of Computing I

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

Discrete Mathematics

DISCRETE STRUCTURES WEEK5 LECTURE1

Chemistry 401: Modern Inorganic Chemistry (3 credits) Fall 2017

MATH 341, Section 001 FALL 2014 Introduction to the Language and Practice of Mathematics

Mathematical Logic Part One

AS 102 The Astronomical Universe (Spring 2010) Lectures: TR 11:00 am 12:30 pm, CAS Room 316 Course web page:

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Preparing for the CS 173 (A) Fall 2018 Midterm 1

CSE507. Course Introduction. Computer-Aided Reasoning for Software. Emina Torlak

Lecture 02: Propositional Logic

Today s Topic: Propositional Logic

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Welcome to Physics 161 Elements of Physics Fall 2018, Sept 4. Wim Kloet

Today s Menu. Administrativia Two Problems Cutting a Pizza Lighting Rooms

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

Chapter 1, Section 1.1 Propositional Logic

CHEM 102 Fall 2012 GENERAL CHEMISTRY

Ph 1a Fall General Information

Math.3336: Discrete Mathematics. Combinatorics: Basics of Counting

AMSC/MATH 673, CLASSICAL METHODS IN PDE, FALL Required text: Evans, Partial Differential Equations second edition

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

COS 341: Discrete Mathematics

MAT2345 Discrete Math

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

CS70: Discrete Math and Probability. Slides adopted from Satish Rao, CS70 Spring 2016 June 20, 2016

Definition 2. Conjunction of p and q

Important Dates. Non-instructional days. No classes. College offices closed.

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Chemistry 311 Chemistry Across the Periodic Table Spring 2017

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/

GEO 401 Physical Geology (Fall 2010) Unique Numbers Class: JGB 2.324; MWF 9:00-10:00 Labs: JGB 2.310; time according to your unique number

PROPOSITIONAL CALCULUS


Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

General Info. Grading

Chemistry 14C: Structure of Organic Molecules - Winter 2017 Version 56

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Recitation Week 3. Taylor Spangler. January 23, 2012

Math 3B: Lecture 1. Noah White. September 23, 2016

ASTRONOMY 10 De Anza College

Chemistry 883 Computational Quantum Chemistry

Physics 321 Theoretical Mechanics I. University of Arizona Fall 2004 Prof. Erich W. Varnes

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Welcome to Physics 211! General Physics I

San Jose State University Department of Mechanical and Aerospace Engineering ME 230, Advanced Mechanical Engineering Analysis, Fall 2015

CSE 20 DISCRETE MATH. Fall

Ch. 2: Lec. 1. Basics: Outline. Importance. Usages. Key problems. Three ways of looking... Colbert on Equations. References. Ch. 2: Lec. 1.

Important Dates. Non-instructional days. No classes. College offices closed.

Math , Fall 2014 TuTh 12:30pm - 1:45pm MTH 0303 Dr. M. Machedon. Office: Math Office Hour: Tuesdays and

Chemistry 401 : Modern Inorganic Chemistry (3 credits) Fall 2014

PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS GENERAL CHEMISTRY I CHEM 1110

Boolean Logic. CS 231 Dianna Xu

Petrology Spring Please grab a syllabus. Introductions

Physics 141 Course Information

CEE461L Chemical Processes in Environmental Engineering CEE561L/ENV542L Environmental Aquatic Chemistry Fall 2017

Transcription:

Course Staff CS311H: Discrete Mathematics Intro and Propositional Logic Instructor: Işıl Dillig Instructor: Prof. Işıl Dillig TAs: Jacob Van Geffen, Varun Adiga, Akshay Gupta Class meets every Monday, Wednesday 2-3pm Course webpage: http://www.cs.utexas.edu/ isil/cs311h/ Contains contact info, office hours, slides from lectures, homework assignments etc. Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 1/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 2/36 About this Course Textbook Give mathematical background you need for computer science Topics: Logic, proof techniques, number theory, combinatorics, graph theory, basic complexity theory... These will come up again and again in higher-level CS courses Textbook (optional): Discrete Mathematics and Its Applications by Kenneth Rosen Textbook not a substitute for lectures: Class presentation may not follow book Master CS311H material if you want to do well in future courses! Skip many chapters and cover extra material Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 3/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 4/36 Piazza Discussion Sections and Office Hours Piazza page: https://piazza.com/utexas/fall2017/cs311h/home Homework #0: Make sure you can access Piazza page! Please post class-related questions on Piazza instead of emailing instructor TA s If something is not clear to you, it won t be to others either You ll get answers a lot quicker Please use common sense when posting questions on Piazza Hints/ideas ok, but cannot post full solutions!! Discussion sections on Fridays 12-1 pm and 1-2 pm Discussion section will answer questions, solve new problems, and go over previous homework Isil s office hours: Mon, Wed 5:30-6:15 pm Jacob s office hours: TBD Varun s office hours: TBD Akshay s office hours: TBD Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 5/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 6/36 1

Requirements Grading Weekly written homework assignments Two midterm exams: in-class, closed-book Final exam: 35% of final grade Allowed to bring 3 pages of hand-prepared notes Each midterm: 20% of final grade Scheduled for October 11, November 20 Final exam on December 16 (9 am - 12 pm) No make-up exams given unless you have serious, documented medical emergency Homework: 25% of final grade Final grades may be curved, but lower bounds guaranteed (e.g., get at least A- if grade is 90% or higher) Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 7/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 8/36 Homework Policy Honor Code Homework write-up must be your own Homework due at the beginning of class on due date Late submissions not allowed, but lowest homework score dropped when calculating grades We will only give hard copies of homework solutions in class May not copy answers from on-line resources or other students If you discuss with others, write-up must mention their names Honor code taken very seriously at UT May be expelled for violating honor code! Please read departmental guidelines (link from course webpage) Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 9/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 10/36 Class Participation Everyone expected to attend lectures Please do not use cell phone, laptop, or tablets during lecture! Ask questions! No question is a stupid question! Let s get started! Other students also benefit from your questions Make class fun by participating! Might win chocolate if you answer questions :) Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 11/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 12/36 2

Logic Logic: study of valid reasoning; fundemantal to CS Allows us to represent knowledge in precise, mathematical way Allows us to make valid inferences using a set of precise rules Many applications in CS: AI, programming languages, databases, computer architecture, automated testing and program analysis,... Propositional Logic Simplest logic is propositional logic Building blocks of propositional logic are propositions A proposition is a statement that is either true or false Examples: CS311 is a course in discrete mathematics : True Austin is located in California : False Pay attention : Not a proposition x+1 =2 : Not a proposition Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 13/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 14/36 Propositional Variables, Truth Value Truth value of a proposition identifies whether a proposition is true (written T) or false (written F) What is truth value of Today is Friday? F Variables that represent propositions are called propositional variables Denote propositional variables using lower-case letters, such as p, p 1, p 2, q, r, s,... Truth value of a propositional variable is either T or F. Compound Propositions More complex propositions formed using logical connectives (also called boolean connectives) Three basic logical connectives: 1. : conjunction (read and ), 2. : disjunction (read or ) 3. : negation (read not ) Propositions formed using these logical connectives called compound propositions; otherwise atomic propositions A propositional formula is either an atomic or compound proposition Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 15/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 16/36 Negation Conjunction Negation of a proposition p, written p, represents the statement It is not the case that p. If p is T, p is F and vice versa. In simple English, what is p if p stands for... Austin is located in California? Less than 80 students are enrolled in CS311? Conjunction of two propositions p and q, written p q, is the proposition p and q p q is T if both p is true and q is true, and F otherwise. What is the conjunction and the truth value of p q for... p = It is fall semester, q = Today is Wednesday? p = It is Wednesday, q = It is morning? Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 17/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 18/36 3

Disjunction Propositional Formulas and Truth Tables Disjunction of two propositions p and q, written p q, is the proposition p or q p q is T if either p is true or q is true, and F otherwise. What is the disjunction and the truth value of p q for... p = It is spring semester, q = Today is Wednesday? p = It is Friday, q = It is morning? Truth table for propositional formula F shows truth value of F for every possible value of its constituent atomic propositions Example: Truth table for p Example: Truth table for p q p p T F F T p q p q T T T T F T F T T F F F Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 19/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 20/36 Examples More Logical Connectives,, most common boolean connectives, but there are other boolean connectives as well Construct truth tables for the following formulas: 1. (p q) p 2. (p q) ( p q) Other connectives: exclusive or, implication, biconditional Exclusive or: p q is true when exactly one of p and q is true, and false otherwise 3. (p q r) r Truth table: p q p q T T F T F T F T T F F F Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 21/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 22/36 Implication (Conditional) Converting English into Logic An implication (or conditional) p q is read if p then q or p implies q It is false if p is true and q is false, and true otherwise Intuition: Consider the sentence If I m late, I ll pay you $100. When am I lying? Exercise: Draw truth table for p q In an implication p q, p is called antecedent and q is called consequent Let p = I major in CS and q = I will find a good job. How do we translate following English sentences into logical formulas? If I major in CS, then I will find a good job : I will not find a good job unless I major in CS : It is sufficient for me to major in CS to find a good job : It is necessary for me to major in CS to find a good job : Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 23/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 24/36 4

More English - Logic Conversions Let p = I major in CS, q = I will find a good job, r = I can program. How do we translate following English sentences into logical formulas? I will not find a good job unless I major in CS or I can program : I will not find a good job unless I major in CS and I can program : A prerequisite for finding a good job is that I can program : If I major in CS, then I will be able to program and I can find a good job : Converse of a Implication The converse of an implication p q is q p. What is the converse of If I am a CS major, then I can program? What is the converse of If I get an A in CS311, then I am smart? Note: It is possible for a implication to be true, but its converse to be false, e.g., F T is true, but converse false Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 25/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 26/36 Inverse of an Implication Contrapositive of Implication The inverse of an implication p q is p q. What is the inverse of If I am a CS major, then I can program? What is the inverse of If I get an A in CS311, then I am smart? Note: It is possible for a implication to be true, but its inverse to be false. F T is true, but inverse is false The contrapositive of an implication p q is q p. What is the contrapositive of If I am a CS major, then I can program? What is the contrapositive of If I get an A in CS311, then I am smart? Question: Is it possible for an implication to be true, but its contrapositive to be false? Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 27/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 28/36 Conditional and its Contrapositive Question A conditional p q and its contrapositive q p always have the same truth value. Prove it! Given p q, is it possible that its converse is true, but inverse is false? Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 29/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 30/36 5

Summary Biconditionals Conditional is of the form p q Converse: q p Inverse: p q Contrapositive: q p Conditional and contrapositive have same truth value Inverse and converse always have same truth value A biconditional p q is the proposition p if and only if q. The biconditional p q is true if p and q have same truth value, and false otherwise. Exercise: Construct a truth table for p q Question: How can we express p q using the other boolean connectives? Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 31/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 32/36 Operator Precedence Operator Precedence, cont. Negation ( ) has higher precedence than all other connectives. Given a formula p q r, do we parse this as (p q) r or p (q r)? Without settling on a convention, formulas without explicit paranthesization are ambiguous. To avoid ambiguity, we will specify precedence for logical connectives. Question: Does p q mean (i) (p q) or (ii) ( p) q? Conjunction ( ) has next highest predence. Question: Does p q q mean (i) (p q) r or (ii) p (q r)? Disjunction ( ) has third highest precedence. Next highest is precedence is, and lowest precedence is Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 33/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 34/36 Operator Precedence Example Summary Which is the correct interpretation of the formula p q r q r (A) ((p (q r)) q) ( r) (B) ((p q) r) q) ( r) (C) (p (q r)) (q ( r)) Formulas in propositional logic are formed using propositional variables and boolean connectives Connectives: negation, conjunction, disjunction, conditional, biconditional Truth table shows truth value of formula under all possible assignments to variables (D) (p ((q r) q)) ( r) Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 35/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Intro and Propositional Logic 36/36 6