# Recent activity by coder_yash

2 answers
1
Which one of the following is FALSE? A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end. Available expression analysis can be used for common subexpression elimination. Live variable analysis can be used for dead code elimination. $x=4*5 \Rightarrow x=20$ is an example of common subexpression elimination.
6 answers
2
Let G be a connected planar graph with 10 vertices. If the number of edges on each face is three, then the number of edges in G is_______________.
5 answers
3
Which of the following problems are decidable? Does a given program ever produce an output? If $L$ is a context-free language, then, is $\bar{L}$ also context-free? If $L$ is a regular language, then, is $\bar{L}$ also regular? If $L$ is a recursive language, then, is $\bar{L}$ also recursive? $1, 2, 3, 4$ $1, 2$ $2, 3, 4$ $3, 4$
4 answers
4
Let $G =(V,E)$ be an undirected graph with a subgraph $G_1 = (V_1, E_1)$. Weights are assigned to edges of $G$ as follows. $w(e) = \begin{cases} 0 \text{, if } e \in E_1 \\1 \text{, otherwise} \end{cases}$ A single-source shortest path algorithm is executed on ... number of edges in the shortest paths from $v_1$ to all vertices of $G$ $G_1$ is connected $V_1$ forms a clique in $G$ $G_1$ is a tree
5 answers
5
Let $*$ be defined as $x * y = \bar{x} + y$. Let $z = x * y$. Value of $z * x$ is $\bar{x} + y$ $x$ $0$ $1$
8 answers
6
Consider a $B^+$-tree in which the maximum number of keys in a node is $5$. What is the minimum number of keys in any non-root node? $1$ $2$ $3$ $4$
3 answers
7
The maximum number of possible edges in an undirected graph with $n$ vertices and $k$ components is ______.
1 answer
8
An independent set in a graph is a subset of vertices such that no two vertices in the subset are connected by an edge. An incomplete scheme for a greedy algorithm to find a maximum independent set in a tree is given below: V: Set of all vertices in the tree; ... ; Output(I); Complete the algorithm by specifying the property of vertex $u$ in each case. What is the time complexity of the algorithm?
3 answers
9
Quick-sort is run on two inputs shown below to sort in ascending order taking first element as pivot $1, 2, 3, \dots n$ $n, n-1, n-2, \dots, 2, 1$ Let $C_1$ and $C_2$ be the number of comparisons made for the inputs (i) and (ii) respectively. Then, $C_1 < C_2$ $C_1 > C_2$ $C_1 = C_2$ we cannot say anything for arbitrary $n$
5 answers
10
Following algorithm(s) can be used to sort $n$ in the range $[1\ldots n^3]$ in $O(n)$ time Heap sort Quick sort Merge sort Radix sort
4 answers
11
Consider the DFA $A$ given below. Which of the following are FALSE? Complement of $L(A)$ is context-free. $L(A) = L((11^*0+0)(0 + 1)^*0^*1^*)$ For the language accepted by $A, A$ is the minimal DFA. $A$ accepts all strings over $\{0, 1\}$ of length at least $2$. 1 and 3 only 2 and 4 only 2 and 3 only 3 and 4 only
7 answers
12
There are $n$ stations in slotted LAN. Each station attempts to transmit with a probability $p$ in each time slot. What is the probability that ONLY one station transmits in a given time slot? $np(1-p)^{n-1}$ $(1-p)^{n-1}$ $p(1-p)^{n-1}$ $1-(1-p)^{n-1}$
3 answers
13
Suppose we have a database consisting of the following three relations. $\text{FREQUENTS (student, parlor)}$ giving the parlors each student visits. $\text{SERVES (parlor, ice-cream)}$ ... parlor) Express the following in SQL: Print the students that frequent at least one parlor that serves some ice-cream that they like.
5 answers
14
Consider the following $\text{ER}$ diagram The minimum number of tables needed to represent $M$, $N$, $P$, $R1$, $R2$ is $2$ $3$ $4$ $5$
3 answers
15
Consider the following schedule for transactions $T1, T2$ and $T3:$ ... below is the correct serialization of the above? $T1 \to T3 \to T2$ $T2 \to T1 \to T3$ $T2 \to T3 \to T1$ $T3 \to T1 \to T2$
2 answers
16
t1 t2 w(x) r(x) w(x) commit commit Why is this not view serializable?
5 answers
17
A processor uses $\text{2-level}$ page tables for virtual to physical address translation. Page tables for both levels are stored in the main memory. Virtual and physical addresses are both $32$ bits wide. The memory is byte addressable. For virtual to physical address translation, the $10$ most ... the page tables of this process is $\text{8 KB}$ $\text{12 KB}$ $\text{16 KB}$ $\text{20 KB}$
3 answers
18
The address sequence generated by tracing a particular program executing in a pure demand based paging system with $100$ records per page with $1$ free main memory frame is recorded as follows. What is the number of page faults? $0100, 0200, 0430, 0499, 0510, 0530, 0560, 0120, 0220, 0240, 0260, 0320, 0370$ $13$ $8$ $7$ $10$
7 answers
19
An error correcting code has the following code words: $00000000, 00001111, 01010101, 10101010, 11110000$. What is the maximum number of bit errors that can be corrected? $0$ $1$ $2$ $3$
1 answer
20
Consider a procedure $find()$ which take array of $n$ ... Here we need to sort first and then need to compare adjacent element right?? Then what will be complexity??