logic and discrete mathematics hkgab4 discrete
play

Logic and discrete mathematics (HKGAB4) Discrete mathematics: - PDF document

Discrete mathematics, Lecture I Sets Discrete mathematics, Lecture I Sets Logic and discrete mathematics (HKGAB4) Discrete mathematics: contents http://www.ida.liu.se/ HKGAB4/ 1. Sets: equality and inclusion, operations, Venn diagrams.


  1. Discrete mathematics, Lecture I Sets Discrete mathematics, Lecture I Sets Logic and discrete mathematics (HKGAB4) Discrete mathematics: contents http://www.ida.liu.se/ ∼ HKGAB4/ 1. Sets: equality and inclusion, operations, Venn diagrams. Organization 2. Relations: graphs, properties of relations. 3. Functions. Discrete structures. • Discrete Mathematics : 4. Definitions, recursion and induction. – lectures: 5 × 2 hours 5. Formal Languages. Chomsky hierarchy – seminars: 10 × 2 hours – exam: together with the logic course – recommended book: Logic: contents K. Eriksson and H. Gavel “Diskret matematik och diskreta modeller” published by Studentlitteratur, Lund Logic curse will be focused on practical reasoning. In particular we will: • Logic : • define a general framework for logics – lectures: 9 × 2 hours – seminars: 6 × 2 hours • show how logics are defined and used – supervised labs: 12 × 2 hours • show the connections between natural language phenomena – unsupervised labs: 8 × 2 hours and logics, in particular discuss intensional (modal) notions – exam: 1 × 5 hours • show the connections between commonsense reasoning and – manual: logics. J. Barwise, J. Etchemendy “Language, Proof and Logic” published by CSLI Publications � A. Sza� c � A. Sza� c las - 1 - las - 2 - Discrete mathematics, Lecture I Sets Discrete mathematics, Lecture I Sets Sets Important: Intuitively a set is any “abstract collection” of objects, called • we often limit consideration to a particular sets of objects, elements (members) of the set . The empty set , called a domain or a universe denoted by ∅ , is the set containing no elements. • we also distinguish between constants and variables. Constants have a fixed value while variables are used to Examples represent a range of possible values. 1. the set of all persons studying in Link¨ oping 2. the set of meals served in a given restaurant Examples 3. the set of names in a phone book Consider the universe consisting of dates. 4. the set of week days 5. the set of natural numbers 0 , 1 , 2 , 3 , . . . 1. constants 18-03-1899, 27-01-2015 represent concrete days 6. the set of 3 years old kids studying computer science in Link¨ oping 2. if we want to represent any day, e.g., between the above two dates, (empty set). we use variable, say x , and write 18-03-1899 < x < 27-01-2015. Membership is denoted by ∈ . Expression e ∈ S means that Notation 1 (list notation) : sets are denoted by object e is a member of (belongs to) the set S . By writing { e 1 , e 2 , . . . } , i.e., we use brackets “ { ” and “ } ” to denote sets e �∈ S we indicate that e is not a member of the set S . and list all elements, separating them by commas “ , ”. Examples Examples 1. August Strindberg ∈ the set of Swedish dramatists 2. Artur Connan Doyle �∈ the set of Swedish dramatists 1. { John, Mary, Paul } is the set consisting of John, Mary and Paul 3. Wednesday ∈ the set of weekdays 2. { 0 , 1 , 2 , 3 , 4 } is the set consisting of 0 , 1 , 2 , 3 and 4. 4. Wednesday �∈ the set of weekend days. � A. Sza� c � A. Sza� c las - 3 - las - 4 -

  2. Discrete mathematics, Lecture I Sets Discrete mathematics, Lecture I Sets Example: a paradox Notation 2 (extended list notation) : sets are also Consider the situation, where in a small village, say Sm˚ aby, denoted by { e 1 , e 2 , . . . , e n } , i.e., we additionally use dots “ . . . ” as an abbreviation, in the case when all elements the barber shaves all and only those male inhabitants of Sm˚ aby, between e 2 and e n are known from context. who do not shave themselves. Assume that the barber is a male and an inhabitant of Sm˚ aby, too. We are interested in the set: Examples { x | x is a male inhabitant of Sm˚ aby who shaves himself } 1. { 1 , . . . , 9 } is the set consisting of 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 and 9 2. { Tuesday, . . . , Friday } is the set consisting of and ask a question whether the barber is a member of this set. Tuesday, Wednesday, Thursday and Friday . We have two cases: 1. Case 1: the answer is “yes”. Notation 3 (predicate notation) : sets are also denoted Then the barber satisfies the condition that he is a male inhabi- by { x | variable x satisfies a given condition } , i.e., we tant of Sm˚ aby who shaves himself. But he shaves only those who additionally use sign “ | ” and some condition. do not shave themselves. So the answer cannot be “yes”. 2. Case 2: the answer is “no”. Examples Then the barber does not satisfy the condition that he is a male inhabitant of Sm˚ aby who shaves himself. So he does not shave 1. { x | x studies psychology in Sweden } is the set consisting of all himself. But we said that the barber shaves those who do not persons studying psychology in Sweden shave themselves, so he shaves himself. 2. { x | x is a weekday } is the set consisting of all weekdays. So the answer cannot be “no”. We then have a paradox! WARNING! Notation 3 sometimes leads to paradoxes! � A. Sza� c � A. Sza� c las - 5 - las - 6 - Discrete mathematics, Lecture I Sets Discrete mathematics, Lecture I Sets Venn diagrams Creating Venn diagrams In Venn diagrams sets are visualized as circles. Members of To create a Venn diagram, proceed as follows: sets are depicted as points. Sometimes all circles are 1. gather information about the considered situation: surrounded by a rectangle representing all considered (a) what is known about the considered situation? elements. (b) what are the most important elements of the situation? (c) what characteristics do the elements have in common? (d) what characteristics do not the elements have in com- Example mon? 2. concentrate on the overlap areas Universe (a group of students) (they show relationships among sets): Chemistry Maths (a) what is the intersection of chosen circles? Chris (b) how can overlapping areas be named? John (c) what relationships do they show? 3. try to discover laws illustrated by diagrams. Eve Paul Mary Lise Ann Peter Physics � A. Sza� c � A. Sza� c las - 7 - las - 8 -

  3. Discrete mathematics, Lecture I Sets Discrete mathematics, Lecture I Sets Set equality and set inclusion A set A is properly included (or is a proper subset of ) set B if both A ⊆ B and A � = B . Proper inclusion is denoted by A � B . Two sets are equal (or identical ) iff they have the same elements. Set equality is denoted by = and inequality is denoted by � =. Examples 1. { Wednesday } � { Wednesday, Friday } Examples 2. { x | x is a weekend day } � { Friday, Saturday, Sunday } . 1. { Wednesday, Friday } = { Wednesday, Friday } 2. { x | x is a weekend day } = { Saturday, Sunday } 3. { x | x is a weekend day } � = { Wednesday, Friday } . Venn diagrams for inclusion A set, say A is included (or, in other words, is a subset of ) Paul set B , denoted by A ⊆ B iff all members of A are also members of B . To indicate that A is not a subset of B , we write A �⊆ B . John Eve Mary Examples 1. { Wednesday, Friday } ⊆ { Wednesday, Friday } 2. { Wednesday } ⊆ { Wednesday, Friday } 3. { Friday } ⊆ { Wednesday, Friday } 4. { x | x is a weekend day } ⊆ { Friday, Saturday, Sunday } { John, Mary } ⊆ { John, Mary, Paul, Eve } 5. { x | x is a weekend day } �⊆ { Wednesday, Friday } . � A. Sza� c � A. Sza� c las - 9 - las - 10 - Discrete mathematics, Lecture I Sets Discrete mathematics, Lecture I Sets Operations on sets: intersection Operations on sets: union Intersection of sets A and B , denoted by A ∩ B , is the set Union of A and B , denoted by A ∪ B , is the set containing containing all elements which are members of both A and B . all elements which are members of A or of B (or of both). Examples Examples 1. { Monday, Tuesday } ∪ { Tuesday, Friday } = 1. { Monday, Tuesday } ∩ { Tuesday, Friday } = { Tuesday } = { Monday, Tuesday, Friday } 2. { 1 , 2 , 4 , 6 } ∩ { 2 , 3 , 4 , 5 } = { 2 , 4 } . 2. { 1 , 2 , 4 , 6 } ∪ { 2 , 3 , 4 , 5 } = { 1 , 2 , 3 , 4 , 5 , 6 } . Venn diagrams for union Venn diagrams for intersection Paul Paul John Eve John Eve Mary Chris Mary Chris { John, Mary, Paul, Eve } ∪ { Paul, Eve, Chris } = { John, Mary, Paul, Eve } ∩ { Paul, Eve, Chris } = { Paul, Eve } = { John, Mary, Paul, Eve, Chris } Observe that, for any two sets A , B , Observe that, for any two sets A , B , A ∩ B ⊆ A and A ∩ B ⊆ B. A ⊆ A ∪ B and B ⊆ A ∪ B. � A. Sza� c � A. Sza� c las - 11 - las - 12 -

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend