Discrete Final Spring 2024
Discrete Final Spring 2024
Karachi Campus
CLO # 2: Construct
formal logic, proofs and/ or informal for solving problems in discrete structure.
Q1: 16 Marks
a. Find an equivalent compound proposition that does not involve conditionals. [2]
(𝑝 → ¬𝑞) → (¬𝑝 → 𝑞)
b. Rewrite the following statements in the if-then form. Then write the converse, inverse, and
contra positive of your implication. [2]
“Divisibility by 21 is a sufficient condition for divisibility by 7”.
c. Determine the truth value of the following statement if the domain consist of all real numbers.[2]
i. ∃𝑥(𝑥 3 = −1) iii. ∃𝑥 (𝑥 4 < 𝑥 2 )
ii. ∀𝑥((−𝑥 )2 = 𝑥 2 iv. ∀𝑥(2𝑥 > 𝑥)
2
d. Let 𝑃(𝑥) and 𝑞(𝑥) be given by 𝑝(𝑥): x is odd , 𝑞(𝑥 ): 𝑥 − 1 is even and the statement “ if x is
odd , then 𝑥 2 − 1 is even “ [2]
i. Translate the statements into logical expression using predicates, quantifiers, and
logical connectives
ii. Write negation of the above expression in Q1 part d(i).
e. Prove or disprove : 𝑥 2 − 𝑥 , ∀𝑥 ∈ ℤ is an even integer.[2]
f. Use mathematical induction to show that 𝑛3 − 7𝑛 + 3 is divisible by 3 for all positive
integer 𝑛.[2]
g. Write each of the following arguments in symbolic form. Then check the validity of the argument
using truth table. [4]
‘If Rochelle gets the supervisor's position and works hard, then she'll get a raise. If she gets the
raise, then she'll buy a new car. She has not purchased a new car. Therefore, either Rochelle did
not get the supervisor's position or she did not work hard’.
CLO #1. Explaining and solving mathematical logic of sets, relations, counting and permutations in
Discrete structure.
Q2: 20 Marks
a. Find the coefficient of x 3 y 2 in the expansion of(3𝑥 − 7𝑦)5 .[2]
b. Let 𝑓(𝑥 ) =⌊𝑥 2 /3⌋ 𝑓𝑖𝑛𝑑 𝑓(𝑠) 𝑖𝑓 𝑠 = {−2, −1,0,1,2,3}. [2]
c. Find an explicit formula for the following linear homogeneous recurrence relation: [2]
3𝑎𝑛 = 7𝑎𝑛−1 − 2𝑎𝑛−2 , if 𝑛 > 1, Where 𝑎0 = −2 and 𝑎1 = 1.
d. In how many ways can 12 different books be distributed among four children of school, so that
each child gets three books. [2]
e. What is the least number of area codes needed to guarantee that the 25 million phones in a state
can be assigned distinct 10 -digit telephone numbers? (Assume that telephone numbers are of
the form 𝑁𝑋𝑋 − 𝑁𝑋𝑋 − 𝑋𝑋𝑋𝑋, where the first three digits form the area code, 𝑁 represents a
digit from 2 to 9 inclusive, and 𝑋 represents any digit.) [3]
f. During freshman orientation at a small liberal arts college, two showing of the latest James Bond
movie were presented. Among the 600 freshman ,80 attended the first showing and 125
attended the second showing, while 450 didn’t make it to either showing. How many of the 600
freshman attended twice, use Inclusion-Exclusion principal. [3]
g. List all the ordered pairs in the relation 𝑅 = {(𝑎, 𝑏)| 𝑎 𝑑𝑖𝑣𝑒𝑑𝑠 𝑏 } 𝑜𝑛 𝑡ℎ𝑒 𝑠𝑒𝑡 {1,2,3,4,5,6}
and check whether the relation 𝑅 is Irreflexive , Antisymmetric or Asymmetric (justify) [4]
CLO # 3: Use discrete structure in solving other computing problems such as formal specification,
verification, databases, artificial intelligence and cryptography.
Q3: 6*2+4=16 Marks
a. What is the greatest common divisor (GCD) and least common multiple(LCM) of pair of
integers? [2]
37 . 53 . 73 𝑎𝑛𝑑 211 . 35 . 59
b. Without using Fermat’s theorem find the reminder of 1243 𝑚𝑜𝑑 713. [2]
c. Let 𝑓 be the function from the set 𝑋 = {2,3,4,5,6,7} into the set 𝑌 = {0,1,2,3,4} defined
by 𝑓(𝑥) = 2𝑥(𝑚𝑜𝑑 5). Write 𝑓 as a set of ordered pairs. Is 𝑓 one-one or onto? Explain. [2]
d. The first nine digits of ISBN-10 of the 7th edition of elementary number theory and its application
is 007288008 . What is the check digit? [2]
e. Find the sequence of pseudorandom numbers generated by the power generator with [2]
𝑝 = 7 , 𝑑 = 3 𝑎𝑛𝑑 𝑠𝑒𝑒𝑑 𝑥 0 = 2
f. Solve the linear congruence 17𝑥 ≡ 4(𝑚𝑜𝑑 36) using modular inverse. [4]
g. Use RSA algorithm ,Encrypt the 𝑀𝑒𝑠𝑠𝑎𝑔𝑒 "𝐻𝐸𝐿𝐿𝑂" 𝑤ℎ𝑒𝑟𝑒 𝑝 = 7 , 𝑞 = 11 𝑎𝑛𝑑 𝑒 = 17. [4]
CLO # 1:Use discrete structure in solving other computing problems such as formal specification,
databases, graphs and Trees.
Q4: 16 Marks
a. Complete the following table-01 with Yes or No.[2]
Table-01
b. Write adjacency list, adjacency matrix, in-degree and out-degree of each vertex of figure G1.
Is figure G1 connected? [3]
c. Draw the graph of 𝐾3,4 and determine graph is planner or not using Euler theorem. [2]
d. Check graph obtained in Q4 part(c) for Bipartite if yes explain? and
what is the chromatic number of 𝐾3,4 [2]
g. Find a route with the least total airfare that visit each of the cities in figure 5. where the weight
on an edge is least price available for flight between two cities [3]
CLO # 4: Distinguish various discrete structure and their relevance within the context of computer science, in the areas
of data structure and algorithms, in particular.
Q5 12 Marks
a. Answer the following for the tree shown in figure G6 with root “a”. [2]
i. what is level of b?
ii. what are internal nodes?
iii. what are descendants of j?
iv. what are sibling of g?
b. Consider the figure G6 .[2]
i. Determine the order in which
preorder,Inorder and Postorder
traversal visits the vertices of
the ordered rooted tree in
figure G6.
ii. Is the rooted tree a full m-ary
tree or balanced tree? explain
c. Form a binary search tree for the words mathematics, physics, geography, zoology,
meteorology, geology, psychology, and chemistry using alphabetical order. [2]
d. Evaluate the postfix expression 521 − −314 + + ∗ [2]
e. Represent the compound proposition using ordered rooted tree and write the expression in
prefix and infix notation ¬(𝑝 ∧ 𝑞) ↔ (¬𝑝 ∨ ¬𝑞).[2]
f. Find the minimum spanning tree of figure G7.
Indicate the order in which edges are added to
form the tree using Prim’s algorithm. [2]