Unformatted text preview:

CS341 Automata TheoryMathematial Preliminaries: A Review11 SetsAsetis a olletion of ob jets. For example, the olletion of all students in the CS341ourse is a set. The olletion of the four lettersa,b,anddis a set, whih we may allS;we writeS=fa; b; ; dg. There are various ways of desribing sets:\Expliit" enumeration of al l the objets in the set.Examples:S=fa; b; g,T=f1;2;3;4;5;6;7;8;9;10g.\Impliit" enumeration of the objets in the set.Examples:A=f0;1;2;3; : : :g, whih represents the set of all non-negative integers.B=f: : : ;2;1;0;1;2; : : :g, whih represents the set of a all integers.Formal desription.Examples:P=fn:n is ev eng.Q=f4n+ 5 :n= 0;1;2; : : :g.S=fn:n3and81< m < n; n60 (mod m)g.T=f(p; q ; r; s) :p!q or r!s or p$sg.\Preise" verbal desription.Examples:Ais the set of all students in CS341.Bis the set of all leap years in the seond entury.Some sp eial symb ols denote sp eial sets.Ndenotes the set of all the Naturals (1;2;3; : : :).Zdenotes the set of all the Integers (: : : ;2;1;0;1;2; : : :).Rdenotes the set of all the Reals.Qdenotes the set of all the Rationals.The ob jets omprising a set are alled itselementsormemb ers. For example, 7 isa member ofR; in symbols, 72R. Sometimes we simply sayaisinthe setS, or thatSontainsa. On the other hand, ifbis not an element ofS, we writeb =2S.In a set we do not distinguish rep etitions of the elements. Moreover, the elements of aset are unordered. Thus,fa; a; agis the same set asfag, andfa; b; gis the same set asfb; a; g.Two sets A and B are equal if and only if they have the same elements;we writeA=B.1This material was prepared by Luay Nakhleh.1The elements of a set need not b e related in any way, and in partiular, need not b e ofthe same type. For examples, the setf10; automata;f1;29g;(x; y ; z)gontains four elements:one is an integer, one is a string, one is a set and one is a list. A set whih ontains only oneelement is alled asingleton. The set that ontains no elements is alled theempty setand is denoted by;. Any set other than the empty set is said to b enonempty.A setSis asubsetof a setT, denoted byST, if every elementaofSis also anelement ofT, i.e.,ST:8a2S,a2T.For example,NZ. However,R6N. IfSTandS6=T, we say thatSis aprop ersubsetofT, and writeST.One way of provingS=Tis by showing thatSTandTS. Theardinalityof asetS, denoted byjSj, is the number of elements inS. For example,jf2;3;9gj= 3. If the sethas an innite number of elements, then its ardinality is1. Otherwise, the setSis nite.jNj=1, for example.1.1 Op erations on setsUnion:A[B=fa:a2A or a2Bg.Intersetion:A\B=fa:a2A and a2Bg.Differene:AB=fa:a2A and b =2Bg.Complement: (always taken with resp et to a \universal" set,U)A=UA.1.2 Prop erties of set op erationsIfA,B, andCare sets, the following laws hold.Idemp otenyA[A=AA\A=ACommutativityA[B=B[AA\B=B\AAsso iativity (A[B)[C=A[(B[C)(A\B)\C=A\(B\C)DistributivityA[(B\C) = (A[B)\(A[C)A\(B[C) = (A\B)[(A\C)AbsorptionA\(A[B) =AA[(A\B) =ADeMorgan's LawsA(B[C) = (AB)\(AC)A(B\C) = (AB)[(AC)2Two sets are said to b edisjointif they have no elements in ommon, i.e., if theirintersetion is;.It is p ossible to form intersetions and unions of more than two sets. IfSis a olletion ofsets, we writeSSfor the set whose elements are the elements of the sets inS. For example,ifS=ffng:n2Ng, thenSS=N. In general,SS=fx:x2Pfor somesetP2Sg.Similarly,TS=fx:x2Pfor eahsetP2Sg.The olletion of all subsets of a setSis itself a set, alled thep ower setofSanddenoted by 2S. For example,2f1;2g=f;;f1g;f2g;f1;2gg.Apartitionof a nonempty setSis a subset  of 2Ssuh that;=2, and suh thateah element ofSis in one and only one set in . That is,  is a partition ofSif  is a setof subsets ofSsuh that1. eah element of  is nonempty.2. distint members of  are disjoint.3.S =A.For example,ff1;2g;f3;4ggis a partition ofS=f1;2;3;4g, whereasff1;2g;f1;3;4ggis not a partition ofS.2 Relations and FuntionsAs mentioned b efore, elements of a set are unordered. To distinguish b etween elements ofa set, we have to \order" them. We b egin by intro duingordered pairs. We write theordered pair of two ob jetsaandbas (a; b). The ordered pair (a; b) is not the same as thesetfa; bg. First, the order matters: (a; b) is dierent from (b; a), whereasfa; bg=fb; ag.Seond, the two omponents of an ordered pair need not b e distint; (7;7) is a valid orderedpair. Note that the two ordered pairs (a; b) and (; d) are equal only whena=andb=d.TheCartesian pro dutof two setsAandB, denotedAB, is the set of all orderedpairs (a; b) witha2Aandb2B, i.e.,AB=f(a; b) :a2A and b2Bg.Abinary relationon two setsAandBis a subset ofAB. For example,f(i; j) :i; j2Nand i < jgis theless-thanrelation.More generally, letnb e any natural number. Then, ifa1; : : : ; anarenob jets, notneessarily distint, (a1; : : : ; an) is anorderedn-tuple.Afuntionffroma setAtoa setB, denoted byf:A!B, is a binary relationRonAandBwith the following sp eial prop erty: for eah elementa2A, there is exatly3one ordered pair inRwith rst omp onenta. We allAthedomainoff, and the setff(a) :a2Ag Btherangeoff.A funtionf:A!Bisone-to-oneif for any two distint elementsa; b2A,f(a)6=f(b).A funtionf:A!BisontoBif eah element ofBis the image underfof someelement inA.A funtionf:A!Bis abijetionb etweenAandBif it is both one-to-one and onto.IfQandRare binary relations, then theiromp ositionQÆR, or simplyQR, isf(q ; r) :for some, (q ; )2Qand (; r)2Rg.2.1 Sp eial types of binary relationsWe an dene a binary relation on a single set; for example,RAA. Certain prop ertiesof suh relations are:Reexivity: A binary relationRAAisreexiveif (a; a)2Rfor eaha2A.Symmetry: A binary relationRAAissymmetriif (b; a)2Rwhenever (a; b)2R.Antisymmetry: A binary relationRAAisantisymmetriif whenever (a; b)2Randaandbare distint, then (b; a)=2R.Transitivity: A binary relationRAAistransitiveif whenever (a; b)2Rand(b; )2R, then (a; )2RA binary relationRAAthat is reexive, symmetri and transitive is alled anequivalene relation.Example: The binary relationR5=f(a; b) :a; b ar e nonneg ativ e


View Full Document

UT CS 341 - CS 341 Review

Documents in this Course
Load more
Download CS 341 Review
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS 341 Review and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 341 Review 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?