2/17/2008Sultan Almuhammadi1 ICS 253-01 Logic & Sets (An Overview) Week 1.

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

TRUTH TABLES Section 1.3.
Constructing a Truth Table
Logic ChAPTER 3 1. Truth Tables and Validity of Arguments
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Boolean Algebra Computer Science AND (today is Monday) AND (it is raining) (today is Monday) AND (it is not raining) (today is Friday) AND (it is.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
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/20/11 Ming-Hsuan Yang UC Merced 1.
Phil 120 week 1 About this course. Introducing the language SL. Basic syntax. Semantic definitions of the connectives in terms of their truth conditions.
Propositional Logic 7/16/ Propositional Logic A proposition is a statement that is either true or false. We give propositions names such as p, q,
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved.
Homework 3.
Logic Truth Tables, Propositions, Implications. Statements Logic is the tool for reasoning about the truth or falsity of statements. –Propositional logic.
Truth Tables for Negation, Conjunction, and Disjunction.
3.2 – Truth Tables and Equivalent Statements
TRUTH TABLES. Introduction Statements have truth values They are either true or false but not both Statements may be simple or compound Compound statements.
Logic ChAPTER 3.
1 Propositional Logic Section Definition A proposition is a declarative sentence that is either true or false but not both nor neither Any proposition.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Chapter 3 – Introduction to Logic The initial motivation for the study of logic was to learn to distinguish good arguments from bad arguments. Logic is.
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Conjunctions, Disjunctions, and Negations Symbolic Logic 2/12/2001.
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
Section 1.5 Implications. Implication Statements If Cara has a piano lesson, then it is Friday. If it is raining, then I need to remember my umbrella.
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
Chapter 3 section 3. Conditional pqpqpq TTT TFF FTT FFT The p is called the hypothesis and the q is called the conclusion.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Faculty of ENGINEERING | Chulalongkorn University Discrete Structures Department of Computer Engineering DISCRETE STRUCTURE.
3.3: Truth Tables. Types of Statements Negation: ~p Conjunction: p ˄ q (p and q) Disjunction: p V q (p or q, or both) Conditional: p → q (if p, then q)
Boolean Algebra. Logical Statements A proposition that may or may not be true:  Today is Monday  Today is Sunday  It is raining.
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
Chapter 7 Logic, Sets, and Counting
Conditional Statements
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
CS1022 Computer Programming & Principles Lecture 1 Logic and Proof.
How do I show that two compound propositions are logically equivalent?
Review Given p: Today is Thursday q: Tomorrow is Friday
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a.
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Boolean Algebra Monday/Wednesday 7th Week. Logical Statements Today is Friday AND it is sunny. Today is Friday AND it is rainy. Today is Monday OR it.
Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
Notes - Truth Tables fun, fun, and more fun!!!!. A compound statement is created by combining two or more statements, p and q.
Joan Ridgway. If a proposition is not indeterminate then it is either true (T) or false (F). True and False are complementary events. For two propositions,
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Conditional Statements Lecture 2 Section 1.2 Fri, Jan 20, 2006.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
 2012 Pearson Education, Inc. Slide Chapter 3 Introduction to Logic.
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Ms. Andrejko 2-2 Logic. Real World Legally Blonde.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Aim 1.4: To work with conditionals and biconditionals Do Now: Determine the truth value of the following sentences: 1.9 is a prime number and New York.
Chapter 1 Logic and proofs
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Presentation transcript:

2/17/2008Sultan Almuhammadi1 ICS Logic & Sets (An Overview) Week 1

2/17/2008Sultan Almuhammadi2 Keywords (1): Proposition Conjunction Disjunction Negation Compound proposition Truth Table Logically equivalence

2/17/2008Sultan Almuhammadi3 Getting started Proposition: true/false statement cannot be both at the same time e.g. Today is Monday Conjunction: (and) p ^ q Disjunction: (or) p v q Negation: (not) ~p

2/17/2008Sultan Almuhammadi4 Example: p ^ q is a “compound” proposition (logical expression) The value of this proposition (expression) depends on the values of p and q.

2/17/2008Sultan Almuhammadi5 Truth table: p ^ q pqp ^ q TTT TFF FTF FFF

2/17/2008Sultan Almuhammadi6 Truth table: p v q pqp v q TTT TFT FTT FFF

2/17/2008Sultan Almuhammadi7 Keywords (2) Conditional proposition: if p then q pq Biconditional proposition: p if and only if q pq

2/17/2008Sultan Almuhammadi8 Keywords (2) Conditional proposition: if p then q (read: p implies q ) pq Biconditional proposition: p if and only if q (write: p iff q for short) pq

2/17/2008Sultan Almuhammadi9 Keywords (2) Conditional proposition: if p then q (read: p implies q ) pq Biconditional proposition: p if and only if q (write: p iff q for short) pq p -> q p q

2/17/2008Sultan Almuhammadi10 Truth Tables: if_then and iff pqp -> qp q TTTT TFFF FTTF FFTT

2/17/2008Sultan Almuhammadi11 Truth Tables (Example) pq~p~p v qp -> q TT? TF? FT? FF?

2/17/2008Sultan Almuhammadi12 Truth Tables pq~p~p v qp -> q TTF? TFF? FTT? FFT?

2/17/2008Sultan Almuhammadi13 Truth Tables pq~p~p v qp -> q TTFT? TFFF? FTTT? FFTT?

2/17/2008Sultan Almuhammadi14 Truth Tables pq~p~p v qp -> q TTFTT TFFFF FTTTT FFTTT

2/17/2008Sultan Almuhammadi15 Truth Tables pq~p~p v qp -> q TTFTT TFFFF FTTTT FFTTT Logically equivalent (~p v q) = (p -> q)

2/17/2008Sultan Almuhammadi16 Exer 1. (p -> q) = (~p v q) If it is Wednesday, John has discussion. It is not Wed, or John has discussion. If you don’t study hard, you will fail. Study hard or you fail. I have a meeting on Friday. I have a meeting today, or it is not Friday.

2/17/2008Sultan Almuhammadi17 Logical Equivalence: p  q (p -> q )  (~p v q ) ~( p v q )  ~p ^ ~q [De Morgan’s] ~( p ^ q )  ~p v ~q [De Morgan’s] (p q)  (p -> q) ^ (q -> p) (p q)  (~p v q) ^ (~q v p) Remember: I use = for 

2/17/2008Sultan Almuhammadi18 Binary Logic p has one of two values: True / False p cannot have both. Values can be {T,F}, {0,1}, {High, Low} n-ary Logic p has one of n valuse: e.g. 1, 2, …, n Conjunction, disjunction, and negation are defined over these n values. Sounds weird?

2/17/2008Sultan Almuhammadi19 Keywords (3): - Propositional logic - First order logic - Domain of discourse - Sets - Natural Numbers (N) - Integers (Z) - Rational Numbers (Q) - Irrational Numbers ( Q’ ) - Real Numbers (R) - Prime numbers

2/17/2008Sultan Almuhammadi20 First Order Logic - Propositional logic - E.g. p ^ q -> r - First order logic - E.g. p(x) ^ q(y) - x and y are from some Domain of discourse. - The value of p(x) depends on x.

2/17/2008Sultan Almuhammadi21 Sets - Notations: - Upper case letters: A, B X, Y - Elements can be listed in braces {…} - E.g. A = {1, 2, 5} - Elements can be described: - E.g. B = set of all even numbers. - Or B = {x | x is an even number} - E.g. C = {a : a is even and 1< a <10} - The size of set A is denoted by |A| - E.g. |A| = 3, |B| = ∞, |C| = 4

2/17/2008Sultan Almuhammadi22 Sets - Membership - x  A // x belongs to A, - y  A - Subsets - A  B // can be equal - B  N // proper-subset - The Empty Set: denoted by  = { } - The Universe: U = set of all elements.

2/17/2008Sultan Almuhammadi23 Set Operations - Intersection - A  B = { x | x  A and x  B} - Union - A  B = { x | x  A or x  B} - Complement - E’ = Ē = { x | x  E }

2/17/2008Sultan Almuhammadi24 Number Systems - Integers: - Z = { …, -3, -2, -1, 0, 1, 2, 3, …} - Z + = {1, 2, 3, …} (positive integers) - Natural Numbers: - N = {0, 1, 2, 3, … } (nonnegative integers) - Rational Numbers: - Q = {a/b | a, b  Z and b  0} - Irrational Numbers: - Q’ = { x | x  R and x  Q} - Prime numbers: - {x | x  N and x is divisible by 1 and x only}

2/17/2008Sultan Almuhammadi25 Examples: - Which of the following is true? - 2  N - 2  Z - 2  N  Z - x  N  x  Z - N  Z -   Z -   Z

2/17/2008Sultan Almuhammadi26 Warm up: - Domain of discourse (the domain) - Set {x | x is prime} - Set {x | x is even and x is prime} - For all x, P(x)  x P(x) - For some x, P(x)  x P(x) - Eg. -  x, x > 1 (domain = N) -  x, x > 1 (domain = N) -  x,  y, x > y (domain = N)

2/17/2008Sultan Almuhammadi27 Exer 1: -  x  y (x > y)(domain of discourse is R) -  x  y (x > y)(domain of discourse is N) -  x  y (x < y)(domain of discourse is Z) -  x  y (x > y)(domain of discourse is Q) -  x  y (x < y)(domain of discourse is N) -  x  y (x < y)(domain of discourse is Z)

2/17/2008Sultan Almuhammadi28 Exer 1: Solution -  x  y (x > y)(domain of discourse is R) - False, for x = 1, y = 2 -  x  y (x > y)(domain of discourse is N) - True, for x = 2, y = 1 -  x  y (x < y)(domain of discourse is Z) - True, for y = x  x  y (x > y)(domain of discourse is Q) - False, for y = x  x  y (x < y)(domain of discourse is N) - False, for y = x -  x  y (x < y)(domain of discourse is Z) - False, for y = x - 1

2/17/2008Sultan Almuhammadi29 Negation: - E.g. - Domain: set of all horses - p(x) : x is a black horse - q(x): x is a white horse - Universal quantifier -  x p(x) /* all horses are black */ - Negation: ~  x p(x) =  x ~p(x) - Existential quantifier -  x p(x) - Negation: ~  x p(x) =  x ~p(x)

2/17/2008Sultan Almuhammadi30 Negation: - e.g.1. -  x  y (x > y) - =  x [  y (x > y) ] - Negation: ~  x [  y (x > y) ] - =  x ~  y (x > y) - =  x  y ~ ( x > y) - =  x  y ( x ≤ y) - e.g.2. -  x  y  z (x < z) ^ (z < y) - Negation: ~  x  y  z (x < z) ^ (z < y) - =  x  y  z ~ [ (x < z) ^ (z < y) ] - =  x  y  z (x ≥ z) V (z ≥ y)

2/17/2008Sultan Almuhammadi31 Exer 2: Domain = all cs253 students p(x, q) = student x solved question q Write the following in symbolic notation: A.Everybody got full mark. B.Nobody got full mark. C.Negation of A. (Not everybody got full mark). D.Negation of B. E.There was a hard question nobody solved it. F.Negation of E. Solution: ?

2/17/2008Sultan Almuhammadi32 Quiz (A1) (A1: for practice only, not counted) Domain = all cs253 students p(x, q) = student x solved question q Write the following in symbolic notation: “There is exactly one student who got full mark.” Solution: ?