CSE 311: Foundations of Computing I

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

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

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

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

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

Introduction Propositional Logic

CSE 240 Logic and Discrete Mathematics

Compound Propositions

Course Staff. Textbook

CS 340: Discrete Structures for Engineers

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

Discrete Structures for Computer Science

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

Today s Topic: Propositional Logic

About the course. CSE 321 Discrete Structures. Why this material is important. Topic List. Propositional Logic. Administration. From the CSE catalog:

EECS 1028 M: Discrete Mathematics for Engineers

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

Discrete Mathematics

CSE 20 DISCRETE MATH. Fall

DISCRETE STRUCTURES WEEK5 LECTURE1

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

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

Section 1.2: Conditional Statements

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

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

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

Discrete Structures of Computer Science Propositional Logic I

Consider the following propositions: p: lecture has started q: If I have a banana, then I have a pear r: I finished this problem

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

ICS141: Discrete Mathematics for Computer Science I

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

Propositional Logic. Fall () Propositional Logic Fall / 30

Math.3336: Discrete Mathematics. Applications of Propositional Logic

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

CSE 421 Algorithms. Richard Anderson Autumn 2015 Lecture 1

Section 1.1: Logical Form and Logical Equivalence

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

We last time we began introducing equivalency laws.

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Mathematical Logic Part One

Lecture 02: Propositional Logic

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

Propositional Logic. Spring Propositional Logic Spring / 32

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

1 The Foundations. 1.1 Logic. A proposition is a declarative sentence that is either true or false, but not both.

Introducing Proof 1. hsn.uk.net. Contents

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

Mathematical Logic Part One

Logic and Propositional Calculus

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

CSC Discrete Math I, Spring Propositional Logic

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

MAT2345 Discrete Math

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Chapter 1: The Logic of Compound Statements. January 7, 2008

Propositional Logic 1

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

MA103 STATEMENTS, PROOF, LOGIC

The statement calculus and logic

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

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

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

COMP 2600: Formal Methods for Software Engineeing

CS Module 1. Ben Harsha Apr 12, 2017

Propositions. Frequently, we will use the word statement instead of proposition.

Discrete Mathematics and Its Applications

Definition 2. Conjunction of p and q

Logic and Propositional Calculus

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

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

PROPOSITIONAL CALCULUS

CISC-102 Winter 2016 Lecture 17

Section A (not in the text) Which of the following are statements? Explain. 3. The President of the United States in 2089 will be a woman.

Propositional logic (revision) & semantic entailment. p. 1/34

Announcements CompSci 102 Discrete Math for Computer Science

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

The Logic of Compound Statements cont.

AMTH140 Lecture 8. Symbolic Logic

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

PROBLEM SET 3: PROOF TECHNIQUES

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

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Foundation of proofs. Jim Hefferon.

STRATEGIES OF PROBLEM SOLVING

PHIL 422 Advanced Logic Inductive Proof

Mathematical Logic Part One

Chapter 5: Section 5-1 Mathematical Logic

Two hours. Note that the last two pages contain inference rules for natural deduction UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Section 3.1 Statements, Negations, and Quantified Statements

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

Mat 243 Exam 1 Review

Boolean Logic. CS 231 Dianna Xu

Mathematics for linguists

Announcements. Exam 1 Review

CSE 20 DISCRETE MATH WINTER

Logic and Proofs. (A brief summary)

Transcription:

CSE 311: Foundations of Computing I Autumn 2015 Lecture 1: Propositional Logic Overload Request Link: http://tinyurl.com/p5vs5xb

We will study the theory needed for CSE. about the course Logic: How can we describe ideas and arguments precisely? Formal proofs: Can we prove that we re right? Number theory: How do we keep data secure? Relations/Relational Algebra: How do we store information? How do we reason about the effects of connectivity? Finite state machines: How do we design hardware and software? Turing machines: What is computation? Are there problems computers can t solve? [to ourselves? to others?] [really? we need to justify numbers?] [the universe? superheroes?]

about the course The computational perspective. Example: Sudoku Given one, solve by hand. Given most, solve with a program. Given any, solve with computer science. - Tools for reasoning about difficult problems - Tools for communicating ideas, methods, objectives - Fundamental structures for computer science [ like, uhh, smart stuff ]

professors Prof. Oveis Gharan CSE 636 Prof. Lee CSE 640 Section A MWF 9:30-10:20 in CMU 120 Office hours MW 10:30-11:30 Section B MWF 1:30-2:20 in MGH 241 Office hours MW 2:30-3:30 We will each sometimes teach both sections. The person who teaches is the one holding office hours after class. You can go to any office hours any time.

administrivia Teaching assistants: [office hours TBD soon] Sam Castle Jiechen Chen Rebecca Leslie Evan McCarty Tim Oleskiw Spencer Peters Robert Weber Ian Zhu cse311-staff@cs Quiz Sections: Thursdays (Optional) Book: Rosen Discrete Mathematics 6 th or 7 th edition Can buy online for ~$50 Homework: Due Fridays on Gradescope Write up individually First homework out this Friday (Oct 2) Exams: Midterm: Monday, Nov. 9, in class Final: Monday, Dec. 14 Grading (roughly): 50% homework 35% final exam 15% midterm All course information at http://www.cs.washington.edu/311.

administrivia

logic: the language of reasoning Why not use English? Turn right here [When I was taking my driving test, the officer said Turn left ; I asked into the first or second street? The officer replied you are failed because you asked for help!!] Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo. We saw her duck. Language of Reasoning like Java or English Words, sentences, paragraphs, arguments Today is about words and sentences. [The sentence means "Bison from Buffalo, that bison from Buffalo bully, themselves bully bison from Buffalo. ]

why learn a new language? Logic as the language of reasoning, will help us Be more precise Be more concise Figure out what a statement means more quickly [ please stop ]

propositions A proposition is a statement that has a truth value, and is well-formed

proposition is a statement that has a truth value and is well-formed Consider these statements: 2 + 2 = 5 The home page renders correctly in IE. This is the song that never ends. Turn in your homework on Wednesday. This statement is false. Akjsdf? The Washington State flag is red. Every positive even integer can be written as the sum of two primes.

propositions A proposition is a statement that has a truth value, and is well-formed Propositional variables: p, q, r, s, Truth values: T for true, F for false

a proposition Roger is an orange elephant who has toenails if he has tusks, and has toenails, tusks, or both. What does this proposition mean? [might as well just end it all now, Roger] It seems to be built out of other, more basic propositions that are sitting inside it! What are they?

a proposition Roger is an orange elephant who has toenails if he has tusks, and has toenails, tusks, or both. RElephant : Roger is an orange elephant RTusks : Roger has tusks RToenails : Roger has toenails

logical connectives Negation (not) p Conjunction (and) p q Disjunction (or) p q Exclusive or p q Implication p q Biconditional p q RElephant : Roger is an orange elephant RTusks : Roger has tusks RToenails : Roger has toenails Roger is an orange elephant who has toenails if he has tusks, and has toenails, tusks, or both. RElephant and (RToenails if RTusks) and (RToenails or RTusks or (RToenails and RTusks))

some truth tables p p p q p q p q p q p q p q

p q If p, then q is a promise: Whenever p is true, then q is true Ask has the promise been broken? p q p q If it s raining, then I have my umbrella. Suppose it s not raining

p q I am a Pokémon master only if I have collected all 151 Pokémon. Can we re-phrase this as if p, then q?

p q Implication: p implies q whenever p is true q must be true if p then q q if p p is sufficient for q p only if q p q p q

converse, contrapositive, inverse Implication: p q Converse: q p Contrapositive: q p Inverse: p q How do these relate to each other?

back to Roger Roger is an orange elephant who has toenails if he has tusks, and has toenails, tusks, or both. RElephant (RToenails if RTusks) (RToenails RTusks (RToenails RTusks)) Define shorthand p : RElephant q : RTusks r : RToenails

roger s sentence with a truth table p q r q r p q r r q r q (r q) r q p q r (r q r q ) Shorthand: p : RElephant q : RTusks r : RToenails

Let s think about fruits A fruit is an apple only if it is either red or green and a fruit is not red and green. p : q : r : Fruit is an apple Fruit is red Fruit is green

Let s think about fruits A fruit is an apple only if it is either red or green and a fruit is not red and green. (FApple only if (FGreen xor FRed)) and (not (FGreen and FRed)) (FApple (FGreen FRed )) ( (FGreen Fred)) p : FApple q : FGreen r : FRed

Fruit Sentence with a truth table p q r q r p (q r) q r (q r) (p q r ) ( q r ) T T T T T F T F T T F F F T T F T F F F T F F F

biconditional: p q p iff q p is equivalent to q p implies q and q implies p p q p q