You are on page 1of 118

Chapter 1: Graphs

(VERY SHORT ANSWER TYPE QUESTIONS)

Q. 1. Define directed graph with example and draw a diagram? Sol. Directed Graph: A directed graph is defined as an ordered pair (V, E) where V is a set and E is a binary relation on V. A directed graph can be represented geometrically as a set of marked points V with a set of arrows E between pairs of points. Also the elements in V are called vertices. The ordered pairs in E are called edges. For example : The directed graph is given below. Here, vertices are a, b, d and edges are (a, b), (b, a), (b, d) (d, a).

Q. 2. Define undirected graph with example? Sol. Undirected Graph: It consists of a set of vertices, V and a set of edges E. The edge set contains the unordered pair of vertices. If (u , v) E E, then we say u and v are connected by edge where u and v are vertices in the set V. For example The undirected graphs are given below in Fig 1 and Fig. II.

We note that the edges x1 x2 x3 in Fig. II are associated with the unordered points (1, 2), (2, 3) and (3, 1) respectively. In Fig. II node I is adjacent to node 2 and 3.

Q. 3. Define the following terms with example Sol. (a) Simple Graph: If there is no more than one edge between a pair of vertices (no more than one directed edge in the case of a directed graph) then such a graph is known as simple graph. (a) Simple graph (b) Non-simple graph (c) Multi-graph (d) Weighted graph

(b) Non-Simple Graph: A graph which is not a simple is called a non-simple graph. (c) Multigraph : A multigraph G = (V. E) consists of a set of vertices V and a set of edges E such that edge set E may contain multiple edges and self-loops. For example : Consider the following graphs.

In undirected multigraph, e4, and e5 are multiple edges and e6 is a self loop. In directed multigraph, edges e1, e2 and e4 e5 are multiple edges and e7, is a self-loop. (d) Weighted Graph : A graph G = (V, E) is called a weighted graph if each edge of graph G is assigned a positive number w, called the weight of the edge e.

For Example : The fig I is a weighted graph in which the number of any edge show the multiplicity of the edge. We may regard the multiplicity as a weight assigned to an edge. The Fig II is a weighted graph in which the numbers on the edge show the weight of the edges which are not necessarily integer.

Q. 4. How can you define degree of a graph? Sol. Degree of a graph: Let v be a vertex of an undirected graph, the degree of v, denoted by d(v), is the number of edges that connects v to the other vertices in a graph. The degree of a graph cannot be negative. Out degree : If v is a vertex of a directed graph, then the out degree of v, denoted by d (v), is the number of edges of the graph that initiate V In degree : The indegree of v, denoted by indeg (v), is the number of edges that terminate of v. e.g. Consider the graph, we see that the degrees of A, B, C and D are 3, 3, 5 and 3 respectively.

Q. 5. What are the conditions to make two graph isomorphic? Or Define isomorphic Graphs? Sol. Two graphs G = [V1. E1] and C2 = [V2, E2] are called isomorphic graphs if there is a one-to-one correspondence between their vertices and between their edges i.e. the graphs have identical representation except that vertices may have different labels. Two groups G1 and G2 are said to be isomorphic if there exist a function f:

such that
1. 2.

f is one-one and onto f preserves adjancies i.e.

1.

f preserves non-ad jancies

The function f is called isomorphism between G1 and G2 (i.e. between G1 and G2). Note : Two graphs are isomorphic, will have 1. Same number of vertices. 2. Same number of edges 3. An equal number of vertices with given degree. e.g.

These are isomorphic graphs.

Q. 6. Define the following terms (a) Finite multigraph (b) Trivial graph Sol. Finite multigraph : A multigraph is said to be finite if it has a finite number of vertices and a finite number of edges; Trivial Graph : The finite graph with one vertex and no edge i.e. a single point is called a trivial graph.

Q. 7. The sum of the degrees of the vertices of a undirected graph G is twice the number of edges in G. Or Let G IV, E] be an undirected graph with e edges, then

Sol. If the edge e is a self loop at node x, it is counted twice in deg (x). If e is an edge with distinct end nodes x and y, it is also counted twice, once in degree (x) and again in deg (y). The sum of the degrees of all vertices is equal to twice the number of edges in C.

Q. 8. Define the following terms: (d)Cut point (a) Connected graph (b) Diameter of a connected graph (c) Complete graph Sol. (a) Connected Graph : A graph is connected if there is a path from vertex u to v or vice-versa. If there is no path between any of its vertices are called disconnected graph. (b) Diameter of a connected Graph : Let G be a connected graph. The distance between vertices u and v in G written as d (u, v); is the length of the shortest path between u and v. The diameter of G written as diag (G), is the maximum distance between any two points in G.

(c) Complete Graph: A complete graph is a graph with the property that between any two distinct vertices there is exactly one edge. (d) Cut-point : be a connected graph. If v be a vertex of G such that C-v is not connected then we call vertex v as a cut vertex. The subgraph G-v is obtained by deleting the vertex v from the Graph G and also deleting all the edges incident on v.

In given Fig., v is a cut vertex of C.

Q. 9. Define the following: 1. Subgraph 2. Spanning-subgraph Sol. Subgraph: A Subgraph of graph G = (V. E) is a graph C = (V1 E) in which V V and E E and each edge of G has the same end vertices in G as in graph G. That is C is a subgraph of G, if 1. All the vertices of G are in G. 2. All the edges of C are inC and 3. Each edge of C has same end vertices in G as in G. Note : Graph C is itself a subgraph of G. Spanning Subgraph: A graph G1 = (V1. E1) is called a spanning sub graph of C = (V. F) if G1 contains all the vertices of G and e.g.

Q. 10. Differentiate between path and circuit. Sol. Path: A path of length n is a sequence of (n + 1) vertices of a graph in which each pair of vertices is an edge of the graph. The path is called simple one if no edge is repeated in the path i.e., all the vertices are distinct except that first vertex equal to last vertex. If first vertex equal to last vertex then path is called a closed path and if first vertex not equal to last vertex then path is called an open path. If p is a path in a graph G then clearly

1. 2. 3.

i.e. number of vertices in P is a subset of number of vertices in C. i.e. number of edges in P is a subset of number Of edges in G. i.e.number of vertices in P lies between l and

n + 1 and number of edges in P lies between 1 and n. Circuit: If G = [V. E] be a graph, then a path is a cycle (circuit) which originates and ends in the same vertex. It is simple if its path is simple. Incircuit no. edge occurs more than once in the path. Note: 1. A self loop is also a circuit, but converse is not true 2. The degree of every vertex in a circuit is 2. e.g. In the graph of fig.

Q. 11. What properties a graph must have to call as strongly connected graph? Sol. Strongly connected graph: A directed graph is called strongly connected if there is a directed path from any node u to v and vice-versa, for any pair of nodes of the graph.

In other words, two vertices u and v are strongly connected, if there is a path from u and v and v and u. That is if they are connected in both directions to one another and graph is strongly connected if every pair of its vertices is strongly connected.

Q. 12. Define weekly connected? Sol. Weekly Connected : A weekly connected graph is a directed graph, if its undirected graph is connected i.e. the graph obtained after neglecting the direction.

Q. 13. Define the following (a) Chromatic number (b) Chromatic number of chromatic polynomial. Sol. Chromatic Number The minimum number of colours needed to produce a proper colouring of a graph is called chromatic number of G and is denoted by (G).

In the following figure minimum 3-.colourable. Hence Similarly, for the complex graph K6, we need 6 colours to colur K6. Since every vertex is adjacent to every other vertex and we need a different colour for each vertex. Therefore Chromatic Polynomial : The problems of computing (G) is the problem of computing the total number of different proper colouring of a graph C using a set Let G be a graph and x 0 is an integer. Let P (x) be the number of ways to properly colour G using x or fewer colours, as P (x) is a definite number for each x, we see that PG is a function. That is P is a polynomial in x. We call P the chromatic polynomial in G.

Q. 14. Define Planner Graphs? Sol. Planar Graph : A graph is said to be planar if it can be drawn in the plane with no intersecting edges. That is a graph G is said to be planar if it can be drawn on a plane without crossovers and A graph G that cannot be drawn on a plane without cross over between its edges is called non-planar graph.

Q. 14. Show that following graphs are planar.

Sol.

Q. 15. State Eulers formula for connected planar Graph. Sol. Let C (V. E, R) be a planar graph with V, E and R be number of vertices, edges and region, respectively then V - E + R = 2.

Q. 16. Define the following (a) Eulerian Path (b) Eulerian circiuts (c) Eulerian Graphs Sol. Eulerian Path : An Eulerian path through a graph is a path whose edge list contains each edge of the graph exactly once. Eulerian Circuit: An Euler circuit is a path through a graph, in which the initial vertex appears 2nd time as the terminal vcrtex. Eulerian Graph: A graph C is called Eulerian graph which possesses an Euler circuit. Euler circuit uses every edge exactly once but vertices may be repeated.

Q. 17. In the following graph the Euler Path is:

(i) abcdef (ii) abcf

(iii) ftlceah (iv) fdeabc Sol. (iii) fdceah.

Q. 18. Write short Note on (a) Hamiltonian graphs (b) Hamiltonian path (c) Hamiltonian circuit. (d) Hamiltonian chain Sol. (a) Hamiltonian graph : A Hamiltonian graph is a graph that possesses a Hamiltonia path. A Hamiltonian path uses each vertex exactly once but edges may not be included. (b) Hamiltonian Path: A Hamiltonian path through a graph is a path whose vertex list contain each vertex of the graph exactly once, except if path is a circuit. (c) Hamiltonian Circuit: A Harniltonian circuit is a path in which the initial vertex appears a second time as the terminal vertex. (d) Hamiltonian Chain : It is a path through a graph whose vertex list contains each vertex exactly once.

Q. 19. Give an example of a graph which has an Euler circuit but not Hamilton circuit. Also discuss converse with example. Give an example of a graph that has neither an Euler nor Hamiltonian circuit. Sol. An Euler circuit but not Hamiltonian

The Euler circuit V1. V5. V2, V5, V3, V4, V6. V3. V2, V1. There is no Hamiltonian circuit A Hamiltonian circuit but not Eulerian circuit

Hamiltonian circuit is a, b, d, c, a. There is no Euler path. Neither Euler nor Hamiltonian circuit

It has neither Euler circuit nor Hamiltonian circui

Q. 20. Prove that there is always a Hamiltonian path in a directed complete graph ? Sol. Directed complete graph A simple directed graph in which there exist an edge between every pair of vertices is called a directed complete graph. The path W = v, e10, v5, e6, v6, e9, v2, 2 v7, e, v8, e, v4, is a Hamiltonian path and it is calle a directed complete graph.

Q. 21. What is the minimum number of vertices necessary for a graph with six edges to be planar, with eleven edges. Sol. Here

[SHORT ANSWER TYPE QUESTIONS]

Q. 1. Suppose a graph G contains two distinct parts from a vertex u to a vertex v. Show that G has a cycle. Sol. Consider two distinct path from u to e be

Now delete from the paths P1 and P2. all the initial edges, v art identical i.e. of we have We will delete the all first k edges of both the paths P1 and P2. Now, after delecting the K edges be!h the paths start from the same vertex, (Let u1) and ends at v. Now, to construct a Je. start trom vertex u, and follow the left over path of P1 until we first meet any vertex of the left over path of P2. If this vertex is u2, then the remaining cycle is computed by following the left over path of 2 which starts from u2 and ends at v.

Q. 2. State and prove Eulers Theorem. Sol. Statement Let be a connected graph and Let R be the number of regions defined by any planar depiction of C. Then we have Proof. We prove the result by induction on number of regions determined by C. We first prove the result for K = 1 A tree determines above region.

Let us assume that result is true for all Let C be a connected plane group determining regions. Remove an edge which is common to the boundary of two regions we obtain a graph G. If V, E, R denotes number of vertices, number of edges and regions of C rep. then

Q. 3. If a graph C has more than two vertices odd degree, then prove that there is no Euler path in G. Sol. Let V1, V2, V3 be vertices of odd degree. Any possible Euler path must leave (or arrive at) each of V1, V2. V3 with no. way to return (or leave) since each of these vertices has odd degree. One vertex of these three vertices has odd degree. One vetex of these three vertices may be the beginning of the Euler path and another the end, but this leaves the third vertex at end of an untravelled edge. Thus there is no Euler path.

Q. 4. If G is a connected graph and has Exactly two vertices of odd degree, there is an Euler path in G. Any Euler path in G must begin at vertex of odd degree and ends at other. Sol. Let C has two vertices V1 and V2 of odd degree. By adding the edge [V1, V2] to G we can produce a connected graph say C all of whose vertices are of even degree. As G, is a connected graph and every vertex of G has even degree so we can determine an Euler circuit C in G. Removing the edge [V1. V2] from the circuit C, produces an Euler path that begins at V1 (or V2) and ends at V2 (or V1).

Q. 5. An undirected graph possesses Eulerian path if it is connected and has either zero or two vertices of odd degree. Give suitable example. Sol. Let the undirected graph possesses an Eulerian path. Then, by definition, the graph must be connected. Now, since the graph has Eulerian path, it means that every time the path meets a vertex, it goes through two edges which are incident with the vertex and have not been traced before. Ihus, except for the two vertices at the ends of the path, the degree of all other vertices in the graph must be even. When the two vertices at the ends of the Eulerian path are distinct, then there are only two vertices with odd degree. Converse : Let the undirected graph is connected and two of its vertices are of odd degree.

To Show : Graph C possesses an Eulerian path. Since the graph is connected, so no edge of the graph will be traced more than once. For a vertex of even degree, when the path enters the vertex through an edge, it can always leave the vertex through another edge that has not been traced before. Iherefore, when the construction is completed, we must have reached the other vertex of odd degree. Tracing all the edges in this way, we will get an Eulerian path. If not all of the edges in the graph were traced, we shall remove those edges that have been traced and obtained a subgraph formed by remaining edges. The degree of the vertices of this subgraph will be even. Starting from one of these vertices, we can again construct a path that passes through the edges. Because the degrees of the vertices are all even, this path must return to the vertex at which it starts. Combining this path with the path we have constructed to obtain one which starts and ends at the two vertices of odd degree, the path so obtained is Eulerian path. For Example, consider the graph as shown below:

This graph has only two vertices of odd degree (by above theorem), it has an Eulerian path.

Q. 6. An undirected graph possesses an Eulerian circuit iff it is connected and its vertices are all of even dLrce. Prove that with the help of suitable example. Sol. Let the u ndirected graph OSSCS an Eulerian circuit. Then, by definition, the graph must he conne ted. Now since the graph has Eulerian circuit, it means that every time the graph nwe1 a erte\, it goes through edges which are incident with the vertex and have not been ltaud helore. ihus, the degree of all vertices in the graph must be even. Converse let the undiiected graph is connected and all its vertices are of even degree. We shov ha the i api possesses an Eulerian circuit. Since the graph is connected, no edge wIll be traced more than once. As all the vertices are of even degree, whenever the circuit, cntcrd the vetv through an edge, it can always leave the vertex through another edge that has not been traced before and also the circuit must return to the vertex at which it starts. I lence the circuit is an Eulerian circuit. E.g Consider the graph given below

Ihe graph is conner ted and all the vertices are of even degree. Therefore, it has an Eulerian circuit.

Q. 7. State and rmve Fuleria theorem on graph to show that konigs bergs graph is not proved to a solution. Sol. The word Konigs berg is the name a town, situated on the bank of river, pregel in Germany. This city has seven briges. L. Euler, the father of graph theory, proved that it was not possible to cross each of the seven bridges once and only once in a walking tour. Euler replaced the islands and the two sides of the river by points and the bridges by curves as shown in Fig. II. Fig II is a multigraph. A multigraph is said to be traversable if it can be drawn with any breaks in the curve and without repeating any edges i.e. if there is path which includes all vertices and uses each edge exactly once and such a path is called traversable trial.

According to Euler, the walk in Konigs berg is possible if the multigraph in Fig. 2 is traversable. But Euler proved that the multigraph in Fig. 2 is not traversable and hence the walk in konigsberg is impossible. We prove it. We know that a vertex is even or odd according as its degree is even or odd. Suppose a multigraph is traversable and that a traversable trial does not begin or end at a vertex, say P, we claim that P is an even vertex. For whenever the traversable trials enters P by an edge, there must always be an edge not previously used by which the trial can leave P. Thus, the edges in the trial incident with P must appear in pairs and so P is an even vertex. F urther, if a vertex Q, is odd the traversable trial must begin or ends at Q. Hence, a multigraph with more then two odd vertices cannot he traversable. Now the multigraph corresponding to the Konigsberg bridge has four odd vertices.

Thus, one cannot walk through Kongisberg so that each bridge is crossed exactly once. Euler actually proved the converse of the above statement, which is contained in the following theorem, called Euler theorem.

Q. 8. Using either breadth first search aigz. m or Dijkstrass a1gorithem find the shortest path from s to tin the following weghd graph.

Sol. Let S be the set of vertices of the given weighted shown in Fig. below. graph i.e. S {s, a, b, c, d, t) as

Step I. Include the vertex s in S and eterm ne all the direct paths from to all other vertices without going through any other vertex

Step II. Include the vertex in S which is nearest to s and determine shortest paths to all vertices through this vertex and update the values. The nearest vertex is C.

Step III. The vertex which is 2 nearest t. s is a. Include this vertex in S.

Step IV. The vertex which is 3rd nearest to s is h. Include this vertex in S.

Step V. The vertex which is next nearest to S is (d). Include this vertex in S.

Since n - 1 = S vertices are included in S. Hence we have found the shortest distance from s to all other vertices. Thus, the shortest distance between s and t is 63 and the shortest path is s;a, b, t.

Important Expected Questions

Q. 1. Define the following terms (a) Mixed Graph (b) Finite Graph (c) Linear Graph (d) Discrete or Null Graph Sol. Mixed Graph: A graph C = [V, E] in which some edges are directed and some are undirected is called a mixed graph. The graph shown in Fig. I is a mixed graph. Finite Graph: A Graph C = [V, E] is said to be finite if V and E are finite sets. Linear Graph : A graph G = [V1 El is said to be a linear graph, if its edges joining vertices lie along a line. Discrete or Null Graph: A graph containing only vertices and no edge is called a discrete or null graph. The set E of edges in a graph G [V. E] is empty in a discrete graph. Also each vertex in a discrete graph is an isolated vertex.

Q. 2. Show that the sum of degree of all the vertices in a graph G, is even. Or The sum of the degrees of the vertices of a graph G is equal to twice the no. of edges in G. Sol. Each edge contribute two degrees in a graph. Also each edge contributes one degree to each of the vertices on which it is incident. Hence, if there are N edges in C, then we have

Q. 3. Prove that in any graph, there are an even number of vertices of odd degree. Sol. Consider a graph having vertices of degree even and odd. Now, make two groups of vertices. One with even degree of vertices v1, v2 ,Vk and other with odd degree of. vertices U1, U2, ....u

Now we know that sum of degree of all the vertices is even so, U + V is even

Since, V is sum of k even numbers. Hence, it is even. But U is sum of n odd numbers. So, to be U an even number, n must be even. Hence proved.

Q. 4. A graph G has 21 edges, 3 vertices of degree 4 and other vertices are of degree 3. Find the number of vertices in G. Sol. let n be the number of vertices in C. Since, sum of degree of all vertices is equal to twice the number of edges i.e.

Q. 5. Show that the maximum number of edges in graph with ii vertices and no multiple edges are

Sol. Let n be the number of vertices of a graph C.

Q. 6. Prove that in a simple graph with n vertices, each vertex has maximum degree (n1). Sol. A simple graph is a graph without parallel edges or self loops. If G = [V, F] is a simple graph with only one vertex, then number of edges in C is :. maximum degree of a vertex in G = I I = 0 If G = [V. F] he a simple graph with 2 vertices, then number of edges in G is I and therefore degree of each vertex is (21). and so on If C = [V F] he a simple graph with n vertices, then maximum degree of each vertex = n-1.

Q. 7. A graph C has a Hamilton circuit if

where 11 is the number of vertices and e the number of edges in C. Sol. Let if possible, the graph C is non-Hamilton and we show

The converse of above theorem, however, is not true.

Q. 8. A planar and connected graph has a vertex of degree less on equal to 5. Sol. Let C be connected and planar and suppose, if possible degree of each vertex

Sectionll (Trees)

Q. 1. Prove that A tree with n vertices has 11 1 edges? Sol. Because a tree is connected, there must at least 11 1 edges to connect the n vertices. Suppose that there are more than it 1. Then either the root has in degree I or some other vertex has in-degree at least 2. Which is impossible. Thus there are exactly i-i 1 edges.

Q. 2. Define the following terms: (1) Complete Binary tree (2) Binary search tree Sol. Complete Binary tree : Complete binary tree is a binary tree if all its levels, except possibly the least, have the maximum number of possible nodes as for left as possible. The depth of complete binary tree having it nodes is log2 ii + i. For example : The tree given below is a complete binary tree.

Binary Search Tree : Binary search trees has the property that the node to the left contains a smaller value than the node pointing to it and the node to the right contains a larger value then the node pointing to it. It is not necessary that a node in a binary search tree point to the nodes whose values immediately precede and follow it.

Q. 3. What are the properties of minimum spanning tree. Sol. A minimum spanning tree T of a laph C is a tree whose total weight is the smallest among all the spanning trees of the graph C. It has following properties. 1 The total weight of spanning tree is the sum of the weights of the edges of the spanning trees. 2. The minimum weight of the spanning tree is unique. a tree.

Q. 1. Let T be a binary tree with ii vertices. Determine the number of leaf nodes in Sol. We shall prove it by induction.

Hence the result.

Q. 2. Define a rooted tree with an example and show how it may be viewed as directed graph. Ans. Rooted tree: We first define the term directed tree. A directed graph is said to be a directed tree if it becomes a tree when the directions of the edges are ignored.

A directed tree is called a rooted tree if there is exactly one vertex whose incoming degree is 0 and incoming degree of all other vertices are 1. The vertex with incoming degree 0 is called the roots of the rooted tree.

In a rooted tree, a vertex whose outgoing degree is 0 is called a. leaf or a terminal node and a vertex whose out going degree is non-zero, is called a branch node or internal node. Rooted tree may be viewed as directed graph : We know that a tree is a graph which is connected and without any cycles. A rooted tree T is a tree with a designated vertex r, called the root of the tree. Since there is a unique simple path from the root r to any other vertex a in 1, this determines a direction to the edge of T. Thus T may be viewed as a directed graph.

Q. 3. Prove that a simple graph is connected if it has a unique spanning tree. Sol. First, SUOSC that a simple graph G has a spanning tree T. T contains every vertex of C. let a and b he the vertices of G. Since a and h are also vertices of T and T is a tree, there is a path P between a and h. Since T is subgraph, P also serves as path between a and 17 in C. Hence C is connected. Conversely, Suppose that C is connected, if G is not a tree, it must contain a simple circuit. Remove an edge from one of these simple circuits. The resulting subgraph has one fewer edge hut still contains all the vertices of G and is connected. If this subgraph is not, a tree, it has a simple circuit, so as before, remove an edge that is in a simple circuit. Repeat this process until no simple circuit remain. This is possible because there are only a finite number of edges in the graph, the process terminates when no simple circui remain. Thus, we eventually produce an a cycle sub graph T which is a tree. The tree is spanning tree since it contain every vertex of G.

Q. 4. Suppose S people enter a Badminton tournament use a rooted tree model of tournament to determine how many games must be played to determine a champian if a player is eliminated after one loss. Sol. We can show if there are n people enter in a Badminton tournament, then there are (ii 1) matches to he played. Number of people = 8. So there are 8 people enter in a Badminton tournament, then there are (8 1) = 7 matches to he played. Here number of rooted tree and no. of match to be played is same as the no. of internal vertices.

Q.5 . What is minimum spanning tree of a graph ? Write down Prims and Kruskals algorithms and execute them by taking a suitable example. Sol. Minimum Spanning tree : Consider a connected weight graph C (V. F). A minimal spanning tree T of the graph C is a tree whose total weight is smallest among all the spanning trees of the graph C. The total weight of the spanning trees is the sum of the weights of the edges of the spanning trees. The minimum weight of the spanning tree is unique but the spanning tree may not be unique because more than one spanning tree are possible when more than one edges exist having the same weight. Algorithm for minimal spanning Trees There are several methods available for actually finding a minimal spanning tree in a graph. Two algorithm due to prim and kruskal for finding a minimal spanning tree for a connected weighted graph where no - weight is negative. These algorithms are example of greedy algorithms. A greedy algorithm is a procedure that makes an optimal choice at each of its steps without regard to previous choices, Prims Algorithm Initially the algorithm starting at a designated vertex chooses an

edge with minimum weight and considers this edge and associated vertices as part of the desired tree. Then iterate, looking for an edge with minimum weight not yet selected that has one of its nodes in the tree while the other node is not. The process terminates when n I edges have been selected from a graph of n nodes to form a minimal spanning tree. The algorithm involves the following steps. Input: A connected weighted graph C. Output: A minimal spanning tree 1. Step I. Select any vertex in C. Among all the edges incident with the selected vertex, choose an edge of minimum weight. Include it in T. Step II. At each stage, choose an edge of smallest weight joining a vertex already included in T and a vertex not yet included if it does not form a circuit with the edges in T include it in T. Step III. Repeat until all the vertices in G are included. e.g. Find the minimal spanning tree of the weighted graph of fig. I using Prisms algorithm. Kruskals Algorithm : This algorithm provides an acyclic subgraph T of a connected weighted graph C which is a minimal spanning tree of G. The algorithm involves the following steps: Input: A connected weighted graph C Output: A minimal spanning tree T. Step I. List all the edges (Which do not form a loop) of C which are non-decreasing order of their weights Step Ii. Select an edge of minimum weight (if more than one edge of minimum weight, arbitrarily choose one of them). This the first edge of T. Step III. At each stage, select an edge of minimum weight from all the remaining edges of G if it does not form a circuit with the previously selected edges in T. Add the edge to T Step IV. Repeat step 3 until n 1 edges have been selected, when n is the number of vertices in G. The following examples illustrate these steps e.g. Show how Kruskals algorithm find a minimal spanning tree for the graph of fig. given below Step I. List the edges in non-decreasing orders of their weights.

Step II. Select the edge (b, c) since it has the smallest weight, include it in T. Step III. Select an edge with the next smallest weight (c, e) since it does not form circuit with the existing edges in T. So include it in T.

Step IV. Select an edge with the next smallest weight (c, d) since it does not form circuit with the existing edges in T, so include it in T

Step 5. Select an edge with the next smallest weight (a, b) since it does not form circuit with the existing edges in T. So include it in T.

Since G contain 5 vertices and we have chosen 4 edges, we stop the algorithm and the minimal spanning tree is produced.

Chapter 2 : Combinational Mathematics


Q. 1. Define Basic principle of counting? Explain, Sol. Basic principle of counting: If we have to perform n operations, and there are n different ways to perform 1 operation, n2 different ways to perform 2 operation and soon then number of ways to perform n operations will be n1xn2x x n. This is known as Basic counting Principle. There are mainly two counting principles namely (i) Sum Rule (ii) Product Rule. Sum Rule : Suppose some event E can occur in iii ways and a second event F can occur in n ways, and suppose both events cannot occur simultaneously. Then E or F can occur in m + n ways. Mathematically, If E and F are disjoint sets then

more generally, suppose an event E1 can occur in .n1 ways, a second event E2 can occur in n2 ways, a yd event E3 can occur in n3 ways and suppose no two of the events can occur at the same time, then one of the event can occur in n1 + + + ways.

Product Rule (Principle of Association) Suppose there is an eventE which can occur in rn ways and independent to this event there is a second event F which can occur in n ways. Then combinations of E and F can occur in rnn ways. Mathematically, Let E x F be carterisan product of sets E and F, then n(ExF)=n(E).n(F)

Q. 2. Define the following terms (a) Permutation (b) combination Sol. Permutation: A permutation is an arrangement of a number of objects in some definite order taken some or all at a time. The total number of permutations of n distinct objects taken r at a time is denoted by

Combination: A combination is a selection of some or all, objects from a set of given objects, where order of the objects does not matter. The number of combinations of n objects, takes r at a time is represented by

Q. 3. What is a circular permutation of n objects and how many are there? Sol. Circular permutation : The circular permutation are the permutations of the object placed in a circle. Therefore, there is no starting and ending in the circular permutation. We only consider the relative positions. When persons are sitting around a circular table, then there is not first and last person. Let us fix this position of one person. The remaining (nfl persons can be arranged in the remaining (ni) places in 1P,,1 ways i.e (nI) ways.

Q. 4. How many 4-digit numbers have one or more repeated digits? Sol. For a four digit number, unit place can be filled in 10 ways, tens place can be filled in 10 ways, hundreds place can be filled in 10 ways and Thousands place can be filled in 9 ways. [.. As first digit can not be zero] Total 4 digit numbers 10x10x10x9 = 9000 Total 4 digit numbers without any repetition =9x9x8x7 =4536 Total no. of 4 digit number with repeated digit 9000-4536 = 4464 Ans.

Q. 5. In how many ways can a president and vice president be choosen from a state of 30 candidates? Sol. Two candidates one is president and other is vice-president can be choosen out of 30 candidates Then No. of ways for choosing president and vice president are

870 Ans.

Q. 6. Automobile license plates in Massa chusetts usually consists of 3 digits followed by 3 letters. The first digit is never zero. How many different plates of this type could be made. Sol. Consider the digits 0, 1, 2 , 9. These are 10 digits. Since first digit of

License plate is non-zero. First place can be filled up in 9 ways. Similarly 2nd place can be filled up in 10 ways. and 3 places can be filled up in 10 ways. Required No. of using the digits = 9x10x10 = 9000. Again, there are 26 Alphabets. 1 place can be filled up in 26 ways 2 place can be filled up in 26 ways 3rd place can be filled up in 26 ways Required number of using the English Alphabets = 26x26x26 = 17576 By product rule, total Number of making the plate = 900x17576 = 15818400 Ans. 15818400 Ans.

Q. 7. Find the number of permutations that can be formed from the letter ELEVtN. TTjW many of them begin and end with E. How many of these have the three Es together. Sol. Total No. of letter are 6 have three Es Therefore, Required No. of ways

1.

The first and last places are occupied by E i.e.

(2) Take three Es one word. Total No. of words = 4. [FEE L V N] Req. No. of ways =4!= 24Ans.

Q. 8. State Principle of Inclusive and Exclusive? Sol. Let A and B be any finite sets, then lhis principle holds for any number of sets. In other words, to find the number of elements in the union AUB, we add n (A) and n (B) & then we subtract i.e. we include n (A) & n (B) and we exclude principle is known as Inclusion-Exclusion principle. Let P and Q be any two non-disjoint sets. Then . This

Q. 9. How many subsets of { 1, 2 , 9) contains at least 5 elements. Sol. Let A = {1, 2 , 9) i.e. A has 9 elements. There are the 9 elements of the given set. There are Subsets each consisting of 5 of

subsets each consisting of 6 of the 9 elements of the given set.

There are Subsets each consisting of all the 9 elements of the given set. Total number of Subsets containing at Least 5 elements.

(SHORT ANSWER TYPE QUESTIONS)

Q. 1. How many words can be obtained by arranging the letters of the word UNIVERSAL in different ways. In how many of them (a) E, R, S occur together (b) No two of the letters F, R, S occur together? Sol. There are 9 Letters in the word UNIVERSAL which can be arranged among in 9! Ways.

1.

As E, R, S occur together taking ERS as one letter, we can arrange seven Letters in 7! ways and three Letters E, R, S can be arranged among themselves in 3P3 = 3! ways.

By Product Rule, required Number of words when F, R, S occur together =7! x3! 31240Ans. (ii) Since no two of E, R, S occur together. We first place six Letters U, N, I, V, A, L in = 6! Ways

Now we place three Letters at place marked X so that No two F, R, S occur together. We can place these three Letters at 7 places in

Required no. of ways =6! x2106 x5 x4 x3 x2 x1 x210 = 30 x 24 x 210 151200 Ans.

Q. 2. Suppose that there are n people in room, n>=1 and they all shake hands with one another. Show that n (n 1)/2 hands shaken will have occured. Sol. When two persons shake hand, it is counted as one hand Shake. Total Number of hand Shakes = Number of ways of choosing 2 persons from

Q. 3. In a class of 60 boys, 45 boys play cards and 30 play carrom. How many boys play both games. How many play cards ony and how many plays carrom only? Sol. Let n (A) denotes Number of boys who play cards Let n (B) denotes number of boys who play carrom. n(A)= 45 & n(B)=30 n (AUB) =60 Since n (AUB) = n (A) + n (B) =45+3060=15 There are 15 boys who play both games. Since ,

No. of boys who play cards only =

Q. 4. Find the number of Subsets of a set S containing n elements? Sol. There are nC1 subsets each consisting of one of the n elements of the given set S. There will be nC2 subsets each consisting of any two of the n elements of the given set S.

At last there will be nCn subsets each consisting of all n elements of given set S. Also, there will be one set Hence, total No. of subsets are =

Q. 5. A set contains (2n+1) elements. If the number of subsets of this set which contain at most n elements is 8192. Find the value of n. Sol. Let A Set containing (2n + 1) elements. Number of Subset of A which contains at most n elements. We know that

Q. 6. In a group of 70 people, 37 like coffee, 52 like tea arid each person likes at least one of the drinks. How many like both coffee and tea? Sol. ii (A) denotes for no. of person like coffee ii (B) denotes for no. of person like Tea. o (A) = 37 & n (B) = 52 O (AUB) = 70 We know

19 people like both coffee and lea. Ans.

Q. 7. Suppose that 100 out of 120 mathematics students at a college take atleast one of the language French, German and Russian. Also suppose 65 study French, 45 study German, 42 Study Russian, 20 study French & German, 25 study French & Russian, 15 study German & Russian. Find the number of students studying all subjects. Also find the number of students studying taking exactly one subject. Sol. n (F) denotes no. of students study French o (C) German o (R) Russian

:. No. of Students studying all three langauges = 8 Ans.

Q. 8. Prove that Sol . We know

Hence Proved.

Q. 9. Suppose that an urn contains 15 balls of which 8 are Red & 7 are Black In how many ways can 5 balls to be choosen so that 2 are red and 3 are Black. Sol, Total Number of Balls = 15 Number of Red Balls 8 Number of Black Balls = 7

Q. 10. If A and B are disjoint sets such that AUB finite, then n(AUB) = n(A) + n(B) Sol. In counting the element of AUB, we first count those elements which are in A. 1 hese are n (A). The only other elements of AUB are those elements which are in B, but not in A. Since given that A and B are disjoint No element of B is in A Hence there are n (B) elements which are in B. n (AUB) = n (A) + n (B) (AUB)

Q. 11. In how many ways can 5 Gentleman & 5 ladies be seated round a table so that no two ladies are together. Sol. Let us first seat 5 gentlemen on the round table M1, M2, M3, M4, M5 and this can be done in (n 1)! (51)!4! =24 ways

Since no two Ladies are to sit together, they occupy the places marked as L1, L2, L3, L4, L5 4 Ladies can be arranged in 5 places in 5C4 = 120 ways. Required No. of ways = 24 x 120 = 2880 Ans.

Q. 12. Find the least number of cables required to connect 100 computers to 20 printers to guarantee that 20 computers can directly access 20 different printers. Justify your Answer. Sol. Here Printer are Pigeonholes i.e. m = 20 and computers are pigeon i.e. n = 100 By extended principle of pigeonholes, one of the pigeonhole must contain atleast

pigeons.

Least no. of cables required = 5 Ans.

Important Expected Questions

Q. 1. Define Extended pigeonhole principle. Sol. Extended pigeonhole Principle: If n pigeons are assigned to m pigeonholes where n is sufficiently large as compared to m, then one of the pigeonhole must contain

at least

pigeons.

Q. 2. Show that if 9 colours are used to paint 1000 houses, at least 112 houses will be of the same order. Sol. We denote the no. of given houses by n and no. of colours by m i.e. n =1000, m=9 ie there are n pigeons and m pigeonholes. using extended pigeonhole principle

Q. 3. Show that at least two people must have their birthday in the same month if 13 people are assembled in a room. Sol. Let each person be assigned the month of the year on which he has born. As there are 12 months in a year By pigeonhole principle, There must be at Least two people assigned to the same month.

Q. 4. How many 6-digit numbers can be formed from the digits 0, 1, 2 , 6,7, if

no digit is repeated. Sol. Out of 8 Numbers, 6 to be selected. Total number of 6-digit Numbers =

Q. 5. How many permutations can be made out of the letter of word COMPUTER. How many of these (i) begin with C and ends with R (ii) C and R occupy the end places. Sol. There are 8 Letters in the word COMPUIER and all are distinct. Total No. of permutations = 8 ! = 40320 (i)Permutation begin with C and ends with R : lhe first position can be filled in only one way i.e., C and the last place can he filled in only one way ie R and Remaining 6 letters can be arranged in 6 ! ways. The total number of permutations begin with C and ends with R is = 1 x 6! x 1 720 Ans. (ii)Permutations in which C and R occupy end places : C and R occupy end positions in 21 ways ie C,R and R,Cand the remaining 6 letters can be arranged in 6! ways. The total number of permutations in which C and R occupy end places is 2! x 6! = 1440 Ans.

Q. 6. How many 16-bit strings are there containing exactly five os? Sol. A 16-bit string having exactly five zeros is determined if we tell which bits are zeros. This can be done in Therefore, the total number of 16-bit string is =

Q. 7. Define pigeonhole Principle? Sol. Pigeonhole Principle : if n pigeons are assigned to in pigenholes and m<n, then there exist at least one pigeonhole that contains two or more pigeons.

Q. 9. 40 Computer programmers interviewed for a job. 25 knew JAVA, 28 knew ORACLE and 7 knew neither Language. How many knew both Languages?

Sol. Let J denote for JAVA and 0 denote for ORACLE n (J) = 25 n (O) = 28 n (JUO) = 40-7= 33

20 knew both Languages.

Sectionll (Recurrence Relations and Generating Functions)

Q. 1. Define Recurrence Relation? Sol. Recurrence Relation : Let S be a sequence of numbers. A recurrence relation on S is a formula that relates all, but a finite number of terms of s, to previous terms of s. A sequence is called as a solutioi of a recurrence relation if its terms satisfy the recurrence relation. Recurrence relations arealso called difference equation. Recurrence relations are used to model variety of problems. Few problems are inherently recursive, viz., Towers of Hanoi, divide and computer compound interest, conquer algorithms etc.

Q. 2. Define Linear recurrence Relation? Sol. Linear Recurrence Relation : A recurrence relation with degree one is called Linear recurrence relation. e.g. S (K) 2 S (Ki) 0 is Linear recurrence relation. Linear recurrence relation of order ii with constant coefficients : The general linear recurrence relation of order n with constant coefficients, is given by Where C1, C2.. Cn are constants. Homogeneous Linear Recurrence relation of order n : A homogeneous Linear recurrence relation of order n is an equation of the form Characteristic Equation : The Characteristic equation of (1) is

Q. 1. Solve the recurrence relation :

given that

Sol. Given recurrence relation can be written as S(r)7S(r1) + 10S(r2) =0 (1) Where S (0) = 0 and S (1) = 3 Its order = r - (r- 2) = 2 The characteristic equation is

Therefore, the homogeneous solution of the equation (2) Using,

Using,

Solving equations (3) and (4), for the value of

Then putting the value of c1 and c2 in (2), we get

Q. 2. Solve the recurrence relation

Sol. Given recurrence relation can be written as

Its characteristic equation is

The solution of equation (1) is

using S (0) = 1, then equation (2) becomes

Also using S (1) =2, then n =(2) becomes

Q. 3. Solve the recurrence relation

Sol. Given equation is

Given recurrence relation can be written as

Its characteristic equation is

a = 2,4 Solution is given by

Q. 4. Discuss an algorithm on solving flth order linear homogeneous recurrence relation? Sol. Consider the linear homogenous recurrence relation of order n is

Step II: Find the roots of the characteristic equation obtained in Step I.

Q. 3. Find a close form expression (generating function) for the terms of Fibonacci sequence. Sol. Consider the Fibonacci sequence F (K), given by F(K) = F(K-1) + F(K-2) ; K<=2 Where F (0)= 1, F (1)= 1

Its order = K - (K-2) -2

is the required generating function for the fibonacci sequence.

Chapter 3 : Sets and Functions (Part 1)

[VERY SHORT ANSWER TYPE QUESTION]

Q. 1. Define following terms (a) Set (b) Power set (c) Union and Inter section of two sets (d) Complement of a set (e) Symmetric difference of two sets Sol. (a) Set: A set is defined as a collection of distinct objects of same type or class of objects. The objects of a set are called element or members of the set. Objects can be number, alphabets, names etc. Eg. A = {1,2,3,4,5} A is a set of numbers containing element 1, 2,3, 4 and 5. (b) Power set : The power set of any given set A is the set of all subsets of A and is denoted by P(A). If A has n elements then P(A) has elements.

(c) Union of two sets: Union of two sets A and B is defined as the set of all those elements which belongs to A or B or both and is denoted by AUB. i.e., AUB = {x:x A or x B} eg. Let A ={a, b, c, d) and B={c, d, e, f} Then AUB ={a, b, c, d, e ,f }

Intersection of two sets: Intersection of two sets A and B is the set of all those elements which belongs to both A and B and is denoted by

(d) Complement of a set : Let U be universal set and A be its subset of all those element of U which do not belong to A, is called complement of A and is written as

Symbolically, if and is called complement of A. (e) Difference of two sets : The difference of two sets A and B is the set of all those elements of A which do not belong to B and is denoted by A - B.

Symbolically,

The shaded area in Venns diagram represents A B. (f) Symmetric Difference of two sets : The set which contains the elements of either set A or set B but does not contain those elements which occur in both A and B is called symmetric difference of two sets A and B.

The symmetric difference of two sets A, B is written as AVB and symbolically written as

Q. 2. Describe with example, the two basic ways to specify a particular set. Sol. There are two ways of expressing a set. 1. Roster form or tabular form : When the actual elements of the set are given, we put them with in bracket { } and separate them with commas. e.g. The set A of odd natural numbers 1,3,5, 7,9,11 is written as {1, 3,5,7,9, 11}

2. Set Builder form or Defining property: When instead of actual elements, a rule is given with the help of which we can write the elements of the set, then it is said to be set builder form. eg. A is the set of all those odd +ve integers which are less than 12, gives us the same data in (1) only expressed in a different way. That is written as T he dot : is read as such that.

Q. 3. Describe the following sets in set builder form: (a) A = {2, 3, 5, 7, 11, 13, 17, 19} (b) B = {3, 5, 7, 9 77, 79} (c) C = The even Integer Sol. 1. A = {x:x is a prime number} 2. B = {2K + 1, 3. {2n : , 1 <=K<= 39} } or {0, 2, 4, 6 ..}

Q. 4. For A {a, b, {b, c}, d}, determine the following sets: (a) A - {a, c} (b) A - {{a, c}} (c) -A (d) {a} A Sol. 1. 2. 3. 4. A {a, c} = {b {a, c}, {{a, c)) = {a, b, -A= {a} - A =

Q. 5. Find out the cardinality of the set Z of integers. Sol. Two sets A and B are said to be equipotent or to have same number of elements or the same cardinality, written as A, If there exist a one to one correspondence

We denote the cardinal number of a set A by |A| , n(A). The cardinal number of empty set . is 0. The cardinality of set Z of integers is

Q. 6. If A = {1, 2,4, 5} and B = {a, b, c, f}, C = {a, 5} , Compute AUC and (AUC) x B. Sol. AUC = {1,2,4,5,a} (AUC) x B {1, 2, 4, 5, a) x {a, b, c, f}

Q. 7. Let A = [+, -] and B = [00, 01, 10, 11] find A x B. Sol, Ax B [+, ] x [00, 01, 10, Ii] = [+00, +01, +10, +11, 00, 01, 10,11].

Q. 8 Define comparable and non-comparable sets. Sol. Two sets are said to be comparable if one of the two sets is a sub set of the other. e.g. Let A ={2,4,6} B ={2,4,6,8} C = {1, 2} Here A B A and B are comparable sets But A C and C A. A and C are non-comparable sets.

Q. 9. What do you understand by fundamental product of sets Sol. Consider n distinct sets A fundamental product of the sets is a set of the form We Note, (i) There are such fundamental products. (ii) Any two such fundamental products are disjoint and (iii) The universal set U is the union of all the fundamental products. There is a geometrical description of these sets which is given below e.g. consider three sets X, Y and Z. The following lists the eight fundamental product of three sets:

These eight products correspond precisely to the eight disjoint regions in the venn diagram of sets X, Y and Z in figure.

Q. 10. Let A and B be a set such that diagram. Sol. Since given that

. Draw the venns

then Venns diagram is

Q. 11. Given that AUB = AUC. Is it necessary thus B = C. Sol. Let A {1, 2, 3, 4, 5} B = {2, 3} Here C = {1,4} AUB = {1,2,3,4,5} AUC = {1, 2, 3, 4, 5} i.e. AUB = AUC But B C. Therefore, it is not necessary to have B = C.

Q. 12. Is a statement

Sol. A set with n elements has 2 subsets when n = 0 this statement is true because A set has subset .

Q. 13. Differentiate between an ordered and unordered partition of a finite set. Sol. Let S be a set with n distinct elements and f be a +ve integer. By ordered partition of S, we mean a set of S , such that where the subsets are

A partition of a set A into a collection of subsets unordered is called an unordered partition of the set A.

Q. 14. If A = {1, 2, 3}, find P(A). Sol. A = {1, 2, 3} P(A) = { , {1}, {2}, {3), {1,2}, {1,3}, {2,3}, {1,2,3}.

Q. 15. If A x B = B XA (where A and B are general matrices), then (i) A = (ii) A=B (iii) B = A (iv) A= B Sol. (iii) B = A.

Q. 16. The description of the shaded region in the following figure using the operation on set is.

Sol.

Q. 17. Let N = (1, 2, 3...) be ordered by divisibility which of following subset is totally ordered. (i) (2, 6, 24) (ii) (2, 9, 16) (iii) (3, 5, 15) (iv) (4, 15, 30) Sol. (i) (2, 6, 24), Since 2 divides 6 which further divide 24.

Q. 18. For A = {1, 2, {1, 3}

} determine the following sets.

Sol. (a) A - {1} = (b) A (c) A - { =A }= }

(d) A {1, 2} = {2, {1, 3},

Q. 19. If n is an integer and (i) even (ii) even or odd (iii) odd (iv} prime Sol. (ii) Odd.

is odd, then n is

Q. 20. If A and B are two subsets of U then prove that Sol.

[ SHORT ANSWER TYPE QUESTION]

Q. 1. If A, B are any two sets then

Sol. To prove:

Q. 2. Let A,B,C be any three sets then prove that Sol. Let

Q. 3. If A is any set, then (A) = A. Sol. To prove (A) =A Let

Now conversely Let

from (1) and (2), we have (A) =A.

Q. 4. Prove that (a) (b)

Sol. (a) Let

Therefore Now conversely Let

Therefore , From (1) and (2), we have Hence Proved. (b)To prove: Let

Now conversely, Let

Find (1) and (2), we have Hence Proved.

Q. 5. Prove that AU(B -A) = AUB. Sol. Let

Hence, AU(B -A) = AUB Hence proved.

Q. 6. Let A, B, C be arbitrary sets then show that (A-B) -C = A- (BUC). Sol. Let

Conversely Let ,

From (1) and (2), we have (A-B) - C = A - (BUC) Hence proved.

Q. 7. Prove that

Sol. Let

Now conversely Let

Therefore from (1) and (2), we have Hence Proved.

Q. 8. Given that is it necessary that Q = R ? Justify your Answer. Sol. This is not necessarily true. Since contains elements common to both P and Q and contains elements common to both P and R. But it is not necessary that Q = R because set R can have elements of Q which are elements of P as well, but it can also have element other than those in Q. e.g. P = {1, 2, 3, 4} Q = {1, 2, 5} R = {1, 2, 7} Then = {1 , 2}

= {1 , 2}

Here

Important Expected Questions

Q. 1. Prove that A x (BUC) = (A x B)U(A x C) Sol. Let (x, y) A x (BUC) X A and y BUC X A and (y B or

C)

Now conversely Let (x, y) (A x B) U (A x C) (x, y) (A X B) or (x, y) (AxC) (x A and y B) or (x A and y X A and y B or y C X A and y BUC = x A x (BUC) (A x B) U (A x C) (BUC) Ax

C)

(2)

From (1) and (2), we get A x (BUC) = (AXB) U(A X C) Hence proved.

Q. 2. Prove that if A Sol. Let

B then A x C

BxC.

Therefore

Q. 3. Given that Is it necessary that Q = R ? Justify your answer. Sol. It is necessary that Q = R. Because = i.e. this set contains element which are in sets P or Q but does not contain elements common to both sets. Similarly,

i.e. This set contains elements which are in sets P or R but does not contain elements common to both sets. As

R=Q

Q. 4. Two finite sets have in and ii elements. The total number of subsets of the first set is 56 more than the total number of subsets of the second set. Find the value of in and n. Sol. Let A = first set B = Second set Then total no. of subsets of Then total no. of subsets of According to question n(A) = m n(B) = n

Hence

n = 3 and m-n=3

m-3 = 3

M = 6 Ans.

Q.5. IfA x B = B x A then A = B. Sol. Let us assume that A = B. To Prove Now

conversely, let

To prove A = B Let x be an arbitrary element of A, then

Let y be an arbitrary elements of B, then

from (1) and (2), we have A = B Hence proved.

Q. 6. If A is any set then

Sol. (a) To prove: We know that Let

from (1) and (2), we have

(b) To prove: We know Let

from (1) and (2), we have AUA = A (c)To prove:

From (1) and (2), we have

1. Clearly Let

To prove:

From (1) and (2), we have

(e) To prove: Clearly Let

From (1) and (2), we have

1.

Let

Let

From (1) and (2), we have

1.

To prove:

Let

1.

To prove:

Let

1.

To prove :

Let

Conversely ,

From (1) and (2), we have

1.

To prove:

We have Let

Hence Proved.

1.

To prove:

We have

Let

From (1) and (2), we have

Q.7. Prove that

Sol. Given: To prove: A = B Proof : Let

Similary

Conversely :

Let A = B

And from these two results, we have

Q. 8. If Sol. Let Then

then prove that

Hence Proved.

Q. 9. If A and B are any two sets, then prove that

Sol. (i) Let

(ii) Let

(iii) Let

SECTION II (RELATIONS)

Q. 1. Define the following terms. (a) Relations (b) Inverse Relation (c) Domain and Range of a Relation (d) Anti symmetric Relation (e) Partial order Relation (f) Composition of Relation (g) Equivalence Relation (h) Tarnary Relation Sol. (a) Relation: Let U he the universal set and A and B are any two subsets of U, then a relation R in A x B is a subset of A x B. If is related to element and we write Such a relation is called binary Relation. (b) Inverse Relation : Let R be a relation from a set A to another set B. Then, the inverse relation is a relation from B to A. It is denoted by

(c) Domain and Range of a Relation: Let R be a relation from the set A to the set B. Then, the domain of R is the set of all first co-ordinates of the ordered pair belonging to R. Range of R is the set of all second co-ordinates of the ordered pair belonging to R. e.g. A = {1, 3, 5, 7} B = {2, 4, 6, 8, 10} And R = {(1, 8), (3, 6), (5, 2), (1, 4)} be a relation from A to W Then Domain of R = {1, 3, 5} Range of R = {2, 4, 6, 8}. (d) Anti symmetric Relation: Let A be any set. A relation R on a set A is called an antisymmetric relation if

(e) Partial order Relation : A relation R on a set A is called partial order relation if it is: (i) Reflexive (ii) Anti-symmetric (iii) transitive. (t) Composition of Relation : Let R and S be two relations from sets A to B and B to C respectively. Then a relation SoR is called composite relation from A to C where (a, c) S or if we can find b B S.t. (a, b) R and (h,c) The relation SoR is read as composition of R and S. Also And S.

e.g. Let A = {1 , 2 , 3} B = {a , h, c} C = {p, q, r} be three sets such that R = ((1, a), (2, 5), (1, c)} is a relation from A to B S = {(a, p), (b, q), (c, r)} is a relation from B to C. The relation SoR is a relation from A to C is given by SoR = {(1, p), (2, r), (1, r)}. (g) Equivalence Relation : Let A be any set. Then a relation R on A is said to be an equivalence relation on A if it satisfies the following (PTU May 2009) (i) Reflexive: A relation R on a set A is said to be a reflexive relation if every element of a is related to itself. Thus, R is reflexive iff (x, x) ER V xEA. (ii) Symmetric : Let A be any set. Then a relation R on a set A is called symmetric if (iii) Transitive: Let A be any set. Then a relation R on a set A is said to be transitive if (h) Tarnary Relation : It is a set of ordered triples. In particular, if S is a set, then a subset of S x 5 x S is called a tarnary relation on S. If L is a line, then betweenness is a tarnary relation among points of L.

Q. 2. Let A = (1, 2, 3, 4 and Let r be the relation on A. Draw the digraph and the Hasse diagram of r. Sol. r {(1., 1), (1., 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)}

Q. 3. Give an example that shows that R does not necessarily partition a set of Mathematicians? Sol. Here the set of mathematicians is given by the set of all pairs (a, h). Consider the collections of (a, h) as. {(a, h) (h, a)) Since both are not disjoint. They cannot form a partition of set of mathematicians.

Q. 4. Let R be a relation on A = {2, 3, 4, 5, 6) defined by x is relative prime to y. Write R as a set of ordered pair. Sol. We know two integers x and y are said to be relative prime iff (x, t) = 1. i.e. g.c.dof(x,y) The required set of ordered pair is given by R {(2, 3), (2, 5), (3, 4), (3, 5), (4, 5), (5, 6)).

Q. 5. Find the numbers of relation from A {a, b, c} to B = fi, 2). Sol. We know that if a set A contain m elements and set B contains n elements, then total number of relations from A to B is 2im Here m = 3 and n = 2. Required no. of relations from A to B = = 64 Ans.

Q. 6. A partial order relation is transitive reflexive and Sol. (i) Anti-symmetric.

Q. 7. A partial ordered relation is reflextive, antisymmetric and

Sol. (i) Transitive.

Q. 8. The relation {(1, 2), (1, 3), (3, 1), (1, 1), (3, 3), (3, 2), (1, 4), (4, 2), (3, 4)} is

Sol. (ii) Transitive.

Sol. A = (0) B = {1, 2} We know that if a set A contains m elements and set B contain n elements then total no. of relations from A to B is Here m = 1 and n = 2 Then total No. of relations from A to B is Ans.

Q. 11. How many different reflexive, symmetric relation are there on a set with three elements. Sol. Let A = {a, b, c} Let r be a relation on A with adjancency matrix M. Case I : When the diagonal entries of the matrix M are each equal to unity, then the relation is reflexive. Case II : When the three entries, above the principle diagonal are determined and also the three entries below the principal diagonal are also determined then the relation is symmetric. Combining the above two cases, total number of required relations = = 8.

Q. 12. What are the properties for a relation to be equivalence relation? Sol. Let A be any non-empty set A relation r on A is said to be an equivalence relation if it satisfies the following properties (1) r is reflexive is for (ii) r is symmetric i.e. (iii) r is transitive i.e.

Q. 1. Let be a one-one function where Z is a set of integers and N is a set of natural numbers. Let R be a relation on A defined as under: Prove that R is a partial order relation. Sol. To prove: R is a partial order relation. Proff: For R to be partial order relation we have to prove that R is reflexive, antisymmetric and transitive. i. Reflexive: Now f is reflexive.

i.

Anti-symmetric : Let

From (1) and (2)

i.

Transitive : Let

R is transitive. R is partial order relation on A.

Q. 2. Let A = 11, 2, 3, 4) and let R and S be the relation on a described by

using warshalls algorithm to compute the transitive closure of RUS. Sol.

Q. 3. Prove that following statement are equivalent. P1 : n is even Integers n -1 is odd integer P3: n2 is even integer. Sol. Let Integers are 0, 1, 2, 3, 4 even Integers are: 0, 2, 4.

odd integers are : 1, 3, 5

Therefore , given statements are equivalent.

Q.4 . In inclusion of a subset in another, in the context of a universal set an equivalence relation in the class of subset of sets ? Justify the answer. Sol. The relations inclusion of a subset in another is not symmetric. As if A is a subset of B, But B may not be a subset of A, so relation is not equivalent. No, inclusion is not symmetric.

Q. 5. Prove that mod m relation is an equivalence relation. Sol. (a) Reflexivity: n n(mod m) as n-n = 0 m (b) Symmetry: If n = k (mod m ), then n - k = rm, for some integer r, thus k-n = -r(m) and k = n mod(m) (c) Transitive If a = b (mod m) and b = c (mod m), then a - b = rm and b - c = s m, for some integers r and s, Thus ac =a -b+b-c = (r+s)m a = c(mod m)

Q. 6. Suppose R and S are symmetric relation on a set show that symmetric. Sol. Let Then As R and S are symmetric

is also

Q. 7. If A is a set containing n elements. Find the number of relations from A to A. Sol. We know, if a set A has in elements and B has n elements, then total no. of relations from A to B is 2. Therefore, total no. of relations from A to A is Ans.

Q. 8. Prove that a relation R on a set A is symmetric if Sol. Let R is symmetric on A. We show Let

from (1) and (2) Converse : Let To show R is symmetric Let

Therefore , R is symmetric.

Q.9. Characterize the matrix of an irreflexive relation. What about that relation that is neither reflexive nor irreflexive. Sol. There should be only zeros on the diagonal of the matrix of an irreflexive relation. There should be at least one zero and atleast one I on the diagonal of the matrix of a relation that is neither reflexive nor irreflexive.

Q. 10. If A = {a, b, c} and r, s are relation on A, whose matrices are :

Sol.

Sor = {(a, a),(a, c),(b, a),(b, b),(b, c),(c, b),(c, c)} Ans.

Section III (FUNCTIONS)

Q. 1. Define functions. Sol. Function: A function f from a set P into set Q is a relation from P to Q such that each element of P is related to exactly one element of tile set Q. It is denoted by

Q. 2. Discuss the types of Function. Sol. Types of Function 1. Injective (one to one) function. 2. Surjective (onto) function. 3. Bijective (one to one onto) function. 4. Into function. 5. One-one into function. 6. Many one function. 7. Many one into function. 8. Many one onto function.

Q. 3. Let

Sol. Let us assume the functions have same domain, they are equal if for each domain element, the image of that element under the two functions are equal. We want to prove that

Similarly,

from (1) and (2)

Q. 4. A function f : X -> Y will be invertible if f is one to one and onto. Sol. Case I: When f: X -> Y is invertible. f possesses inverse say

i. Let

To prove f is one to one

Therefore , f is one to one.

i.

To prove f is onto:

Therefore , f is onto.

Q. 5. What are domain, co-domain and image of a function. Sol. Domain of a function : Let f be a function from P to Q such that every element of is called the domain of function. Co-Domain of a function: Let f be a function from P to Q. The set Q is called codomain of the function Image of a function: If the element x of P corresponds toy under function f then y is the image of x under f and is written as f(x) = y. If fix) = y, then we say that x is a pre image of y.

Q. 6. Let A = B = (1, 2, 3, 4, 51. Define a function f: A B s.t. f is one-one and onto function. Sol. Let f(1) = 1, f(2) = 2, f(3) = 3 f(4) =4, f(5)=5. i.e. different element of A have different images in B. f is one-one. Also each element of B is the image of some element of A. f is onto also.

Q. 7. Find the formula for the inverse of

Sol. exists if function is one-one and onto. One-one : Let

x=y Therefore, f is one-one. Onto: Let

Therefore , f is onto. Now, f (x) = y gives

Q. 8. Find the formula for inverse of

Sol. Let

Q.9. Give an explicit formula for a function. (a) One-one not onto. (b) onto not one-one (c) one-one and onto (d) neither one-one nor onto. Sol. (a) One-one and not onto:

(b) Onto not one-one

(c) One-one and onto

(d) Neither one-one nor onto:

Q.10 . What are Types of Functions? Explain with example. Sol. 1. Injective (one-to-one) Function : Let f: X -> Y. The functionf is called one-to- one or injective if different element m X have different image in Y

e.g. Consider X = {1, 2, 3, 4} and Y = {a, b, c, d} and f is a function from X to Y st. f = {(1, a),(2, b),(3, c), (4, d)}

The function f is one-to-one as every element of domain X has a unique image in the co-domain Y

2. Surjective (onto) Functions: (PTU Dec. 2004) Let f: X> Y. The function f is called surjective function if each element in Y, is the image of at least one element in X. In other words, the range off is equal to co-domain Y i.e. e.g. Consider, X = {1, 2, 3, 4, 5} Y = {a,b,c,d} f = {(1, a),(2, a),(3, b), (4, c), (5, d)} It is a onto function, as every element of Y is the image of some element of X.

3. Bijective (one-to-one onto) function: (Dec. 2004) A function which is both one-to-one and onto is called bijective (one-to-one onto) function. e.g. Consider A = {x, y, z} B = {a, b, c} and f: A -> B s.t. f= {(x, a), (y, b), (z, c)} The f is one-to-one and also it is onto. So it is a bijective function.

4. Into functions: Let f: X -> Y. The function f is called into function if the range of f is not equal to codomain of Y. Therefore, there must be an element by co-domain Y which is not the image of any element of domain X. e.g. consider X = (1, 2, 3}, Y = {a, b, c, d, e} and f: X -> Y s.t. f = {(1, a),(2, d),(3, e)} In the function, f the range i.e. (a, d, e} is not equal to co-domain of Y. Therefore, it is an into function.

5. One-one into functions : Let f: X -> Y. The function f is called one-one Into function if different elements of X have different unique image of Y. X = {a, b, c} Y ={1, 2, 3, 4} And f: X -> Y such that f= {(a, 1), (b, 3), (c, 4)} The function f is one-one into function. e.g. Consider

6. Many one functions : Let f: X -> Y. The function f is said to be many one function if 3 two or more than two different element in X having the same image in Y. e.g. Consider X = {1, 2, 3, 4, 5) and Y (a, b, c} and f: X -> Y such that f= {(1, a), (2, a), (3, a), (4, b), (5, c)} The function f is a many one function.

Chapter 4 : Monoids and Groups


Q. 1. Define the following terms (a) Group (b) Subgroup (c) Abelian group (d) Semi group (e)Monoid (f) Congruence Relation (g) Coset (h) Isomorphic Sol. (a) Group Let us consider an algebraic system (G, *), where * is a binary operation C. Then the system (G, *) is said to be a group if it satisfies the following properties: (i) The operation * is a closed operation. (ii) The operation * is an associative operation (iii) There exist an identity element w. r. t the operation . (iv) For every aEG, there exist an element a1 E G s.t.

(b) Sub Group : Let G be a group and Let is called a subgroup iff it satisfies the following propertries. (i) The operation * is closed operation on S. (ii) The operation * is an associative operation on S. (iii) As e is any identity element belonged to G. It must belong to the set S i.e. the identity element of (G, *) must belong to (S, *). (iv) For every element , a also belongs to S. (c) Abelian Group : Let us consider, an algebraic system (C, *), where * is a binary operation on G. Then the system (G, *) is said to be an abelian group if it satisfies aB the properties of the Group plus an additional following property i.e. (i) The operation * is cummulative i.e. (d) Semi-Group : Let us consider an algebraic system (A, *), where * is a binary operation on A. Then, the system (A, *) is said to be a semi-group if it satisfies the following properties: (i) The operation * is a closed operation on Set A. (ii) The operation * is an associative operation. (e) Monoid : Let us consider an algebraic system (A, 0) where 0 is a binary operation on A. Then the system (A, 0) is called monoid if it satisfies the following properties: (i) The operation0 is a closed operation on the Set A. (ii) The operation 0 is an associative operation

(iii) There exist such that for all (j) Congruence Relation: Let C be a semigroup and Let R be an equivalence relation on G. We know that the equivalence relation R inducesa partition of G into equivalence classes, where [x] represents the equivalence class containing the element x in C and that the collection of equivalence classes is denoted by G/R. Let the equivalence relation R on C has following property: Then R is called a congruence relation on C. (g) Coset : Let H be a subgroup of G and Let be any element. Then called

or define Right coset and left coset. Let be a group and H be a subgroup of G. Let aEG. The tight coset of H w,r.ta

written as Ha is the set Similarly the left coset of H w.r.t a is written as aH is the set The subset H is itself a left and right coset since When we use addition notation, then

(h) Isomorphic : The groups (G, o, e) and (H,*,i) are isomorphic if there is a bijection

The bijection f is called an isomorphism.

Q. 2. Show that the identity element on a group is unique. Solution. Let us assume that there exist two identity element by C i.e. e and e. We have Similarly we have from (1) and (2), we have

Q. 3. Let (A, *) be an algebraic system s.t. for all (a*b) * a = a ...(1) and (a*b)*b = (b*a) * a ---(2) Show that

Sol. (i) a * (a * b) = = a*b (ii) Let a*b =b*a As a = (a*b)*a = (b * a) * a = (a * b) * b = (b * a) * b

[(a * b)*a] * (a * b) (3) [by (3)] [using (2)] [using (3)]

[using (ii)]

= b [using (1)]

Q. 4. Prove that for any commutative monoid (A, 0) the set of idempotent element of A forms a sub monoid. Sol. Let S be the set of idempotent elements To prove S is a sub monoid i.e. S is closed under operation 0. Also i e S has an identity element S is a sub-Monoid.

Q. 5. Let s be a semi group with identity e and Let b and b are inverse of a. Show that b = b i.e. inverses are unique, if they exist. Ans As S is a semi-group with identity e and b & bare inverses of a b*a =e=a*h (1) & b*a=e=a* b (2) As S is a semi-group under *, therefore associativity property holds in S under operation .* i.e. b*(a*b) = (b*a)*b b*e = e* b [using (1) and (2)] b= b Hence Proved.

Q. 6. Let

denotes the set of integers {0, 1,2, , n 1) Let , s.t. is a semi-group for any n. = {O, 1, 2,, n 1)

be the binary

operation on Show that Sol. Since Let Now

where r is the least + ye remainder when ab is divided by n. We shall show that r lies between 0 and n 1 i.e. 0 r < n I If n does not divide a and n does not divide b, then dividing ab by n. Let q be the quotient and r, the remainder, where r < n

Multiplication modulo n, is a binary operation. Associative: as each will leave the same remainder when the ordinary product abc is divided by n. therefore, by the definition of semi-group is a semi-group, under given binary operation.

Q. 7. A group is (a) Also a semi-group (b) also a ring (c) an Integral domain (d) None of these. Ans. (a) Also a semi-group.

Q. 8. Let (A, *) be a semi-group. Let a be an element in A. Consider a binary operation Show that Sol. Consider on A, s.t. for every x and y in A. is an associative operation.

Consider

from (1) and (2),

is an associative operation.

Q. 9. Let (A, x) be a commutative semi-group show that if a *a = a and b * b = b Then

Sol. Consider L.H.S. Since associativity hold in a semi group then Then from (1), we have

Q. 10. Let H be a sub group of C. Then HH = H Sol. Let , As H is a subgroup of C and .

from (1) and (2), we have

Q. 11. Show that every homomorphic image of an abelian group is abelian. group. Ans. Let f be a homomorphism mapping of G onto a group H, where G is an abelian Then H is a homomorphism image of C. Let Then

Now

Q.12.Ifa,b,c are elements of a group G and a*b =c*a. Then b = c? Explain your answer. Ans. Given that Consider We claim given that Hence the given statement is a false statement. However, the given statement is a true statement if G is an abelian group. In this case Left cancellation Law

Q. 13. Define Normal subgroup? Sol. Normal Subgroup : A subgroup H of a group C is called normal subgroup of G if for every

Q. 14. Define cyclic group? Ans. Cyclic Group A group G is called cylic if for some aEG, every element xEG is of the form for some The element a is called the generator of C. If G is cyclic, we write G = <a>

Q 15. Define Homomorphism of Groups. Sol. A mapping from a group (G, ) in to a group hornorphism if is said to be a group

Q. 16. Define Group Isomorphism. Sol. A homorphism which is one-one and onto is called isomorphism and the group C and G are called isomorphic, written

A homomorphism which is onto is called epimorphism. A homomorphism which is oneone called monomorphism.

Q. 1. Prove that intersection of two normal subgroups is again a normal subgroup. Sol. Let H and K be two normal subgroups of G. Since H and H are normal subgroup C then we shall prove that is a normal subgroup of G. Let x be any element of G and h be any element of We have

Since H is a normal subgroup of G

Similarly K is normal subgroup of G,

From (1) and (2), we get Thus we have,

Fleiice

is a normal subgroup of G.

Q. 2. Let H and K be subgroup of group G. Neither of which contains the other. Show that there exists an element of belonging neither to H nor K. Sol. Given H and K are subgroup of G and To show: Proof. Now, and since H is a subgroup of G But and since K is subgrouped of G.

from (1) and (2 , a contradiction. Hence the theorem is proved.

Q. 3. If H and k are two subgroups of G, then

is also a subgroup of G.

Sol. We know that a subset H of a group G is a subgroup of G iff Let To show: Now Also Since H is sub group of C and a, b, Also If K is a subgroup of G and a, b From (1) and (2), we have Hence is a sub group of G. H, then, K, then

Q. 4. Prove that congruence modulo H, in G. Sol. Let G be a group, H is a subgroup of G. For a, mode H, written as

is an equivalence relation

, we say a is congruent to b

An equivalence relation on a set A is a relation on A which satisfies all the properties.

1. Reflexivity: Let Then Hence the relation is reflexive 2. Symmetry : We have Since H is a subgroup of G.

There the relation is symmetric

3. Transitivity: Let And Then Since H is a subgroup of G. H must be closed w.r.t the composition in G.

Hence the relation is transitive. Therefore, the relation is an equivalence relation in G.

Q. 1. State and prove Lagranges Theorem. Ans. Statement: If G is a finite group and H is a subgroup of G then o(H) or o(G) Proof Since H is a subgroup of finite group C :. H is also finite, say

Hence H a has distinct elements. Now G is finite The number distinct right cosets of H in G is also finite, say, K Let

Q.2 . How Group theory is applied in according to Theory. Sol. By using group code, we can find the solutions of many coding problems by using Group Theory. A coding problem is a problem which is used to represent distinct messages by mean of a sequence of letters from a given alphabet. A sequence of letters from an alphabet is called a word. A code is a collection of words that is used to

represent distinct messages. A word in a code is called code word. A code consisting of words that are of same length is called black code. The concept Group Theory can be applied in many situations which arise in coding problem which is clear from the following discussion. In error correction: Suppose a code word is transmitted from the origin to its destination. During the course of transmission, some of the information might cause some of 1 in the code word to be received as 0s and some of the os to be received as 1s during the course of transmission. (This may be due to some interferences such as noises) Let A denote the set of all binary sequence of length n, Let be a binary operation on A such that for x, . Let denotes the sequences of length n that has ls when x and y differ and 0s when x and y are same. We observe that is a group with all zero word as its identity and every word is its own inverse. By employing the minimum distance coding criteria, it has been observed that a code of distance 2r + 1 can correct r or lesser transmission error.

Q. 3. Prove that the set G = {1, 2,.., 6} is a finite abelian group of order 6 with respect to multiplication modulo 7. Sol. The order to prove C is finite albelian group of order 6 w.r.t. multiplication modulo 7, Let us form the composition table.

We see that all the entries in the composition table are elements of the set G. Therefore G is closed w.r.t multiplication modulo 7 i.e. (ii)The composition X7 is associative. If a, b, c are any three elements of G then = Least non-negative remainder when a(bc) is divided by 7. = Least non-negative remainder when (ab)c is divided by 7.

(iii) Existence of Identity : We have composition table. We see that

If a is any element G, then from the

1 is the identity element. (iv) Existence of Inverse From the table, we see that the inverse of 1, 2, 3, 4, 5, 6 are 1, 4, 5, 2, 3, 6 respectively. The composition is commutative as the corresponding rows and columns in the composition table are identical. The set C has 6 elements. Hence is a finite abelian group of order 6.

Chapter 5 : Rings and Boolean Algebra (Part 1)

SectionI (Rings)

Q. 1. Define Ring. Sol. Let R be a non-empty set with two binary compositions, addition (+) and multiplication (.). Then R is called a ring iff it satisfies the following. I. R is an abelian group under + i.e.,

I.

For each a, b R, a.b

R i.e.,

R is closed under multiplication.

I.

For a, b, c

R, a.(b.c) = (a.b).c i.e.,

Associativity under multiplication holds in R.

I.

For a, b, c

R,

(i) a.(b + c) = a.b + a.c. (Left distribution Law) (ii) (a + b).c = a.c + b.c. (Right distribution Law)

Q. 2. What is a ring with identity. Sol. A ring R is called ring with identity if for each x The element 1 is called multiplicative identity of R. R,3 IER such that 1.x = x = x. 1.

Q. 3. Define subring? Sol. Let {R, +,} be a ring and S be a subset of R. Then S is called a subring of R iff S is itself a ring under the operation of R.

Q. 4. Define Integral Domain. Sol. Integral Domain : A commutative ring R is called an integral Domain if for every O a, b R, ab=0 a=0 Or b=0 Thus, a commutative ring R is called an integral domain if R has zero divisor.

Q. 5. Define field? Sol. Field : A commutative ring with unity such that each non-zero element has a multiplicative inverse is called field. It is denoted by F. (a b)

Q. 6. Let D be the ring of all real 2 x 2 matrices of the form D is isomorphic to the complex number C where D is a field. Ans.

. Show that

Let D is a ring of real 2 x 2 matrices of the form Define

To show :f is homomorphism, one-one and onto. Let

Consider

Thus f is a homomorphism. Further, Let

Equating real and Imaginary parts, we get Thus Hence defined by

Q. 7. Define Improper ideals. Sol. A non-empty set k of a ring R is called an ideal (or two sided ideal) of R if k is both left ideal and ring ideal of R i.e.,

Every ideal other than <0> and R are known as proper ideals. The field <0> and R are improper ideals of R.

Q. 8. Define Euclidean ring (Domain) Sol. Let R be an integral domain and suppose that for every 0 a ER, there exists a non-negative d(a) satisfying the following.

Then R is called Euclidean domain

Q. 1. Define Quotient Ring ? Explain with suitable example. Sol. Quotient Ring : Let R be a ring and I be an ideal of R. Define R/I, by Then R/I is also a ring under the addition and multiplication defined by

The ring defined by R/I is known as quotient ring. Example : Consider

Let And

Also if

Hence H4 is an ideal of z. Further,

Thus

Q. 2. Show that relation of being associates is an equivalence relation in a ring R. Sol. Reflexive : For Hence Symmetric : Let Now we can write x = x. 1 where 1 is a unit in R. reflexive. there exist some unit such that b = au

Hence is symmetric. Transitive: if there exists some unit

s.t. a = bu

Relation of being associates is an equivalence relation.

Q.3. Conside the ring (i) Find the units of (ii) Find the roots of f(x) over Sol. (i) Those integers relatively prime to the modulus m IO are the units in 1 is the identity of As Hence the units are 1, 3, 7 and 9. (ii) Substitute each of the ten elements of z10 into f (x) to see which element yield 0 We have

Thus the roots are 1, 2, 6 and 7 This example shows that a polynomial of degree n can have more than n roots over an arbitrary ring. This cannot happen, if the ring is a field.

Q. 4. If R is commutative, then WI is also commutative. Sol. By definition, if I is an ideal of R, then

R/I is commutative

Q. 5. Let R be a ring with a unity element 1. Show that the set R* of units in R is a group under Multiplication. Sol. Let R be a ring with a unity element 1. Then by definition of Ring,

Each element in R* possess multiplicative inverse. R* is a group under multiplication.

Q. 6. (a) Prove that every field is an integral domain. (b) Prove that a finite integral domain is a field. Sol. (a) As field is a commutative ring with unity. To prove every field is an Integral domain, we shall prove that a field has no zero divisors.

Thus in a field xy =0* x =0 or y =0 A field has no zero divisor. Every field is an integral domain. Note: Every integral domain is not a field e.g. The, ring of integer is an integral domain, but it is not a field. The only inversible elements of the ring of integer are I and -1 (b) Let R be finite integral domain. Let R be the subset of R containing non-zero elements of R. An associativity hold in R, will hold in R. Thus R is a finite semi-group. Again cancellation laws hold in R (for non-zero elements) and therefore, in R. Hence R is a finite, semi group w.r.t. multiplication and cancellation laws hold. .. <R..> form a group. In other words <R, +, >is a field (it being commutative as it is an integral domain).

Q. 7. If K is a ring such that (i)a+a0 (ii)a+b =0 a=b

prove that

(iii) R is a commutative ring.

By Left cancellation Law for addition in R (a + a) (ii) We have just proved that a + a = 0 a+b =0*a+ ba+a[0=a+a] b = a, by left cancellation law for addition in R. (iii) We have

Important Expected Questions

Q. 2. Compute

in the ring

Sol. Since the additive inverse of 4 (mod 6) is 2. Of course, we would have done the problem directly as

Q. 3. Prove that if

are rings, then

is a ring.

Sol. We know that if R1, R2 are rings under operation of component wise addition and multiplication then R1 and R2 is also a ring.

are rings under addition modulo and multiplication modulo. is also a ring under the component wise addition and multiplication. Ex:-

Thus we determine in such that in the ring The only element in in that satisfies this equation is the element m = 1. Similarly, we determine a value of 1 for n. Thus the unity of , which is unique is (1, 1). Similarly, we can verify that this ring is unique.

Q. 4. Classify the ring ring with or without zero divisor?

. What is unity of this ring? Is it a

Sol. The composition tables for the two compositions are

It is clear from the 2nd table, that R is a commutative ring. The line 0, 2, 4, 6, 8 appears again against 6 in the 2nd table,

It is unity (i.e., 6 unity) It is also a ring without zero divisor because the product of no two non-zero elements (2, 4, 6, 8) is zero.

Q. 5. If and conversely. Solution. L.H.S.

then prove that R is a commutative ring

R is commutative Conversely If ab = ba, then we get from (1), the required result.

Q. 6. If R is a ring in which ring of characteristic 2.

for all aER then prove that R is a commutative

Sol. To prove R is a commutative Ring

Which proves that characteristic of ring is 2.

Q. 7. Prove that (i) The ring of polynomials over a field is a Euclidean. (ii) Every Field is a Euclidean ring. Sol. (i) Let F(x) be ring of polynomial over a Field F. Let the function d on the non-zero polynomial in F(x) be defined as

(ii) Let F be any Field. Let function d on the non-zero element of F be defined as We have assigned the integer zero to every non-zero element in F. If x and y be two non-zero elements in F, then xy is also a non-zero element in F. We have

Every field is a Euclidean ring

Q. 8. If R is a ring with unit element 1 and f is a homomorphism of R into an integral domain T s.t. kernal of f i.e. T. , then prove that f(1) is the unit element of

Sol. Letf be a homomorphism of a ring R into an integral Domain T.

Sectionll (Boolean Algebra)

Q. 1. Define the following terms (a) Lattice (b) Poset (c) Boolean Algebra (d) Chain (e) Principal of Duality Sol. (a) Lattice: A Lattice L is a partially ordered Set in which every pair of elements has the greatest lower bound and a least upper bound and belongs to L. Note: 1. It follows from the definition of a Lattice that both V and are binary operations on L because of the uniqueness of the l.u.b and g.l.b of any subset of a partially ordered set. 2. Thus a lattice L is an algebraic system with binary operations A and V. it is denoted by {L, ,V }. a V b LCM of a and b a b = GCD of a and b. (b) Poset: i.e. Partially ordered sets. A non-empty set P. together with a binary relation R is said to form a partially ordered set or a poset if the following conditions hold. P1 : Reflexivity: P2: Anti-symmetry: P3 : Transitivity: For convenience, we generally use the symbol in place of R. If a b is in a Poset, we say that a and b are comparable. (c) Boolean Algebra : A boolean algebra is a lattice which contains the least element and the greatest element and which is both complemented and distributive. in other words, a Boolean Algebra is a complemented, distributive Lattice. We will use the Letter B for the set of Boolean Algebra, that is general Boolean Algebra. will stand for

(d) Chain: Let (A, ) be a partially ordered set. A subset of A is called a chain, if every two elements in the subset are related. The number of elements in a chain is called the length of the chain. Chains are totally ordered sets by definition and they are Lattices as we have seen, with given by mim (a, b} and max (a, b} respectively and as either hold for every pair a and b, one of the meet and join is a and other is b. Now chains may be finite or infinite. The elements of a chain can all be represented on a line but for any given element there may or may not be a next element on either side as the name chain might suggest. Of course, for finite chains we would always get a next element but for infinite chain it may or may not so. Chains are always distributive but they are seldom complemented even in case they are bounded. In Mathematical form

Then {1, 2), (2, 3), (1, 2, 3) are chains and (2, 4), {1, 4), (2, 4), (4) are antichains. (e) Principal of Duality : The dual of any theorem in Boolean algebra is also a theorem. In words if any statement is a consequence of the axioms of a Boolean algebra, then the dual is also a consequence of those axioms since the dual statement can be proved by using the dual of each step of the proof of original statement.

Q. 2. Define tautology. Sol. Tautology : An expression involving logical variables that is true in all cases, is called tautology.

Q. 3. Which of the following statement is the negation of the statement 2 is even or 3 is negative.? (i) 2 is even and 3 is negative (ii) 2 is odd and -3 is not negative (iii) 2 is odd or 3 is not negative. (iv) 2 is even or -3 is not negative. Sol. (iii) 2 is odd or 3 is not negative.

Q. 4. The statement (i) Contingency (ii) Absurdity (iii) Tautology (iv) None of these. Sol. (iii) Tautology.

is a:

Q. 5. Let L be a Lattice. Then for every a and b in L. Which one of the following is correct:

Sol.

(iii) c (iv) 1. Sol. (ii) a + c

Q. 7. If B is a Boolean Algebra, than which of the following is true: (i) B is a finite but not complemented Lattice. (ii) B is finite, complemented and distributive Lattice. (iii) B is finite, distributive but not complemented Lattice (iv) B is not distributive Lattice Sol. (ii)

Q. 9. State De-Morgans Laws in Boolean Algebra. Sol. De-Morgans Law in Boolean Algebra

Similarly We can prove part (ii)

Q. 1. What are the applications of Boolean algebra in Logic circuits. Sol. In application of Boolean algebra, we have to reduce a particular expression to its simplest form or change its form to a more convenient one to implement the expression most effeciently using logic gates. Simplification of Logic Circuit using Boolean Algebra We know that Boolean algebra can be used to simplify the Boolean expression for a given logic circuit. Such a simplification leads to the simplification of a logic circuit. This means that the logic circuit with a simplified Boolean expression contains fewer gates and therefore will be smaller and cheaper to implement than the original logic circuit. Now we will illustrate the simplification method through examples. Notice that the examples contain two essential steps. The original Boolean expression is put into sum-of product (SOP) form by repeated application of Boolean Laws, rules and theorems. Once the original Boolean expression is in this form the product terms are checked for common factors. The factors performed whenever possible and usually it leads to elimination of one or more terms from the original Boolean expression. It may be noted that this simplification method depends on a thorough knowledge of Boolean algebra and considerable practice in its application.

Given : The logic circuit First of all, let us determine the Boolean expression for the output of the logic circuit. Next the output of invertej is We know that the output of the left-most AND gate with inputs A and B is Next the out put of an OR.gate with AB and Finally, the output of right most AND gate with as its inputs ,B and C as its input is,

Next figure shows the resulting outputs at all the logic gate outputs.

The Boolean expression in equation (1) can be simplified as follows by applying DeMorgans theorem. Boolean Law and Rules.

Q. 2. Simplify using Boolean and show that

Q. 3. Discuss various application of Boolean Algebra. Sol. (i) Application of Boolean algebra in (ii) Switching Theory (iii) Logic Circuit (i) Application of Boolean Algebra in Switching Theory : The simplest switching device is the ordinary ON-OFF switch. By a switch we mean a contact or a device in an electric circuit-which let or does not let the current to flow through the circuit. The switch can assume two states closed or open (ON or OFF). If the switch is closed (ON) current will pass through it. if it is open (OFF) current will not pass through it. In parallel, connections are represented by a + b or a V b. Note: If two switches in a circuit be such that both are open (closed) simultaneously, we will represent them by the same Letter. Again if two switches be such that one is open iff other is closed, we represent them by a and a Switching Algebra : Consider the system clearly B is a non-empty set with and V two binary compositions (operations) on B as is clear from the following table.

The conditions of idempotency, commutativity associativity and absorption are clearly satisfied.

If we denote ON by true, the logical or Boolean 1 and OFF by false, the logical or Boolean 0, we can represent electrical circuits containing switches by logical or Boolean expression. There are two ways in which switches are interconnected i.e. In series and In parallel. (a) In series ON, OFF are denoted by 1, 0

Two switches a, h are said to be connected in series if the current can pass only when both are in closed (ON) state and the current does nt flow if any one or both are open (OFF), we represent it as in above diagram. In series connection are represented by a, b, or a A b (b) In parallel

Two switches a, b are said to be connected parallel if current flows when anyone or both are closed (ON) and current does not pass when both are open (OFF). It is represented by above diagram.

Hence, the required circuit in simplified form will be

2. Applications of floolean Algebra in Logic circuits. (PTU Dec. 2004) Same as Q. 1.

Q. 4. Show that

Sol.

Q. 5. State DeMorgans Law. Prove it using truth table. Sol. De-Morgans Law If P and Q are two propositions then the two statements.

are called De-morgns Laws. It can be defined as.The negation of the disjunction (or conjunction) of two statements is logicaly equivalent to conjunction (or disjunction) of the negation of the two statement respectively. Let us prove these statement by truth table. 1.

Last two columns of both tables are identical hence the theorem.

Q. 6. How Boolean Algebra is applicable in Logic circuit? Explain with the help of suitable example. Sol. Boolean Algebra is applicable in logic circuits. Suppose we are given the Boolean expression A + B + C = Y (Read as A or B or C equals output Y) and told to build a circuit that

will perform this logic function. From the expression, we notice that each input must be ORrd to get output Y.

Logic diagram for Boolean Expression A + B + C = Y. Now suppose we are given the Boolean expression (Read as not A and B, or A and not B, or not B and C equals output Y). For constructions circuit the first step is to look at Boolean Expression and note that we must Fig. 2 show that a three input OR gate will form the output Y. This may be redrawn as in Fig 2 (a).

The second Step used in constructing a logic circuit from the given Boolean expression

In fig. 3(a), an AND gate has been added to feed the been added to form the for the input to AND gate 2. In Fig. 3(e), adds AND gate 3 to from

to the OR-gate and an inverter has

input to OR-gate.

Finally, in Fig. 3(c), add AND gate 4 and inverter 6 to form input to OR-gate. Fig. 3(c) is the circuit that would be constructed to perform required logic given in Boolean expression.

it is notice that, we started at the output of the logic circuit and worked toward the inputs. We have now experienced how combinational logic circuit are constructed from Boolean expression. Boolean expression come into two form 1. Sum of Product (SOP) : This form is the type we saw in Fig 2. Another example of this form is A,B + B.C = Y SOP is called the minterm form 2.Product of sums (POS) : An example is (D + E) (E + F) = Y It is also called maxterm form.

Q. 7. State the commutative Laws, associative Laws and absorption Law for Lattice.

Q. 8. Let L be a bounded distributive Lattice. Show that if a complement exists, it is unique.

Q. 11. State various postulates of Boolean Algebra. Sol. Let B be a non-empty set with two binary operations + and i, a uniary operation.

The Boolean algebra is denoted by (B, , 0, 1) and the elements 0 and 1 are called zero element and unit element. a is coniplment of a.

Q. 12. State and prove at least five theorem of Boolean algebra. Sol.

The minterm 0000, 0010, 1100, 1110, 1011, 1010 are marked with ls. We encircle the pairs. The first pair represent the Boolean function The second pair represent the l3oolean function The Third pair represent the Boolean function . The logical sum of these product provides the simplified expression. Which is the required minimizing form.

The K-map for the given function is shown in above figure. In the above K-map, the cells 5, 7, 13 and 15 can be grouped to form a quad as indicated by the dotted lines. However, all the four ls covered by the quad are also covered by the pairs. So, the quad in the above K-map is superfluous grouping (redundant). Hence, omit redundant group (quad). Therefore, the simplified SOP expression for the given function Is

Important Expected Questions

Q. 1. Define the following terms. (a) Logical equivalence (b) Disjunctive statement (c) Negation statement (d) Conditional operator (e) Linear ordered Set (I) Isomorphism Lattice Sol. (a) Logical Equivalence : Two propositions i.e. compound statement are said to be logical equivalent or equal if they have same true values. The symbol or = is used for logical equivalence. (b) Disjunctive Statement: When two statements are connected by logical connective or then the compound statement is known as disjunctive statement. (e) Negation Statement: When a statement is presented by its contradiction, then that statement is known as negation statement. (d) Conditional Operator When two statements are connected by the connective if then then the compound statement is known as conditional operator. (e) Linearly ordered Set: If every pair of element in a poset is comparable, we say that A is Linearly ordered set, and the partial order is called a linear order. We also say that A is chain.

Q. 5. Prove that if a poset L has a least element, then this element is unique. Sol. If 0 and 0 are distinct least elements of L, then

=> We get a contradiction Our assumption that 0 = 1 is wrong.

Q. 7. Prove by using Boolean Algebra B that:

Q. 8. Reduce the following using rules of Boolean Algebra B:

Sol. 1. Consider L.H.S

Q. 10. Prove that in Boolean Algebra

We mark 1 in each minterms that represents the function as shown in Fig. above.

The minterms 000, 001, 110, 111 are maked with ls in the square. We encircle the pairs (adjacent ls)

We mark 1 in each minterm that represents the function as shown in fig. The minterm 001, 010, 011, 110 and 111 are marked with ls is in square. We encircle a quad and a pair. The quad represents the Boolean function.

The pair represents the Boolean function

The logical sum of these products provide the simplified expression

The two square corresponding to first term xy are found in Fig to given sequence 110 and 111. The second term xyz is represented in square 000. The 3rd term xyz is represented in square 010. pairs. The minterm 001, 010, 110, 111 are marked with ls in the square. We encircle two The first pair represents the function

The second pair represents

The logical sum of these products provide the simplified expression.

Sol.

In the sum of minterms listed are marked by ls in the map fig. above. The minterms 0100, 0111, 0110, 1111 are marked with ls we encircle the pairs. The first pair represents the Boolean function

The second pair represents the Boolean function

The logical sum of these products provide the simplified expression

In the sum, of minterms listed are marked by ls in the Karnaugh map fig. above. The minterms 0011, 0010, 1100, 1101, 1111 1110 ale marked with ls. We encircle the quad and the pairs. The quad represents the Boolean function.

The pair represent the Boolean function.

The logical sum of these products provide the simplified expression.

Q. 13. Show the logic circuit for Then simplify the circuit

As Y = B, we dont require a logic circuit. All we do is to connect a wire to B input to the Y output.

Q. 14. Simplify the following Boolean expression

You might also like