QUESTIONS CARRY 2 MARKS EACH
If one uses straight two-way merge sort algorithm to sort following elements in ascending order
20, 47, 15, 8, 9, 4, 40, 30, 12, 17
then order of these elements after the second pass of the algorithm is
-
Solution
QUESTIONS CARRY 2 MARKS EACH
Let LAST POST, LAST IN and LASTPRE denote last vertex visited in a post order, in order and preorder traversal, respectively, of a complete binary tree. Which of the following is always true ?
-
Solution
It is given that the given tree is complete binary tree. For a complete binary tree, the last visited node will always be same for in order and preorder traversal. None of the above is true even for a complete binary tree.
The option (a) is incorrect because the last node visited in Inorder traversal is right child and last node visited in Postorder traversal is root.
The option (c) is incorrect because the last node visited in Preorder traversal is right child and last node visited in Post order traversal is root.
For option (b), see the following counter example.
1
/ \
2 3
/ \ /
4 5 6
Inorder traversal is 42 5 1 6 3
Preorder traversal is 1 2 4 5 3 6
QUESTIONS CARRY 2 MARKS EACH
Simultaneous equations on the Boolean variables x, y, z and w,
x +y + z =1
xy = 0
xz + w = 1
xy + \(\bar{z}\bar{w}\) = 0
have following solutions for x, y, z and w, respectively
QUESTIONS CARRY 2 MARKS EACH
Trapezoidal method to numerically obtain \(\int_{a}^{b}f(x)dx\) has an error E bounded by 1\(\frac{b-a}{12}\) h2 max f”(x) x ∈[a, b] where h is width of the trapezoids. The minimum number of trapezoids guaranteed to ensure E ≤ 10–4 computing in 7 using f = 1⁄x, is
QUESTIONS CARRY 2 MARKS EACH
Rank of the matrix given below is
\(\begin{bmatrix} 1 &4 &3 &7 \\ 0 &0 &3 &0 \\ 4 &2 &3 &1 \\ 3 &12 &24 & 2 \end{bmatrix}\)-
Solution
2
QUESTIONS CARRY 2 MARKS EACH
There are five records in a data base
Name Age Occupation Category
Rama 27 CON A
Abdul 22 ENG A
Jebiffer 28 DOC B
Maya 32 SER D
Dev 24 MUS C
There is an index file associated with this and it contains the values 1, 3, 2, 5 and 4. Which one of the fields is the index built from ?
-
Solution
Indexing will be on occupation field because occupation field lexicographically sorted will give the sequence 1,3,2,5,4.
QUESTIONS CARRY 2 MARKS EACH
POS (Primitive disk Operating System) manages its disk files in contiguous blocks. A file is saved to the first available space that is large enough to hold the file.Assume that a disk has only 10 contiguous blocks of available free space. Which of the following set of file operations cannot be completed given the set of files and file sizes specified below ?
fa= 1,fb = 3,fc = 5,fd = 6
-
Solution
Given Fa=1, Fb=3, Fc=5, Fd=6
Option (a) save (ƒa), save (ƒb), save (ƒd),delete (ƒd), save(ƒc) is possible as we can save 1,3,6 in 9 contiguous block and then delete ( fd) to get 6 contiguous space. After that we can save ( fc) = 5 in remaining 7 blocks.. So option (a) is possible.
Similarly we can execute Option (b) and option (c) where as option (d) is not possible
QUESTIONS CARRY 2 MARKS EACH
The language recognized by the following finite automation is
-
Solution
Start A to Accept E
r1= (aab + ba),
E to C & D
r2= (bab)*,
∴ r = r1 . r2= (aab +ba) (bab)*
QUESTIONS CARRY 2 MARKS EACH
If linear velocity \(\vec{\bigtriangledown }\) is given by
\(\vec{\omega }=x^{2}yi+xyz\hat{j}-yz^{2}\hat{k}\)
then angular velocity \(\vec{\omega }\) at the point(1, 1 – 1) is
QUESTIONS CARRY 2 MARKS EACH
Which of the following is a factor of determinant \(\Delta =\begin{vmatrix} 1 &a &bc \\ 1 &b &ca \\ 1 &ca &ab \end{vmatrix}\) ?