Discrete Structures
Discrete Structures
MID-II SOLUTION
Instructions:
• Return the question paper together with the answer script. Read each question completely before answering
it. There are 4 questions written on 2 pages.
• In case of any ambiguity, you may make assumptions. However, your assumptions should not contradict any
statement in the question paper.
• Attempt all the questions in given sequence of the question paper to get bonus point.
________________________________________________________________________________________
(a) Find the smallest relation on {cup, glass, soccer}, that is Asymmetric and Transitive, but not Symmetric.
Solution:
R= {(cup, glass)}
Solution:
0 1 1 0 0
0 0 1 1 0 Figure # 1
.0 1 0 0 1
1 0 0 0 0
[1 0 0 0 0]
(d) Find the sum of number between 200 and 950 which are divisible by 11.
Solution:
a= 209, d= 11, Tn = 946.
𝑇𝑛 = 𝑎 + (𝑛 − 1)𝑑; 946 = 209 + (𝑛 − 1)(11) n =68.
𝑛 68
Now for Sum; 𝑆𝑛 = [2𝑎 + (𝑛 − 1)𝑑]; 𝑆68 = [2(209) + (68 − 1)(11)] = 39,270
2 2
1
𝑛(𝑛+1) 2
(a) Prove using mathematical induction that 1 3 + 2 3 + 3 3 + ... + n 3 = ( ) , whenever n is a nonnegative integer.
2
Solution:
1 3 + 2 3 + 3 3 + ... + n 3 = (n (n + 1) / 2)2
STEP 1: We first show that p (1) is true.
Left Side = 1 3 = 1
Right Side = 1 2 (1 + 1) 2 / 4 = 1
hence p (1) is true.
STEP 2: We now assume that p (k) is true
1 3 + 2 3 + 3 3 + ... + k 3 = (k (k + 1) / 2)2 (1)
add (k + 1) 3 to both sides
1 3 + 2 3 + 3 3 + ... + k 3 + (k + 1) 3 = [(k+1) (k+1+ 1) / 2)]2
1 3 + 2 3 + 3 3 + ... + k 3 + (k + 1) 3 = [(k+1) (k+2) / 2)]2 (2)
put eq(1) in eq(2)
=> (k (k + 1) / 2)2 + (k + 1) 3 = [(k+1) (k+2) / 2)]2
=> k2 (k + 1) 2 /4 + (k + 1)3
=> (k + 1) 2 [ k 2 + 4 k + 4 ] / 4
=> (k + 1) 2 [ (k + 2) 2 ] / 4
=> [(k+1) (k+2) / 2)]2 = [(k+1) (k+2) / 2)]2
LHS = RHS, Hence proved!
(b) Let x be an integer and P is the following statement. P: “If x2 − (x − 2)2 is not divisible by 8, then x is even.”
Prove by contraposition.
Solution: Contraposition: If x is odd then x2 − (x − 2)2 is divisible by 8.
Let x =2k + 1 be an odd number.
x2 − (x − 2)2 = x2 − (x2 – 2x + 4) = x2 − x2 + 4x − 4) = 4(x − 1) = 4(2k + 1 −1) = 8k
which is an integer multiple of 8. Therefore x2 − (x − 2)2 is divisible by 8.
(c) Express in sigma notation the sum of the first 50 terms of the series 3 + 6 + 9 + 12 + 15 +. . ..
Solution:
(a) A message has been encrypted using the function f(x) = (x + 5) mod 26. If the message in coded form is
VZJXYNTS UFUJW, decode the message.
Solution:
QUESTION PAPER is the encrypted message.
(b) Find the greatest common divisor, d, of 250 and 29 and determine integers x and y such that d = 250x + 29y.
Solution:
2
(c) List all integers between −100 and 100 that are congruent to −1 modulo 25.
Solution:
-76, -51, -26, -1, 24, 49, 74, 99 are the integers.
(d) Suppose that a computer has only the memory locations 0, 1, 2. . . 64. Use the hashing function
h(x) = (x + 9) mod 65 to determine the memory locations at which the following values are stored:
63, 509, 197, 832, and 652.
Solution:
63 will be stored on memory location 7, 509 will be stored on memory location 63,
197 will be stored on memory location 11, 832 will be stored on memory location 61, and
652 will be stored on memory location 11+1=12.
(a) Determine whether the relation in Question # 1 part (a) is a partial-order relation? Show all of your steps.
Solution:
It holds antisymmetric and transitive property but it does not hold reflexive property hence not a partial order
relation.
(b) Determine whether the relation in Question # 1 part (b) is an equivalence relation? Show all of your steps.
Solution:
It is not an equivalence relation. Since it does not hold reflective, symmetric and Transitive properties.
_________________________________________________________________________________________________