2 - DePaul University

Download Report

Transcript 2 - DePaul University

The Role of Logic and Proof in
Teaching Discrete Mathematics
Summer Workshop on Discrete Mathematics
Messiah College
June 2006
Susanna S. Epp
1
Why Discrete Math?
The most important difference [between the demands of computer
science and those of traditional scientific or engineering
disciplines] on mathematics is that, to a much greater extent than
in other disciplines, abstraction is an essential tool of every
computer scientist, not just of the theoretician. The computer
scientist is not simply a user of mathematical results: he must use
his mathematical tools in much the same way as a mathematician
does. . . The most important contribution a mathematics
curriculum can make to computer science is the one least likely to
be encapsulated as an individual course: A deep appreciation of
the modes of thought that characterize mathematics.
W. Scherlis and M. Shaw, “Mathematics curriculum and the needs of
computer science,” in The Future of College Mathematics, A. Ralston and
G. Young, eds., Springer-Verlag, 1983.
2
The Role of Proof
What is learned when a person becomes able to understand and
develop basic mathematical proofs?
The power of certain abstract logical principles (e.g., modus
ponens, modus tollens, universal instantiatiation, generalizing from
the generic particular, …)

How to think with symbols rather than specific, concrete objects

Respect for the meanings of words, careful use of language
How to deal with multiple levels of abstraction, to move back and
forth between the abstract and the particular

The necessity of being able to give a valid reason for the
correctness of each statement in a chain

How to understand and build a logically connected chain of
statements - think in a tightly disciplined way

3
Quote
“[P]rogramming reliably - must be an activity of an
undeniably mathematical nature. . . You see, mathematics
is about thinking, and doing mathematics is always trying
to think as well as possible.”
Edsger W. Dijkstra (1981) "Why correctness must be
a mathematical concern." In The Correctness Problem
in Computer Science, Robert S. Boyer and J. Strother
Moore, eds., Academic Press, 1981.
4
Quote
The mathematics profession as a
whole has seriously underestimated
the difficulty of teaching mathematics.
Ramesh Gangolli
MER Workshop
May 31, 1991
5
The Mathematical Register
“Mathematicians speak and write in a special
‘register’ suited for communicating mathematical
arguments…[This] register uses special words as well
as ordinary words, phrases and grammatical
constructions with special meanings … .”
Charles Wells
The Handbook of Mathematical Discourse
www.cwru.edu/artsci/math/wells/pub/abouthbk.html
6
“…at least most of the time most mathematicians would
agree on the meaning of most statements made in the
[mathematical] register. Students have various other
interpretations of particular constructions used in the
mathematical register, and one of their (nearly always
unstated) tasks is to learn how to extract the standard
interpretation from what is said and written. One of the
tasks of instructors is to teach them how to do that.”
Charles Wells
The Handbook of Mathematical Discourse
www.cwru.edu/artsci/math/wells/pub/abouthbk.html
7
Relation between “Math Meaning”
and “Everyday Meaning”
Example:
Promise: If you eat your dinner, then you'll get
dessert.
Threat: If you don’t eat your dinner, then you won’t
get dessert.
Intended interpretation:
Same for both: You will get dessert if and only if you
eat your dinner.
8
Mathematical Meaning of If-then
“If p then q ” is not logically equivalent to
or to
“If not p then not q ”
“If q then p.”
Example:
Statement: If a geometric figure is a square then it has
four sides.
Converse: If a geometric figure has four sides then it is
a square.
Inverse: If a geometric figure is not a square then it
does not have four sides.
9
Relation between “Math Meaning”
and “Everyday Meaning”
 In formal mathematics the words and phrases “if-
then,” “and,” “or,” “not,” “only if,” “for all,” and “there
exists” always have only one meaning and there is
just one set of conventions for their usages.
 In everyday language, these words and phrases
sometimes have meanings and usages that are the
same as their mathematical meanings and usages;
other times they have different meanings and usages.
Example (same meaning): The Red Sox will win the
World Series only if they win the pennant.
10
Another example (same meaning): Jacob was
supposed to go with his father to get his hair cut.
Jacob: What will you give me if I get my hair cut?
Jacob’s mother: Jacob, if you get your hair cut, I’ll let
you live.
Jacob (wide-eyed): Does that mean that if I don’t
get my hair cut you won’t let me live?
Jacob’s mother: Of course not!
11
“Most mathematics classes are conducted in a mixture
of the registers of ordinary and mathematical English,
and failure to distinguish between these two can result
in incongruous errors and breakdowns in
communication.”
David Pimm
Speaking Mathematically: Communication in the
Mathematics Classroom
Routledge, 1990 (paperback)
12
More Examples: A Sample
 “All that glisters is not gold.”
 “There is a time for every purpose under heaven.”
 Actual occurrence: All the students left early.
True or false? Some students left early.
 Write down all string of three 0’s and 1’s in which
all the 0’s lie to the left of all the 1’s: Should I
include 000? 111?
 Someone says “All mathematicians wear glasses.”
What does it mean for this to be false?
13
Sometimes Things Get Tricky –
Even for Us
Example: “I’ll go unless it rains.” What does this
mean?
a) If it doesn’t rain, I’ll go.
b) If it rains, I won’t go.
c) I’ll go if, and only if, it doesn’t rain.
14
However – in general
The way logic and language are used in
the mathematical register is closely related
to the way they are used in high-level
work in general scientific and other
academic disciplines and in the law.
15
Some Specifics: Negations
To be able to reason with a (mathematical) statement, a
person needs to know what it means for the statement
to be true and what it means for it to be false.
Importance of being able to formulate negations.
Examples:
 Write a negation for 1 < x < 5. answer: 1 ≥ x ≥ 5 ouch!
 Proof by contradiction, Proof by contraposition
 Meaning of one-to-one and onto for functions
 Show that a general (universal) statement is false by
finding a counterexample
16
Universal Instantiation
Well Duh!
Logical Principle: If a property is true for all elements of a
set, then it is true for any particular element of the set.
But! We use this principle every time we apply a rule from
algebra.
Example (comes up in a standard induction problem):
Simplify
(k2k+2 + 2) + (k + 2)2k+2 = (k + (k + 2))2k+2 + 2
Etc. (several additional uses of the principle before one is
finished)
17
Generalizing from the Generic
Particular
“Mathematics, as a science, commenced when
first someone, probably a Greek, proved
propositions about ‘any’ things or about ‘some’
things without specification of definite particular
things.”
Alfred North Whitehead (1861-1947)
18
Example
Prove: The square of any odd integer is odd.
“Proof”:
(2k+1)2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1
19
What’s really going on?
Prove: The square of any odd integer is odd.
Proof:
Suppose n is any [particular but arbitrarily chosen]
odd integer. [Show that n 2 is odd.]
By definition of odd, n = 2k+1 for some integer k.
Then
Note: Both the
n 2 = (2k+1)2
by substitution
“if” and the
2 + 4k + 1
=
4
k
“only if” aspects
a sum of products of
2
of the definition
= 2(2k + 2k) + 1
integers,  an integer
are used.
But 2k 2 + 2k is an integer. So by definition of odd,
n 2 is odd [as was to be shown].
20
Goal of My Course
Provide foundation for math and cs courses
 Learn specific mathematical topics
 Learn how to support claims with effective
arguments – demonstrate things with
mathematical certainty
 Improve general reasoning skills –
“Don’t just code, sit there!”
21
Discrete Mathematics I & II:
DePaul Syllabi – Quarter Courses
These courses are intended to provide a solid
foundation for further study of mathematics,
programming languages, database theory, data
structures, and analysis of algorithms.
An aim of both courses is to develop facility with the
basic principles of logical reasoning and to learn how
to apply them to formulate and explore the truth and
falsity of a variety of statements in mathematics and
computer science. Proof, disproof, and conjecture all
figure prominently, and there is a continuing
emphasis on written and oral communication.
22
Discrete Mathematics I: Syllabus
CONTENT
HOURS
Logic of Compound Statements
3
Logic of Quantified Statements
3
Elementary Number Theory and Methods of Proof
(divisibility; division theorem; rational and irrational
numbers; floor and ceiling; mod and div; direct and
indirect proof; division into cases)
7
Applications: Algorithms
(division algorithm; Euclidean algorithm)
1
Sequences and Mathematical Induction
3
Definitions from set theory, functions, and relations
2
Combinatorial Reasoning
(counting and probability, possibility trees and the
multiplication rule; combinations, the binomial theorem)
6
Review, Exams
5
TOTAL HOURS
30
23
Discrete Mathematics II: Syllabus
CONTENT
Set Theory (basic definitions; computer science
examples; set properties and their proofs)
Functions Defined on General Sets
One-to-one and Onto Functions, Pigeonhole
Principle, Composition
Recursively Defined Sequences and Applications
Real-valued Functions of a Real Variable and Their
Graphs; 0-, -, and -Notations
Application: Efficiency of Algorithms
HOURS
4
1
5
4
2
1
Exponential and Logarithmic Orders
2
Relations on Sets; Equivalence Relations
4
Graphs and Trees and Their Applications
4
Review, Exams
3
TOTAL HOURS
30
24
Summary of Student Responses in
a Discrete Mathematics Course
Problem from first test (62 students): Prove that the
difference of any odd integer minus any even integer is odd.
100% correct
12
Relative
Frequency
17%
Small mistakes or linguistic infelicities
17
24%
Basic idea with moderate mistakes
7
10%
20 + 2 halves
29%
8
11%
Proof by example
2 + 2 halves
4%
General confusion
4
6%
Outcome
(2k+1) – 2k mistake
Got (2r+1) – 2s then stymied
Frequency
25
Examples of Student Responses in a
Discrete Mathematics Course
Problem from first test (19 students): Write the following
statement in the form “ __ x, if __ then __”:
The negative of any rational number is rational.
Frequency
Relative
Frequency
100% correct
8
42%
 rational #s x, if x is negative then x is rational.
7
37%
 numbers x, if x is a negative of a rational number
then x is rational.
 real numbers x, if x is negative then x is rational.
1
5%
1
5%
 real numbers x, if x is irrational then -x is
irrational.
 real numbers x, if the negative of x is rational
then x is rational.
1
5%
1
5%
Outcome
26
Examples of Student Responses in a
Discrete Mathematics Course for Teachers
“Give-away” problem from final exam (34 students): Write
the following statement in the form “ __ x, if __ then __”:
The negative of any rational number is rational.
Frequency
Relative
Frequency
100% correct
18
53%
 rational #s x, if x is negative then x is rational.
13
38%
 x  R, -x is rational.
1
3%
 rational numbers x, if (-1)x then x is rational.
1
3%
 x  X, if -x Q then x Q.
1
3%
Outcome
BUT: Almost all students did very well on other, “harder”
problems where greater emphasis was placed on providing
models for correct solutions.
27
Quote
For the human soul is hospitable, and will entertain
conflicting sentiments and contradictory opinions
with much impartiality.
George Eliot, Proem to Romola (1862-63)
28
Excerpt from Article
 Very few of my students had an intuitive feel for the
equivalence between a statement and its contrapositive
or realized that a statement can be true and its
converse false.
 Most students did not understand what it means for an
if-then statement to be false, and many also were
inconsistent about taking negations of “and” and “or”
statements.
 Large numbers used the words "neither-nor" incorrectly,
and hardly any interpreted the phrases "only if" or
"necessary" and "sufficient" according to their
definitions in logic.
29
Excerpt from Article
 All aspects of the use of quantifiers were poorly understood,
especially the negation of quantified statements and the
interpretation of multiply-quantified statements.
 Students neither were able to apply universal statements in abstract
settings to draw conclusions about particular elements nor did they
know what processes must be followed to establish the truth of
universally (or even existentially) quantified statements.
 Specifically, the technique of showing that something is true in
general by showing that it is true in a particular but arbitrarily
chosen instance did not come naturally to most of my students.
 Nor did many students understand that to show the existence of an
object with a certain property, one should try to find the object.
30
Examples
1. Knowing that
“If an integer n is not divisible by any prime number less
than or equal to the square root of n, then n is prime”
means the same as
“If an integer n is not prime, then n is divisible by some
prime number less than or equal to n.”
2. Knowing that
“The negative of any irrational number is irrational”
means the same as
“No matter what irrational number you pick, if you
multiply it by –1, the result will also be irrational.”
And understanding that
This is false if you can find an irrational number whose
negative is rational.
31
Examples
3. Student says: “An integer is even if it equals 2k.”
My response: Is 1 an even number?
Does 1 = 2k ?
1
But 1  2  ( 2 )
So it’s pretty important for k to be an integer!
4. Ask student: Is 0 even? Is 0 positive? Is
1
irrational?
0
In fact, what is a real number? an integer? a rational number?
32
Summary
Thesis: The primary value of a discrete math
course that is specifically addressed to freshman
and sophomore students is that it can be
structured so as to address students'
fundamental misconceptions and difficulties with
logical reasoning and improve their general
analytical abilities.
However: It is not easy to change students'
deeply embedded mental habits!
33
My Philosophy in a Nutshell
 Teach logical reasoning, not just logic as a subject
 Be conscious of the tension between covering
topics and developing students' understanding
 Don't rush to present topics from an advanced
perspective
 Be aware that most students today are not very
good at algebra
 In general: Much miscommunication occurs
because of unjustified assumptions
34
OK - Really in a Nutshell
Interaction!
Interaction!
Interaction!
35
Why Discrete Math?
The most important difference [between the demands of computer
science and those of traditional scientific or engineering
disciplines] on mathematics is that, to a much greater extent than
in other disciplines, abstraction is an essential tool of every
computer scientist, not just of the theoretician. The computer
scientist is not simply a user of mathematical results: he must use
his mathematical tools in much the same way as a mathematician
does. . . The most important contribution a mathematics
curriculum can make to computer science is the one least likely to
be encapsulated as an individual course: A deep appreciation of
the modes of thought that characterize mathematics.
W. Scherlis and M. Shaw, “Mathematics curriculum and the needs of
computer science,” in The Future of College Mathematics, A. Ralston and
G. Young, eds., Springer-Verlag, 1983.
36
Uses of Web Resources
& a Few Examples

As demonstrations/motivation/efficient way to bring
certain concepts and/or situations to life
--Tower of Hanoi
--sieve of Eratosthenes
--vegetarians and cannibals, wolf-goat-cabbage
--comparison of sorting algorithms
--Euclidean algorithm
--RSA cryptography

For extra practice

For self-study/tutorial/course projects/extra credit

As basis for a laboratory
--online exercises (e.g., tilominos, Ensley, Velleman)
--Logic Café, slogic
--Chinese remainder theorem webpage
--Doug Baldwin’s website
37