Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22
Logic and Proof
Propositional logic 01
Tasmin Sanjida, Lecturer, UIU
Introduction
Welcome to DM !
Tasmin Sanjida, Lecturer, UIU
Before we start, 3 simple Rules 1. Pay attention and actually take notes, not pics. 2. Don’t talk during the lectures. 3. Be present in class. For absence due to valid reasons, send an email within the class day to [email protected] 4. Come within 5-10 mins within the class starting time. Tasmin Sanjida, Lecturer, UIU Now, on with the classes!
Tasmin Sanjida, Lecturer, UIU
What is Discrete Mathematics? Discrete mathematics is the study of mathematical structures that are countable or otherwise distinct and separable. It is a branch of mathematics dealing with objects that can consider only distinct, separated values. Example: The number of students, houses, Integer Numbers etc. Things we will learn in this course – • Logical statements • Sets and functions • Counting • Graphs and tree and many more... Tasmin Sanjida, Lecturer, UIU Why learn discrete mathematics in CSE? Computer is built on discrete structures!!! Foundation of logic building and problem solving Understanding algorithms, and their complexities Software Development
And many more...
Tasmin Sanjida, Lecturer, UIU
Propositional logic Logic and Proof
Tasmin Sanjida, Lecturer, UIU
Proposition A proposition is a statement that is either true or false, but not both. A proposition is a declarative sentence that has the following properties: • It can be either true or false • It cannot be neither • It cannot be both Example: a) The ball is round. This is a proposition because it can be clearly classified as true or false. b) 4 + 4 = 5. This is also a proposition because it can be identified as false. Tasmin Sanjida, Lecturer, UIU Proposition Let, be “Washington DC is the capital of USA”, and be “Toronto is the capital of Canada” • is a true proposition • is a false proposition
Let, = We live in Moon
= We live in Earth • is a false proposition • is a true proposition
Tasmin Sanjida, Lecturer, UIU
What is not a proposition? What is your name? • A question – hence not a declarative sentence Tell me your name. • An order – hence not a declarative sentence A+5=B • An equation with variable – hence neither true nor false ⭐⭐⭐Given that A=5 and B=6 An equation with values of each variable – a proposition If you fill up all the gaps of a predicate, you get a proposition
Tasmin Sanjida, Lecturer, UIU
What is not a proposition? I am lying. If this sentence is true, then since I am saying this, it must be false!!! • Both true and false, so not a proposition • We call such a sentence a paradox This statement is false • Both true and false, so not a proposition • We call such a sentence a paradox
Tasmin Sanjida, Lecturer, UIU
Proposition We can use variable or symbol to represent a proposition without writing the actual sentence. P = Earth is a Planet Here, P represents “Earth is a Planet” Q = Earth is a food Here, Q represents “Earth is a food”
Tasmin Sanjida, Lecturer, UIU
Compound proposition My name is Messi and I am a footballer. Two (or more) propositions combined or modified with logical connectives/linkers. Linkers are:- and, or, if, only if, if and only if • Negation / NOT (¬) • Conjunction / AND (∧) • Disjunction / OR (∨) • Conditional statement / Implication / if-then (→) • If and only if – Biconditional statement (⇔) Tasmin Sanjida, Lecturer, UIU Negation p=Sakib is a batsman. ¬p=Sakib is not a batsman. T F
Symbol : ¬p F T
True if the actual proposition is false.
Tasmin Sanjida, Lecturer, UIU
Conjunction Tamim Iqbal is a batsman, and Mustafizur Rahman is a bowler p=Tamim Iqbal is a batsman Truth table of q=Mustafizur Rahman is a bowler p∧q True if both propositions are true T T T T F F F T F F F F
Tasmin Sanjida, Lecturer, UIU
Disjunction Tamim Iqbal is a batsman or Mustafizur Rahman is a bowler p=Tamim Iqbal is a batsman Truth table of q=Mustafizur Rahman is a bowler p∨q True if any proposition is true T T T T F T F T T F F F
Tasmin Sanjida, Lecturer, UIU
A special type of disjunction – Exclusive-or 1. Quinton de Kock or Heinrich Klassen will play in today’s match. Both will not play together. p=Quinton de Kock will play in today’s match q=Heinrich Klassen will play in today’s match T T F p⊕q T F T True if exactly one proposition is true F T T 2. I will have rice or pulao. F F F Can’t have both together. R⊕P
Tasmin Sanjida, Lecturer, UIU
Truth tables of compound propositions A truth table is used to observe the behavior of a compound proposition at a glance The different possible truth values of the simple propositions are compiled in the table, and for each combination, the truth value of the compound one is found out
Tasmin Sanjida, Lecturer, UIU
Truth tables of compound propositions (p∨q)∧¬r T T T ? ∨= Disjunction (or) T T F ? ∧ = Conjunction (and) T F T ? ¬ = Negation (Not) T F F ? To solve this we have divide it into F T T ? small sections. F T F ? (p∨q) F F T ? ¬r F F F ? (p∨q)∧¬r Tasmin Sanjida, Lecturer, UIU Truth tables of compound propositions (p∨q) ¬r (p∨q)∧¬r (p∨q)∧¬r T T T T F ? ∨= Disjunction (or) T T F T T ? ∧ = Conjunction (and) T F T T F ? ¬ = Negation (Not) T F F T T ? To solve this we have divide F it into T T T F ? small sections. F T F T T ? (p∨q) F F T F F ? ¬r F F F F T ? (p∨q)∧¬r Tasmin Sanjida, Lecturer, UIU Truth tables of compound propositions (p∨q) ¬r (p∨q)∧¬r (p∨q)∧¬r T T T T F F ∨= Disjunction (or) T T F T T T ∧ = Conjunction (and) T F T T F F ¬ = Negation (Not) T F F T T T To solve this we have divide F it into T T T F F small sections. F T F T T T (p∨q) F F T F F F ¬r F F F F T F (p∨q)∧¬r Tasmin Sanjida, Lecturer, UIU Problem Construct the truth table of the proposition (p∨¬q)∧r
Instant ebooks textbook Security and Privacy Preserving for IoT and 5G Networks: Techniques, Challenges, and New Directions Ahmed A. Abd El-Latif download all chapters
Instant ebooks textbook Security and Privacy Preserving for IoT and 5G Networks: Techniques, Challenges, and New Directions Ahmed A. Abd El-Latif download all chapters