0% found this document useful (0 votes)
76 views

Learning Goals Lesson Plans and Logic: Rex Page

Uploaded by

ashalizajohn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views

Learning Goals Lesson Plans and Logic: Rex Page

Uploaded by

ashalizajohn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 11

Lecture 1

CS 1813 – Discrete Mathematics

Learning Goals
Lesson Plans
and
Logic

Rex Page
Professor of Computer Science
University of Oklahoma
EL 119 – [email protected]

CS 1813 Discrete Mathematics, Univ 1


Oklahoma
Copyright © 2000 by Rex Page
CS 1813 Discrete Mathematics
Learning Goals
 Apply mathematical logic to prove properties
of software
 Predicate calculus and natural deduction
 Boolean algebra and equational reasoning
 Mathematical induction
 Mathematical induction
 Mathematical induction
 Understand fundamental data structures
 Sets
 Trees
s g al o re !
 Functions and relations proof o re!
 Additional topics proofs gal !
e
 Graphs oofs galor
pr re!
proofs gaglo
alore!
 Counting proofs
proofs gal
ore!

 Algorithm Complexity
CS 1813 Discrete Mathematics, Univ 2
Oklahoma
Copyright © 2000 by Rex Page
Why Proofs?
100s > 2100s
of input output of
software
inputs signals signals possibilities

Key presses Images


Mouse gestures Sounds
computation Files
Files
Databases Databases
… …

Software translates input signals to output signals


A program is a constructive proof of a translation
But what translation?
Proofs can confirm that software works correctly
Testing cannot confirm software correctness
Practice with proofs improves software thinking
CS 1813 Discrete Mathematics, Univ 3
Oklahoma
Copyright © 2000 by Rex Page
CS 1813 Discrete Mathematics
Textbook and Tools
Discrete Mathematics Using a Computer
Cordelia Hall and John O’Donnell
Springer-Verlag, January 2000
 Tools provided with textbook
 Download from course website for CS 1813
 Hugs interpreter for Haskell
 Download from course website
 Haskell is a math notation (and a programming lang)
 Reading assignments begin with Chapter 2
 Read Chapter 1 (Haskell) as needed, for reference
 Haskell coverage JIT, like other math notations
CS 1813 Discrete Mathematics, Univ 4
Oklahoma
Copyright © 2000 by Rex Page
Formal Mathematical Notations
Notations introduced as needed (JIT)
 Logic ab, ab, ab, x.P(x), x.Q(x), 
 Sets A  B, A  B, {x | xS, P(x)}, 
 Sequences [x | x  s, P(x)]
[4, 7, 2] ++ [3, 7] == [4,7,2,3,7]
s(a: xs) = s[x | x  xs, x < a]
ll

++ [a] ++
ke
as

s[x | x  xs, x >= a]


H

Structures Theorem [P, Q] (And P Q)

CS 1813 Discrete Mathematics, Univ 5


Oklahoma
Copyright © 2000 by Rex Page
Coursework nd a nce
s A tte
Clas RED
UI
 Reading assignments R EQ
See syllabus on course website
Study prior to class

Contribution to grade
 Class Participation 10%
 Homework problem sets
Approximately weekly 10%
 Midterm Exam 1 20%
 Midterm Exam 2 20%
 Final Exam 40%
Q /A L ab
Q/A Lab – Thursdays 8:00pm, CEC 439 NOT
Att en d ance
CS 1813 Discrete Mathematics, Univ 6
Oklahoma
R E Q U IRED
Copyright © 2000 by Rex Page
Tiling with Dominos
a mathematical proof – just for practice
Dominos – size matches board

Adapted from Singh, Fermat’s Enigma, Walker & Co, 1997


Problem
 cover board with dominos
 no overlapping dominos
 no dominos outside board
How many squares on board?
So, how many dominos will it take?
checkerboard with One domino covers how many red squares?
two missing corners 31 dominos cover how many red squares?
How many red squares are there?
Yikes! What’s wrong here?
LT
TI
CS 1813 Discrete Mathematics, Univ 7
Oklahoma
Copyright © 2000 by Rex Page
How To Find a Million Dollars
using logic
Three Doors

Adapted from Smullyan, The Lady or the Tiger, Times Books, 1982
 Behind one is a million dollars Where’s the jackpot?
• Why not A?
 Behind another is a Palm Pilot
• Why not B?
 Behind the other is a melting Popsicle
• Must be C, eh?
A B C Bonus question:
Palm Popsicle Palm Where’s the Palm Pilot?
Here Behind C Behind A • Door C speaks the truth –
the Palm Pilot is behind A
so palm here if $$$ here … popsicle here
• Door B lies –
so C sign correct
LT it has a Popsicle, afterall
TI
Signs on Doors If it was so, it might be;
$$$ door: true statement and if it were so, it would be:
 Popsicle door: false statement but as it isn’t, it ain’t. That’s logic.
- Tweedledee
in Through the Looking Glass
CS 1813 Discrete Mathematics, Univ 8
Oklahoma
Copyright © 2000 by Rex Page
Tracing a Square and Its Diagonals

Problem
Start at any corner
Trace some line to another corner
Then trace from that corner to another
 Keep going until all six lines are traced
Square + Diagonals  Don’t trace any line more than once
(crossing OK, but not retracing)

Solution revealed in the next lecture

CS 1813 Discrete Mathematics, Univ 9


Oklahoma
Copyright © 2000 by Rex Page
Homework #1

Problem under “Assignments” tab in


course website
It’s a hard problem
You don’t have much mathematical
apparatus, yet, to attack it
Grade based more on thoughtfulness
and well-expressed ideas than on
solutions
CS 1813 Discrete Mathematics, Univ 10
Oklahoma
Copyright © 2000 by Rex Page
End of Lecture

CS 1813 Discrete Mathematics, Univ 11


Oklahoma
Copyright © 2000 by Rex Page

You might also like