Consider a tree in which each node has exactly two children.Let n be the count of NULL links holds. Let m be the internal nodes of the tree. Which of the following is true?
-
Solution
Let F {D → AC, A → DB, B → E, E → D}that hold on attribute set ABCED, the highest normal form that hold forgiven set is
-
Solution
The attributes ABCD results in minimal cover {A → DB, D → AC, B → D}, since every key in minimal cover is candidate key. Hence, the relation is BCNF.
Consider the following code
if key < A [i] then error“new key is smaller then A[i]” A[i] ← key while i > 1 and A[Parent (i)] < A[i] do exchange A[i] ↔ A[Parent (i)] i ← parent (i) What is the running time of above code?
-
Solution
The running time is O(log n) since the path from node updated to root has length O(log n)
You have an IP of 130.233.42.48 with sub net mask of 7 bits.How many hosts and subnets are possible?
-
Solution
The given address is of class B.
The default mask of class B is of 16 bits long.
There is additional 7 bits to the default subnet mask.The total number of bits in the subnet are 16 + 7 = 23 bits.
This leaves us with the 32 – 23= 9 bits for assigning to host.
7 bits of subnet corresponds to 27 – 2 = 126 subnets 7 bits belonging to host address corresponds to= 29 – 2 = 510 hosts.
A channel has a bit rate of 20 kbit/sand a propagation delay of 100 ms. For what sizes does stop and wait gives an efficiency of 50%?
-
Solution
4000
Suppose a line has bandwidth of 7000 Hz. The signal to noise ratio is 30 dB. Then, the capacity of channel in bps would be ________.
-
Solution
What will be the normal form of a table after normalization in which all determinations are candidate key?
-
Solution
The table will be in BCNF.
R(A, B, C, D) is a relation which of the following does not have a loss less join, dependency preserving BCNF decomposition?
-
Solution
AB → C, C → AD
Let R be a relation schema R (ABC), F= {A → BC, B → C,AB → C} is the set of functional dependency. The canonical cover will be
-
Solution
The canonical cover will be A → B, B → C
The relational schema student_performance (name,course_number, roll_number, grade) has the following functional dependencies :
name , course_number → grade
roll_number , course_number → grade
name → roll_number
roll_number → name
The highest normal form of this relation scheme is
-
Solution
The functional dependency of the relation is
name, course – number → grade — 1
roll– number, course – number → grade — 2
name → roll – number — 3
roll – number → name — 4T
he candidate keys are {name, course–number} and{course – number, roll –number}.Dependency 3 and 4 are transitive but they are prime attribute, so we will break this relation upto 3 NF.