Recent questions tagged goclasses2024-mockgate-13

858
views
2 answers
4 votes
A university's mathematics department has $10$ professors and will offer $20$ different courses next semester. Each professor will be assigned to teach exactly $2$ of the courses, and each ... $10^{20}-2^{10}$ $\dfrac{20 ! 10 !}{2^{10}}$
582
views
1 answers
3 votes
The order of a leaf node in a $\text{B tree}$ ... and a block pointer is $6$ bytes long, what is the order of the leaf node?
346
views
1 answers
3 votes
Consider the following two schedules consisting to two transaction $\mathrm{T}_1$ and $\mathrm{T}_2$ :Which of the following is/are true about these ... $\mathrm{S}_2$ are neither conflict equivalent nor conflict serializable.
538
views
1 answers
2 votes
In typical RISC ISA, delayed branch executes which instruction irrespective of whether the branch condition is true or false?Instruction immediately following ... to a different a subroutineIt waits till the branch condition is evaluated
787
views
1 answers
7 votes
Consider a processor with an in-order five-stage pipeline (IF, ID, EX, MEM, and WB) with clock cycle time $10 \mathrm{~ns}$. This processor is ... branch is taken. What is the throughput (Million instructions per second) of the system?
490
views
1 answers
3 votes
Let $\mathrm{T}$ be the smallest AVL tree of height $h$. How many nodes does it have, if the smallest AVL tree of height $h-2$ has $m$ nodes and the smallest AVL tree of height $h-3$ has $k$ nodes?$m+k+2$m+2 k$2 m+k$2 m+k+2$
566
views
2 answers
4 votes
Consider the null-terminated linked list of four integers $\textsf{1->2->3->4->NULL},$ and the variable 'list' points to the head of the linked list. Upon running the ... ->next->next>next = list->next>next; LINE Y: list = list->next->next;
650
views
1 answers
3 votes
Consider the syntax-directed translation given by the following grammar and semantic rules. Here, $S$ is the only non-terminal and $\Sigma=\{0,1,2\}$ is a ... The value computed by the translation scheme for the input string $201$ is $20.$
454
views
1 answers
4 votes
Consider the following grammar$\begin{aligned}& A \rightarrow B B \\& B \rightarrow b\end{aligned}$Suppose we draw an $\operatorname{LR}(0)$ ... state with $2$ incoming transitionsThere is exactly one state with $3$ outgoing transitions
971
views
3 answers
7 votes
You are given a complete binary tree (each level must be full except the last) on $n$ vertices. Each vertex $v$ is labeled by an integer value $x_v$. Say that a vertex is a ... $\theta(\sqrt{n})$\theta(\log n)$\theta(n \log n)$
431
views
1 answers
5 votes
Consider the following weighted graph, where the weight of every edge is written on the edge itself.What is the number of possible minimum spanning trees for the above graph?
836
views
1 answers
11 votes
Consider the following statements related to Huffman's algorithm:$\text{S1:}$ If there is exactly one symbol with a frequency of $1 / 3$, and all other symbols have frequencies ... , but $\mathrm{S} 2$ is true.S1 is false, and S2 is false.
600
views
2 answers
9 votes
Let $A$ be a $2 \times 2$ matrix for which there is a constant $k$ such that the sum of the entries in each row and each column is $k$. Which of the following ... . I onlyII onlyIII onlyI and II only
542
views
1 answers
5 votes
Football teams $T_1$ and $T_2$ ... of $P(X=Y)?$1 / 3$13 / 36$1 / 36$1 / 18$
993
views
2 answers
7 votes
Imagine a computer with a $32$-bit virtual address space and $\text{1 KB}$ pages. It uses a two-level page table system, with page-sized chunks at the inner level(not at ... $2 \mathrm{~KB}$66 \mathrm{~KB}$16 \mathrm{MB}$
571
views
1 answers
7 votes
Assume that for a given system, virtual addresses are $40$ bits long and physical addresses are $30$ bits long. The page size is $8$ KB. The Translation Look-aside Buffer ( ... $2^{20}$2^{13}$2^8$
404
views
1 answers
3 votes
#include<stdio.h> #include<string.h> char upstr[50]; void putStar (int n,char str[]){ upstr[n] = str[n]; if(n == strlen(str)) return; else upstr[n+1] = '*'; putStar ... be the output of the given program?h*e*l*l*oh*e*l*l*o*h*e*l*l*hello
665
views
2 answers
8 votes
#include <stdio.h> int main() { int i= 255; short int *s= (short int *)&i; printf("%d\n", *s); }What will be the output of the above program in little-endian and big- ... $65280,\; 0$0,\;0$0,\; 65280$
616
views
1 answers
6 votes
We want to use semaphores to implement a shared critical section (CS) among three threads $\mathrm{T} 1$, $\mathrm{T} 2$, and $\mathrm{T} 3$.We ... What is the minimum number of binary semaphores we need in order to enforce this ordering?
457
views
1 answers
2 votes
Consider a laptop trying to access a file via HTTP from a server. The laptop knows its own IP address and the server's IP address.Below list the following messages that appear on the Laptop's ... c, a, e, c$a, e, c, d, g, c, b, f, c$
1.2k
views
2 answers
8 votes
A TCP connection has been established between hosts $\text{A}$ and $\text{B. A}$ receives a packet from $\text{B}$ with the following field values shown ... Sequence: $8001$Acknowledgment: $1053$Window size: $2000$[TCP Payload Size: $1000]$
1.1k
views
1 answers
8 votes
Consider a sliding window protocol with a window size of $5$ using cumulative ACKs (and ACK is being sent for each segment).Retransmissions: retransmissions occur under two ... (expressed in terms of msec after $t=0 )?$23$42$43$102$
1.0k
views
2 answers
9 votes
Suppose we use $\textsf{IEEE-754}$ single precision floating point format to represent the numbers in binary. What will be the hexadecimal representation ... $\textsf{0x80000008}$\textsf{0x80000010}$\textsf{0x80000002}$
881
views
1 answers
6 votes
Assume a cache memory with the following properties:The cache size $\text{(C)}$ is 512 bytes (contains $512$ data bytes)The cache uses an LRU (least recently used) policy ... $\text{B}=8$ bytes$\text{B}=16$ bytesNone of the above.
629
views
1 answers
5 votes
Recall that a Turing machine $\text{T}$ can be represented or 'coded' by an integer $m$. Let us write 'the $m$ th Turing machine' to mean the Turing machine coded ... $m$.The set of $n$ such that all Turing machines halt on the input $n$.
535
views
1 answers
7 votes
For a string $x=x_1 \cdots x_n \in \Sigma^*$, where $\Sigma$ is any alphabet and $x_1, \ldots, x_n \in \Sigma$, we write $x^{\uparrow m}=x^m$ (that is, the usual ... in \Sigma^*\right\}$\left\{(a b c)^{\downarrow n} \mid n \geq 0\right\}$
700
views
1 answers
8 votes
Consider a pushdown automaton (PDA) with two control states $Q=\{q 1, q 2\}$, start state $q 1$, input alphabet $\Sigma=\{a, b\}$, stack ... stack.)The number of strings of length $21$ accepted by the above pushdown automaton is _________.
528
views
1 answers
5 votes
Your code is required to perform the function $(\text{M}\%16) \ast 3.$ What should you do to eliminate multiplication ($\ast$) and mod($\%$ ... the result, shift result left by $2,$ and add the saved result to current result.
658
views
3 answers
2 votes
For the circuit in the figure below, if the current state $\text{Q}_3\text{Q}_2\text{Q}_1\text{Q}_0$ is $6$ ... the clock signal the new state will be (in decimal)? (the flip-flops are positive edge triggered)
626
views
2 answers
4 votes
You are asked to implement the following four functions with half-adders: ... functions simultaneously? (You are not allowed to use any other logic element but half-adder)