# Recent posts tagged interview-experience

1
Which of the following describes the minimum condition for ambiguity in a grammar? a) Every derived word must have atleast 2 rightmost derivation b) some word must have more than 1 leftmost derivation c)A derived word has one rightmost and another leftmost derivation d)each derived word has 2 leftmost and 2 rightmost derivation
2
lets rename the attributes a) Let Bookid=A,subject-category-of-book=B,Name-of-author=C,Nationality-of-Author=D A is the Pk hence A+={BCD} F .D is A->BCD Since there is one attributed CK,there is no prime attribute hence,no partial dependency,so Relation is 2NF No transitive ... b)Let Book-Title=E Author-Address=F CE->ABD ce is PK There is a non trivial dependency and LHS of which is SK so BCNF.
3
4
If r is a relation on a then it's xsitive closure = the smallest xsitive relation on a which contain r ...eg a={a,b,c} and r= {(a,c),(c,b)} then r* = { (a,c),(c,b),(a,b)}
5
option A C$\Rightarrow$ a or, C $\Rightarrow$b or, C $\Rightarrow$aCb$\Rightarrow$aaCbb$\Rightarrow$ aaaCbbb .. soon at last you have to put either C$\rightarrow$ a or C$\rightarrow$ b so production C is used to derive $a^{n+1}b^{n}$ or $a^{n}b^{n+1}$ $n \geq 0$ S$\rightarrow$ AC [Aanbn+1] ... $\rightarrow$ CB will generate $a^{n}b^{n}b^{+}$ i.e $a^{i}b^{j} \ i<j$ option D is right .
6
A only. B is false as for a single tuple, dname cannot be both 'shoe' as well as 'toy' and hence this query returns {}.
7
If you put "Null" as introducer it will work. But by self introduction I mean "john" introducing himself- introducer will be "john" for customer "john". But I guess this needn't be considered unless specified as by the meaning of "introduction" we can assume it is a different person.
8
A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time needed to sort 100 names will be approximately 50.2 sec 6.7 sec 72.7 sec 11.2 sec
9
Answer: B Round Trip Time $= 80ms$ Frame size $=32\times 8\text{ bits}$ Bandwidth $=128\text{ kbps}$ Transmission Time $=\dfrac{32\times 8}{128}\ ms = 2\ ms$ Let $n$ be the window size. Utilization $=\dfrac{n}{1+2a}$ where $\large a = \dfrac{\text{Propagation Time}}{\text{Transmission Time}}$ $=\dfrac{n}{1+\dfrac{2 \times 40}{2}}$ For maximum utilization: $n = 41$ which is close to option (B).
10
13
starting with 001100110011 means alternative sequence of process P and Q.. Process P should start execution so at W, P(s) where S=1.. to get alternate sequence X and Y are operation on same semaphore i.e. T. option B or C. bt process Q shouldn't start execution before process P .. means Initial value T=0 W : P(s) X : V(T) Y : P(S) Z : V(S) S = 1 T = 0
15
Among simple LR (SLR), canonical LR, and look-ahead LR (LALR), which of the following pairs identify the method that is very easy to implement and the method that is the most powerful, in that order? SLR, LALR Canonical LR, LALR SLR, canonical LR LALR, canonical LR
16
Option A is correct because height $5$ means level $6$ so maximum node $= 2^l -1 =2^6 -1=63$ and for minimum, at each level only single node so total $6$.
17
The number of onto functions (surjective functions) from set $X = \{1, 2, 3, 4\}$ to set $Y=\{a,b,c\}$ is ______.
18
A system has $6$ identical resources and $N$ processes competing for them. Each process can request at most $2$ requests. Which one of the following values of $N$ could lead to a deadlock? $1$ $2$ $3$ $4$
19
20
If $g(x) = 1 - x$ and $h(x) = \frac{x}{x-1}$, then $\frac{g(h(x))}{h(g(x))}$ is: $\frac{h(x)}{g(x)}$ $\frac{-1}{x}$ $\frac{g(x)}{h(x)}$ $\frac{x}{(1-x)^{2}}$
21
C) P - iii, Q - i, R - iv, S - ii Ref: https://en.wikipedia.org/wiki/Software_testing
22
Is there any SQL command which belongs to both DDL and DML?
23
Answer is D. $L_1$ is context-free and hence recursive also. Recursive set being closed under complement, $L_1$' will be recursive. $L_1$' being recursive it is also recursively enumerable and Recursively Enumerable set is closed under Union. So, $L_1' \cup L_2$ is recursively enumerable. ... $L_2$')' $= L_2$ is also recursive which is not the case here. So, $II$ is also false.
24
$\lim_{x\rightarrow \infty } x^{ \tfrac{1}{x}}$ is $\infty$ 0 1 Not defined
25
B. Worst case for quick sort happens when $1$ element is on one list and $n-1$ elements on another list.
26
2 is correct answer. fig 2, b and c have {f,g} as upperbound. but for the graph to be a lattice it should have a least upper bound. Since b and c have two upper bounds they cannot have a least upper bound<which is always unique for a pair for vertices>. In ... {f,g}. therefore it is not a join semilattice(every pair of element should have a least upper bound). henceforth it is also not a lattice
27
29
The sequence &hellip;&hellip;&hellip;&hellip;&hellip; is an optimal non-preemptive scheduling sequence for the following jobs which leaves the CPU idle for &hellip;&hellip;&hellip;&hellip;&hellip;&hellip;&hellip; unit(s) of time. ---------------------------- Job Arrival_Time Burst_Time ------------------ ... (2,1,3},0 (c) {3,2,1),0 (d) {1,2,3},5 Ans: option (a) please explain why answer is a)....