The PYQ practice room

GATE CS 2016 Set 1

All 65 solved GATE CS 2016 Set 1 questions in exam order. Open a question, commit to an answer, and learn from the step-by-step solution. One question at a time.

Attempt before revealInstant answer feedbackExplore questions
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.

Questions

65

Paper marks

100

Question formats

2

MCQ · NAT

Revision mode

Self-paced

No timer. Focus on understanding.

Difficulty mixEasy 27Medium 32Hard 6

Explore the questions

65 of 65 questions

General Aptitude (GA)

10
  1. Think it through. Then check your answer.

    Question

    Out of the following four sentences, select the most suitable sentence with respect to grammar and usage.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  2. Think it through. Then check your answer.

    Question

    A rewording of something written or spoken is a ______________.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  3. Think it through. Then check your answer.

    Question

    Archimedes said, “Give me a lever long enough and a fulcrum on which to place it, and I will move the world.”
    The sentence above is an example of a ___________ statement.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  4. Think it through. Then check your answer.

    Question

    If ‘relftaga’ means carefree, ‘otaga’ means careful and ‘fertaga’ means careless, which of the following could mean ‘aftercare’?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  5. Think it through. Then check your answer.

    Question

    A cube is built using 64 cubic blocks of side one unit. After it is built, one cubic block is removed from every corner of the cube. The resulting surface area of the body (in square units) after the removal is __________.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  6. Think it through. Then check your answer.

    Question

    A shaving set company sells 4 different types of razors, Elegance, Smooth, Soft and Executive. Elegance sells at Rs. 48, Smooth at Rs. 63, Soft at Rs. 78 and Executive at Rs. 173 per piece. The table below shows the numbers of each razor sold in each quarter of a year.
    Quarter \ ProductEleganceSmoothSoftExecutive
    Q12730020009176029999
    Q22522219392184458942
    Q328976224291954410234
    Q421012182291659510109
    Which product contributes the greatest fraction to the revenue of the company in that year?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  7. Think it through. Then check your answer.

    Question

    Indian currency notes show the denomination indicated in at least seventeen languages. If this is not an indication of the nation’s diversity, nothing else is.
    Which of the following can be logically inferred from the above sentences?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  8. Think it through. Then check your answer.

    Question

    Consider the following statements relating to the level of poker play of four players P, Q, R and S.
    I. P always beats Q
    II. R always beats S
    III. S loses to P only sometimes
    IV. R always loses to Q
    Which of the following can be logically inferred from the above statements?
    (i) P is likely to beat all the three other players
    (ii) S is the absolute worst player in the set
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  9. Think it through. Then check your answer.

    Question

    If f(x)=2x7+3x5f(x) = 2x^7 + 3x - 5, which of the following is a factor of f(x)f(x)?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  10. Think it through. Then check your answer.

    Question

    In a process, the number of cycles to failure decreases exponentially with an increase in load. At a load of 80 units, it takes 100 cycles for failure. When the load is halved, it takes 10000 cycles for failure. The load for which the failure will happen in 5000 cycles is ________.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page

COMPUTER SCIENCE AND INFORMATION TECHNOLOGY

55
  1. Think it through. Then check your answer.

    Question

    Let p,q,r,sp, q, r, s represent the following propositions.

    p:x{8,9,10,11,12}p: x \in \{8, 9, 10, 11, 12\}
    q:xq: x is a composite number
    r:xr: x is a perfect square
    s:xs: x is a prime number
    The integer x2x \ge 2 which satisfies ¬((pq)(¬r¬s))\neg ((p \Rightarrow q) \wedge (\neg r \vee \neg s)) is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  2. Think it through. Then check your answer.

    Question

    Let ana_n be the number of nn-bit strings that do NOT contain two consecutive 1s. Which one of the following is the recurrence relation for ana_n?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  3. Think it through. Then check your answer.

    Question

    limx4sin(x4)x4\lim_{x \to 4} \frac{\sin(x-4)}{x-4} = ______________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  4. Think it through. Then check your answer.

    Question

    A probability density function on the interval [a,1][a,1] is given by 1/x21/x^2 and outside this interval the value of the function is zero. The value of aa is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  5. Think it through. Then check your answer.

    Question

    Two eigenvalues of a 3×33 \times 3 real matrix PP are (2+1)(2 + \sqrt{-1}) and 33. The determinant of PP is ___________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  6. Think it through. Then check your answer.

    Question

    Consider the Boolean operator # with the following properties:
    x#0=x,x#1=xˉ,x#x=0x\# 0 = x, x\# 1 = \bar{x}, x\#x = 0 and x#xˉ=1x\# \bar{x} = 1. Then x#yx\#y is equivalent to
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  7. Think it through. Then check your answer.

    Question

    The 16-bit 2’s complement representation of an integer is 1111 1111 1111 0101; its decimal representation is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  8. Think it through. Then check your answer.

    Question

    We want to design a synchronous counter that counts the sequence 0-1-0-2-0-3 and then repeats. The minimum number of J-K flip-flops required to implement this counter is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  9. Think it through. Then check your answer.

    Question

    A processor can support a maximum memory of 4 GB, where the memory is word-addressable (a word consists of two bytes). The size of the address bus of the processor is at least ________ bits.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  10. Think it through. Then check your answer.

    Question

    A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT (nn refers to the number of items in the queue)?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  11. Think it through. Then check your answer.

    Question

    Consider the following directed graph:
    Directed graph with vertices a, b, c, d, e, f and edges a->b, b->c, c->f, a->d, d->e, e->f
    The number of different topological orderings of the vertices of the graph is _______.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  12. Think it through. Then check your answer.

    Question

    Consider the following C program.
    void f(int, short);
    void main()
    {
        int i = 100;
        short s = 12;
        short *p = &s;
        __________ ; // call to f()
    }
    
    Which one of the following expressions, when placed in the blank above, will NOT result in a type checking error?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  13. Think it through. Then check your answer.

    Question

    The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are:
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  14. Think it through. Then check your answer.

    Question

    Let GG be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increased by the same value, then which of the following statements is/are TRUE?
    P: Minimum spanning tree of GG does not change
    Q: Shortest path between any pair of vertices does not change
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  15. Think it through. Then check your answer.

    Question

    Consider the following C program.
    #include<stdio.h>
    void mystery(int *ptra, int *ptrb) {
        int *temp;
        temp = ptrb;
        ptrb = ptra;
        ptra = temp;
    }
    int main() {
        int a=2016, b=0, c=4, d=42;
        mystery(&a, &b);
        if (a < c)
            mystery(&c, &a);
        mystery(&a, &d);
        printf("%d\n", a);
    }
    
    The output of the program is ________ .
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  16. Think it through. Then check your answer.

    Question

    Which of the following languages is generated by the given grammar?SaSbSϵS \longrightarrow aS \mid bS \mid \epsilon
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  17. Think it through. Then check your answer.

    Question

    Which of the following decision problems are undecidable?
    I. Given NFAs N1N_1 and N2N_2, is L(N1)L(N2)=ΦL(N_1) \cap L(N_2) = \Phi?
    II. Given a CFG G=(N,Σ,P,S)G = (N, \Sigma, P, S) and a string xΣx \in \Sigma^*, does xL(G)x \in L(G)?
    III. Given CFGs G1G_1 and G2G_2, is L(G1)=L(G2)L(G_1) = L(G_2)?
    IV. Given a TM MM, is L(M)=ΦL(M) = \Phi?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  18. Think it through. Then check your answer.

    Question

    Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  19. Think it through. Then check your answer.

    Question

    Consider the following code segment.
    x = u - t;
    y = x * v;
    x = y + w;
    y = t - z;
    y = x * y;
    
    The minimum number of total variables required to convert the above code segment to static single assignment form is __________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  20. Think it through. Then check your answer.

    Question

    Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  21. Think it through. Then check your answer.

    Question

    Which of the following is NOT a superkey in a relational schema with attributes V,W,X,Y,ZV, W, X, Y, Z and primary key VYV Y?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  22. Think it through. Then check your answer.

    Question

    Which one of the following is NOT a part of the ACID properties of database transactions?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  23. Think it through. Then check your answer.

    Question

    A database of research articles in a journal uses the following schema.
    (VOLUME,NUMBER,STARTPAGE,ENDPAGE,TITLE,YEAR,PRICE)(\text{VOLUME}, \text{NUMBER}, \text{STARTPAGE}, \text{ENDPAGE}, \text{TITLE}, \text{YEAR}, \text{PRICE})
    The primary key is (VOLUME,NUMBER,STARTPAGE,ENDPAGE)(\text{VOLUME}, \text{NUMBER}, \text{STARTPAGE}, \text{ENDPAGE}) and the following functional dependencies exist in the schema.
    (VOLUME,NUMBER,STARTPAGE,ENDPAGE)TITLE(\text{VOLUME}, \text{NUMBER}, \text{STARTPAGE}, \text{ENDPAGE}) \rightarrow \text{TITLE}
    (VOLUME,NUMBER)YEAR(\text{VOLUME}, \text{NUMBER}) \rightarrow \text{YEAR}
    (VOLUME,NUMBER,STARTPAGE,ENDPAGE)PRICE(\text{VOLUME}, \text{NUMBER}, \text{STARTPAGE}, \text{ENDPAGE}) \rightarrow \text{PRICE}
    The database is redesigned to use the following schemas.
    (VOLUME,NUMBER,STARTPAGE,ENDPAGE,TITLE,PRICE)(\text{VOLUME}, \text{NUMBER}, \text{STARTPAGE}, \text{ENDPAGE}, \text{TITLE}, \text{PRICE})
    (VOLUME,NUMBER,YEAR)(\text{VOLUME}, \text{NUMBER}, \text{YEAR})
    Which is the weakest normal form that the new database satisfies, but the old one does not?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  24. Think it through. Then check your answer.

    Question

    Which one of the following protocols is NOT used to resolve one form of address to another one?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  25. Think it through. Then check your answer.

    Question

    Which of the following is/are example(s) of stateful application layer protocols?
    (i) HTTP
    (ii) FTP
    (iii) TCP
    (iv) POP3
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  26. Think it through. Then check your answer.

    Question

    The coefficient of x12x^{12} in (x3+x4+x5+x6+)3(x^3 + x^4 + x^5 + x^6 + \dots)^3 is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  27. Think it through. Then check your answer.

    Question

    Consider the recurrence relation a1=8,an=6n2+2n+an1a_1 = 8, a_n = 6n^2 + 2n + a_{n-1}. Let a99=K×104a_{99} = K \times 10^4. The value of KK is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  28. Think it through. Then check your answer.

    Question

    A function f:N+N+f : \mathbb{N}^+ \to \mathbb{N}^+, defined on the set of positive integers N+\mathbb{N}^+, satisfies the following properties:f(n)=f(n/2)if n is evenf(n) = f(n/2) \quad \text{if } n \text{ is even}f(n)=f(n+5)if n is oddf(n) = f(n+5) \quad \text{if } n \text{ is odd}Let R={ij:f(j)=i}R = \{i \mid \exists j : f(j) = i\} be the set of distinct values that ff takes. The maximum possible size of RR is __________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  29. Think it through. Then check your answer.

    Question

    Consider the following experiment.
    Step 1. Flip a fair coin twice.
    Step 2. If the outcomes are (TAILS, HEADS) then output YY and stop.
    Step 3. If the outcomes are either (HEADS, HEADS) or (HEADS, TAILS), then output NN and stop.
    Step 4. If the outcomes are (TAILS, TAILS), then go to Step 1.
    The probability that the output of the experiment is YY is (up to two decimal places)
    __________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  30. Think it through. Then check your answer.

    Question

    Consider the two cascaded 2-to-1 multiplexers as shown in the figure.
    Two cascaded 2-to-1 multiplexers circuit diagram
    The minimal sum of products form of the output XX is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  31. Think it through. Then check your answer.

    Question

    The size of the data count register of a DMA controller is 16 bits. The processor needs to transfer a file of 29,154 kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the DMA controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory is __________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  32. Think it through. Then check your answer.

    Question

    The stage delays in a 4-stage pipeline are 800, 500, 400 and 300 picoseconds. The first stage (with delay 800 picoseconds) is replaced with a functionally equivalent design involving two stages with respective delays 600 and 350 picoseconds. The throughput increase of the pipeline is __________ percent.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  33. Think it through. Then check your answer.

    Question

    Consider a carry lookahead adder for adding two nn-bit integers, built using gates of fan-in at most two. The time to perform addition using this adder is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  34. Think it through. Then check your answer.

    Question

    The following function computes the maximum value contained in an integer array p[] of size n (n >= 1).
    int max(int *p, int n) {
        int a=0, b=n-1;
    
        while (__________) {
            if (p[a] <= p[b]) { a = a+1; }
            else              { b = b-1; }
        }
    
        return p[a];
    }
    
    The missing loop condition is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  35. Think it through. Then check your answer.

    Question

    What will be the output of the following C program?
    void count(int n){
        static int d=1;
    
        printf("%d ", n);
        printf("%d ", d);
        d++;
        if(n>1) count(n-1);
        printf("%d ", d);
    }
    
    void main(){
        count(3);
    }
    
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  36. Think it through. Then check your answer.

    Question

    What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed?
    a=3;
    void n(x) {x = x * a; print(x);}
    void m(y) {a = 1; a = y - a; n(a); print(a);}
    void main() {m(a);}
    
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  37. Think it through. Then check your answer.

    Question

    An operator delete(i)delete(i) for a binary heap data structure is to be designed to delete the item in the ii-th node. Assume that the heap is implemented in an array and ii refers to the ii-th index of the array. If the heap tree has depth dd (number of edges on the path from the root to the farthest leaf), then what is the time complexity to re-fix the heap efficiently after the removal of the element?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  38. Think it through. Then check your answer.

    Question

    Consider the weighted undirected graph with 4 vertices, where the weight of edge {i,j}\{i, j\} is given by the entry WijW_{ij} in the matrix WW.W=[02852058850x58x0]W = \begin{bmatrix} 0 & 2 & 8 & 5 \\ 2 & 0 & 5 & 8 \\ 8 & 5 & 0 & x \\ 5 & 8 & x & 0 \end{bmatrix}The largest possible integer value of xx, for which at least one shortest path between some pair of vertices will contain the edge with weight xx is _________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  39. Think it through. Then check your answer.

    Question

    Let GG be a complete undirected graph on 4 vertices, having 6 edges with weights being 1, 2, 3, 4, 5, and 6. The maximum possible weight that a minimum weight spanning tree of GG can have is _________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  40. Think it through. Then check your answer.

    Question

    G=(V,E)G = (V,E) is an undirected simple graph in which each edge has a distinct weight, and ee is a particular edge of GG. Which of the following statements about the minimum spanning trees (MSTs) of GG is/are TRUE?
    I. If ee is the lightest edge of some cycle in GG, then every MST of GG includes ee
    II. If ee is the heaviest edge of some cycle in GG, then every MST of GG excludes ee
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  41. Think it through. Then check your answer.

    Question

    Let QQ denote a queue containing sixteen numbers and SS be an empty stack. Head(Q)Head(Q) returns the element at the head of the queue QQ without removing it from QQ. Similarly Top(S)Top(S) returns the element at the top of SS without removing it from SS. Consider the algorithm given below.
    while Q is not Empty do
        if S is Empty OR Top(S) <= Head(Q) then
            x := Dequeue(Q);
            Push(S, x);
        else
            x := Pop(S);
            Enqueue(Q, x);
        end
    end
    
    The maximum possible number of iterations of the while loop in the algorithm is __________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  42. Think it through. Then check your answer.

    Question

    Consider the following context-free grammars:
    G1:SaSB,BbbBG_1: S \to aS \mid B, B \to b \mid bB
    G2:SaAbB,AaABϵ,BbBϵG_2: S \to aA \mid bB, A \to aA \mid B \mid \epsilon, B \to bB \mid \epsilon
    Which one of the following pairs of languages is generated by G1G_1 and G2G_2, respectively?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  43. Think it through. Then check your answer.

    Question

    Consider the transition diagram of a PDA given below with input alphabet Σ={a,b}\Sigma = \{a,b\} and stack alphabet Γ={X,Z}\Gamma = \{X,Z\}. ZZ is the initial stack symbol. Let LL denote the language accepted by the PDA.
    Transition diagram of a PDA with 4 states
    Which one of the following is TRUE?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  44. Think it through. Then check your answer.

    Question

    Let XX be a recursive language and YY be a recursively enumerable but not recursive language. Let WW and ZZ be two languages such that Y\overline{Y} reduces to WW, and ZZ reduces to X\overline{X} (reduction means the standard many-one reduction). Which one of the following statements is TRUE?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  45. Think it through. Then check your answer.

    Question

    The attributes of three arithmetic operators in some programming language are given below.
    OperatorPrecedenceAssociativityArity
    ++HighLeftBinary
    -MediumRightBinary
    *LowLeftBinary
    The value of the expression 25+1732 - 5 + 1 - 7 * 3 in this language is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  46. Think it through. Then check your answer.

    Question

    Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S,A}\{S, A\} and terminals {a,b}\{a, b\}.
    SaA{print 1}S \longrightarrow aA \quad \{ \text{print } 1 \}
    Sa{print 2}S \longrightarrow a \quad \{ \text{print } 2 \}
    ASb{print 3}A \longrightarrow Sb \quad \{ \text{print } 3 \}
    Using the above SDTS, the output printed by a bottom-up parser, for the input aab is:
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  47. Think it through. Then check your answer.

    Question

    Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table per process and each page table entry requires 48 bits, then the size of the per-process page table is ________ megabytes.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  48. Think it through. Then check your answer.

    Question

    Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  49. Think it through. Then check your answer.

    Question

    Consider a computer system with ten physical page frames. The system is provided with an access sequence (a1,a2,,a20,a1,a2,,a20)(a_1, a_2, \dots, a_{20}, a_1, a_2, \dots, a_{20}), where each aia_i is a distinct virtual page number. The difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  50. Think it through. Then check your answer.

    Question

    Consider the following proposed solution for the critical section problem. There are nn processes: P0Pn1P_0 \dots P_{n-1}. In the code, function pmax returns an integer not smaller than any of its arguments. For all ii, t[i] is initialized to zero.
    Code for PiP_i:
    do {
        c[i]=1; t[i] = pmax(t[0],...,t[n-1])+1; c[i]=0;
        for every j != i in {0,...,n-1} {
            while (c[j]);
            while (t[j] != 0 && t[j]<=t[i]);
        }
        Critical Section;
        t[i]=0;
        Remainder Section;
    } while (true);
    
    Which one of the following is TRUE about the above solution?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  51. Think it through. Then check your answer.

    Question

    Consider the following two phase locking protocol. Suppose a transaction TT accesses (for read or write operations), a certain set of objects {O1,,Ok}\{O_1, \dots, O_k\}. This is done in the following manner:
    Step 1. TT acquires exclusive locks to O1,,OkO_1, \dots, O_k in increasing order of their addresses.
    Step 2. The required operations are performed.
    Step 3. All locks are released.
    This protocol will
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  52. Think it through. Then check your answer.

    Question

    Consider that B wants to send a message mm that is digitally signed to A. Let the pair of private and public keys for A and B be denoted by KxK_x^- and Kx+K_x^+ for x=A,Bx = A, B, respectively. Let Kx(m)K_x(m) represent the operation of encrypting mm with a key KxK_x and H(m)H(m) represent the message digest. Which one of the following indicates the CORRECT way of sending the message mm along with the digital signature to A?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  53. Think it through. Then check your answer.

    Question

    An IP datagram of size 1000 bytes arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is 100 bytes. Assume that the size of the IP header is 20 bytes. The number of fragments that the IP datagram will be divided into for transmission is ________.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  54. Think it through. Then check your answer.

    Question

    For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of 1 megabyte and the maximum output rate is 20 megabytes per second. Tokens arrive at a rate to sustain output at a rate of 10 megabytes per second. The token bucket is currently full and the machine needs to send 12 megabytes of data. The minimum time required to transmit the data is ________ seconds.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  55. Think it through. Then check your answer.

    Question

    A sender uses the Stop-and-Wait ARQ protocol for reliable transmission of frames. Frames are of size 1000 bytes and the transmission rate at the sender is 80 Kbps (1Kbps = 1000 bits/second). Size of an acknowledgement is 100 bytes and the transmission rate at the receiver is 8 Kbps. The one-way propagation delay is 100 milliseconds.
    Assuming no frame is lost, the sender throughput is __________ bytes/second.
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page