search
Log In

Recent questions tagged gate2001

9 votes
1 answer
1
A sequential circuit takes an input stream of 0's and 1's and produces an output stream of 0's and 1's. Initially it replicates the input on its output until two consecutive 0's are encountered on the input. From then onward, it produces an output stream, which is ... to be used to design the circuit. Give the minimized sum-of-product expression for J and K inputs of one of its state flip-flops
asked Feb 12, 2018 in Digital Logic jothee 929 views
6 votes
2 answers
2
Consider a relation examinee (regno, name, score), where regno is the primary key to score is a real number. Write an SQL query to list the regno of examinees who have a score greater than the average score.
asked Feb 8, 2018 in Databases jothee 609 views
1 vote
1 answer
3
Consider a relation $\text{examinee (regno, name, score)},$ where regno is the primary key to score is a real number. Suppose the relation $\text{appears (regno, centr_code)}$ specifies the center where an examinee appears. Write an SQL query to list the centr_code having an examinee of score greater than $80.$
asked Feb 8, 2018 in Databases jothee 382 views
17 votes
4 answers
4
Consider a set of n tasks with known runtimes $r_1, r_2, \dots r_n$ to be run on a uniprocessor machine. Which of the following processor scheduling algorithms will result in the maximum throughput? Round Robin Shortest job first Highest response ratio next first come first served
asked Jun 10, 2016 in Operating System jothee 5.4k views
7 votes
2 answers
5
We wish to construct a $B^+$ tree with fan-out (the number of pointers per node) equal to $3$ for the following set of key values: $80, 50, 10, 70, 30, 100, 90$ Assume that the tree is initially empty and the values are added in the order given. Show ... Intermediate trees need not be shown. The key values $30$ and $10$ are now deleted from the tree in that order show the tree after each deletion.
asked Sep 15, 2014 in Databases Kathleen 1.1k views
15 votes
2 answers
6
Consider a relation examinee (regno, name, score), where regno is the primary key to score is a real number. Write a relational algebra using $( \Pi, \sigma, \rho, \times)$ to find the list of names which appear more than once in examinee.
asked Sep 15, 2014 in Databases Kathleen 1.4k views
32 votes
3 answers
7
Consider a disk with the $100$ tracks numbered from $0$ to $99$ rotating at $3000$ rpm. The number of sectors per track is $100$ and the time to move the head between two successive tracks is $0.2$ millisecond. Consider a set of disk requests to read ... initially at track $0$ and the elevator algorithm is used to schedule disk requests, what is the worse case time to complete all the requests?
asked Sep 15, 2014 in Operating System Kathleen 4.1k views
29 votes
3 answers
8
Two concurrent processes $P1$ and $P2$ want to use resources $R1$ and $R2$ in a mutually exclusive manner. Initially, $R1$ and $R2$ ... to deadlock. Exchange the statements $Q1$ and $Q3$ and statements $Q2$ and $Q4$. Is mutual exclusion guaranteed now? Can deadlock occur?
asked Sep 15, 2014 in Operating System Kathleen 2.2k views
15 votes
2 answers
9
Remove left-recursion from the following grammar: $S \rightarrow Sa \mid Sb \mid a \mid b$ Consider the following grammar: $S \rightarrow aSbS\mid bSaS \mid ∊$ Construct all possible parse trees for the string abab. Is the grammar ambiguous?
asked Sep 15, 2014 in Compiler Design Kathleen 1.5k views
6 votes
1 answer
10
The syntax of the repeat-until statement is given by the following grammar $S \rightarrow\text{ repeat }S_1\text{ until }E$ where E stands for expressions, $S$ and $S_1$ stand for statements. The non-terminals $S$ and $S_1$ have an attribute code that represents ... a statement. Use the operator '\\' to concatenate two strings and the function gen(s) to generate a line containing the string s.
asked Sep 15, 2014 in Compiler Design Kathleen 685 views
19 votes
2 answers
11
Consider the following grammar with terminal alphabet $\Sigma =\{a,(,),+,* \}$ and start symbol $E$. The production rules of the grammar are: $ E \rightarrow aA$ $ E \rightarrow (E)$ $A \rightarrow +E$ $A \rightarrow *E$ $A \rightarrow \epsilon $ Compute the FIRST and FOLLOW sets for $E$ and $A$. Complete the LL(1) parse table for the grammar.
asked Sep 15, 2014 in Compiler Design Kathleen 1.1k views
19 votes
2 answers
12
Consider a weighted undirected graph with vertex set $V = \{ n1, n2, n3, n4, n5, n6 \} $ and edge set $E = \{(n1,n2,2), (n1,n3,8), (n1,n6,3), (n2,n4,4), (n2,n5,12), (n3,n4,7), (n4,n5,9), (n4,n6,4)\}$. The ... tree unique over all possible minimum spanning trees of a graph? Is the maximum among the edge weights of a minimum spanning tree unique over all possible minimum spanning tree of a graph?
asked Sep 15, 2014 in Algorithms Kathleen 1.8k views
26 votes
3 answers
13
Insert the following keys one by one into a binary search tree in the order specified.$15, 32, 20, 9, 3, 25, 12, 1$Show the final binary search tree after the insertions. Draw the binary search tree after deleting $15$ from it. Complete the statements $S1$, $S2$ and $S3$ in ... = NULL) return 0; x = depth (t -> left); S1: ___________; S2: if (x > y) return __________; S3: else return _______; }
asked Sep 15, 2014 in DS Kathleen 1.9k views
21 votes
2 answers
14
Consider the following C program: void abc(char*s) { if(s[0]=='\0')return; abc(s+1); abc(s+1); printf("%c",s[0]); } main() { abc("123"); } What will be the output of the program? If $abc(s)$ is called with a null-terminated string $s$ of length $n$ characters (not counting the null ('\0') character), how many characters will be printed by $abc(s)$?
asked Sep 15, 2014 in Programming Kathleen 2.8k views
37 votes
2 answers
15
Consider a $5-$stage pipeline - IF (Instruction Fetch), ID (Instruction Decode and register read), EX (Execute), MEM (memory), and WB (Write Back). All (memory or register) reads take place in the second phase of a clock cycle and all writes occur ... Show all data dependencies between the four instructions. Identify the data hazards. Can all hazards be avoided by forwarding in this case.
asked Sep 15, 2014 in CO and Architecture Kathleen 6.2k views
18 votes
1 answer
16
A sequential circuit takes an input stream of 0's and 1's and produces an output stream of 0's and 1's. Initially it replicates the input on its output until two consecutive 0's are encountered on the input. From then onward, it produces an output stream, ... The desired output 101100|10110100 0|11 J-K master-slave flip-flops are to be used to design the circuit. Give the state transition diagram
asked Sep 15, 2014 in Digital Logic Kathleen 1.4k views
20 votes
5 answers
17
Is the $3\text{-variable}$ function $f= \Sigma(0,1,2,4)$ its self-dual? Justify your answer. Give a minimal product-of-sum form of the $b$ output of the following $\text{excess-3}$ to $\text{BCD}$ converter.
asked Sep 15, 2014 in Digital Logic Kathleen 1.5k views
21 votes
2 answers
18
A CPU has $32-bit$ memory address and a $256 \ KB$ cache memory. The cache is organized as a $4-way$ set associative cache with cache block size of $16$ bytes. What is the number of sets in the cache? What is the size (in bits) of the tag field per ... bits are required to find the byte offset within a cache block? What is the total amount of extra memory (in bytes) required for the tag bits?
asked Sep 15, 2014 in CO and Architecture Kathleen 4.5k views
33 votes
3 answers
19
Consider a disk with the following specifications: 20 surfaces, 1000 tracks/surface, 16 sectors/track, data density 1 KB/sector, rotation speed 3000 rpm. The operating system initiates the transfer between the disk and the memory sector-wise. Once the head has been placed on ... transfer? What is the maximum percentage of time the CPU is held up for this disk I/O for cycle-stealing DMA transfer?
asked Sep 15, 2014 in Operating System Kathleen 4.4k views
23 votes
2 answers
20
Let a decision problem $X$ be defined as follows: $X$: Given a Turing machine $M$ over $\Sigma$ and any word $w \in \Sigma$, does $M$ loop forever on $w$? You may assume that the halting problem of Turing machine is undecidable but partially decidable. Show that $X$ is undecidable Show that $X$ is not even partially decidable
asked Sep 15, 2014 in Theory of Computation Kathleen 1.7k views
15 votes
2 answers
21
Give a deterministic PDA for the language $L=\{a^ncb^{2n} \mid n \geq 1\}$ over the alphabet $\Sigma = \{a,b,c\}$. Specify the acceptance state.
asked Sep 15, 2014 in Theory of Computation Kathleen 1k views
23 votes
2 answers
22
Construct DFA's for the following languages: $L=\left\{w \mid w \in \{a,b\}^*, \text{ w has baab as a substring } \right\}$ $L=\left\{w \mid w \in \{a,b\}^*, \text{ w has an odd number of a's and an odd number of b's } \right\} $
asked Sep 15, 2014 in Theory of Computation Kathleen 1.5k views
2 votes
3 answers
23
Consider the function $h: N \times N \rightarrow N$ so that $h(a,b) = (2a +1)2^b - 1$, where $N=\{0,1,2,3,\dots\}$ is the set of natural numbers. Prove that the function $h$ is an injection (one-one). Prove that it is also a Surjection (onto)
asked Sep 15, 2014 in Set Theory & Algebra Kathleen 700 views
4 votes
2 answers
24
Prove that powerset $(A \cap B) = \text{powerset}(A) \cap \text{powerset}(B)$ Let $sum(n) = 0 + 1 + 2 + ..... + n$ for all natural numbers n. Give an induction proof to show that the following equation is true for all natural numbers $m$ and $n$: $sum(m+n) = sum(m) + sum(n) + mn$
asked Sep 15, 2014 in Set Theory & Algebra Kathleen 673 views
43 votes
5 answers
25
Consider a relation geq which represents "greater than or equal to", that is, $(x,y) \in $ geq only if $y \geq x$. create table geq ( ib integer not null, ub integer not null, primary key ib, foreign key (ub) references geq on delete cascade ); Which of the following is possible ... deleted A tuple (z,w) with z > x is deleted A tuple (z,w) with w < x is deleted The deletion of (x,y) is prohibited
asked Sep 15, 2014 in Databases Kathleen 3.8k views
28 votes
2 answers
26
Which of the rational calculus expression is not safe? $\left\{t \mid \exists u \in R_1\left(t[A] = u[A]\right) \land \neg \exists s \in R_2 \left(t[A] = s[A]\right)\right\}$ ... $\left\{t \mid \exists u \in R_1\left(t[A]=u[A]\right) \land \exists s \in R_2 \left(t[A] = s[A]\right)\right\}$
asked Sep 15, 2014 in Databases Kathleen 3k views
87 votes
4 answers
27
$R(A,B,C,D)$ is a relation. Which of the following does not have a lossless join, dependency preserving $BCNF$ decomposition? $A \rightarrow B, B \rightarrow CD$ $A \rightarrow B, B \rightarrow C, C \rightarrow D$ $ AB \rightarrow C, C \rightarrow AD$ $A \rightarrow BCD$
asked Sep 15, 2014 in Databases Kathleen 15.1k views
40 votes
5 answers
28
Consider Peterson's algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below. repeat flag[i] = true; turn = j; while (P) do no-op; Enter critical section, perform actions, then exit critical section Flag[i] = false; Perform other non- ... turn = i flag[j] = true and turn = j flag[i] = true and turn = j flag[i] = true and turn = i
asked Sep 15, 2014 in Operating System Kathleen 6.5k views
26 votes
3 answers
29
Consider a machine with $64$ MB physical memory and a $32$-bit virtual address space. If the page size s $4$ KB, what is the approximate size of the page table? $\text{16 MB}$ $\text{8 MB}$ $\text{2 MB}$ $\text{24 MB}$
asked Sep 15, 2014 in Operating System Kathleen 12k views
46 votes
4 answers
30
Which of the following does not interrupt a running process? A device Timer Scheduler process Power failure
asked Sep 15, 2014 in Operating System Kathleen 7.5k views
...