cse 2500 introduction to discrete systems
DESCRIPTION
CSE 2500 Introduction to Discrete Systems. Jinbo Bi Department of Computer Science & Engineering http://www.engr.uconn.edu/~jinbo. The Instructor. Ph.D. in Mathematics Working experience Siemens Medical Solutions Department of Defense, Bioinformatics UConn, CSE - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/1.jpg)
1
CSE 2500Introduction to Discrete
Systems
CSE 2500Introduction to Discrete
Systems
Jinbo BiDepartment of Computer Science &
Engineeringhttp://www.engr.uconn.edu/~jinbo
![Page 2: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/2.jpg)
The InstructorThe Instructor• Ph.D. in Mathematics• Working experience
• Siemens Medical Solutions• Department of Defense, Bioinformatics• UConn, CSE
• Contact: jinbo@ engr.uconn.edu, 486-1458 (office)• Research Interests:
• Machine learning• Apply machine learning techniques in bio medical informatics• Help doctors to find better therapy to cure disease
subtyping GWAS
Color of flowers
Cancer, Psychiatric
disorders, …
http://labhealthinfo.uconn.edu/EasyBreathing
![Page 3: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/3.jpg)
3
TodayToday
Organizational details
Purpose of the course
Material coverage
Chapter 1 of the text
![Page 4: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/4.jpg)
4
Course SyllabusCourse Syllabus
Go over syllabus carefully, and keep a copy of it
Course website http://www.engr.uconn.edu/~jinbo/
Fall2014_discrete_math.htm
![Page 5: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/5.jpg)
5
TextbookTextbook
Attending the lectures is not a substitute for reading the text
Lectures merely highlight some examples
Read the text and do as many exercises as humanly possible
![Page 6: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/6.jpg)
6
SlidesSlides
We do not have slides for later lecture (only the first lecture has a full set of slides)
If a lecture uses slides, they will be available right after lecture at HuskyCT
![Page 7: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/7.jpg)
7
Marking SchemeMarking Scheme
6 - 9 assignments30%
(the lowest mark assignment will be dropped)
2 Midterm:40%1 Final Exam: 30%
CurvedCurve is tuned to the final overall distributionNo pre-set passing percentage
![Page 8: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/8.jpg)
8
In-Class ParticipationIn-Class Participation
Finding errors in my lecture notes
Answering my questions
Asking questions on the material
![Page 9: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/9.jpg)
9
AssignmentsAssignments
All HWs except one will count
Each will have 4-10 problems from the textbook
Solutions will be published at HuskCT one day after due day
Each assignment will be given 1 week, but some may be 2-weeks
![Page 10: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/10.jpg)
10
Questions?Questions?
![Page 11: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/11.jpg)
11
Why This Course?Why This Course?
Relation to real life:
Algorithm correctness ~ programming, reverse-
engineering, debugging
Propositional logic ~ hardware (including VLSI)
design
Sets/relations ~ databases (Oracle, MS Access, etc.)
Predicate logic ~ Artificial Intelligence, compilers
Proofs ~ Artificial Intelligence, VLSI, compilers,
theoretical physics/chemistry
![Page 12: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/12.jpg)
12
Code CorrectnessCode Correctness
Millions of programmers code away daily…How do we know if their code works?How can we find the bug if it does not work
![Page 13: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/13.jpg)
13
Argument #1Argument #1
All men are mortalSocrates is a man
Therefore, Socrates is mortal
![Page 14: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/14.jpg)
14
Argument #2Argument #2
Nothing is better than GodA sandwich is better than nothing
Therefore, a sandwich is better than God
![Page 15: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/15.jpg)
15
ValidityValidity
An argument is valid if and only if given that its premises hold its conclusion also holds
So…Socrates argument: Valid or Invalid?Sandwich argument: Valid or Invalid?
![Page 16: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/16.jpg)
16
How can we tell ?How can we tell ?
Common sense?Voting?Authority?What is valid argument anyway?Who cares?
???
![Page 17: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/17.jpg)
17
CSE 2500CSE 2500
Logic : a formal way to assess a validity of an argument
Can verify given proofs that an argument is valid
Can prove theorems in a semi-automatic fashion
![Page 18: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/18.jpg)
18
Material CoverageMaterial CoverageChapter 1: Speaking mathematicallyChapter 2: The logic of compound statements
Chapter 3: The logic of quantified statements
Chapter 4: Elementary number theory Chapter 5: Mathematical induction, Recursion
Chapter 6: Set theoryChapter 7: FunctionsChapter 8: Relation
![Page 19: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/19.jpg)
19
Questions?Questions?
![Page 20: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/20.jpg)
20
Arguments in PuzzlesArguments in Puzzles
The Island of Knights and Knaves
Never lie
Always lie
![Page 21: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/21.jpg)
21
Example #1Example #1
You meet two people: A, BA says:
I am a Knave orB is a Knight.
Who is A?
Who is B?
![Page 22: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/22.jpg)
22
SolutionSolutionThe original statement can be written as:S = X or YX = “A is a Knave”Y = “B is a Knight”Suppose A is a KnaveThen S must be false since A said itThen both X and Y are falseIf X is false then A is not a KnaveContradiction : A cannot be a Knave and not a Knave !So A must be a KnightSo S is true and X is not trueThus, to keep S true Y must be trueSo B is a Knight too
![Page 23: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/23.jpg)
23
How about…How about…
You meet just one guy : A
A says:“I’m a Knave!”
Who is A?
![Page 24: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/24.jpg)
24
Features Of An Argument
Features Of An Argument
arguments involve things or objectsthings have propertiesarguments consist of statementsstatements may be composedan argument starts with assumptions which create a context.each step yields another statement which is true, within its context.arguments may contain sub-argumentsit is absurd for a statement to be both true and false
![Page 25: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/25.jpg)
25
FormalizationFormalization
Why formalize?
to remove ambiguity
to represent facts on a computer and use it for proving, proof-checking, etc.
to detect unsound reasoning in arguments
![Page 26: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/26.jpg)
26
FormalizationFormalization
Variables Mathematical Statements
2x+8 = x2
Summer is hot4 is divisable by 2P(x), M(x) - predicates
![Page 27: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/27.jpg)
27
Graphically…Graphically…
![Page 28: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/28.jpg)
28
LogicLogic
Mathematical logic is a tool for dealing with formal reasoning
Logic does:Assess if an argument is valid/invalid
Logic does not directly:Assess the truth of atomic statements
![Page 29: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/29.jpg)
29
DifferencesDifferences
Logic can deduce that:Edmonton is in Canada
given these facts:Edmonton is in AlbertaAlberta is a part of Canada
and the definitions of:‘to be a part of’‘to be in’
Logic knows nothing of whether these facts actually hold in real life!
![Page 30: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/30.jpg)
30
Questions?Questions?
![Page 31: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/31.jpg)
31
Mathematical SymbolsMathematical Symbols
Simplest kind of math logic
Dealing with:
Propositions: X,P,Q,…each can be true or falseExamples: P=“I’m a knave”
Q=“He is a knight”
Connectives: Λ, v, , , ~, …connect propositions: X v Y
![Page 32: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/32.jpg)
32
ConnectivesConnectives
Different notation is in useWe will use the common math notation:
~ notV or (non-exclusive!)
and implies (if … then …) if and only if for all there exists
Λ
![Page 33: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/33.jpg)
33
FormulaeFormulae
A statement/proposition: true or false
Atomic: P, Q, X, Y, …
Unit Formula: P, ~P, (formula), …
Conjunctive: P Λ Q, P Λ ~Q, …
Disjunctive: P v Q, P v (P Λ X),…
Conditional: P Q
Biconditional: P Q
![Page 34: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/34.jpg)
34
Determining Truth of A Formula
Determining Truth of A Formula
Atomic formulae: given
Compound formulae: via meaning of
the connectives
Suppose: P is trueQ is false
How about: (P v Q)
Truth tables
![Page 35: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/35.jpg)
35
Truth TablesTruth Tables
Suppose: P is falseQ is falseX is true
How about:P & Q & XP v Q & XP & Q v X
![Page 36: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/36.jpg)
36
PrecedencePrecedence
~ highestΛv, lowest
Avoid confusion - use ‘(‘ and ‘)’:P Λ Q v X(P Λ Q) v X
![Page 37: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/37.jpg)
37
ParenthesizingParenthesizing
Parenthesize & build truth tablesSimilar to arithmetics:
3*5+7 = (3*5)+7 but NOT 3*(5+7)AΛB v C = (AΛB) v C but NOT AΛ(B v C)
So start with sub-formulae with highest-precedence connectives and work your way out
Let’s do the knave & knight problem in TT
![Page 38: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/38.jpg)
38
TT for K&KTT for K&K
S = X or YX = “A is a Knave”Y = “B is a Knight”
A B S X Y X v YAbsurd------------------------------------------------------------------------------Knave Knave false true false true yesKnave Knight false true true true yesKnight Knave true false false false yesKnight Knight true false true true no
![Page 39: CSE 2500 Introduction to Discrete Systems](https://reader036.vdocument.in/reader036/viewer/2022062301/56813a21550346895da1fde6/html5/thumbnails/39.jpg)
39
Questions?Questions?