Download presentation
Presentation is loading. Please wait.
Published byAusten Greene Modified over 8 years ago
1
A Quick Review of Set Theory A set is a collection of objects. A B D E We can enumerate the “members” or “elements” of finite sets: { A, D, B, E }. There is no significant order in a set, so { A, D, B, E } is the same set as { E, A, D, B }, etc.
2
Uniqueness of Elements You cannot have two or more ‘A’ elements in the same set A B DE { A, A, D, B, E} is just a redundant specification of the set { A, D, B, E }.
3
Cardinality of Sets The Empty Set: A Finite Set: An Infinite Set: e.g. The Set of all Positive Integers Norway Denmark Sweden
4
Simple Operations on Sets: Union A B C D E Set 1Set 2 B C A D E Union of Set1 and Set 2
5
Simple Operations on Sets (2): Union A B C C D Set 1Set 2 B C A D Union of Set1 and Set 2
6
Exercise #1 - Union pen pencil book marker book Set 1Set 2 ?
7
Simple Operations on Sets (3): Intersection A B C C D Set 1Set 2 C Intersection of Set1 and Set 2
8
Exercise #2 - Intersection pen pencil book marker book Set 1Set 2 ?
9
Simple Operations on Sets (4): Subtraction A B C C D Set 1Set 2 A B Set 1 minus Set 2
10
Exercise #3 - Subtraction pen pencil book marker book Set 1Set 2 ?
11
Formal Languages Very Important Concept in Formal Language Theory: A Language is just a Set of Words. We use the terms “word” and “string” interchangeably. A Language can be empty, have finite cardinality, or be infinite in size. You can union, intersect and subtract languages, just like any other sets.
12
Union of Languages (Sets) dog cat rat elephant mouse Language 1 Language 2 dog cat rat elephant mouse Union of Language 1 and Language 2
13
Intersection of Languages (Sets) dog cat rat elephant mouse Language 1 Language 2 Intersection of Language 1 and Language 2
14
Intersection of Languages (Sets) dog cat rat rat mouse Language 1 Language 2 Intersection of Language 1 and Language 2 rat
15
Subtraction of Languages (Sets) dog cat rat rat mouse Language 1 Language 2 Language 1 minus Language 2 dog cat
16
Languages A language is a set of words (=strings). Words (strings) are composed of symbols (letters) that are “concatenated” together. At another level, words are composed of “morphemes”. In most natural languages, we concatenate morphemes together to form whole words. For sets consisting of words (i.e. for Languages), the operation of concatenation is very important.
17
Concatenation of Languages work talk walk Root Language 0 ing ed s Suffix Language work working worked works talk talking talked talks walk walking walked walks The concatenation of the Suffix language after the Root language.
18
Exercise #4 - Concatenation able like Prefix language Root Language The concatenation of the Prefix language before the Root language.
19
Exercise #4 - Concatenation happy white black Root language Suffix Language The concatenation of the Suffix language after the Root language.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.