37
1 The Role of Logic and Proof in Teaching Discrete Mathematics Summer Workshop on Discrete Mathematics Messiah College June 2006 Susanna S. Epp

The Role of Logic and Proof in Teaching Discrete Mathematics

  • Upload
    kiele

  • View
    55

  • Download
    0

Embed Size (px)

DESCRIPTION

The Role of Logic and Proof in Teaching Discrete Mathematics. Summer Workshop on Discrete Mathematics Messiah College June 2006 Susanna S. Epp. Why Discrete Math?. - PowerPoint PPT Presentation

Citation preview

Page 1: The Role of Logic and Proof in Teaching Discrete Mathematics

1

The Role of Logic and Proof in Teaching Discrete Mathematics

Summer Workshop on Discrete Mathematics Messiah CollegeJune 2006Susanna S. Epp

Page 2: The Role of Logic and Proof in Teaching Discrete Mathematics

2

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.

Page 3: The Role of Logic and Proof in Teaching Discrete Mathematics

3

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 objectsRespect for the meanings of words, careful use of languageHow to deal with multiple levels of abstraction, to move back and forth between the abstract and the particularThe necessity of being able to give a valid reason for the correctness of each statement in a chainHow to understand and build a logically connected chain of statements - think in a tightly disciplined way

Page 4: The Role of Logic and Proof in Teaching Discrete Mathematics

4

Quote

“[P]rogramming reliably - must be an activity of anundeniably 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 bea mathematical concern." In The Correctness Problem in Computer Science, Robert S. Boyer and J. Strother Moore, eds., Academic Press, 1981.

Page 5: The Role of Logic and Proof in Teaching Discrete Mathematics

5

Quote

The mathematics profession as a whole has seriously underestimated the difficulty of teaching mathematics.

Ramesh GangolliMER WorkshopMay 31, 1991

Page 6: The Role of Logic and Proof in Teaching Discrete Mathematics

6

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 WellsThe Handbook of Mathematical Discourse www.cwru.edu/artsci/math/wells/pub/abouthbk.html

Page 7: The Role of Logic and Proof in Teaching Discrete Mathematics

7

“…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 WellsThe Handbook of Mathematical Discourse www.cwru.edu/artsci/math/wells/pub/abouthbk.html

Page 8: The Role of Logic and Proof in Teaching Discrete Mathematics

8

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.

Page 9: The Role of Logic and Proof in Teaching Discrete Mathematics

9

Mathematical Meaning of If-then

“If p then q ” is not logically equivalent to

“If not p then not q ” or to “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.

Page 10: The Role of Logic and Proof in Teaching Discrete Mathematics

10

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.

Page 11: The Role of Logic and Proof in Teaching Discrete Mathematics

11

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!

Page 12: The Role of Logic and Proof in Teaching Discrete Mathematics

12

“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 PimmSpeaking Mathematically: Communication in the Mathematics Classroom Routledge, 1990 (paperback)

Page 13: The Role of Logic and Proof in Teaching Discrete Mathematics

13

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?

Page 14: The Role of Logic and Proof in Teaching Discrete Mathematics

14

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.

Page 15: The Role of Logic and Proof in Teaching Discrete Mathematics

15

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.

Page 16: The Role of Logic and Proof in Teaching Discrete Mathematics

16

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. 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

answer: 1 ≥ x ≥ 5 ouch!

Page 17: The Role of Logic and Proof in Teaching Discrete Mathematics

17

Universal Instantiation

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 (k2k+2 + 2) + (k + 2)2k+2

Etc. (several additional uses of the principle before one is finished)

= (k + (k + 2))2k+2 + 2

Well Duh!

Page 18: The Role of Logic and Proof in Teaching Discrete Mathematics

18

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)

Page 19: The Role of Logic and Proof in Teaching Discrete Mathematics

19

Example

Prove: The square of any odd integer is odd.

“Proof”:

(2k+1)2 = 4k 2 + 4k + 1 = 2(2k

2 + 2k) + 1

Page 20: The Role of Logic and Proof in Teaching Discrete Mathematics

20

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

n 2 = (2k+1)2 by

substitution= 4k

2 + 4k + 1= 2(2k

2 + 2k) + 1

But 2k 2

+ 2k is an integer. So by definition of odd, n

2 is odd [as was to be shown].

Note: Both the “if” and the “only if” aspects of the definition are used.

a sum of products of integers, an integer

Page 21: The Role of Logic and Proof in Teaching Discrete Mathematics

21

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!”

Page 22: The Role of Logic and Proof in Teaching Discrete Mathematics

22

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.

Page 23: The Role of Logic and Proof in Teaching Discrete Mathematics

23

Discrete Mathematics I: Syllabus

CONTENT HOURSLogic of Compound Statements 3Logic of Quantified Statements 3Elementary 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 3Definitions from set theory, functions, and relations 2Combinatorial Reasoning (counting and probability, possibility trees and the multiplication rule; combinations, the binomial theorem)

6

Review, Exams 5TOTAL HOURS 30

Page 24: The Role of Logic and Proof in Teaching Discrete Mathematics

24

Discrete Mathematics II: Syllabus

CONTENT HOURSSet Theory (basic definitions; computer science examples; set properties and their proofs)

4

Functions Defined on General Sets 1One-to-one and Onto Functions, Pigeonhole Principle, Composition

5

Recursively Defined Sequences and Applications 4 Real-valued Functions of a Real Variable and Their Graphs; 0-, -, and -Notations

2

Application: Efficiency of Algorithms 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

Page 25: The Role of Logic and Proof in Teaching Discrete Mathematics

25

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. Outcome

Frequency

Relative Frequency

100% correct 12 17%Small mistakes or linguistic infelicities

17 24%

Basic idea with moderate mistakes

7 10%

(2k+1) – 2k mistake 20 + 2 halves

29%

Got (2r+1) – 2s then stymied 8 11%Proof by example 2 + 2 halves 4%General confusion 4 6%

Page 26: The Role of Logic and Proof in Teaching Discrete Mathematics

26

Examples of Student Responses in aDiscrete 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.

Outcome 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.

1 5%

real numbers x, if x is negative then x is rational.

1 5%

real numbers x, if x is irrational then -x is irrational.

1 5%

real numbers x, if the negative of x is rational then x is rational.

1 5%

Page 27: The Role of Logic and Proof in Teaching Discrete Mathematics

27

Examples of Student Responses in aDiscrete 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.

BUT: Almost all students did very well on other, “harder” problems where greater emphasis was placed on providing models for correct solutions.

Outcome 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%

Page 28: The Role of Logic and Proof in Teaching Discrete Mathematics

28

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)

Page 29: The Role of Logic and Proof in Teaching Discrete Mathematics

29

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.

Page 30: The Role of Logic and Proof in Teaching Discrete Mathematics

30

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.

Page 31: The Role of Logic and Proof in Teaching Discrete Mathematics

31

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.

Page 32: The Role of Logic and Proof in Teaching Discrete Mathematics

32

Examples

3. Student says: “An integer is even if it equals 2k.”

My response: Is 1 an even number? Does 1 = 2k ? But So it’s pretty important for k to be an integer!

4. Ask student: Is 0 even? Is 0 positive? Is irrational?

In fact, what is a real number? an integer? a rational number?

12

1 2 ( )

10

Page 33: The Role of Logic and Proof in Teaching Discrete Mathematics

33

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!

Page 34: The Role of Logic and Proof in Teaching Discrete Mathematics

34

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

Page 35: The Role of Logic and Proof in Teaching Discrete Mathematics

35

OK - Really in a Nutshell

Interaction!

Interaction!

Interaction!

Page 36: The Role of Logic and Proof in Teaching Discrete Mathematics

36

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.

Page 37: The Role of Logic and Proof in Teaching Discrete Mathematics

37

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 --online exercises (e.g., tilominos, Ensley, Velleman)

For self-study/tutorial/course projects/extra credit--Logic Café, slogic

As basis for a laboratory--Chinese remainder theorem webpage--Doug Baldwin’s website