SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Proposition (Logic)
Proposition (Logic)Proposition (Logic)
Proposition (Logic)
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory
 
Application of discrete math in real life
Application of discrete math in real lifeApplication of discrete math in real life
Application of discrete math in real life
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Applications of Discrete Structures
Applications of Discrete StructuresApplications of Discrete Structures
Applications of Discrete Structures
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Lecture-1: Introduction to system integration and architecture - course overv...
Lecture-1: Introduction to system integration and architecture - course overv...Lecture-1: Introduction to system integration and architecture - course overv...
Lecture-1: Introduction to system integration and architecture - course overv...
 
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
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logic
 
Introduction to theory of computation
Introduction to theory of computationIntroduction to theory of computation
Introduction to theory of computation
 
Truth table
Truth tableTruth table
Truth table
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
Propositional Logic and Pridicate logic
Propositional Logic and Pridicate logicPropositional Logic and Pridicate logic
Propositional Logic and Pridicate logic
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
Conditional statements
Conditional statementsConditional statements
Conditional statements
 
First order logic
First order logicFirst order logic
First order logic
 
Application of Discrete Mathematics in CSE
Application of Discrete Mathematics in CSE Application of Discrete Mathematics in CSE
Application of Discrete Mathematics in CSE
 

Andere mochten auch

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
 

Andere mochten auch (7)

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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

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