# Recent questions tagged gate1996

1
Consider the synchronous sequential circuit in the below figure Given that the initial state of the circuit is S$_4$, identify the set of states, which are not reachable.
2
A library relational database system uses the following schema USERS (User#, User Name, Home Town) BOOKS (Book#, Book Title, Author Name) ISSUED (Book#, User#, Date) Explain in one English sentence, what each of the following relational algebra queries is designed to determine ...
3
A computer system has a three-level memory hierarchy, with access time and hit ratios as shown below: $\overset{ \text {Level$1$(Cache memory)} \\ \text{Access time =$ ... access time of less than $100 nsec$? What is the average access time achieved using the chosen sizes of level $1$ and level $2$ memories?
4
A hard disk is connected to a $50$ MHz processor through a DMA controller. Assume that the initial set-up of a DMA transfer takes $1000$ clock cycles for the processor, and assume that the handling of the interrupt at DMA completion requires $500$ clock cycles for the ... K bytes. What fraction of the processor time is consumed by the disk, if the disk is actively transferring $100\%$ of the time?
5
Consider the synchronous sequential circuit in the below figure Draw a state diagram, which is implemented by the circuit. Use the following names for the states corresponding to the values of flip-flops as given below. ... $} \\\hline \end{array}$
6
A file system with a one-level directory structure is implemented on a disk with disk block size of $4K$ ... What is the maximum possible number of files? What is the maximum possible file size in blocks
7
A computer system uses the Banker's Algorithm to deal with deadlocks. Its current state is shown in the table below, where $P0$, $P1$, $P2$ are processes, and $R0$, $R1$, $R2$ ... $P0$ for one unit of resource type $R1$?
8
The concurrent programming constructs fork and join are as below: Fork <label> which creates a new process executing from the specified label Join <variable> which decrements the specified synchronization variable (by $1$) and terminates the process if the new value is not $0$. Show the precedence graph for $S1$, ... $N$ $S3$ $L2$ : join $M$ $S5$ $L3:S2$ Goto $L1$ $L4:S4$ Goto $L2$ Next:
9
Consider the syntax-directed translation schema (SDTS) shown below: $E\rightarrow E + E$ {print &ldquo;+&rdquo;} $E\rightarrow E * E$ {print &ldquo;.&rdquo;} $E\rightarrow id$ {print id.name} $E\rightarrow (E)$ An LR-parser executes the actions associated with ... the corresponding production. Draw the parse tree and write the translation for the sentence. $(a+b)*(c+d)$, using SDTS given above.
10
Consider the following program in pseudo-Pascal syntax. What is printed by the program if parameter $a$ in procedure test1 is passed as call-by-reference parameter call-by-value-result parameter program Example (input, output) var b: integer; procedure test2: begin b:=10; end procedure test1 (a:integer ... ('point 2: ', a, b); end begin (*Example*) b:=3; test1(b); writeln('point3: ', b); end
11
Consider the following program that attempts to locate an element $x$ in an array $a[ ]$ using binary search. Assume $N > 1$. The program is erroneous. Under what conditions does the program fail? var i,j,k: integer; x: integer; a: array; [1..N] of integer; begin i:= 1; j:= n; repeat k: ... x) or (i >= j); if (a[k] = x) then writeln ('x is in the array') else writeln ('x is not in the array') end;
12
Let $G$ be the directed, weighted graph shown in below figure We are interested in the shortest paths from $A$. Output the sequence of vertices identified by the Dijkstra’s algorithm for single source shortest path when the algorithm is started at node $A$ Write down sequence of vertices in the shortest path from $A$ to $E$ What is the cost of the shortest path from $A$ to $E$?
13
A complete, undirected, weighted graph $G$ is given on the vertex $\{0, 1,\dots, n -1\}$ for any fixed ‘n’. Draw the minimum spanning tree of $G$ if the weight of the edge $(u, v)$ is $\mid u-v\mid$ the weight of the edge $(u, v)$ is $u + v$
14
Insert the characters of the string $K \ R \ P \ C \ S \ N \ Y \ T \ J \ M$ into a hash table of size $10$. Use the hash function $h(x)=( ord (x) – ord ("a") + 1) \mod 10$ and linear probing to resolve collisions. Which insertions cause collisions? Display the final hash table.
15
A two dimensional array $A[1..n][1..n]$ of integers is partially sorted if $\forall i, j\in [1..n-1], A[i][j] < A[i][j+1] \text{ and } A[i][j] < A[i+1][j]$ Fill in the blanks: The smallest item in the array is at $A[i][j]$ where $i=__$ and $j=__$. The smallest item is deleted. ... __) do if A[i+1][j] < A[i][j] ___ then begin A[i][j]:=A[i+1][j]; i:=i+1; end else begin _____ end A[i][j]:= ____ end
16
Let $Q=\left( \left\{q_1,q_2 \right\}, \left\{a,b\right \}, \left\{a,b,\bot \right\}, \delta, \bot, \phi \right)$ be a pushdown automaton accepting by empty stack for the language which is the set of all nonempty even palindromes over the set $\left\{a,b\right\}$. Below is ... $\delta(q_2,b,b) = \left\{(q_2, \epsilon)\right\}$ $\delta(q_2,\epsilon,\bot) = \left\{(q_2, \epsilon)\right\}$
17
Given below are the transition diagrams for two finite state machines $M_1$ and $M_2$ recognizing languages $L_1$ and $L_2$ respectively. Display the transition diagram for a machine that recognizes $L_1.L_2$, obtained from transition diagrams for $M_1$ and $M_2$ by adding ... $(L_1.L_2)^*$ by adding only $\varepsilon$ transitions and no new states. (Final states are enclosed in double circles).
18
Let $G$ be a context-free grammar where $G=(\{S, A, B, C\}, \{a, b, d\}, P, S)$ with the productions in $P$ given below. $S \rightarrow ABAC$ $A \rightarrow aA \mid \varepsilon$ $B \rightarrow bB \mid \varepsilon$ $C \rightarrow d$ ($\varepsilon$ ... has no $\varepsilon$ productions and no unit productions. (A unit production is of the form $x \rightarrow y$, and $x$ and $y$ are non terminals).
19
Let $A = \begin{bmatrix} a_{11} && a_{12} \\ a_{21} && a_{22} \end{bmatrix} \text { and } B = \begin{bmatrix} b_{11} && b_{12} \\ b_{21} && b_{22} \end{bmatrix}$ be two matrices such that $AB=I$. Let $C = A \begin{bmatrix} 1 && 0 \\ 1 && 1 \end{bmatrix}$ and $CD =I$. Express the elements of $D$ in terms of the elements of $B$.
1 vote
20
The Fibonacci sequence $\{f_1, f_2, f_3 \ldots f_n\}$ is defined by the following recurrence:$f_{n+2} = f_{n+1} + f_n, n \geq 1; f_2 =1:f_1=1$Prove by induction that every third element of the sequence is even.
21
Let $F$ be the collection of all functions $f: \{1, 2, 3\} \to \{1, 2, 3\}$. If $f$ and $g \in F$, define an equivalence relation $\sim$ by $f\sim g$ if and only if $f(3) = g(3)$. Find the number of equivalence classes defined by $\sim$. Find the number of elements in each equivalence class.
22
A demand paged virtual memory system uses $16$ bit virtual address, page size of $256$ bytes, and has $1$ Kbyte of main memory.$LRU$ page replacement is implemented using the list, whose current status (page number is decimal) is For each hexadecimal address in the address ... $010D$, $10FF$, $11B0$ indicate the new status of the list page faults, if any, and page replacements, if any.
23
An 8052 based system has an output port with address 00H. Consider the following assembly language program. ORG 0100H MVI A, 00H LXI H, 0105H OUT 00H INR A PCHL HLT What does the program do with respect to the output port $00H$ ? Show the waveforms at the three least significant bits of the port $00H$.
24
A logic network has two data inputs $A$ and $B$, and two control inputs $C_0$ and $C_1$. It implements the function $F$ according to the following table. ${\begin{array}{|cc|c|}\hline \textbf{$C_1$}& \textbf{$C_2$}& \textbf{F}\\\hline 0&0&\text{$ ... using one $4$ to $1$ Multiplexer, one $2-$input Exclusive OR gate, one $2-$input AND gate, one $2-$input OR gate and one Inverter.
25
A binary search tree is used to locate the number $43$ ...
26
Let $f$ be a function defined by $f(x) = \begin{cases} x^2 &\text{ for }x \leq 1\\ ax^2+bx+c &\text{ for } 1 < x \leq 2 \\ x+d &\text{ for } x>2 \end{cases}$ Find the values for the constants $a$, $b$, $c$ and $d$ so that $f$ is continuous and differentiable everywhere on the real line.
27
A micro program control unit is required to generate a total of $25$ control signals. Assume that during any micro instruction, at most two control signals are active. Minimum number of bits required in the control word to generate the required control signals will be: $2$ $2.5$ $10$ $12$
What is the equivalent Boolean expression in product-of-sums form for the Karnaugh map given in Fig $B\overline{D} + \overline{B}D$ $(B + \overline{C} +D) (\overline{B} + C + \overline{D})$ $(B + {D})(\overline{B} +\overline{ D})$ $(B + \overline{D})(\overline{B} + {D})$
Consider the following state table for a sequential machine. The number of states in the minimized machine will be ... $4$ $3$ $2$ $1$
Consider the circuit in figure. $f$ implements $\overline{A} \overline{B}C + \overline{A}B \overline{C} + ABC$ $A + B + C$ $A \oplus B \oplus C$ $AB + BC + CA$