# Recent activity by prateekdwv

1
Assume that multiplying a matrix $G_1$ of dimension $p \times q$ with another matrix $G_2$ of dimension $q \times r$ requires $pqr$ scalar multiplications. Computing the product of $n$ matrices $G_1G_2G_3 \dots G_n$ can be done by parenthesizing in different ... multiplications, the explicitly computed pairs is/are $F_1F_2$ and $F_3F_4$ only $F_2F_3$ only $F_3F_4$ only $F_1F_2$ and $F_4F_5$ only
2
Let $\oplus$ and $\odot$ denote the Exclusive OR and Exclusive NOR operations, respectively. Which one of the following is NOT CORRECT? $\overline{P \oplus Q} = P \odot Q$ $\overline{P} \oplus Q = P \odot Q$ $\overline{P} \oplus \overline{Q} = P \oplus Q$ $P \oplus \overline{P} \oplus Q = ( P \odot \overline{P} \odot \overline{Q})$
3
In how many ways 2 alike apple, 3 alike orange and 4 alike mango can be given to 3 children if each child can have 1 or more than 1 fruits.
4
In any boolean algebra show that (a+b')(b+c')(c+a')=(a'+b)(b'+c)(c'+a)
5
Kindly justify with an example
6
Let the time taken to switch from user mode to kernel mode of execution be $T1$ while time taken to switch between two user processes be $T2$. Which of the following is correct? $T1 > T2$ $T1 = T2$ $T1 < T2$ Nothing can be said about the relation between $T1$ and $T2$
7
Consider a complete undirected graph with vertex set $\{0, 1, 2, 3, 4\}$. Entry $W_{ij}$ in the matrix $W$ below is the weight of the edge $\{i, j\}$ ... What is the minimum possible weight of a path $P$ from vertex $1$ to vertex $2$ in this graph such that $P$ contains at most $3$ edges? $7$ $8$ $9$ $10$
8
Consider a complete undirected graph with vertex set $\{0, 1, 2, 3, 4\}$. Entry $W_{ij}$ in the matrix $W$ below is the weight of the edge $\{i, j\}$ ... $T$ in this graph such that vertex 0 is a leaf node in the tree $T$? $7$ $8$ $9$ $10$
9
Hari(H), Gita(G), Irfan(I) and Saira(S) are siblings (i.e., brothers and sisters). All were born on 1st January. The age difference between any two successive siblings (that is born one after another) is less than three years. Given the following facts: Hari's age + Gita ... and Saira is not the youngest. There are no twins. In what order they were born (oldest first)? $HSIG$ $SGHI$ $IGSH$ $IHSG$
10
Frames of 1000 bits are sent over a 106 duplex link between two hosts. The propagation time is 25ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link). Let I be the minimum number of bits (I) that will be required ... 25 packets again(full duplex)...so fully transit the link by 51 packets right ? why asssuming only for one way propogation as 25 frames
11
In a sorted array, every element is repeated more than once except one. what will be the time complexity to find that element in the worst case?
12
What is the remainder when $4444^{4444}$ is divided by $9?$ $1$ $2$ $5$ $7$ $8$
13
We are given a (possibly empty) set of objects. Each object in the set is colored either black or white, is shaped either circular or rectangular, and has a profile that is either fat or thin, Those properties obey the following principles: Each white object is also circular. Not all ... $(i) \text{ and } (iii)$ only None of the statements must be TRUE All of the statements must be TRUE
14
Let $T(a, b)$ be the function with two arguments (both nonnegative integral powers of 2) defined by the following recurrence: $T(a, b) = T \left( \frac{a}{2}, b \right) +T\left( a, \frac{b}{2} \right) \quad \quad \text{ if } a, b \geq 2$ ... $\begin{pmatrix} r+s \\ r \end{pmatrix}$ $2^{r-s}$ if $r \geq s$, otherwise $2^{s-r}$
15
Given that $B(x)$ means "$x$ is a bat", $F(x)$ means "$x$ is a fly", and $E(x, y)$ means "x eats $y$", what is the best English translation of $\forall x(F(x) \rightarrow \forall y (E(y, x) \rightarrow B(y)))?$ all flies eat bats every fly is eaten by some bat bats eat only flies every bat eats flies only bats eat flies
16
Consider the following program operating on four variables $u, v, x, y$, and two constants $X$ and $Y$. x, y, u, v:= X, Y, Y, X; While (x β  y) do if (x > y) then x, v := x - y, v + u; else if (y > x) then y, u:= y - x, u + v; od; print ((x + ... $\frac1 2 \times \text{gcd}(X, Y)$ followed by $\frac1 2 \times \text{lcm}(X, Y)$. The program does none of the above.
17
static char hello[]='hello'; printf("%s",hello); The output will be same as- puts("hello"); puts(hello); printf("%s", "hello"); puts("hello\n"); Answer is 1,2 and 3. Can anyone tell what's the problem with 4 option? It is also printing hello.
18
Consider the following relational schema: $\text{Student} (\underline{\text{school-id}, \text{sch-roll-no}}, \text{sname}, \text{saddress})$ $\text{School} (\underline{\text{school-id}}, \text{sch-name}, \text{sch-address}, \text{sch-phone})$ ... the other schools with a pass percentage above $35\%$ over all exams taken together schools with a pass percentage above $35\%$ over each exam
19
Confusion regarding these log representations. 1.(logn)2 2.log2n 3.log(logn) 4.log(n)2 which of these are equal . Also explain meaning of each one.(Pls provide any source if possible).
20
Is this regular L={w | w $\varepsilon$ (0,1)* w is of the form (0i1)n for i=1,2,3...n ,n>=0} ?
21
22
Suppose in question we are given the language is Turing Decidable , can I consider it a CFL or Regular?
23
Which of the following is not context free? $I) L_{1}=\left \{ a^{i}b^{j}c^{k} |i,j,k\geq 0,i<j<k \right \}$ $I) L_{2}=\left \{ a^{i}b^{j}c^{k} |i,j,k\geq 0, j=max\left ( i,k \right )\right \}$
24
A cache has hit ration 0.95, 64 byte lines , having cache hit latency of 5ns. The main memory takes 90ns to return the first word(16 bits) of a line and 10ns to return each subsequent word . The time needed when cache miss happens is _____(nsec) (Assume ... Ignore time to write line into cache once it has been fetched from main memory and to detect cache miss time needed same as cache hit time)
25
Let R and S be two relations with the following schema R(Pββ,Qββ,R1,R2,R3) S(Pββ,Qββ,S1,S2) where {P,Q} is the key for both schemas? R:{β¨"1","abc","p1","p2","p3"β©, β¨"2","xyz","p1","p2","p3"β©} S:{β¨"1","abc","q1","q2","q3"β© β¨"2","def","q1","q2","q3"β© WHat is R *S? WHERE * IS NATURAL JOIN.
26
Let R and S be two relations with the following schema $R(\underline{P,Q}, R1, R2, R3)$ $S(\underline{P,Q}, S1, S2)$ where $\left\{P, Q\right\}$ is the key for both schemas. Which of the following queries are equivalent? $\Pi_P \left(R \bowtie S\right)$ ... Only I and II Only I and III Only I, II and III Only I, III and IV
The first $n$ cells of an array $L$ contain positive integers sorted in decreasing order, and the remaining $m - n$ cells all contain 0. Then, given an integer $x$, in how many comparisons can one find the position of $x$ in $L$? At least $n$ comparisons are necessary in the ... . $O (\log (m - n))$ comparisons suffice. $O (\log n)$ comparisons suffice. $O (\log (m / n))$ comparisons suffice.
In the given network of AND and OR gates $f$ can be written as $X_0X_1X_2 \dots X_n + X_1X_2 \dots X_n + X_2X_3 \dots X_n + \dots + X_n$ $X_0X_1 + X_2X_3+ \dots X_{n-1}X_n$ $X_0+X_1 + X_2+ \dots +X_n$ $X_0X_1 + X_3 \dots X_{n-1}+ X_2X_3 + X_5 \dots X_{n-1} + \dots +X_{n-2} X_{n-1} +X_n$
The Boolean theorem $AB+\bar{A}C +BC = AB + \bar{A}C$ corresponds to $(A+B) \bullet (\bar{A} +C) \bullet (B+C) = (A+B) \bullet (\bar{A} +C)$ $AB+\bar{A}C +BC =AB+BC$ $AB+\bar{A}C +BC =(A+B) \bullet (\bar{A} +C) \bullet (B+C)$ $(A+B) \bullet (\bar{A} +C) \bullet (B+C) = AB + \bar{A}C$