Discrete Mathematics: September 13, 2006
Discrete Mathematics: September 13, 2006
離散數學
Lecture 01
September 13, 2006
洪國寶
Outline
• Course information
• Overview of Discrete Mathematics
• Logic (chapter 1 (§1.1))
1.1)
2006/9/14 2
Course information (1/3)
• Textbook
Discrete Mathematics and its Applications,
5th Edition, Kenneth H. Rosen, McGraw-
Hill, Inc., New York, 2003
http://www.mhhe.com/math/advmath/rosen/r5/
歐亞書局
2006/9/14 3
Course information (2/3)
• Grading (Tentative)
Quizzes 30%
Midterm exam 30%
Final exam 30%
Class participation 10%
2006/9/14 4
Course information (3/3)
• The problems of the quizzes and exams are
all from examples and exercises of the
textbook.
2006/9/14 5
Outline
• Course information
• Overview of Discrete Mathematics
• Logic (chapter 1 (§1.1))
1.1)
2006/9/14 6
Overview of Discrete Mathematics
• Propositions • Proofs
• Predicates • Summations
• Sets • Permutations
• (Discrete) Functions • Combinations
• Orders of Growth • Relations
• Algorithms • Graphs
• Integers • Trees
Relationships Between Structures
- combinatorial analysis
the ability to count or enumerate objects
- discrete structures
to work with discrete structures, which are the abstract mathematical
structures used to represent discrete objects and relationships between these
objects
- algorithmic thinking
the specification of the algorithm, the verification that it works properly, and
the analysis of the computer memory and time required to perform it
2006/9/14 19
Course Outline (2/11)
• 2 The Fundamentals: Algorithms,
the Integers, and Matrices
– 2.1 Algorithms
– 2.2 The Growth of Functions
– 2.3 Complexity of Algorithms
– 2.4 The Integers and Division
– 2.5 Integers and Algorithms
– 2.6 Applications of Number Theory
– 2.7 Matrices
2006/9/14 20
Course Outline (3/11)
• 3 Mathematical Reasoning,
Induction, and Recursion
– 3.1 Art and Strategy of Proof
– 3.2 Sequences and Sums
– 3.3 Mathematical Induction
– 3.4 Recursive Definitions and
Structural Definition
– 3.5 Recursive Algorithms
– 3.6 Program Correctness
2006/9/14 21
Course Outline (4/11)
• 4 Counting
– 4.1 The Basics of Counting
– 4.2 The Pigeonhole Principle
– 4.3 Permutations and Combinations
– 4.4 Binomial Coefficients
– 4.5 Generalized Permutations and
Combinations
– 4.6 Generating Permutations and
Combinations
2006/9/14 22
Course Outline (5/11)
• 5 Discrete Probability
– 5.1 An Introduction to Discrete
Probability
– 5.2 Probability Theory
– 5.3 Expected Value and
Variance
2006/9/14 23
Course Outline (6/11)
• 6 Advanced Counting Techniques
– 6.1 Recurrence Relations
– 6.2 Solving Recurrence Relations
– 6.3 Divide-and-Conquer Relations
– 6.4 Generating Functions
– 6.5 Inclusion-Exclusion
– 6.6 Applications of Inclusion-Exclusion
2006/9/14 24
Course Outline (7/11)
• 7 Relations
– 7.1 Relations and Their Properties
– 7.2 n-ary Relations and Their
Applications
– 7.3 Representing Relations
– 7.4 Closures of Relations
– 7.5 Equivalence Relations
– 7.6 Partial Orderings
2006/9/14 25
Course Outline (8/11)
• 8 Graphs
– 8.1 Introduction to Graphs
– 8.2 Graph Terminology
– 8.3 Representing Graphs and Graph
Isomorphism
– 8.4 Connectivity
– 8.5 Euler and Hamilton Paths
– 8.6 Shortest Path Problems
– 8.7 Planar Graphs
– 8.8 Graph Coloring
2006/9/14 26
Course Outline (9/11)
• 9 Trees
– 9.1 Introduction to Trees
– 9.2 Applications of Trees
– 9.3 Tree Traversal
– 9.4 Spanning Trees
– 9.5 Minimum Spanning Trees
2006/9/14 27
Course Outline (10/11)
• 10 Boolean Algebra
– 10.1 Boolean Functions
– 10.2 Representing Boolean Functions
– 10.3 Logic Gates
– 10.4 Minimization of Circuits
2006/9/14 28
Course Outline (11/11)
• 11 Modeling Computation
– 11.1 Languages and Grammars
– 11.2 Finite-State Machines with Output
– 11.3 Finite-State Machines with No Output
– 11.4 Language Recognition
– 11.5 Turing Machines
2006/9/14 29
Some Advice
• Take note
• Read in advance
• Do exercises
• Take advantages of the web resources
– http://www.mhhe.com/math/advmath/rosen/r5/
– MIT 6.042 Mathematics for Computer Science
http://theory.lcs.mit.edu/classes/6.042/fall06/
2006/9/14 30
2006/9/14 31
Outline
• Course information
• Overview of Discrete Mathematics
• Logic (chapter 1 (§1.1))
1.1)
2006/9/14 32
Logic (1/2)
Mathematical Logic is a tool for working with
complicated compound statements. It includes:
• A language for expressing them.
• A concise notation for writing them.
• A methodology for reasoning about their truth or
falsity.
• It is the foundation for expressing formal proofs
in all branches of mathematics.
2006/9/14 33
Logic (2/2)
• Propositional logic (§1.1-1.2):
– Basic definitions. (§1.1)
– Equivalence rules & derivations. (§1.2)
• Predicate logic (§1.3-1.4)
– Predicates.
– Quantified predicate expressions.
– Equivalences & derivations.
2006/9/14 34
Topic #1 – Propositional Logic
2006/9/14 35
Topic #1 – Propositional Logic
Definition of a Proposition
A proposition (p, q, r, …) is simply a
statement (i.e., a declarative sentence) with
a definite meaning, having a truth value
that’s either true (T) or false (F), but not
both.
(However, you might not know the actual
truth value, and it might be situation-
dependent.)
2006/9/14 36
Topic #1 – Propositional Logic
Examples of Propositions
• “It is raining.” (In a given situation.)
• “Toronto is the capital of Canada.”
• “2 + 2 = 3”
But, the following are NOT propositions:
• “What time is it?” (interrogative, question)
• “La la la la la.” (meaningless interjection)
• “Just do it!” (imperative, command)
• “x+1=2” (neither true nor false)
• “1 + 2” (expression with a non-true/false value)
2006/9/14 37
Topic #1.0 – Propositional Logic: Operators
Operators / Connectives
An operator or connective combines one or
more operand expressions into a larger
expression. (E.g., “+” in numeric exprs.)
Unary operators take 1 operand (e.g., −3);
binary operators take 2 operands (eg 3 × 4).
Propositional or Boolean operators operate
on propositions or truth values instead of on
numbers.
2006/9/14 38
Some Popular Boolean Operators
2006/9/14 39
Topic #1.0 – Propositional Logic: Operators
2006/9/14 41
Topic #1.0 – Propositional Logic: Operators
2006/9/14 42
Topic #1.0 – Propositional Logic: Operators
2006/9/14 45
Topic #1.0 – Propositional Logic: Operators
2006/9/14 47
Topic #1.0 – Propositional Logic: Operators
2006/9/14 48
Topic #1.0 – Propositional Logic: Operators
2006/9/14 50
Topic #1.0 – Propositional Logic: Operators
2006/9/14 51
Topic #1.0 – Propositional Logic: Operators
2006/9/14 52
Topic #1.0 – Propositional Logic: Operators
2006/9/14 54
Topic #1.0 – Propositional Logic: Operators
2006/9/14 56
Translating English Sentences
• Example 9.
2006/9/14 57
System Specifications
• Propositional expressions are consistent if
there is an assignment of truth values to the
variables in the expressions that makes all
the expressions true.
• Example 12.
2006/9/14 58
Logic puzzles
• Puzzles that can be solved using logical
reasoning are known as logic puzzles.
• Example 15.
2006/9/14 59
Topic #2 – Bits
2006/9/14 60
Topic #2 – Bits
2006/9/14 61
Topic #2 – Bits
Bit Strings
• A Bit string is a sequence of zero or more bits.
The length of this string is the number of bits in
the string.
– More on sequences in §3.2.
• By convention, bit strings are written left to right:
e.g. the first bit of “1001101010” is 1.
• When a bit string represents a base-2 number, by
convention the first bit is the most significant bit.
Ex. 11012=8+4+1=13.
2006/9/14 62
Topic #2 – Bits
Bitwise Operations
• Boolean operations can be extended to
operate on bit strings as well as single bits.
• E.g.:
01 1011 0110
11 0001 1101
11 1011 1111 Bit-wise OR
01 0001 0100 Bit-wise AND
10 1010 1011 Bit-wise XOR
2006/9/14 63
End of §1.1
You have learned about: • Atomic vs. compound
• Propositions: What propositions.
they are. • Alternative notations.
• Propositional logic • Bits and bit-strings.
operators’ • Next section: §1.2
– Symbolic notations. – Propositional
– English equivalents. equivalences.
– Logical meaning. – How to prove them.
– Truth tables.
2006/9/14 64