Académique Documents
Professionnel Documents
Culture Documents
Fall 2012 Assignment Set 1 Roll No: 521110833 Center Code: 03011
Example Suppose m = 5. Then *0+ = ,x / x 0 mod 5- = ,x / 5 divides x 0 = x- = ,, -10, -5, 0, 5, 10, [1] = ,x / x 1 mod 5- = ,x / 5 divides x - 1-= ,, -9, -4, 1, 6, *2+ = ,x / x 2 mod 5- = ,x / 5 divides x -2- = ,, -8, -3, 2, 7, 12, *3+ = ,x / x 3 mod 5- = , x / 5 divides x -3- = ,, -7, -2, 3, 8, 13, *4+ = ,x / x 4 mod 5- = , x / 5 divides x - 4- = ,, -6, -1, 4, 9, 14, Also it is clear that *0+ = *5+ = *10+ = *1+ = *6+ = *11+ = *2+ = *7+ = *12+ = *3+ = *8+ = *13+ = *4+ = *9+ = *14+ =
Therefore the set of equivalence classes is given by {[0], [1], [2], [3], [4]}.
Therefore, |f(x) | 4 | g(x) | for all x > 1 or | f(x) | C | g(x) | for all x > k Where C = 4 and k = 1 Hence x2 + 2x +1 is O(x2) Example Use the definition of order to show that 5x3 3x + 4 is O(x3).
Solution: The functions f and g referred to in the definition of O-notation are defined as follows.
If p is even, then it can be written as p = 2k. Therefore 4k2 = 2q2. Therefore q is even. This is a contradiction to our assumption that p and q have no common factors. Therefore 2 is not a rational number. Example Give a proof by contradiction of if 3n + 2 is odd, then n is odd.
To construct a proof by contradiction, assume that both p and ~ q are true. That is, assume that 3n + 2 is odd and that n is not odd. Since n is not odd, it is even. Now we can show that if n is even, then 3n + 2 is even. (Verification: n is even n = 2k for some integer k. Substituting 2k for n, we get 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1) 3n + 2 is even). Now the statement 3n + 2 is even is ~ p. Now since p and ~ p are true, we have a contradiction. This completes the proof by contradiction, proving that if 3n + 2 is odd, then n is odd.
Adding the (m + 1)th term i.e. (m + 1)2 to both side of the above equation, we get
Therefore the result is true for n = m+1. Hence by mathematical induction the given result is true for all positive integers n.
5. Prove that The sum of the degrees of the vertices of a graph G is twice the number of edges
The sum of the degrees of the vertices of a graph G is twice the number of edges. That is, 2e. (Here e is the number of edges). Proof: (The proof is by induction on the number of edges e). Case-(i): Suppose e = 1. Suppose f is the edge in G with f = uv. Then d(v) = 1, d(u) = 1. Therefore = + d (u) + d (v) = 0 + 1 + 1 = 2 = 2 1 =
= 2 (number of edges). Hence the given statement is true for n = 1. Now we can assume that the result is true for e = k - 1. Take a graph G with k edges. Now consider an edge f in G whose end points are u and v. Remove f from G. Then we get a new graph G* = G - {f}. Suppose d*(v) denotes the degree of vertices v in G*. Now for any x {u, v}, we have d(x) = d*(x), and d*(v) = d(v) -1, d*(u) = d(u) - 1. Now G* has k - 1 edges. So by induction hypothesis = 2(k - 1). Now 2(k - 1) = = = 2(k - 1) + 2 = = + d*(u) + d*(v)
Hence by induction we get that the sum of the degrees of the vertices of the graph G is twice the numbers of edges.
6. Prove that T is a tree there is one and only one path between every pair of vertices
Part 1: Suppose T is a tree. Then T is a connected graph and contains no circuits. Since T is connected, there exists at least one path between every pair of vertices in T. Suppose that between two vertices a and b of T, there are two distinct paths. Now, the union of these two paths will contain a circuit in T, a contradiction (since T contains no circuits). This shows that there exists one and only one path between a given pair of vertices in T. Part 2: Let G be a graph. Assume that there is one and only one path between every pair of vertices in G. This shows that G is connected. If possible suppose that G contains a circuit. Then there is at least one pair of vertices a, b such that there are two distinct paths between a and b. But this is a contradiction to our assumption. So G contains no circuits. Thus G is a tree