Welcome to CMSC 250
Discrete Structures
Please put laptops away
Lecture Slide Disclaimer
This is the only slide you are likely to find during this
course that contains verbose paragraphs. These
lecture slides are not intended as a tutorial. The
role of the slides in this course will be:
1. To provide an outline of topics we are covering
2. To allow quick visuals for things that are hard for the
instructor to write out by hand
To succeed in this course, you will need to attend
every class session and to take notes!
2
What are Discrete Structures?
A discrete structure is a collection of objects
that are separated from one another
In contrast: The real numbers are continuous
Examples of discrete structures
Examples of continuous structures
Examples of structures that are neither
discrete nor continuous
3
What Can You Expect in CMSC250?
Goals
1. Learn math topics essential for studying C.S.
2. Learn to understand and write proofs
Significant work load
Mathematical rigor
Challenging homeworks
Analytical thinking required
You may surprise yourself
4
Course Logistics
Lecture Tu/Th with me
Lab M/W with T.A.
Class webpage (including syllabus)
Unit 1
Propositional Logic
Logic
What is logic?
There zillions of different definitions out there. I like this one:
Logic is the study of two things:
1. The principles of reasoning, focusing on the structure
of propositions (not their meaning)
2. Methods and validity of deduction
Why should a Computer Scientist study this?
Statements (or Propositions)
A statement (or proposition) is a sentence that is
either true or false.
We use variables like p or q for statements
Examples (and counterexamples)
Logical Connectives
Conjunction (and)
Disjunction (or)
Negation (not)
~ (or sometimes )
Used to join statements together
Examples
Rules of Precedence
9
Truth Tables
What is an interpretation?
How many interpretations are possible for a
statement with n unique variables?
What is a truth table?
Truth tables for logical connectives
10
Practice Translating
1.
2.
3.
4.
5.
I am hungry or I am tired
Bob was tall and thin
Apples are healthy but fast food is not
Neither Jim nor Toby is on fire
Either Im hilarious or you have no sense of humor
11
Practice Truth Tables
p ^ ~q
(p ^ ~r) (p ^ r)
(p ^ q) (~q ~p)
(p ^ ~r) (q ~r)
12
Logical Equivalence
Two statements are logically equivalent if they have
identical truth values for every possible
interpretation.
Notation:
p q
Can we check if two statements are logically
equivalent?
13