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.

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

Geometry Logic.
TRUTH TABLES Section 1.3.
TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
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.
1 Section 1.1 Logic. 2 Proposition Statement that is either true or false –can’t be both –in English, must contain a form of “to be” Examples: –Cate Sheller.
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.
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
Adapted from Discrete Math
The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Intro to Discrete Structures
Propositions and Truth Tables
The Foundations: Logic and Proofs
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Chapter 8 Logic DP Studies. Content A Propositions B Compound propositions C Truth tables and logical equivalence D Implication and equivalence E Converse,
Discrete Maths 2. Propositional Logic Objective
Discrete Mathematics and Its Applications
Lecture for Week Spring.   Introduction to Propositional Logic  Types of Proposition  Operator and Truth table Agenda.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
Chapter 1: The Foundations: Logic and Proofs
CS 103 Discrete Structures Lecture 02
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
CSci 2011 Textbook ^Discrete Mathematics and Its Applications,  Rosen  6th Edition  McGraw Hill  2006.
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 !
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Chapter 2: The Logic of Compound Statements 2.2 Conditional Statements
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
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.
MAIN TOPIC : Statement, Open Sentences, and Truth Values Negation Compound Statement Equivalency, Tautology, Contradiction, and Contingency Converse, Inverse,
How do I show that two compound propositions are logically equivalent?
Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Chapter 1: The Foundations: Logic and Proofs
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
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.
Chapter 7 Evaluating Deductive Arguments II: Truth Functional Logic Invitation to Critical Thinking First Canadian Edition.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
Invitation to Critical Thinking Chapter 7 Lecture Notes Chapter 7.
LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
CS104 The Foundations: Logic and Proof 1. 2 What is Discrete Structure?  Discrete Objects  Separated from each other (Opposite of continuous)  e.g.,
Propositional and predicate logic
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Chapter 1 Logic and proofs
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Logical functors and connectives. Negation: ¬ The function of the negation is to reverse the truth value of a given propositions (sentence). If A is true,
Chapter 1 Propositional Logic
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Information Technology Department
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics Lecture 2: Propositional Logic
MAT 3100 Introduction to Proof
Presentation transcript:

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 questions on-the-spot.  Always prepare 1/8 or ¼ size of paper.

LOGIC  LOGIC is commonly known as the science of reasoning. The emphasis here will be on logic as working tool.  We will develop some of the symbolic techniques required for computer logic. Some of the reasons to study logic are the following:  At the hardware level the design of ‘logic’ circuits implement instructions is greatly simplified by the use of symbolic logic.  At the software level a knowledge of symbolic logic is helpful in the design of programs.

RULES OF LOGIC  The rules of LOGIC specify the precise meaning of mathematical statements.  These rules are used to distinguish between valid and invalid mathematical arguments.  These rules are used in the design of computer circuits, the construction of computer programs, the verification of correctness of programs, and in many other ways.

PROPOSITIONS  The building blocks of logic.  A proposition is a statement that is either true or false, but not both.

Examples 1&2  Yaoundé is the capital of Cameroon  x + 2 = 2  English is the national language spoken in Cameroon  x + y = z  All the above examples are propositions?

 Letters are used to denote propositions, just as letters are used to denote variables.  The conventional letters used for this purpose are p,q,r,s…  The truth value of a proposition is true, denoted by T and denoted by F, if it is a false proposition.  Many mathematical statements are constructed by combining one or more propositions.  New propositions, called compound propositions are formed from existing propositions using logical operators.

NEGATION  Let p be a preposition.  The statement, “It is not the case that p” is another proposition, called the negation of p, and is denoted by  p read as not p.  Find the negation of the proposition “This month is September”  Solution: “It is not the case that this month is September”  The negation can be more simply expressed by “This month is not September”

 A truth table displays the relationships between the truth values of propositions.  The negation of a proposition can also be considered the result of the operation of the negation operator on a proposition.  These logical operators are also called connectives TABLE 1 The Truth Table for the Negation of a Proposition p pp TF FT

What is the negation of the following propositions? 1/8 1. Today is Thursday. 2. There is no pollution in Douala = Douala is the capital of Cameroon. 5. The summer in Yaoundé is hot and sunny.

CONJUNCTION  Let p and q be propositions.  The proposition “p and q”, denoted by p  q  is the proposition that is true when both p and q are TRUE and is FALSE otherwise. TABLE 2 The Truth Table for the Conjunction of Two Proposition pq p  q TTT TFF FTF FFF

Example  p is the proposition “Today is Friday”  q is the proposition “It is raining today”  Solution: the conjunction of these p  q, is the proposition “Today is Friday and it is raining today.”  The proposition is TRUE on rainy Fridays and is FALSE on any other days and not raining.

1. There is one red apple and a total of two apples. 2. The green apple is smaller than the red apple and the red apple has a leaf. 3. The red apple is taller and green apple is not having a stem. 4. Both apples have sprinkled water and none of them is sliced. 5. The green apple is labeled unripe and the red is labeled ripe.

DISJUNCTION  Let p and q be propositions.  The proposition “p and q”, denoted by p  q  is the proposition that is FALSE when both p and q are FALSE and is TRUE otherwise. TABLE 3 The Truth Table for the Disjunction of Two Proposition pq p  q TTT TFT FTT FFF

Example  The use of the connective OR in a disjunction corresponds to one of the two ways the word OR is used in English, namely an inclusive way.  Students who have taken calculus or computer science can take this class. (inclusive)  Students who have taken calculus or computer science, but not both, can take this class. (exclusive)

Activity 10 Pts.  Search the web or think of real world scenarios, create the disjunction table.  Cite an example for each p  q.

EXCLUSIVE OR  Let p and q be propositions.  The exclusive or of “p and q”, denoted by p  q  is the proposition that is TRUE when exactly one of p and q is TRUE and is FALSE otherwise. TABLE 4 The Truth Table for the Exclusive Or of Two Proposition pq p  q TTF TFT FTT FFF

Activity 10 Pts.  Search the web, and create the exclusive or table.  Cite a real world example for each p  q.

IMPLICATION/CONDITIONAL  Let p and q be propositions.  The implication of “p  q”, is the proposition that is FALSE when p is true and q is false, and TRUE otherwise.  In this implication p is called the hypothesis (or antecedent or premise)  and q is called the conclusion (or consequence) TABLE 4 The Truth Table for the Implication p  q pq p  q TTT TFF FTT FFT

COMMON WAYS OF EXPRESSING IMPLICATIONS:  If p then q  p implies q  If p,q  p only if q  p is sufficient for q  q if p  q wherever p  q is necessary for p  EXAMPLE statements:

ACTIVITY 10 Pts.  Search the web, and create the implications table.  Cite a real world example for each p  q

BICONDITIONAL  Let p and q be propositions.  The biconditional of “p  q”, is the proposition that is TRUE when p and q have the same truth values and is FALSE otherwise. TABLE 4 The Truth Table for the Implication p  q pq p  q TTT TFF FTF FFT

ACTIVITY 10 Pts.  Search the web, and create the biconditional table.  Cite a real world example for each p  q

Lecture 1 24 Logical Connectives OperatorSymbolUsageJava Negation  not ! Conjunction  and && Disjunction  or || Exclusive or  xor (p||q)&&(!p||!q) Conditional  if,then p?q:true Biconditional  iff (p&&q)||(!p&&!q)

NEXT TOPIC: - LOGIC AND BIT OPERATIONS - PROPOSITIONAL EQUIVALENCES - SETS - FUNCTIONS