0% found this document useful (0 votes)
22 views

Lecture 1

The document discusses the goals and topics of a discrete mathematics course including mathematical logic, set theory, graph theory, and algebraic structures. It also provides information about textbooks for the course and defines what discrete mathematics is as the study of discrete, mathematical objects and structures. The document explains why discrete math is important to study, especially for computer science, as it provides the basic language and concepts for the field.

Uploaded by

Arif Imran
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Lecture 1

The document discusses the goals and topics of a discrete mathematics course including mathematical logic, set theory, graph theory, and algebraic structures. It also provides information about textbooks for the course and defines what discrete mathematics is as the study of discrete, mathematical objects and structures. The document explains why discrete math is important to study, especially for computer science, as it provides the basic language and concepts for the field.

Uploaded by

Arif Imran
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Discrete Mathematics

Course goals
• Mathematical Logic
– Propositional calculus, Predicate calculus
• Set Section A
– Sets, Relations, Partial Ordered sets, Lattices, Functions

• Graph Theory
• Algebraic Structures
• Algorithms & Complexity
• Combinatories Section B
• Proof Methods
Textbook
• Discrete Mathematics and Its Applications
by Kenneth H. Rosen, 6th edition, McGraw Hill

• “Discrete Mathematics” by Seymour Lipscgutz


and Marc Lipson ( Schaum’s Series)
What is Mathematics?
• It’s not just about numbers!
• Mathematics is much more than that:
Mathematics is, most generally, the study of
absolutely certain truths about perfectly well-
defined concepts.
• But, these concepts can be about numbers,
symbols, objects, images, sounds, anything!
What are “Discrete Mathematics”?
• “Discrete” - Composed of distinct, separable
parts. (Opposite of continuous.)

• “Structures” - Objects built up from simpler


objects according to some definite pattern.

• “Discrete Mathematics” - The study of discrete,


mathematical objects and structures.
Why Study Discrete Math?

• It’s the basic language and conceptual foundation for


all of computer science.

• Discrete math concepts are also widely used


throughout math, science, engineering, economics,
biology, etc., …

• A generally useful tool for rational thought!


Uses for Discrete Math in Computer Science

• Advanced algorithms & • Database management


data structures systems
• Programming language • Cryptography
compilers & interpreters. • Error correction codes
• Computer networks • Graphics & animation
• Operating systems algorithms, game engines,
• Computer architecture etc.…
• I.e., the whole field!
Propositional logic
• Understand and construct correct mathematical
arguments
• Give precise meaning to mathematical statements
• Rules are used to distinguish between valid (true)
and invalid arguments
• Used in numerous applications: circuit design,
programs, verification of correctness of programs,
artificial intelligence, etc.
Proposition
• A declarative sentence that is either true or
false, but not both
– Washington, D.C., is the capital of USA
– California is adjacent to New York
– 1+1=2
– 2+2=5
– What time is it?
– Read this carefully
Logical operators
• Negation operator
• Conjunction (and, ^)
• Disjunction (or v )
• Conditional statement 
• Biconditional statement 
• Exclusive Or
Negation
Example
• “Today is Friday”
– It is not the case that today is Friday
– Today is not Friday
• At least 10 inches of rain fell today in Miami
– It is not the case that at least 10 inches of rain fell
today in Miami
– Less than 10 inches of rain fell today in Miami
Conjunction

Conjunction: p ^ q is true when both p and q are


true. False otherwise
Example
• p: “Today is Friday”, q: “It is raining today”
• p˄q “Today is Friday and it is raining today”
– true: on rainy Fridays
– false otherwise:
• Any day that is not a Friday
• Fridays when it does not rain
Disjunction

Disjunction: p v q is false when both p and q are


false. True otherwise
Example
• p ˅ q: “Today is Friday or it is raining today”
– True:
• Today is Friday
• It is raining today
• It is a rainy Friday
– False
• Today is not Friday and it does not rain
Exclusive or

Exclusive Or is true when exactly one


of p, q is true. False otherwise
Conditional statement

Conditional Statement: p q is false when p is


true and q is false. True otherwise
Conditional statement pQ
• Also called an implication

if p, then q p implies q
if p, q p only if q
p is sufficient for q a sufficient condition for q is p
q if p q whenever p
q when p q is necessary for p
a necessary condition for p is q q follows from p
q unless not p

Conditional Statement: pq is false when p is true and q is false. True


otherwise
Example
p: you go, q: I go. pq means “If you go, then I go”
“You go only if I go” (not the same as “If I go only if you go”)
Example
• If Maria learns discrete mathematics, then she
will find a good job
– Maria will find a good job when she learns
discrete mathematics (q when p)
– For Maria to get a good job, it is sufficient for her
to learn discrete mathematics (sufficient condition
for q is p)
– Maria will find a good job unless she does not
learn discrete mathematics (q unless not p)
Common mistake for pq
• Correct: p only if q
• Mistake to think “q only if p”
Example
• “If today is Friday, then 2+3=6”
– The statement is true every day except Friday even
though 2+3=6 is false
Converse, contrapositive and
inverse
• For p q
– Converse: q p
– Contrapositive: ┐q  ┐ p
– Inverse: ┐p  ┐ q
• Contrapositive and conditional statements are
equivalent
Biconditional statement

• Biconditional Statement: “p if and only if q”


• p  q is true when p, q have the same truth
value. False otherwise
• Also known as bi-implications
Example
• P: “you can take the flight”, q: “you buy a
ticket”
• P  q: “You can take the flight if and only if
you buy a ticket”
– This statement is true
• If you buy a ticket and take the flight
• If you do not buy a ticket and you cannot take the flight
Truth table of compound propositions
Precedence of logic operators
Bit operations
Translating English to logical
expressions
Why?
English is often ambiguous and translating
sentences into compound propositions
removes the ambiguity.
Using logical expressions, we can analyze them
and determine their truth values. And we can
use rules of inferences to reason about them
Example
“ You can access the internet from campus only
if you are a computer science major or you are
not a freshman.
p : “You can access the internet from campus”
q : “You are a computer science major”
r : “You are freshmen”
p  ( q v ~r )
System Specification
• Translating sentences in natural language into
logical expressions is an essential part of
specifying both hardware and software
systems.
• Consistency of system specification.
• Example: (on page 12) Express the specification
“The automated reply cannot be sent when
the file system is full”
Example
1. Let p denote “The automated reply can be
sent”
2. Let q denote “The file system is full”
The logical expression for the sentence “The
automated reply cannot be sent when the
file system is full” is
Example
Determine whether these system specifications
are consistent:
1. The diagnostic message is stored in the
buffer or it is retransmitted.
2. The diagnostic message is not stored in the
buffer.
3. If the diagnostic message is stored in the
buffer, then it is retransmitted.
Example
• Let p denote “The diagnostic message is
stored in the buffer”
• Let q denote “The diagnostic message is
retransmitted”

The three specifications are


Example
• If we add one more requirement “The
diagnostic message is not retransmitted”
The new specifications now are

This is inconsistent! No truth values of p and q will


make all the above statements true.

You might also like