SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
Discrete Structures (CS 335)
Mohsin Raza
University Institute of Information
Technology PMAS Arid Agriculture University
Rawalpindi
Discrete vs Continuous
• Examples of discrete Data
– Number of boys in the class.
– Number of candies in a packet.
– Number of suitcases lost by an airline.
Discrete

Continuous

• Examples of continuous Data
– Height of a person.
– Time in a race.
– Distance traveled by a car.

10/7/2013

Discrete Structures(CS 335)

2
What is discrete Structures?
• Discrete mathematics is the part of mathematics
devoted to the study of discrete objects (Kenneth H.
Rosen, 6th edition).
• Discrete mathematics is the study of mathematical
structures that are fundamentally discrete rather
than continuous (wikipedia).

10/7/2013

Discrete Structures(CS 335)

3
Syllabus (Topics to be covered in this course)
•
•
•
•
•
•
•
•
•
•
10/7/2013

Logic
Elementary Number Theory and Methods of Proof
Set Theory
Relations
Sequences and Recursion
Mathematical Induction
Counting
Relations and Equivalence Relations
Graphs
Trees
Discrete Structures(CS 335)

4
Reference Books
• Discrete Mathematics and its Applications
(with Combinatorics and Graph Theory)
5th Edition, The McGraw-Hill Companies, 2007,

Kenneth H. Rosen.
• Discrete Mathematics with Applications
4th Edition, Thomson Learning, 1995,

Susanna S. Epp.
• Discrete Mathematics for Computer Scientists
2nd Edition, Addison-Wesley, 1999,

John

Truss.
10/7/2013

Discrete Structures(CS 335)

5
Logic
• Propositional Logic
• Logic of Compound Statements
• Propositional Equivalences

• Conditional Statements
• Logical Equivalences
• Valid and Invalid Arguments

• Applications: Digital Logic Circuits
• Predicates and Quantifiers
• Logic of Quantified Statements
10/7/2013

Discrete Structures(CS 335)

6
Propositional Logic
Proposition: A proposition (or Statement) is a declarative
sentence (that is, a sentence that declares a
fact) that is either true or false, but not both.
Examples
1. Is the following sentence a proposition? If it is a proposition,
determine whether it is true or false.
Islamabad is the capital of Pakistan.
This makes a declarative statement, and hence is a
proposition. The proposition is TRUE (T).

10/7/2013

Discrete Structures(CS 335)

7
Examples (Propositions Cont.)
2. Is the following sentence a proposition? If it is a

proposition, determine whether it is true or false.

Can Ali come with you?.
This is a question not the declarative sentence and hence
not a proposition.

10/7/2013

Discrete Structures(CS 335)

8
Examples (Propositions Cont.)
3. Is the following sentence a proposition? If it is a
proposition, determine whether it is true or false.

Take two aspirins.
This is an imperative sentence not the declarative
sentence and therefore not a proposition.

10/7/2013

Discrete Structures(CS 335)

9
Examples (Propositions Cont.)
4. Is the following sentence a proposition? If it is a

proposition, determine whether it is true or false.

x+ 4 > 9.
Because this is true for certain values of x (such as x =
6) and false for other values of x (such as x = 5), it is not
a proposition.

10/7/2013

Discrete Structures(CS 335)

10
Examples (Propositions Cont.)
5. Is the following sentence a proposition? If it is a
proposition, determine whether it is true or false.

He is a college student.
Because truth or falsity of this proposition depend
on the reference for the pronoun he. it is not a
proposition.

10/7/2013

Discrete Structures(CS 335)

11
Notations
• The small letters are commonly used to denote the
propositional variables, that is, variables that
represent propositions, such as, p, q, r, s, ….
• The truth value of a proposition is true, denoted by T
or 1, if it is a true proposition and false, denoted by F
or 0, if it is a false proposition.

10/7/2013

Discrete Structures(CS 335)

12
Compound Propositions
Producing new propositions from existing propositions.

Logical Operators or Connectives
1. Not



2. And

˄

3. Or

˅

4. Exclusive or



5. Implication



6. Biconditional



10/7/2013

Discrete Structures(CS 335)

13
Compound Propositions
Negation of a proposition
Let p be a proposition. The negation of p, denoted by
 p (also denoted by ~p), is the statement

“It is not the case that p”.
The proposition  p is read as “not p”. The truth
values of the negation of p,  p, is the opposite of the
truth value of p.

10/7/2013

Discrete Structures(CS 335)

14
Examples
1. Find the negation of the following proposition

p : Today is Friday.
The negation is
 p : It is not the case that today is Friday.

This negation can be more simply expressed by
 p : Today is not Friday.

10/7/2013

Discrete Structures(CS 335)

15
Examples
2. Write the negation of

“6 is negative”.
The negation is

“It is not the case that 6 is negative”.
or

10/7/2013

“6 is nonnegative”.

Discrete Structures(CS 335)

16
Truth Table (NOT)
• Unary Operator, Symbol: 
p
true

false

false

10/7/2013

p

true

Discrete Structures(CS 335)

17
Conjunction (AND)
Definition
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 p and q are
both true and is false otherwise.

10/7/2013

Discrete Structures(CS 335)

18
Examples
1. Find the conjunction of the propositions p and q, where

p : Today is Friday.
q : It is raining today.
The conjunction is

p˄q : Today is Friday and it is raining today.

10/7/2013

Discrete Structures(CS 335)

19
Truth Table (AND)
• Binary Operator, Symbol: 
p

pq

true

true

true

true

false

false

false

true

false

false
10/7/2013

q

false

false

Discrete Structures(CS 335)

20
Disjunction (OR)
Definition

Let p and q be propositions. The disjunction
of p and q, denoted by p˅q, is the proposition
“p or q”.
The disjunction p˅q is false when both p and
q are false and is true otherwise.

10/7/2013

Discrete Structures(CS 335)

21
Examples
1. Find the disjunction of the propositions p and q,
where

p : Today is Friday.
q : It is raining today.
The disjunction is

p˅q : Today is Friday or it is raining today.

10/7/2013

Discrete Structures(CS 335)

22
Truth Table (OR)

• Binary Operator, Symbol: 
p

pq

true

true

true

true

false

true

false

true

true

false
10/7/2013

q

false

false

Discrete Structures(CS 335)

23
Exclusive OR (XOR)
Definition

Let p and q be propositions. The exclusive or
of p and q, denoted by pq, is the proposition
“pq”.
The exclusive or, p  q, is true when exactly
one of p and q is true and is false otherwise.

10/7/2013

Discrete Structures(CS 335)

24
Examples
1. Find the exclusive or of the propositions p and q,
where

p : Atif will pass the course CSC102.
q : Atif will fail the course CSC102.
The exclusive or is

pq : Atif will pass or fail the course CSC102.

10/7/2013

Discrete Structures(CS 335)

25
Truth Table (XOR)

• Binary Operator, Symbol: 
p

pq

true

true

false

true

false

true

false

true

true

false
10/7/2013

q

false

false

Discrete Structures(CS 335)

26
Examples (OR vs XOR)
The following proposition uses the (English) connective
“or”. Determine from the context whether “or” is intended
to be used in the inclusive or exclusive sense.

1. “Nabeel has one or two brothers”.
A person cannot have both one and two brothers.
Therefore, “or” is used in the exclusive sense.

10/7/2013

Discrete Structures(CS 335)

27
Examples (OR vs XOR)
2. To register for BSC you must have passed
the qualifying exam or be listed as an Math
major.
Presumably, if you have passed the qualifying exam and
are also listed as an Math major, you can still register for
BCS. Therefore, “or” is inclusive.

10/7/2013

Discrete Structures(CS 335)

28
Composite Statements
Statements and operators can be combined in any
way to form new statements.

p

q

p

q

(p)(q)

true

true

false

false

false

true

false

false

true

true

false

true

true

false

true

false

false

true

true

true

10/7/2013

Discrete Structures(CS 335)

29
Lecture Summery
• Introduction to the Course
• Propositions
• Logical Connectives
• Truth Tables

• Compound propositions

10/7/2013

Discrete Structures(CS 335)

30

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lisp
 
Eucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomialsEucledian algorithm for gcd of integers and polynomials
Eucledian algorithm for gcd of integers and polynomials
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Ai lab manual
Ai lab manualAi lab manual
Ai lab manual
 
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and ProofsDiscrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inference
 
Rules for Variable Declaration
Rules for Variable DeclarationRules for Variable Declaration
Rules for Variable Declaration
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
 
Inference in First-Order Logic
Inference in First-Order Logic Inference in First-Order Logic
Inference in First-Order Logic
 
Logical equivalence, laws of logic
Logical equivalence, laws of logicLogical equivalence, laws of logic
Logical equivalence, laws of logic
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
Formal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical EquivalenceFormal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical Equivalence
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
 
Discrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of ProofDiscrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of Proof
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Proof by contradiction
Proof by contradictionProof by contradiction
Proof by contradiction
 
Introduction to prolog
Introduction to prologIntroduction to prolog
Introduction to prolog
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 

Destacado

Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics Lecture
Genie Rose Santos
 
PRINCIPLES OF MANAGEMENT lecture notes
PRINCIPLES OF MANAGEMENT lecture notesPRINCIPLES OF MANAGEMENT lecture notes
PRINCIPLES OF MANAGEMENT lecture notes
Bala Murugan
 

Destacado (8)

Applications of Discrete Structures
Applications of Discrete StructuresApplications of Discrete Structures
Applications of Discrete Structures
 
Discrete Mathematics Lecture Notes
Discrete Mathematics Lecture NotesDiscrete Mathematics Lecture Notes
Discrete Mathematics Lecture Notes
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics Lecture
 
Organization of the ibm personal computers
Organization of the ibm personal computersOrganization of the ibm personal computers
Organization of the ibm personal computers
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
 
Introduction and Applications of Discrete Mathematics
Introduction and Applications of Discrete MathematicsIntroduction and Applications of Discrete Mathematics
Introduction and Applications of Discrete Mathematics
 
Marketing Management Short Notes
Marketing Management Short NotesMarketing Management Short Notes
Marketing Management Short Notes
 
PRINCIPLES OF MANAGEMENT lecture notes
PRINCIPLES OF MANAGEMENT lecture notesPRINCIPLES OF MANAGEMENT lecture notes
PRINCIPLES OF MANAGEMENT lecture notes
 

Similar a Discrete Structures. Lecture 1

Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
Wongyos Keardsri
 
Lecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docxLecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docx
RaghavaReddy449756
 
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhChapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
beshahashenafe20
 
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhChapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
beshahashenafe20
 
Geometry journal 2
Geometry journal 2Geometry journal 2
Geometry journal 2
Katina1196
 

Similar a Discrete Structures. Lecture 1 (15)

Dscrete structure
Dscrete  structureDscrete  structure
Dscrete structure
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
AI_Session 20 Horn clause.pptx
AI_Session 20 Horn clause.pptxAI_Session 20 Horn clause.pptx
AI_Session 20 Horn clause.pptx
 
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negationLogic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
 
Lecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docxLecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docx
 
Truth, deduction, computation; lecture 5
Truth, deduction, computation;  lecture 5Truth, deduction, computation;  lecture 5
Truth, deduction, computation; lecture 5
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhChapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhChapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 
AI_Session 21 First order logic.pptx
AI_Session 21 First order logic.pptxAI_Session 21 First order logic.pptx
AI_Session 21 First order logic.pptx
 
Geometry journal 2
Geometry journal 2Geometry journal 2
Geometry journal 2
 
AI_session 22 inference and unification.pptx
AI_session 22 inference and unification.pptxAI_session 22 inference and unification.pptx
AI_session 22 inference and unification.pptx
 
Truth table
Truth tableTruth table
Truth table
 
DMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptxDMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptx
 
Course notes1
Course notes1Course notes1
Course notes1
 

Más de Ali Usman

Database ,18 Current Issues
Database ,18 Current IssuesDatabase ,18 Current Issues
Database ,18 Current Issues
Ali Usman
 
Database , 17 Web
Database , 17 WebDatabase , 17 Web
Database , 17 Web
Ali Usman
 
Database ,16 P2P
Database ,16 P2P Database ,16 P2P
Database ,16 P2P
Ali Usman
 
Database , 15 Object DBMS
Database , 15 Object DBMSDatabase , 15 Object DBMS
Database , 15 Object DBMS
Ali Usman
 
Database ,14 Parallel DBMS
Database ,14 Parallel DBMSDatabase ,14 Parallel DBMS
Database ,14 Parallel DBMS
Ali Usman
 
Database , 13 Replication
Database , 13 ReplicationDatabase , 13 Replication
Database , 13 Replication
Ali Usman
 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
Ali Usman
 
Database ,11 Concurrency Control
Database ,11 Concurrency ControlDatabase ,11 Concurrency Control
Database ,11 Concurrency Control
Ali Usman
 
Database ,10 Transactions
Database ,10 TransactionsDatabase ,10 Transactions
Database ,10 Transactions
Ali Usman
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query Optimization
Ali Usman
 
Database ,7 query localization
Database ,7 query localizationDatabase ,7 query localization
Database ,7 query localization
Ali Usman
 
Database , 6 Query Introduction
Database , 6 Query Introduction Database , 6 Query Introduction
Database , 6 Query Introduction
Ali Usman
 
Database , 5 Semantic
Database , 5 SemanticDatabase , 5 Semantic
Database , 5 Semantic
Ali Usman
 
Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data Integration
Ali Usman
 
Database, 3 Distribution Design
Database, 3 Distribution DesignDatabase, 3 Distribution Design
Database, 3 Distribution Design
Ali Usman
 
Database ,2 Background
 Database ,2 Background Database ,2 Background
Database ,2 Background
Ali Usman
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 Introduction
Ali Usman
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor Specifications
Ali Usman
 

Más de Ali Usman (20)

Cisco Packet Tracer Overview
Cisco Packet Tracer OverviewCisco Packet Tracer Overview
Cisco Packet Tracer Overview
 
Islamic Arts and Architecture
Islamic Arts and  ArchitectureIslamic Arts and  Architecture
Islamic Arts and Architecture
 
Database ,18 Current Issues
Database ,18 Current IssuesDatabase ,18 Current Issues
Database ,18 Current Issues
 
Database , 17 Web
Database , 17 WebDatabase , 17 Web
Database , 17 Web
 
Database ,16 P2P
Database ,16 P2P Database ,16 P2P
Database ,16 P2P
 
Database , 15 Object DBMS
Database , 15 Object DBMSDatabase , 15 Object DBMS
Database , 15 Object DBMS
 
Database ,14 Parallel DBMS
Database ,14 Parallel DBMSDatabase ,14 Parallel DBMS
Database ,14 Parallel DBMS
 
Database , 13 Replication
Database , 13 ReplicationDatabase , 13 Replication
Database , 13 Replication
 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
 
Database ,11 Concurrency Control
Database ,11 Concurrency ControlDatabase ,11 Concurrency Control
Database ,11 Concurrency Control
 
Database ,10 Transactions
Database ,10 TransactionsDatabase ,10 Transactions
Database ,10 Transactions
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query Optimization
 
Database ,7 query localization
Database ,7 query localizationDatabase ,7 query localization
Database ,7 query localization
 
Database , 6 Query Introduction
Database , 6 Query Introduction Database , 6 Query Introduction
Database , 6 Query Introduction
 
Database , 5 Semantic
Database , 5 SemanticDatabase , 5 Semantic
Database , 5 Semantic
 
Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data Integration
 
Database, 3 Distribution Design
Database, 3 Distribution DesignDatabase, 3 Distribution Design
Database, 3 Distribution Design
 
Database ,2 Background
 Database ,2 Background Database ,2 Background
Database ,2 Background
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 Introduction
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor Specifications
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Discrete Structures. Lecture 1

  • 1. Discrete Structures (CS 335) Mohsin Raza University Institute of Information Technology PMAS Arid Agriculture University Rawalpindi
  • 2. Discrete vs Continuous • Examples of discrete Data – Number of boys in the class. – Number of candies in a packet. – Number of suitcases lost by an airline. Discrete Continuous • Examples of continuous Data – Height of a person. – Time in a race. – Distance traveled by a car. 10/7/2013 Discrete Structures(CS 335) 2
  • 3. What is discrete Structures? • Discrete mathematics is the part of mathematics devoted to the study of discrete objects (Kenneth H. Rosen, 6th edition). • Discrete mathematics is the study of mathematical structures that are fundamentally discrete rather than continuous (wikipedia). 10/7/2013 Discrete Structures(CS 335) 3
  • 4. Syllabus (Topics to be covered in this course) • • • • • • • • • • 10/7/2013 Logic Elementary Number Theory and Methods of Proof Set Theory Relations Sequences and Recursion Mathematical Induction Counting Relations and Equivalence Relations Graphs Trees Discrete Structures(CS 335) 4
  • 5. Reference Books • Discrete Mathematics and its Applications (with Combinatorics and Graph Theory) 5th Edition, The McGraw-Hill Companies, 2007, Kenneth H. Rosen. • Discrete Mathematics with Applications 4th Edition, Thomson Learning, 1995, Susanna S. Epp. • Discrete Mathematics for Computer Scientists 2nd Edition, Addison-Wesley, 1999, John Truss. 10/7/2013 Discrete Structures(CS 335) 5
  • 6. Logic • Propositional Logic • Logic of Compound Statements • Propositional Equivalences • Conditional Statements • Logical Equivalences • Valid and Invalid Arguments • Applications: Digital Logic Circuits • Predicates and Quantifiers • Logic of Quantified Statements 10/7/2013 Discrete Structures(CS 335) 6
  • 7. Propositional Logic Proposition: A proposition (or Statement) is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both. Examples 1. Is the following sentence a proposition? If it is a proposition, determine whether it is true or false. Islamabad is the capital of Pakistan. This makes a declarative statement, and hence is a proposition. The proposition is TRUE (T). 10/7/2013 Discrete Structures(CS 335) 7
  • 8. Examples (Propositions Cont.) 2. Is the following sentence a proposition? If it is a proposition, determine whether it is true or false. Can Ali come with you?. This is a question not the declarative sentence and hence not a proposition. 10/7/2013 Discrete Structures(CS 335) 8
  • 9. Examples (Propositions Cont.) 3. Is the following sentence a proposition? If it is a proposition, determine whether it is true or false. Take two aspirins. This is an imperative sentence not the declarative sentence and therefore not a proposition. 10/7/2013 Discrete Structures(CS 335) 9
  • 10. Examples (Propositions Cont.) 4. Is the following sentence a proposition? If it is a proposition, determine whether it is true or false. x+ 4 > 9. Because this is true for certain values of x (such as x = 6) and false for other values of x (such as x = 5), it is not a proposition. 10/7/2013 Discrete Structures(CS 335) 10
  • 11. Examples (Propositions Cont.) 5. Is the following sentence a proposition? If it is a proposition, determine whether it is true or false. He is a college student. Because truth or falsity of this proposition depend on the reference for the pronoun he. it is not a proposition. 10/7/2013 Discrete Structures(CS 335) 11
  • 12. Notations • The small letters are commonly used to denote the propositional variables, that is, variables that represent propositions, such as, p, q, r, s, …. • The truth value of a proposition is true, denoted by T or 1, if it is a true proposition and false, denoted by F or 0, if it is a false proposition. 10/7/2013 Discrete Structures(CS 335) 12
  • 13. Compound Propositions Producing new propositions from existing propositions. Logical Operators or Connectives 1. Not  2. And ˄ 3. Or ˅ 4. Exclusive or  5. Implication  6. Biconditional  10/7/2013 Discrete Structures(CS 335) 13
  • 14. Compound Propositions Negation of a proposition Let p be a proposition. The negation of p, denoted by  p (also denoted by ~p), is the statement “It is not the case that p”. The proposition  p is read as “not p”. The truth values of the negation of p,  p, is the opposite of the truth value of p. 10/7/2013 Discrete Structures(CS 335) 14
  • 15. Examples 1. Find the negation of the following proposition p : Today is Friday. The negation is  p : It is not the case that today is Friday. This negation can be more simply expressed by  p : Today is not Friday. 10/7/2013 Discrete Structures(CS 335) 15
  • 16. Examples 2. Write the negation of “6 is negative”. The negation is “It is not the case that 6 is negative”. or 10/7/2013 “6 is nonnegative”. Discrete Structures(CS 335) 16
  • 17. Truth Table (NOT) • Unary Operator, Symbol:  p true false false 10/7/2013 p true Discrete Structures(CS 335) 17
  • 18. Conjunction (AND) Definition 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 p and q are both true and is false otherwise. 10/7/2013 Discrete Structures(CS 335) 18
  • 19. Examples 1. Find the conjunction of the propositions p and q, where p : Today is Friday. q : It is raining today. The conjunction is p˄q : Today is Friday and it is raining today. 10/7/2013 Discrete Structures(CS 335) 19
  • 20. Truth Table (AND) • Binary Operator, Symbol:  p pq true true true true false false false true false false 10/7/2013 q false false Discrete Structures(CS 335) 20
  • 21. Disjunction (OR) Definition Let p and q be propositions. The disjunction of p and q, denoted by p˅q, is the proposition “p or q”. The disjunction p˅q is false when both p and q are false and is true otherwise. 10/7/2013 Discrete Structures(CS 335) 21
  • 22. Examples 1. Find the disjunction of the propositions p and q, where p : Today is Friday. q : It is raining today. The disjunction is p˅q : Today is Friday or it is raining today. 10/7/2013 Discrete Structures(CS 335) 22
  • 23. Truth Table (OR) • Binary Operator, Symbol:  p pq true true true true false true false true true false 10/7/2013 q false false Discrete Structures(CS 335) 23
  • 24. Exclusive OR (XOR) Definition Let p and q be propositions. The exclusive or of p and q, denoted by pq, is the proposition “pq”. The exclusive or, p  q, is true when exactly one of p and q is true and is false otherwise. 10/7/2013 Discrete Structures(CS 335) 24
  • 25. Examples 1. Find the exclusive or of the propositions p and q, where p : Atif will pass the course CSC102. q : Atif will fail the course CSC102. The exclusive or is pq : Atif will pass or fail the course CSC102. 10/7/2013 Discrete Structures(CS 335) 25
  • 26. Truth Table (XOR) • Binary Operator, Symbol:  p pq true true false true false true false true true false 10/7/2013 q false false Discrete Structures(CS 335) 26
  • 27. Examples (OR vs XOR) The following proposition uses the (English) connective “or”. Determine from the context whether “or” is intended to be used in the inclusive or exclusive sense. 1. “Nabeel has one or two brothers”. A person cannot have both one and two brothers. Therefore, “or” is used in the exclusive sense. 10/7/2013 Discrete Structures(CS 335) 27
  • 28. Examples (OR vs XOR) 2. To register for BSC you must have passed the qualifying exam or be listed as an Math major. Presumably, if you have passed the qualifying exam and are also listed as an Math major, you can still register for BCS. Therefore, “or” is inclusive. 10/7/2013 Discrete Structures(CS 335) 28
  • 29. Composite Statements Statements and operators can be combined in any way to form new statements. p q p q (p)(q) true true false false false true false false true true false true true false true false false true true true 10/7/2013 Discrete Structures(CS 335) 29
  • 30. Lecture Summery • Introduction to the Course • Propositions • Logical Connectives • Truth Tables • Compound propositions 10/7/2013 Discrete Structures(CS 335) 30