Docsity

Discrete structures Lecture 1 - Propositional Logic, Slides of Discrete Structures and Graph Theory

Toggle sidebar
bg1
CSD101 - Discrete Structures
(Discrete Mathematics)
Spring 2016
Lecture-1
Introduction
Propositional Logic
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download Discrete structures Lecture 1 - Propositional Logic and more Slides Discrete Structures and Graph Theory in PDF only on Docsity!

CSD101 - Discrete Structures

(Discrete Mathematics)

Spring 2016

Lecture- 1

Introduction

Propositional Logic

Instructor : Mr. Zuhair Qadir

Room : Mathematics Block – Cabin 4

Email : [email protected]

Text Books

  • Discrete Mathematics and its Applications 7th Ed. by Kenneth H. Rosen, McGraw Hill Publisher.
  • Discrete Mathematics with Applications 3rd Ed. by Susanna S., Thomson Learning, Inc.

Course Website

  • Visit the following link: https://sites.google.com/a/ciitlahore.edu.pk/dssp16/
  • Course Handbook
  • Deadlines & Important Information
  • Course Material
  • Assignments
  • Quiz Solutions

Reasons to Study Discrete Structures

  • Proof Ability to understand and create mathematical argument
  • Gateway to more advanced CS courses Data structures, algorithms, automata theory, formal languages, Database, networks, operating system, security etc.

Problems solved using Discrete Math's

  • How many secure passwords (using a specific number of characters or digits)?
  • Probability of winning a lottery?
  • How can I encrypt a message?
  • Shortest paths between two cities using public transportation?
  • How many steps required to sort 10,000 numbers? Is this algorithm correct?
  • How to design a circuit that multiply two integers?

Propositional Logic

  • Proposition
    • A proposition is a declarative statement that is either TRUE or FALSE, but not both.
  • Example 1
    • 2 + 2 = 4.
    • Lahore is the capital of Pakistan.
    • It is Sunday today.
    • Ali is student of this class.
  • Example 2
    • What time is it?
    • X + 1 = 2.
    • Close the door.
    • Read this carefully.

Propositional Logic

  • Letter are used to denote propositional variables, to symbolically represent propositions. - Letters used for this purpose are p, q, r, s,……… - A propositional can have one of two values: true (T) or false (F).
  • Example
    • p = “Islamabad is the capital of Pakistan”
    • q = “17 is divisible by 3”

Logical Operators (Logical connectives)

  • Negation
    • This just turns a false proposition to true and the opposite for a true proposition.
    • Symbol: ¬
    • Let p is a proposition. The statement “It is not the case that p.” is another proposition, called the negation of p.
    • The negation of p is written ¬ p and read as “not p”.

Logical Operator - Negation

  • Logical operators are defined by truth tables – tables which give the output of the operator in the right-most column.
  • Here is the truth table for negation:  P^ ¬ P p ¬ p T F F T

Logical Operator - Conjunction

  • Conjunction is a binary operator in that it operates on two propositions when creating compound proposition. On the other hand, negation is a unary operator.
  • Conjunction corresponds to English “and.”
  • Symbol: ∧
  • Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the proposition “p and q”. The conjunction p ∧ q is true when both p and q are true. If one of these is false, than the compound statement is false as well.

Logical Operator - Conjunction

  • Truth Table p q p ∧ q T T T T F F F T F F F F

Logical Operator - Disjunction

  • Disjunction is also a binary operator.
  • Disjunction corresponds to English “or.”
  • Symbol: ∨
  • Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition “p or q”. The conjunction p ∨ q is false when both p and q are false and is true otherwise.

Logical Operator - Disjunction

  • Truth Table p q p ∨ q T T T T F T F T T F F F