Uploaded by Younas Malik

DS final term paper

advertisement
BARANI INSTITUTE OF MANAGEMENT
SCIENCES
Final-Term Exam Spring 2021
Course Title: Discrete Structure
Course Code: CS-335
Discipline /Program: BSCS 3rd
Total Marks: 30
Time allowed: 12 HOURS
Instructor’s Name: KIRAN SAEED
Q1:
I.
II.
III.
IV.
V.
[6]
Calculate cost of its minimum spanning tree?
Find how many minimum spanning trees does it have?
Let’s imagine that Kruskal’s algorithm is run on this graph.
In what order are the edges added to the MST?
For each edge in this sequence, give a cut that justifies its addition.
Q2:
[4+1]
i)
consider the following binary search tree
Which nodes don’t satisfy the binary search tree property?
ii)
Which type of relation is shown in below expression
R1 = { (a,b) | a = b }
Q3
[2+5]
A geometric progression has first term π‘™π‘œπ‘”2 27 and common ratio π‘™π‘œπ‘”2 π‘₯.
i)
ii)
Find the set of values of x for which geometric progression has a sum to infinity.
Find the value of x for which the sum to infinity of geometric progression
Q4
[6]
Find each of the function below, indicate whether the function in onto, on-to-one neither or both.
If the function is not onto or nor one-to-one, give an example showing why
i.
ii.
iii.
F;R
G;R
H;Z
R. f(x)=x^2
R. g(x)=x^3
Z. h(x)=x^3
Q5
[6]
Here is a picture of four models. Some of the cubes are hidden behind other cubes.
Model one consists of one cube. Model two consists of four cubes and so on.
i.
ii.
iii.
iv.
v.
How many cubes are in the third model?
How many cubes are in the fourth model?
If a fifth model were built, how many cubes would it take?
Find an expression for the number of cubes used in the nth model.
Sketch a side view, front view and plan view of the fourth model.
Related documents
Download