EECS 203-1: Discrete Mathematics Winter 2005 Introductory ...
EECS 203-1: Discrete Mathematics Winter 2005 Introductory ...
EECS 203-1: Discrete Mathematics Winter 2005 Introductory ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>EECS</strong> <strong>203</strong>-1: <strong>Discrete</strong> <strong>Mathematics</strong><br />
<strong>Winter</strong> <strong>2005</strong><br />
<strong>Introductory</strong> Material<br />
• Instructor: Prof. Bill Rounds<br />
• Office hours: Tuesday 1:00-2:30 in 132 ATL<br />
• GSI: Susana Early<br />
• Office Hours: MON 5:30-7:30, FRI 2:30-3:30, 2420 <strong>EECS</strong><br />
• Website: UM Coursetools. The URL is<br />
https://coursetools.ummu.umich.edu/<strong>2005</strong>/winter/eecs/<strong>203</strong>/002.nsf<br />
• Exams: 2 midterms, outside class, Feb. 16, and Mar. 28, from 7-8:30pm,<br />
and final exam April 21 7 – 9 PM.<br />
• Grade distribution: HW 15%, each midterm 25%, final 35%.<br />
• See website for other course policy.<br />
• Another website: wwwmmhhe.com/rosen; lots of extra helpful material<br />
on the text.<br />
1
General topics outline<br />
• Logic and basic set theory<br />
• Elementary methods of proof<br />
• Induction<br />
• MT 1<br />
• Counting<br />
• Relations<br />
• MT 2<br />
• Graphs, algorithms, and complexity<br />
• See website for specific syllabus.<br />
2
Part I: Logic<br />
(Text section 1.1)<br />
• We’ll begin by studying propositional logic.<br />
• This is a simple system useful in translating informal statements into precise<br />
mathematical form.<br />
• In a slightly different notation, propositional logic is used to design logic<br />
circuits, also called Boolean circuits.<br />
• George Boole (1815-1864) is sometimes called the father of modern logic.<br />
3
Propositions<br />
• A proposition is a declarative statement that has a definite truth content:<br />
either true or false.<br />
• Examples: (i) Toronto is the capital of Canada. (ii) 2 + 2 = 3. (iii) Kevin<br />
Bacon is the Pope. (iv) Saddam is the new U of M assistant defensive<br />
coordinator.<br />
• Non- propositions: (i) What time is it (ii) x + 1 = 4. (iii) He is the Pope.<br />
• Sometimes you have contextual information that tells you what x’s value<br />
is, or who ”he” is. Then statements like (ii) and (iii) are propositions, but<br />
only relative to a context or situation.<br />
• A statement like x + x = 2x is technically not a proposition, even though<br />
it’s true for all numbers x.<br />
4
Compound propositions<br />
• These are propositions that are built out of other ones, starting with basic<br />
ones, using logical operators, also called propositional connectives or<br />
Boolean connectives.<br />
• We start with a simple operator called negation.<br />
Definition Let p be a proposition. The statement<br />
“It is not the case that p”<br />
is called the negation of p, and is denoted by ¬p, and read “not p”.<br />
Example (i) (Relative to Jan. 7, <strong>2005</strong>) Let p be “Today is Tuesday”. Then<br />
¬p is “It is not the case that today is Tuesday”, or “today is not Tuesday”, or<br />
“it is not Tuesday today”, (ii) Let p be “1 + 1 = 2” Then ¬p is “1 + 1 ≠ 2”.<br />
5
Other logical operators and truth tables<br />
• You can take the negation of any proposition, whether or not it is true or<br />
false. The result will be a new proposition with the opposite truth value.<br />
• We express this using a simple display called a truth table.<br />
• The truth table for negation is<br />
p ¬p<br />
T F<br />
F T<br />
• We now introduce two new operators called conjunction and disjunction.<br />
(These are also called “and” and “or”.)<br />
• Examples (relative to today) p is “it is raining today” and q is “today is<br />
Friday”. The proposition “p and q”, notated p ∧ q, is “it is raining today<br />
and today is Friday”. The proposition “p or q, notated p∨q, is “it is raining<br />
today or today is Friday.”<br />
• The truth tables for conjunction and disjunction:<br />
p q p ∧ q<br />
T T T<br />
T F F<br />
F T F<br />
F F F<br />
p q p ∨ q<br />
T T T<br />
T F T<br />
F T T<br />
F F F<br />
6
Still more operators<br />
• The exclusive or (⊕) operator has the following truth table:<br />
p q p ⊕ q<br />
T T F<br />
T F T<br />
F T T<br />
F F F<br />
You can see from that p and q have to have differing truth values in order<br />
for p ⊕ q to be true.<br />
• There is also an operator requiring p and q to have the same truth value.<br />
This is the biconditional operator p ↔ q:<br />
p q p ↔ q<br />
T T T<br />
T F F<br />
F T F<br />
F F T<br />
• p ↔ q is read “p if and only if q”. It’s also read as ”p is necessary and<br />
sufficient for q” and sometimes as ”p iff q” (note the two f’s).<br />
7
The conditional connective<br />
• One connective that gets a big workout in logic is the conditional p → q.<br />
It is read “if p then q”, ”p is sufficient for q, ”a necessary condition for p is<br />
q”, “p only if q”, and ”q whenever p”.<br />
• You can think of this as a “one-way biconditional”. The truth table is<br />
p q p → q<br />
T T T<br />
T F F<br />
F T T<br />
F F T<br />
• One way to read this table is that ”q is at least as true as p is, and maybe<br />
more,” as in the third line. Another way to read it is ”p can’t be true and q<br />
false.” This has some strange repercussions. For example,<br />
is true (by line 4). Equally,<br />
is true.<br />
if 2 + 2 = 5, then Kevin Bacon is the Pope<br />
if 2 + 2 = 5, then Kevin Bacon is not the Pope<br />
8
Complex expressions in propositional logic<br />
• You can form “algebraic” expressions using these connectives. For example,<br />
(¬p ↔ ¬q) ↔ (¬p → (p ∨ q))<br />
• There is a precedence scheme here, like the precedence scheme for addition,<br />
multiplication, and negation in algebraic expressions.<br />
• You can build truth tables for complex expressions. For example, consider<br />
We build the table this way:<br />
p → (¬q ∨ r).<br />
p q r ¬q (¬q ∨ r) p → (¬q ∨ r)<br />
T T T F T T<br />
T T F F F F<br />
T F T T T T<br />
T F F T T T<br />
F T T F T T<br />
F T F F F T<br />
F F T T T T<br />
F F F T T T<br />
9
Translating English to propositional logic<br />
• Because English has compound propositions, it’s sometimes possible to<br />
phrase these propositions as formal propositional expressions and to build<br />
truth tables therefrom. This is a bit inexact, and there is very often more<br />
than one way to do it. There’s a way to test whether two translations are<br />
equivalent, though.<br />
• Example from text: “You cannot ride the roller coaster if you are under 4<br />
feet tall unless you are older than 16.”<br />
• We find the basic propositions in this informal expression and assign them<br />
propositional variables: “you can ride the roller coaster” is assigned r,<br />
”you are under 4 feet tall” is assigned u, and ”you are over 16” is assigned<br />
o. Then the English sentence before ”unless” would translate as ”u → ¬r”.<br />
• But what about the “unless” part Here o qualifies u in the sense that if<br />
somebody is under 6 feet, and not over 16, then they cannot ride. So a<br />
correct translation is<br />
(u ∧ ¬o) → ¬r.<br />
• How about (u → ¬r) ∧ (o → r) Is this the same What does “same”<br />
mean To be continued in the next lecture.<br />
10