1 / 72

D isc r e t e

s tructu r e s. D isc r e t e. 2110200. 2007. The foundations C ounting theory N umber theory G raphs & trees. Evaluation. The foundations 15 % Counting theory 15 % Number theory 15 % Graphs & trees 15 % Final 40 %. Motivation. How fast can we do the computation ?. Motivation.

cara
Télécharger la présentation

D isc r e t e

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. structures Discrete 2110200 2007 The foundations Counting theory Number theory Graphs & trees

  2. Evaluation • The foundations 15 % • Counting theory 15 % • Number theory 15 % • Graphs & trees 15 % • Final 40 %

  3. Motivation How fast can we do the computation ?

  4. Motivation ?

  5. Motivation K = 0 FOR I1 = 0 TO M { FOR I2 = 0 TO I1 { FOR I3 = 0 TO I2 { … FOR In = 0 TO In-1 { K = K + 1 } … } } } Find the value of K

  6. s s T T he Foundation Relational structures

  7. The Foundations Logic and reasoning Set, relation and function Methods of proof

  8. Logic & Reasoning

  9. Historical SYLLOGISTIC REASONING Aristotle (384-322 B.C.) Euclid of Alexandria (325-265 B.C.) DEDUCTIVE REASONING Chrysippus of Soli (279-206 B.C.) MODAL LOGIC George Boole (1815-1864 A.D.) PROPOSITIONAL LOGIC Augustus De Morgan (1806-1871 A.D.) DE MORGAN’s LAWs

  10. Propositional logic Definition A proposition is a declarative statement that is either true or false but not both.

  11. Summary Theorem : Logical Equivalences, given any propositions p,q and r, a tautology T and a contradiction C, the following logical equivalences hold: • Commutative laws: pqqppqqp • Associative laws: (pq)rp(qr) • (pq)rp(qr) • Distributive laws: p(qr) (pq)(pr) • p(qr) (pq)(pr) • Identity laws: pTp pCp • Domination laws:(Universal bound laws) pTT pCC • Idempotent laws: ppp ppp • Negation laws: ppT ppC • Double negative laws:  (p) p • De Morgan’s laws:  (pq) pq •  (pq) pq • Absorption laws: p(pq) pp(pq)p

  12. Example Is the following assertion a proposition? This statement is false. No, since this statement is neither “true” nor “false”.

  13. Example The nth statement in a list of 100 statements is What conclusion can you draw from these statements? Exactly n statements are false. At most one statement can be true, then 99 statements are false. That is only the 99th statement is true.

  14. Example The nth statement in a list of 100 statements is What conclusion can you draw from these statements? Exactly n statements are false. At least n statements are false. 50 first statements are true. The others are false.

  15. Example 99 The nth statement in a list of 100 statements is What conclusion can you draw from these statements? Exactly n statements are false. At least n statements are false. CONTRADICTION

  16. Conditional statement p q Converse The converse of p q is q  p. Inverse The inverse of p q is  p   q. Only if p only if q means If  q then  p.

  17. Valid arguments Definition An argument is a sequence of statements. All statements excluded the final one are called “hypotheses”, the final statement is called “conclusion”. A argument is the form: p ; q ; r ; …  f (read therefore) An argument is valid means that if all hypotheses are true, the conclusion is also true.

  18. Valid arguments VALID Example Given an argumentp (q  r);  r ;  p  q TRUE ( p1 p2  p3  …  pn)  q

  19. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P  P  Q

  20. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P  Q  P

  21. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P Q  P  Q

  22. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P  Q P  Q

  23. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P  Q  Q   P

  24. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P  Q Q  R  P  R

  25. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P  Q  P  Q

  26. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P  Q  P  R  Q  R

  27. Rules of inference • Disjunctive addition • Conjunctive simplification • Conjunction addition • Modus ponens • Modus tollens • Hypothetical syllogism • Disjunctive syllogism • Resolution • Dilemma P  Q P  R Q  R  R

  28. Example Given two logical operators, p | q means  ( p  q ) p  q means  ( p  q ) Find a simple proposition for ( p  q )  ( p  q ). ( p  q )

  29. Example Given two logical operators, p | q means  ( p  q ) p  q means  ( p  q ) Find a simple proposition for ( p  q )  ( p  q ). Find a proposition equivalent to pq using only . (( p  p ) q )  (( p  p ) q )

  30. Problem Consider the following statements: All students go to school. John is a student. Diana is a student. …… Of course we can conclude that John goes to school. Diana goes to school. ……

  31. Predicate logic The statement “All students go to school” has two parts: Variable students (denoted by variable x) “go to school” (the predicate) This statement can be denoted by P(x), where P denotes the predicate “go to school”. P(x) is said to be the value of the propositional function P at x. Once a value has been assigned to the variable x, the statement P(x) becomes a proposition and has a truth value.

  32. Quantifiers • Universal quantification  • Existential quantification • Unique existential quantification ! Consider a statement x P(x)  Q(x). Contraposition Its contrapositive is x Q(x)  P(x). Inverse Its inverse is x P(x)  Q(x).. Converse Its converse is x Q(x)  P(x).

  33. Universal Modus Ponens Consider a statement x P(x)  Q(x). For a particular e, P(e) is true, therefore Q(e) is true.

  34. Universal Modus Tollens Consider a statement x P(x)  Q(x). For a particular e, Q(e) is true, therefore P(e) is true.

  35. Rules of inferences Universal instantiation xP(x) P(c) if c  U. Universal generalization P(c) for an arbitrary c  U  xP(x) Existential instantiation xP(x)  P(c) for some element c  U Existential generalization P(c) for some element c  U  xP(x)

  36. The order of quantifiers Given a predicate P(x,y): x + y = 0 • x y P(x,y) • y x P(x,y)

  37. Nested quantifiers • x P(x)  y Q(y) • x y ( P(x)  Q(y) ) • y x ( P(x)  Q(y) ) • x P(x)  x Q(x) • x  y ( P(x)  Q(y) ) Prenex normal form (PNF)

  38. Example Express the following theorem using the first order predicate logic. Mathematical induction

  39. Set George Cantor (1845-1918)

  40. Set Definition A set is an unordered collection of objects. The objects are called the elements or membersof the set. The number of distinct elements in a set is the cardinality of the set. The Cartesian product of A and B, denoted by AB, is described by { (a,b) | a A  b B }.

  41. Defining sets • L1={ n| for n = 123 … } • L2={ n | for n = 1357 … } • L3={ n | for n = 14916 … } • L4={ n | for n =34822 … }. Membership problem

  42. M Machine model { space of yes-input } MEMBERSHIP DECISION { space of input } input output { yes, no }

  43. Example Let U be the universe described by U = { x | 1000  x  9999}. Let Ai be the set of all numbers in U such that the ith position is i. ? Find the cardinality of the union of A1 A2 A3 and A4

  44. Example ? Let S be the set of all x that x does not contain x. S = { x | x  x } Note that x is also a set. Does S contain S Russell’s paradox Bertrand Russell (1872-1970)

  45. Set Operators Union Mutually disjoint Intersection Partition Different Disjoint Complement Power set

  46. Set • Theorem Given sets A,B and C. • Commutative laws: AB = BA AB = BA • Associative laws:(AB)C = A(BC) • Distributive laws: A(BC) = (AB)(AC) • Idempotent laws: AU = A AU = U • De Morgan’s laws: (AB)c = Ac Bc (AB)c = Ac Bc • Alternative representation for set difference A-B = ABc • Absorption laws: A(AB) = A (AB)A = A

  47. Example ? The symmetric difference of A and B, ( A  B ), is the set containing those elements in either A or B, but not in both A and B. ( A  ( B  C ) )= ( ( A  B )  C ) YES

  48. Example ? The symmetric difference of A and B, ( A  B ), is the set containing those elements in either A or B, but not in both A and B. ( A  ( B  C ) )= ( ( A  B )  C ) Given A  C = B  C Must it be the case that A = B ? YES

  49. Multisets Definition Multisets are unordered collections of elements where an element can occur as a member more than once. { m1.a1, m2.a2, m3.a3, …, mr.ar } mi are called the multiplicities of the elements ai. OPERATORS: UNION, INTERSECTION, DIFFERENCE, SUM

  50. Multisets Fuzzy sets Definition Multisets are unordered collections of elements where an element can occur as a member more than once. { m1.a1, m2.a2, m3.a3, …, mr.ar } mi are called the multiplicities of the elements ai. 0  mi  1 Degree of membership OPERATORS: UNION, INTERSECTION, DIFFERENCE, SUM

More Related