0% found this document useful (0 votes)
98 views29 pages

Discrete Structure Question Bank Solution

Questions bank solution discrete Structure sem 3 computer Engineering Mumbai University
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
98 views29 pages

Discrete Structure Question Bank Solution

Questions bank solution discrete Structure sem 3 computer Engineering Mumbai University
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 29
. Binary Operation (a) Definition : Let A be anon: :xamples of Binary Operation It should be noted that since a binary operation is a function, one and only one element of Ais signed to one ordered pair of A x A. Further, we shall denote binary operations by * or (+) instead f f. Since, a binary operation is a function to each (a, b) <¢ Ax A, there exists a unique element a .b A. We describe this property by saying that Ais closed under * . Example 1: Let A = Z and a * b beat b. Then + is a binary operation on Z. -empty set. A function f : A x A= Ais called a binary operation. (b) Identity and Inverse Definition : Given a non-empty set A and a binary operation @ if there is an element e eA, such that for every 2c A, a2 ® e = € ® a= a, then eis called the identity element for the operation e. For example, in the set of real numbers, zero is identity element for usual addition because a+0=0+a=aforeveryae R. in the set of real numbers, unity is identity element for usual multiplication because @x1=1xa=aforeveryac R. Some Algebraic Structy Discrete Structures & Graph Theory (8-2) ry j ration @ if A has an identity elemen, ition ; Given a non-empty set A and a binary ope = ; ‘ and ae elementa, be S,a@ b=b@a=e, then bis called the inverse of aandis denoty bya. ‘ Example : “If a binary operation in Q * (set of positive rational numbers) is defined by 2® b= .ab/2 then 2s an identity and 4/a is the inverse of a under @ ”. State true or false with proper justification. (M.U. 2004 Sol. : Ife is an identity element under ® , we must have a®e=e@a=a Butbydata, a@e Bees 2 _ ae Sure @ + e=2 is identity. If bis the inverse of a, we must have 2@b=b@a=2 (identity) But by data, a@b = 2) al ; | Se eee : 2 eee: at=4 H ence, the Statement is true. 4. Semi-Group (a) Definition A non-empty set S together with a semi-group. We denote the semi-group by (S, * ). Thus, a non-empty set Sis (i) *is binary i.e. a * be S for every a, be S. (ii) * is associative i.e. a * (b * c) = (a* b) * c for every a, b, ce Ss. Definition : A semi-group (S, * ) is called commutative semi-group if « is commutative. Thus, (S, * ) will be a commutative semi-group if « is (i) binary, (ji) associative and (iii) comm tative. (M.U. 2000, 10, (i) binary and (ii) associative operation, * is calla, a semi-group if Examples of Semi-groups Example 1 : (Z, +) is a commutative semi-group. Example 2: If A is a set and § (A) is its power set then i i ions! commutative semi-group. ie n & (A) with the operation of unio! 5. Monoid (M.U. 2000, 10) (a) Definition : A semi-group (S, *) which has identity is called a monoid. Thus, we can say that there are semi-groups which have identity (in which case we call them monoids) and there are semi-groups without identity element. (b) Theorem : The identity element of a semi-group is unique. Proof : If possible let e’ be another identity element of the semi-group (S, *). Since e'is an identity, e*e'=e'*a=a foreacha. 6. Isomorphism, Automorphism And Homomorphism aef We have already studied isomorphism between two posets. In general, two algebraic Systemy 0 are called isomorphic if they preserve special characteristics of the system. We shall now consis 2 isomorphism between two semi-groups. Isomorphism Definition : Let (S, +) and (S', *') be two semi-groups. A function f isomorphism from (S, *) to (S', *') if fis one-to-one and onto and if f (a * b) = f (a) *' f(b) for all a, bin S. Note carefully the « on the left side and »' on the right side. : S$ S'is called ay y ee 3: We shall snow vs a» b)=f (a) «' f(b). qi) S#9P °° (v) step 4: We shall show that f (i eae 4 Let Sbe the ge isomorphic. gol. : We shall follow the above step 1: We define the function f : Step 2: Suppose f (a4) = f (ag). Then 2a, = 249. Step 3 : SUPPOSe bis an even integer. Thena=b/2€ Zand f(a) = f(b! 2) = 2 (b Step 4: We have f(a+ p)=2 (at pb) = 2a + 2b = f(a) + f(b) -morphic semi-groups. woo eaal numbers. Show that the ful set of all even integers. Show that the semi-groups (Z, +) and (S, +) (M.U, 2016) procedure. Z— S where f (a) = 24. Hence, fis one-to-one. 1 2)=b. Hence, fis onto. nection f: RtOR rail Hence, (Z, +) and (S, +) are iso 10 (R, +) where i Group (M.U. 2000, 04, 10, 17) Definition : An ordered pair (G, +) is called a group, if Gis a non-empty set and «is a binary operation on G satisfying the following axioms. 61:Foralla, bce G,a*(b*c)=(a*b)*c. (ie., is associative inG) G2: There exists an element e € G, such that e * a=a* called identity for *. (i.e., Identity e for * exists in G.) e=a forall ae G. The element eis Some Algebraig (8-12) Str, Discrete Structures & Graph Theory pis ch thataxb=b*a=e,T, G3: For every ac G there exists an element b € is su he Glen, b is called the inverse of @ and is denoted by a’ or by @ element in G inverse exists.) i prs y shinee Group : A group (G, *) is called commutative or Abelian, ian . M 1 aeb=beaforalia, be G. me: - ( -U. 205, Most of the groups that we shall be dealing with are commutative /.6. Abelian groups, By, groups are not commutative. If Mis the set of non-singular n xn matrices then the set forms ang, commutative group under multiplication. You might have noticed that in general A x B= Bx Awhe, A and B are non-singular square matrices of the same order. Examples of Groups Example 4 : Let G = {x | xis a real number} and a * b = a + b, the usual addition. Then (6. is an Abelian group with 0 as identity and - a as an Example 2 : Let G = {x | x is a rational number excluding zero} and a * b = a x 6, the use multiplication. G is group with 1 as identity and q/ p as inverse of p/ q. ul Heres ‘ cyclic Group 6 ~ ition : A group (G, *) is sai pefinite ; aid to be a eycli 4 element of G can be written as so IC group if there exists i xa... 4 (k times). me power of a viz. a for anisle ean @ ‘ then Gis said to be generated by a or a generates G. Acyclic group is always Abelian because commutati ne ativit fa’.a°e G, thena’xa*=a°xa’ 'y is observed, (M.U. 2000, 13) ment ae G such patev? some integer k where by a we example 1: The cube roots of unity form a cyclic group under multiplication of complex numbers. ol. : In Example 2, utiplication. Now, we shall prove that itis © asintegral power of some element a € G. We note that oer o' =o, ons wo. Thus, the element 1,0, wo are expressed as an gdic with o as a generator. 22 = gto? O=O Also, wy? =1, (oy = pemloe) ° 2 are expressed as o”, 48 and 2 power 0 cyclic with was a generator. aan 4.2,3: 40S a fini page 8-13, we have proved that the cube roots of unity is a group under yclic i.e., every element of the group 1, 0, * can be expressed 45 and 2" power of «. Hence, the group is 2 Thus, 1, 0, 0 f a Hence, the group is te, abelian, cyclic grouP under Some Algebraic gf Discrete Structures & Graph Theory (8-30) Ut, Si (M.U. 2002, 04, 08, ubgrou } 7 seme : Let H be a subset of group G, such that (i) the identity element e of G belongs to H. (ii) if 2, b belong to H then a * b also belongs to H. (ill) if 2 Athena” € H. Then His called a subgroup of G. In short @ subgroup is @ subset of G having all the properties of a group. illustrations : (i) Let G be the group of all non-zero complex numbers a + ib where a, ba real under multiplication. Let H={a+ib|2?+6?=1} then His a subgroup of G, ii) Let G be th f ices|? iplicat (ii) © Group Of 2 x 2 matrices fi q | Such that ad— be 0 under matrix multiplicait {fa b letH = i : i ad # 0 then His a Subgroup of G, Sa 9. Isomorphism and Homomorphism (a) tsomorphism of groups (M.U. 1998, 99 Definition : If (G, *;) and (Gp, *2) are groups, then f : G; > Gzis an isomorphism from 6, to G> if (i) fis a bijection (je. one-to-one and onto) and (ii) f(a *4 6) = f(a) *2 f(b). If such a function exists, then G; is said to be isomorphic to Go. 10. Ring so far i: have oe pees of a set under one binary operation. We shall now study a inary operations + and - on its element: is gi ( eal set with two mu \ N ents, This gives rise to two important algebraic gtructures ViZ- rings and fields. Rings have structures similar to integers and nelde have Peis similar to real numbers with respect to the operations of addition and multiplication. Definition : Aring is an ordered triple (R, +, :) where Ris anon-empty s ; ne iy et and + and- ry operations on R satisfying the following axioms. nt annua? Ri:(R,+*)isa commutative group. pinal R2:(a-b):c=a:(b-¢) foralla, b,ce R (- is associative) R3:a‘(btc)=a-bta-c and (b+ c):a=b-a+c-aforallia, b, ce R (- distributes over +) (a) Examples of Rings 4. The set of all integers is a ring under the binary operations + and *. 2. The set of all real numbers of the form a + V2 b is aring under the binary operations + and x. ab 3. The set of all matrices of the form E 5| is a ring under the binary operations of addition and multiplication of matrices. 4. The set of complex numbers with usual addition and multiplication is a ring. la ur us . Gnu i Summary We give below the summary of what we have studied so far. 14. A graph is an ordered pair (V, E) of two sets V, and E, where (a) Vis a non-empty finite set. (b) each e € E corresponds to a unique pair of elements v4, vj € V. We shall also denote a graph by a single letter G. if G=(V, E), then elements of V are called the vertices of G, and the elements of E are cales the edges of G. The number of vertices of G is denoted by | V|. The number of edges of ¢s denoted by | E|. et g. The fact that v,, oon ea) Connected Grapr> gee adjacent vertices “ces of a 2 : n 3, If v4 = v2. then eis ©alleg if vis 2 Vertex of an edgg , 28? 8, th qhe NUMbEr Of Edges ingig OOS Sal inci id ree of a vertex vis denoted 4 ata '© be Incidont at v v qne vertex of degree 0 js aa (vy). te 5, Ife and ©’ are distinct gig nd 2 then they are called paralie, oO Thus if @ and e' are paralig| ae ea ava ale Vette A.graph with multiple edges is cay, on e Adiagram of a graph ; A graph a @ multigraph. per. The elements of V are reprasameq y=) can b aiine segment joining them ted by dots. eee by a diagram on the plane of exists) be y 6. Types of Graphs : ) between two dots is shown edge °18 denoted by 0 = (vy. ve) and we say that ¥1 xis call le a the degree or valency of the vertex. The an isola Manta oe vertex, A ven 8 OF E ang tex of degree 1 is called a pendant the Multiple edges 29PONG fo the same pair of vortices Ys 8, then, 1 and wi Thus in a simple graph, if and without multiple edge is callad a simple graph. Vs, V9} nail isa genes e’implios { 4, vo} #(vy\, vy} ) 18 an edge, then v, + vp; and ife = {¥, vz}, "= 401, Vo" (ii) Complete Graph : A graph ig calle d nee adecent. Thus a complete graph has - complete if itis simple and its every two vertices are (a) no loop (b) no multiple edge and @ govern any two vertices there is one and only one edge. (iil) Bipartite Graph : A graph G = (V, E)is called bipartite, if the following hold (a) UUW= Vand Un W=0 (b) Every edge in E has one vertex in U and the other in W. The sets U and Ware called a partition of V. (Wv) Planar Graph : A graph that can be dravin on a piane without the crossing of edges is tiled a planar graph. If it is drawn on a plane, then itis called a plane graph 7. Subgraph : Let G= (V, £) be a graph. A graph G'= (V", E')is sald tobe subgraph of Gif VicVand E’c E. 4 Let G = (V, E) be a graph, A walk in G is a finite alternating sequence of vertices and ages Uy @4 Up @y ...-- @—1 Ux Such that - (@) u; and u, are vertices (i.¢. two e (b) e;is. an edge between uj and Ui+ 1 The walk is closed if uy =U and open if Uy # Ub : 4. Awalk in which no edge is repeatedis called 2 trail, A walkin which neither on 2498" a Wetex is repeated is called a path. & number of edges in path Is called the leng! 7 i intersect, Thus. path (i) does not have a loop, (il) does not have a parallel edge i) does not interse _ path (1, , isnot a closed walk. A closed trail in which no vertex in Tepe The number of edges in a cycle is calle nds of the sequence are vertices) ated exceptthe end points s called.a cycle or a circuit 4 the length of the cycle raph Theory (12-12) Connecteg Cen Discrete Structures &G 40. Connected Graph: A graph is connected if there is a of the graph. path between every pair of Vettioas E Not IL trail nath evcle. are connect 7 ted graphs, (ii) Every c ; complete graph is Connected (13-2) ros & Graph Theory piserete struct shown in the Fig. 13 3 inthe graph 61 oe We have # path ™% 1b 2 : e We have a path 72 pepces3 4% We have another path ng : 2019208 deze Length of a path : at i th is i Definition * The number of edges in a path is called the length of a Brn The length of the path 7 Is a The length of the path m2 is 3. he path m3 is 4. rt) The length of t Gonnected Graphs () Definition : A graph is said to be connected if there is a path from any v vertex. = a .d, then it is called disconnected. This means in a if a graph is not connecte graph, there is atleast one pair of vertices without any path between them. Of the following graphs shown in the Fig. 13.4 (a) and (b) are connected while graph. TAPAS shown, 3.4 (c) and (d) are disconnected graphs. scone in the Fig. 1 Fig. 13.4 (a) Fig. 13.4 (b) Ea — Fig. 13.4 (c) Fig. 13.4 (d) (d) Circuit 5 Definition : A path that begins and ends at ac A 4 the same vertex is called a circuit. Since a circuit ei . & isa path, in a circuit neither a vertex noranedge a e y i is repeated. (Except the beginning vertex.) Ie [tie @ In the neighbouring Fig. 13.5 (a), ae; be,c f i ; €3 de, ais a circuit; a e4 de, ces a is another 2 413.5 Fig. 13» circuit ; a @5 ¢ €9 b e, ais another circuit. fe 4 wn an M112 (@) Eulerian Path (M.U. 2001, 02, 10, 11, 12,4 Definition : A path ina graph is called Eulerian Path if it includes all edges but each ede exactly ones a vertex may be repeated. in the Fig. 13.5 (b), the path m4: ae; be, e3 dis an Eulerian path because it contains al tte edges of the graph and no edge is repeated. & Graph Theory tt structures (13-3) - euleri@n Circuit pefinition : An Eulerian path that is a cirouit is oeedian Circuit mother words, a circuit that contains all edges goat edge exactly once is called an Eulerian oret Eulerian Graph : A graph that contains an ere circuit is called Eulerian Graph. in Fig 13.6 (a), there is an Eulerian circuit a ey de, € 5 aand hence it is an Eulerian Graph. inFig. 13.6 (b), b€2 6 @3 qd e, € és bis a circuit tig not Eulerian Circuit as it does not contain a edges of the graph. Now, study the following table carefully. Path Circuit No Repeated Vertex Eulerian Path Eulerian Circuit Eulerian & Hamiltonian Graphe (M.uU, 2004, 02, 10, 11, 12, 16) e% qd e &, bs ey @2 i) 4, Hamiltonian Graph Definition : Let G = (V, E) be a graph. A pal \ exactly once is called a Hamiltonian path. Acircuil once in G is called a Hamiltonian circuit. If G h Hamiltonian Graph. th in G which contains all the vertices of G but tin G which contains all the vertices but exactly as a Hamiltonian circuit, then G is called a (M.U. 2016, 17) Notes ....% —— 4. Like an Eulerian graph, @ Hamiltonian (and semi-Hamiltonian) graph is connecteg 2. There is 2 difference between an Eulerian circuit and a Hamiltonian circuit. In Eyer. Bc desriodoe ponte wareteed: Hence, Mat Eueca circuit each Vertex willbe vister a) come vertices might be visited more than once. fed but But in Hamiltonian circuit all the vertices will be visited once and once only exce, terminal vertex. Hence, some edges may not be traversed at all. Pt the 3. We have a very simple test to find out whether a graph is Eulerian viz. each vertex h; even degree. But there is no such simple rule to decide whether a graph is Hamiltonian. ae makes a Hamiltonian graph interesting. . This 4, The graphs shown in the Fig. 13.34 are Hamiltonian. (In the following examples we shall show the circuit by arrows for the sake of brevity.) Note that there may exist more than one Hamiltonian circuit. For example, in the last graph we can have following Hamiltonian circuit and some more. x 4 Fig. 13.34 Fig. 13.35 Ky Repeated Edge No Repeated Vertex Eulerian Allowed Hamiltonian No Allowed (Except terminal) Cuivunnrg pene . ae TTT an PHANG Of j Definition 1: Agraph or a multigraph that can be drawn ona plane (or on a sphere) without crossing edges is called a planar graph. Clearly, the graphs on the right are planar graphs. (The second graph is isomorphic to the first). The complete graph with four vertices , drawn on the left ‘looks’ like a non-planar cen : graph. Its edges e, and eo ‘look’ like Fig. 14.1 oo crossing each other. But with little imagination, it can be redrawn as on the right such that the ©dges €, and e, do not cross each other. Thus, Ky, is a planar graph. 2 buaee more illustrations are given below. The graphs [Fig. 14.3 (a) and Sia }]0n the left can be redrawn as on the right [Fig. 14.3 (b) and 14.4 (b)], Sse ges donot rose, " gicimemmmeannediai | 3, Cut Vert (a) Definiti ex And Cut Edge (Bridge) ; B ition : Let G be ac fe point of GG. 18 Ss Sainela soo graph. A vertex v of Gis called a cut vertex or 2 cut Example 1 : Fi ple 1 : Find the cut vertex of the following graph eae Gy s Fig. 12.8 Sol. : We have to seek that point which when deleted, the graph : Fig. 12.8 (a) | becomes disconnected. ages, we get th \ In G, ifwe delete the vortex’ ar ee ee a e 4 ich i ir . e neighbouring graph which IS clear vig’ is the cut vertex. © Teted. Hence 2” ‘ edges are also tO or aS cut vert because bY deleting any vertex we , @b In Go, there IS e ; h. i do not get 4 disconne 6 ae » and the incident edges, we geta e vel vf ¥ | In Gg if we delete Ted. Hence, P'S the cut vertex. Fig, 12.8 (b) ) graph which is not walk guppose A, B, C. D are four citie and we want to ; ‘ D e can do so In various ways. We can go from A oe from A to D. Din cea ‘0 Din any of the jong W2YS fi (yA—D. (i) A—B—bD, a C (ii) A— C— D. (v) A—B—C=p A The same idea is expressed more precisely in the following definition, Fig. 12.4 Definition 1 = Let G=(V, E) be agraph. A walk in Gis defined as a finite al ji Nt gvertioes and edges Uy, €4, Up, 2, «1 4, Uy SUCh that - Moet uc cea) 0 4 and U, are vertices of G (i.e. the sequence starts with a vertex of G and ends at some vertex of G). & is an edge between uy and u; + 4 (i.e. the sequence is such that between two consecutive vertices u;, Uj +4, there is an edge @; in the sequence.) The vertices u and uy (i.e. the starting point and the end point) are called terminal points of the walk. For example, consider the graph shown in Fig. 12.2. The following sequences of vertices and of edges form some @) % ee walks from V2 to V4. Vy a V5, (i) Va €2 V3 @4 V4 (ii) Vz €3 V3 05 V5 @8 V1 9 V3 4 V4 1% (ili) vz €4 V4 @g V3 €5 V5 €7 V5 5 V3 C4 V4 (iv) Vo @4 V4 €g V3 C4 V4 (Vv) v2 €4 V4 @g V5 @7 V5 &6 V4 ee 3. Trail Definition : A walk in which no edge is repeated is called a trail, if a walk is open without repetition of an edge, it is called an open trail. nt if a walk is closed without repetition of an edge, it is called a closed trial, C The walks in 10.3(2) and 10.3(8) are trails. (In fact they are closed trails.) yer The walk in 10.3() is not a trail because the edge eo is repeated. * 4. Path : Definition : A walk in which neither an edge nor a vertex is repeated is called 2 path Te | number of edges in a path is called the length of the path. With reference to the Fig. 12.2, the following walks are paths. (i) v2 €2 V3.4 V4, (ii) Vo €1 V4 Cg V3 Cg V4. But the following walks are not paths. (a) v4 @1 V2 @2 Vz €3 V2 because the vertex v2 is repeated. (b) Vv; @g V5 @7 V5 @5 V3 €4 V4 because the vertex vz is repeated. Discrete Structures & Graph Theory (12-3) Connected Graphs Further, we note that (i) A path cannot have a loop, since in a loop a vertex is repeated as in (b) above. (ii) @ path cannot have parallel edges since again in parallel edges a vertex is repeated as in (a) above. (iii) A path cannot be a closed walk because in a closed walk a vertex is repeated. The length of the path (i) is 2 and of the path (ii) is 3. as ely Ae (ais) (a1) is 6 This means there are 6 different walks of | Ngth 4 from ata, | in which no vertex is repeated (except at the ends) j is called g Cle 5. cycle le is called the length of the cycle. Thus. Definition * A closed tral ior circuit). The number of edges in a cy¢ ) aloop (v4 @1 V1) is @ cycle of length one. [See Fig. (1), page 10-2} i) two parallel edges between two vertices (i.e. the .e. the path v4 64 V2 & 2 V4) form a cycle of len igh two. [See Fig. (2), Page 10-2] 3 is always a simple graph. See that the cycle vj & v2 & v3 ev Note that a cycle of length > in Fig. 12.3, page 10-2 is a cycle of length 3 and itis a simple graph 6. Connected Graphs Definition : A graph i i i i ween graph is said to be connected if there is a path between every pair of vertices if i iti a graph is not connected then it is called disconnected. This means ina disconnected 92°" th E there is atleast one pair of vertices without any path between them.

You might also like