SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics LectureGenie Rose Santos
 
Discrete Mathematics Lecture Notes
Discrete Mathematics Lecture NotesDiscrete Mathematics Lecture Notes
Discrete Mathematics Lecture NotesFellowBuddy.com
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiersblaircomp2003
 
Applications of Discrete Structures
Applications of Discrete StructuresApplications of Discrete Structures
Applications of Discrete Structuresaviban
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDr. Khaled Bakro
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inferenceraksharao
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AIIldar Nurgaliev
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical LogicJoey Valdriz
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logicJanet Stemwedel
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1taimoor iftikhar
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsJulie Iskander
 

Tendances (20)

Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics Lecture
 
Discrete Mathematics Lecture Notes
Discrete Mathematics Lecture NotesDiscrete Mathematics Lecture Notes
Discrete Mathematics Lecture Notes
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
Applications of Discrete Structures
Applications of Discrete StructuresApplications of Discrete Structures
Applications of Discrete Structures
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
 
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
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
 
Normal forms
Normal formsNormal forms
Normal forms
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inference
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AI
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Set in discrete mathematics
Set in discrete mathematicsSet in discrete mathematics
Set in discrete mathematics
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logic
 
Formal Logic - Lesson 2 - Logical Connectives
Formal Logic - Lesson 2 - Logical ConnectivesFormal Logic - Lesson 2 - Logical Connectives
Formal Logic - Lesson 2 - Logical Connectives
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Proposition (Logic)
Proposition (Logic)Proposition (Logic)
Proposition (Logic)
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 

Similaire à 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 ProofsWongyos Keardsri
 
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, negationZaidAly1
 
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.docxRaghavaReddy449756
 
Truth, deduction, computation; lecture 5
Truth, deduction, computation;  lecture 5Truth, deduction, computation;  lecture 5
Truth, deduction, computation; lecture 5Vlad Patryshev
 
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhChapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbeshahashenafe20
 
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhChapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
Chapter Five.ppthhjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhbeshahashenafe20
 
Geometry journal 2
Geometry journal 2Geometry journal 2
Geometry journal 2Katina1196
 
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.pptxAsst.prof M.Gokilavani
 

Similaire à Discrete Structures. Lecture 1 (14)

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

Plus de Ali Usman

Cisco Packet Tracer Overview
Cisco Packet Tracer OverviewCisco Packet Tracer Overview
Cisco Packet Tracer OverviewAli Usman
 
Islamic Arts and Architecture
Islamic Arts and  ArchitectureIslamic Arts and  Architecture
Islamic Arts and ArchitectureAli Usman
 
Database ,18 Current Issues
Database ,18 Current IssuesDatabase ,18 Current Issues
Database ,18 Current IssuesAli Usman
 
Database , 17 Web
Database , 17 WebDatabase , 17 Web
Database , 17 WebAli 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 DBMSAli Usman
 
Database ,14 Parallel DBMS
Database ,14 Parallel DBMSDatabase ,14 Parallel DBMS
Database ,14 Parallel DBMSAli Usman
 
Database , 13 Replication
Database , 13 ReplicationDatabase , 13 Replication
Database , 13 ReplicationAli Usman
 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 ReliabilityAli Usman
 
Database ,11 Concurrency Control
Database ,11 Concurrency ControlDatabase ,11 Concurrency Control
Database ,11 Concurrency ControlAli Usman
 
Database ,10 Transactions
Database ,10 TransactionsDatabase ,10 Transactions
Database ,10 TransactionsAli Usman
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query OptimizationAli Usman
 
Database ,7 query localization
Database ,7 query localizationDatabase ,7 query localization
Database ,7 query localizationAli 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 SemanticAli Usman
 
Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data IntegrationAli Usman
 
Database, 3 Distribution Design
Database, 3 Distribution DesignDatabase, 3 Distribution Design
Database, 3 Distribution DesignAli Usman
 
Database ,2 Background
 Database ,2 Background Database ,2 Background
Database ,2 BackgroundAli Usman
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 IntroductionAli Usman
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor SpecificationsAli Usman
 

Plus 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
 

Dernier

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Dernier (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

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