Q.1 Q.20 Carry One Mark Each. is differentiable for all real values of x

Similar documents
GATE 2007 Computer Science Engineering

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1)

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Programming in Fortran 90 : 2017/2018

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss.

ELEC 377 Operating Systems. Week 6 Class 3

CSE 326: Data Structures Quicksort Comparison Sorting Bound

CSE 326: Data Structures Quicksort Comparison Sorting Bound

Cache Performance 3/28/17. Agenda. Cache Abstraction and Metrics. Direct-Mapped Cache: Placement and Access

Design and Analysis of Algorithms

Problem Set 3 Solutions

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Sorting: The Big Picture. The steps of QuickSort. QuickSort Example. QuickSort Example. QuickSort Example. Recursive Quicksort

Harvard University CS 101 Fall 2005, Shimon Schocken. Assembler. Elements of Computing Systems 1 Assembler (Ch. 6)

CS1100 Introduction to Programming

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions

Assembler. Building a Modern Computer From First Principles.

CE 221 Data Structures and Algorithms

AADL : about scheduling analysis

Conditional Speculative Decimal Addition*

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array

CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

CMPS 10 Introduction to Computer Science Lecture Notes

Memory and I/O Organization

Data Representation in Digital Design, a Single Conversion Equation and a Formal Languages Approach

Assembler. Shimon Schocken. Spring Elements of Computing Systems 1 Assembler (Ch. 6) Compiler. abstract interface.

Hierarchical clustering for gene expression data analysis

Performance Evaluation of Information Retrieval Systems

Efficient Distributed File System (EDFS)

Parallelism for Nested Loops with Non-uniform and Flow Dependences

Parallel matrix-vector multiplication

An Optimal Algorithm for Prufer Codes *

Support Vector Machines

Nachos Project 3. Speaker: Sheng-Wei Cheng 2010/12/16

Priority queues and heaps Professors Clark F. Olson and Carol Zander

Sorting. Sorting. Why Sort? Consistent Ordering

such that is accepted of states in , where Finite Automata Lecture 2-1: Regular Languages be an FA. A string is the transition function,

Load Balancing for Hex-Cell Interconnection Network

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman)

Esc101 Lecture 1 st April, 2008 Generating Permutation

High level vs Low Level. What is a Computer Program? What does gcc do for you? Program = Instructions + Data. Basic Computer Organization

CS 534: Computer Vision Model Fitting

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

A SYSTOLIC APPROACH TO LOOP PARTITIONING AND MAPPING INTO FIXED SIZE DISTRIBUTED MEMORY ARCHITECTURES

GATE-2007 COMPUTER SCIENCE AND ENGINEERING

Private Information Retrieval (PIR)

Lobachevsky State University of Nizhni Novgorod. Polyhedron. Quick Start Guide

Module Management Tool in Software Development Organizations

Real-Time Guarantees. Traffic Characteristics. Flow Control

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

CHAPTER 2 PROPOSED IMPROVED PARTICLE SWARM OPTIMIZATION

If you miss a key. Chapter 6: Demand Paging Source:

Real-time Scheduling

Array transposition in CUDA shared memory

Oracle Database: SQL and PL/SQL Fundamentals Certification Course

Brave New World Pseudocode Reference

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming

Machine Learning: Algorithms and Applications

Sorting and Algorithm Analysis

Greedy Technique - Definition

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

4/11/17. Agenda. Princeton University Computer Science 217: Introduction to Programming Systems. Goals of this Lecture. Storage Management.

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

Lecture 7 Real Time Task Scheduling. Forrest Brewer

On Correctness of Nonserializable Executions

CS240: Programming in C. Lecture 12: Polymorphic Sorting


More on Sorting: Quick Sort and Heap Sort

Hermite Splines in Lie Groups as Products of Geodesics

ETAtouch RESTful Webservices

Announcements. Supervised Learning

Constructing Minimum Connected Dominating Set: Algorithmic approach

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields

CHAPTER 10: ALGORITHM DESIGN TECHNIQUES

Transaction-Consistent Global Checkpoints in a Distributed Database System

CHAPTER 2 DECOMPOSITION OF GRAPHS

#4 Inverted page table. The need for more bookkeeping. Inverted page table architecture. Today. Our Small Quiz

Reclaiming the Brain: Useful OpenFlow Functions in the Data Plane

All-Pairs Shortest Paths. Approximate All-Pairs shortest paths Approximate distance oracles Spanners and Emulators. Uri Zwick Tel Aviv University

3. CR parameters and Multi-Objective Fitness Function

Solving two-person zero-sum game by Matlab

Dijkstra s Single Source Algorithm. All-Pairs Shortest Paths. Dynamic Programming Solution. Performance. Decision Sequence.

Chapter 1. Introduction

Outline. Self-Organizing Maps (SOM) US Hebbian Learning, Cntd. The learning rule is Hebbian like:

Introduction to Programming. Lecture 13: Container data structures. Container data structures. Topics for this lecture. A basic issue with containers

Summarizing Data using Bottom-k Sketches

Intro. Iterators. 1. Access

Lecture 3: Computer Arithmetic: Multiplication and Division

K-means and Hierarchical Clustering

Computation of a Minimum Average Distance Tree on Permutation Graphs*

Math Homotopy Theory Additional notes

Cluster Analysis of Electrical Behavior

Introduction. Leslie Lamports Time, Clocks & the Ordering of Events in a Distributed System. Overview. Introduction Concepts: Time

Transcription:

Q. Q.0 Carry One Mark Each CS Computer Scence: Gate 007 Paper. Consder the followng two statements about the functon f ( x) = x : P. f ( x) s contnuous for all real values of x Q. f ( x) s dfferentable for all real values of x Whch of the followng s TRUE? (A) P s true and Q s false. (C) Both P and Q are true. (B) P s false and Q s true. (D) Both P and Q are false.. Let S be a set of n elements. The number of ordered pars n the largest and the smallest equvalence relatons on S are: (A) n and n (B) n and n (C) n and 0 (D) n and 3. What s the maxmum number of dfferent Boolean functons nvolvng n Boolean varables? (A) n (B) n (C) n (D) n 4. Let G be the non-planar graph wth the mnmum possble number of edges. Then G has (A) 9 edges and 5 vertces (C) 0 edges and 5 vertces (B) 9 edges and 6 vertces (D) 0 edges and 6 vertces 5. Consder the DAG wth V = {,,3,4,5,6, shown below. 5 4 3 6 Whch of the followng s NOT a topologcal orderng? (A) 3 4 5 6 (B) 3 4 5 6 (C) 3 4 6 5 (D) 3 4 6 5 6. Whch of the followng problems s undecdable? (A) Membershp problem for CFGs. (B) Ambguty problem for CFGs. (C) Fnteness problem for FSAs. (D) Equvalence problem for FSAs. n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com.

7. Whch of the followng s TRUE? (A) Every subset of a regular set s regular. (B) Every fnte subset of a non-regular set s regular. (C) The unon of two non-regular sets s not regular. (D) Infnte unon of fnte sets s regular. CS Computer Scence: Gate 007 Paper 8. How many 3-to-8 lne decoders wth an enable nput are needed to construct a 6- to-64 lne decoder wthout usng any other logc gates? (A) 7 (B) 8 (C) 9 (D) 0 9. Consder the followng Boolean functon of four varables: f ( w, x, y, z ) = (, 3, 4, 6, 9,,,4 ) The functon s: (A) ndependent of one varables. (C) ndependent of three varables. (B) ndependent of two varables. (D) dependent on all the varables. 0. Consder a 4-way set assocatve cache consstng of 8 lnes wth a lne sze of 64 words. The CPU generates a 0-bt address of a word n man memory. The number of bts n the TAG, LINE and WORD felds are respectvely: (A) 9, 6, 5 (B) 7, 7, 6 (C) 7, 5, 8 (D) 9, 5, 6. Consder a dsk pack wth 6 surfaces, 8 tracks per surface and 56 sectors per track. 5 bytes of data are stored n a bt seral manner n a sector. The capacty of the dsk pack and the number of bts requred to specfy a partcular sector n the dsk are respectvely: (A) 56 Mbyte, 9 bts (C) 5 Mbyte, 0 bts (B) 56 Mbyte, 8 bts (D) 64 Gbyte, 8 bts. The heght of a bnary tree s the maxmum number of edges n any root to leaf path. The maxmum number of nodes n a bnary tree of heght h s: (A) h (B) h (C) h+ (D) h+ 3. The maxmum number of bnary trees that can be formed wth three unlabeled nodes s: (A) (B) 5 (C) 4 (D) 3 4. Whch of the followng sortng algorthms has the lowest worst-case complexty? (A) Merge sort (B) Bubble sort (C) Quck sort (D) Selecton sort n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com.

5. Consder the followng segment of C-code: nt j, n; j = ; whle (j <=n) j = j*; CS Computer Scence: Gate 007 Paper The number of comparsons made n the executon of the loop for any n > 0 s: (A) log n + (B) n (C) log n (D) log n + 6. Group contans some CPU schedulng algorthms and Group contans some applcatons. Match entres n Group to entres n Group. Group I (P) Gang Schedulng Group II () Guaranteed Schedulng (Q) Rate Monotonc Schedulng () Real-tme Schedulng (R) Far Share Schedulng (3) Thread Schedulng (A) P - 3 Q - R - (B) P - Q - R - 3 (C) P - Q - 3 R - (D) P - Q - 3 R - 7. Consder the followng statements about user level threads and kernel level threads. Whch one of the followng statements s FALSE? (A) Context swtch tme s longer for kernel level threads than for user level threads. (B) User level threads do not need any hardware support. (C) Related kernel level threads can be scheduled on dfferent processors n a mult-processor system. (D) Blockng one kernel level thread blocks all related threads. 8. Whch one of the followng s a top-down parser? (A) Recursve descent parser. (B) Operator precedence parser. (C) An LR(k) parser. (D) An LALR(k) parser. 9. In Ethernet when Manchester encodng s used, the bt rate s: (A) Half the baud rate. (B) Twce the baud rate. (C) Same as the baud rate. (D) None of the above 0. Whch one of the followng uses UDP as the transport protocol? (A) HTTP (B) Telnet (C) DNS (D) SMTP n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 3

Q. Q.75 Carry Two Marks Each CS Computer Scence: Gate 007 Paper. How many dfferent non-somorphc Abelan groups of order 4 are there? (A) (B) 3 (C) 4 (D) 5. Let Graph(x) be a predcate whch denotes that x s a graph. Let Connected(x) be a predcate whch denotes that x s connected. Whch of the followng frst order logc sentences DOES NOT represent the statement: Not every graph s connected? (A) x ( Graph ( x) Connected ( x) ) (B) x ( Graph ( x) Connected ( x) ) (C) x ( Graph ( x ) Connected ( x) ) (D) x ( Graph ( x) Connected ( x) ) 3. Whch of the followng graphs has an Euleran crcut? (A) Any k-regular graph where k s an even number. (B) A complete graph on 90 vertces. (C) The complement of a cycle on 5 vertces. (D) None of the above 4. Suppose we unformly and randomly select a permutaton from the 0! Permutatons of,,3,..,0. What s the probablty that appears at an earler poston than any other even number n the selected permutaton? (A) (B) 0 (C) 9! 0! (D) None of these 5. Let A be a 4 4 matrx wth egenvalues -5, -,, 4. Whch of the followng s an A I egenvalue of, where I s the 4 4 dentty matrx? I A (A) -5 (B) -7 (C) (D) 6. Consder the set S { a b c d =,,,. Consder the followng 4 parttons,, 3, 4 on { { { { S : = abcd, = ab, cd, = abc, d, = a, b, c, d. Let p be the partal 3 4 order on the set of parttons S {,, 3, 4 refnes. The poset dagram for (, ) only f (A) j = defned as follows: p j f and S p s: (B) 3 4 4 All rghts reserved by GATE Forum Educatonal Servces Pvt. Ltd., www.gateforum.com No part 3 of ths booklet may be reproduced or utlzed n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 4

(C) CS Computer Scence: Gate 007 Paper (D) 3 3 4 4 7. Consder the set of (column) vectors defned by 3 T T { 3 3 X = x R x + x + x = 0, where x = x, x, x. Whch of the followng s TRUE? (A) {,,0 T T,,0, (B) {,,0 T T,,0, s a bass for the subspace X. s a lnearly ndependent set, but t does not span X and therefore s not a bass of X. (C) X s not a subspace of (D) None of the above 3 R xn 9 8. Consder the seres xn+ = +, x0 = 0.5 obtaned from the Newton-Raphson 8x n method. The seres converges to (A).5 (B) (C).6 (D).4 9. A mnmum state determnstc fnte automaton acceptng the language { { 0, *, number of 0s and s n are dvsble by 3 and 5, respectvely L = w w w has (A) 5 states (B) states (C) 0 states (D) 9 states 30. The language { 0 L 0 = over the alphabet { (A) not recursve (B) s recursve and s a determnstc CFL. (C) s a regular language. (D) s not a determnstc CFL but a CFL. 0,, s: n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 5

3. Whch of the followng languages s regular? { { R x, w + 0, CS Computer Scence: Gate 007 Paper + { R {, 0, xww + x w (A) ww R w + R { 0, (B) ww x x, w { 0, (C) { (D) { 3. Let f ( w, x, y, z ) = ( 0,4,5,7,8,9,3,5 ). Whch of the followng expressons are NOT equvalent to f? (P) x y z + w xy + wy z + xz (Q) w y z + wx y + xz (R) w y z + wx y + xyz + xy z (S) x y z + wx y + w y (A) P only (B) Q and S (C) R and S (D) S only 33. Defne the connectve * for the Boolean varables X and Y as: X * Y = XY + X Y. Let Z = X * Y. Consder the followng expressons P, Q and R. P : X = Y * Z Q : Y = X * Z R : X * Y * Z = Whch of the followng s TRUE? (A) Only P and Q are vald. (C) Only P and R are vald. (B) Only Q and R are vald. (D) All P, Q, R are vald. 34. Suppose only one multplexer and one nverter are allowed to be used to mplement any Boolean functon of n varables. What s the mnmum sze of the multplexer needed? (A) n lne to lne (C) (B) n lne to lne (D) n+ lne to lne n lne to lne 35. In a look-ahead carry generator, the carry generate functon G and the carry propagate functon P for nputs A and B are gven by: P = A B and G = A B The expressons for the sum bt S and the carry bt C + of the look-ahead carry adder are gven by: S = P C and C = G + PC, where C s the nput carry. + 0 Consder a two-level logc mplementaton of the look-ahead carry generator. Assume that all P and G are avalable for the carry generator crcut and that the AND and OR gates can have any number of nputs. The number of AND gates and OR gates needed to mplement the look-ahead carry generator for a 4-bt adder wth S3, S, S, S0 and C 4 as ts outputs are respectvely: (A) 6, 3 (B) 0, 4 (C) 6, 4 (D) 0, 5 n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 6

CS Computer Scence: Gate 007 Paper 36. The control sgnal functons of a 4-bt bnary counter are gven below (where X s don t care ): Clear Clock Load Count Functon X X X Clear to 0 0 X 0 0 No change 0 X Load nput 0 0 Count next The counter s connected as follows: A 4 A A 3 A Count= Clear 4-bt counter Load=0 Clock Inputs 0 0 Assume that the counter and gate delays are neglgble. If the counter starts at 0, then t cycles through the followng sequence: (A) 0, 3, 4 (B) 0, 3, 4, 5 (C) 0,,, 3, 4 (D) 0,,, 3, 4, 5 37. Consder a ppelned processor wth the followng four stages: IF: Instructon Fetch ID: Instructon Decode and Operand Fetch EX: Execute WB: Wrte Back The IF, ID and WB stages take one clock cycle each to complete the operaton. The number of clock cycles for the EX stage depends on the nstructon. The ADD and SUB nstructons need clock cycle and the MUL nstructon needs 3 clock cycles n the EX stage. Operand forwardng s used n the ppelned processor. What s the number of clock cycles taken to complete the followng sequence of nstructons? ADD R, R, R0 MUL R4, R3, R SUB R6, R5, R4 R R + R0 R4 R3 * R R6 R5 R4 n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 7

CS Computer Scence: Gate 007 Paper (A) 7 (B) 8 (C) 0 (D) 4 38. The followng postfx expresson wth sngle dgt operands s evaluated usng a stack: 8 3 / 3 * + 5 * - Note that s the exponentaton operator. The top two elements of the stack after the frst * s evaluated are: (A) 6, (B) 5, 7 (C) 3, (D), 5 39. The norder and preorder traversal of a bnary tree are d b e a f c g and a b d e c f g, respectvely The postorder traversal of the bnary tree s: (A) d e b f g c a (B) e d b g f c a (C) e d b f g c a (D) d e f g b c a 40. Consder a hash table of sze seven, wth startng ndex zero, and a hash functon 3x + 4 mod7. Assumng the hash table s ntally empty, whch of the followng ( ) s the contents of the table when the sequence, 3, 8, 0 s nserted nto the table usng closed hashng? Note that denotes an empty locaton n the table. (A) 8,,,,,, 0 (B), 8, 0,,,, 3 (C),,,,,, 3 (D), 0, 8,,,, 3 4. In an unweghted, undrected connected graph, the shortest path from a node S to every other node s computed most effcently, n terms of tme complexty, by (A) Djkstra s algorthm startng from S. (B) Warshall s algorthm (C) Performng a DFS startng from S. (D) Performng a BFS startng from S. 4. Consder the followng C functon: nt f(nt n) {statc nt r = 0; f (n <= 0) return ; f (n > 3) {r = n; return f(n-)+; return f(n-)+r; What s the value of f ( 5 )? (A) 5 (B) 7 (C) 9 (D) 8 n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 8

CS Computer Scence: Gate 007 Paper 43. A complete n-ary tree s a tree n whch each node has n chldren or no chldren. Let I be the number of nternal nodes and L be the number of leaves n a complete n-ary tree. If L = 4, and I = 0, what s the value of n? (A) 3 (B) 4 (C) 5 (D) 6 44. In the followng C functon, let n m. nt gcd(n,m) { f (n%m ==0) return m; n = n%m; return gcd(m,n); How many recursve calls are made by ths functon? (A) Θ ( log n) (B) Ω ( n) (C) ( log log n) Θ (D) Θ ( n ) 45. What s the tme complexty of the followng recursve functon: nt DoSomethng (nt n) { (A) ( n ) f (n <= ) else return ; return (DoSomethng (floor(sqrt(n))) + n); Θ (B) Θ ( n n) (C) Θ ( log n) (D) Θ ( log log n) log 46. Consder the followng C program segment where CellNode represents a node n a bnary tree: struct CellNode { ; struct CellNOde *leftchld; nt element; struct CellNode *rghtchld; nt GetValue (struct CellNode *ptr) { nt value = 0; f (ptr!= NULL) { else f ((ptr->leftchld == NULL) && (ptr->rghtchld == NULL)) value = ; value = value + GetValue(ptr->leftChld) n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 9

return(value); CS Computer Scence: Gate 007 Paper + GetValue(ptr->rghtChld); The value returned by GetValue when a ponter to the root of a bnary tree s passed as ts argument s: (A) the number of nodes n the tree (B) the number of nternal nodes n the tree (C) the number of leaf nodes n the tree (D) the heght of the tree 47. Consder the process of nsertng an element nto a Max Heap, where the Max Heap s represented by an array. Suppose we perform a bnary search on the path from the new leaf to the root to fnd the poston for the newly nserted element, the number of comparsons performed s: (A) Θ ( log n) (B) Θ ( log log n) (C) Θ ( n) (D) Θ ( n n) log 48. Whch of the followng s TRUE about formulae n Conjunctve Normal Form? (A) For any formula, there s a truth assgnment for whch at least half the clauses evaluate to true. (B) For any formula, there s a truth assgnment for whch all the clauses evaluate to true. (C) There s a formula such that for each truth assgnment, at most one-fourth of the clauses evaluate to true. (D) None of the above. 49. Let w be the mnmum weght among all edge weghts n an undrected connected graph. Let e be a specfc edge of weght w. Whch of the followng s FALSE? (A) There s a mnmum spannng tree contanng e. (B) If e s not n a mnmum spannng tree T, then n the cycle formed by addng e to T, all edges have the same weght. (C) Every mnmum spannng tree has an edge of weght w. (D) e s present n every mnmum spannng tree. 50. An array of n numbers s gven, where n s an even number. The maxmum as well as the mnmum of these n numbers needs to be determned. Whch of the followng s TRUE about the number of comparsons needed? (A) At least n c comparsons, for some constant c, are needed. (B) At most.5n comparsons are needed. (C) At least nlog (D) None of the above. ncomparsons are needed. n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 0

5. Consder the followng C code segment: nt IsPrme(n) { nt,n; for(=;<=sqrt(n);++) f(n% == 0) CS Computer Scence: Gate 007 Paper {prntf( Not Prme\n ); return 0; return ; Let T ( n) denote the number of tmes the for loop s executed by the program on nput n. Whch of the followng s TRUE? (A) T ( n) = O ( n ) and T ( n) = Ω ( n ) (B) T ( n) = O ( n ) and T ( n) = Ω ( ) (C) T ( n) O ( n) and T ( n) ( n ) = = Ω (D) None of the above =,,, termnals 5. Consder the grammar wth non-termnals N { S C S T { a, b,, t, e, = wth S as the start symbol, and the followng set of rules: S CtSS a S es ε C b The grammar s NOT LL() because: (A) t s left recursve (B) t s rght recursve (C) t s ambguous (D) t s not context-free. 53. Consder the followng two statements: P: Every regular grammar s LL() Q: Every regular set has a LR() grammar Whch of the followng s TRUE? (A) Both P and Q are true (C) P s false and Q s true (B) P s true and Q s false (D) Both P and Q are false 54. In a smplfed computer the nstructons are: OP R j, R - Performs R j OP R and stores the result n regster R. OP m, R - Performs val OP R and stores the result n R. val denotes the content of memory locaton m. MOV, m R - Moves the content of memory locaton m to regster R. MOV R, m - Moves the content of regster R to memory locaton m. The computer has only to regsters, and OP s ether ADD or SUB. Consder the followng basc block: n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com.

t = a + b t = c + d t = e t 3 t = t t 4 3 CS Computer Scence: Gate 007 Paper Assume that all operands are ntally n memory. The fnal value of the computaton should be n memory. What s the mnmum number of MOV nstructons n the code generated for ths basc block? (A) (B) 3 (C) 5 (D) 6 55. An operatng system uses Shortest Remanng Tme frst (SRT) process schedulng algorthm. Consder the arrval tmes and executon tmes for the followng processes: Process Executon tme Arrval tme P 0 0 P 5 5 P3 0 30 P4 5 45 What s the total watng tme for process P? (A) 5 (B) 5 (C) 40 (D) 55 56. A vrtual memory system uses Frst In Frst Out (FIFO) page replacement polcy and allocates a fxed number of frames to a process. Consder the followng statements: P: Increasng the number of page frames allocated to a process sometmes ncreases the page fault rate. Q: Some programs do not exhbt localty of reference. Whch one of the followng s TRUE? (A) Both P and Q are true, and Q s the reason for P (B) Both P and Q are true, but Q s not the reason for P. (C) P s false, but Q s true (D) Both P and Q are false. 57. A sngle processor system has three resource types X, Y and Z, whch are shared by three processes. There are 5 unts of each resource type. Consder the followng scenaro, where the column alloc denotes the number of unts of each resource type allocated to each process, and the column request denotes the number of unts of each resource type requested by a process n order to complete executon. Whch of these processes wll fnsh LAST? n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com.

alloc (A) P0 (B) P (C) P (D) None of the above, snce the system s n a deadlock. CS Computer Scence: Gate 007 Paper request X Y Z X Y Z P0 0 3 P 0 0 P 0 58. Two processes, P and P, need to access a crtcal secton of code. Consder the followng synchronzaton construct used by the processes: /* P */ whle (true) { wants = true; whle (wants==true); /* Crtcal Secton */ wants=false; /* Remander secton */ /* P */ whle (true) { wants = true; whle (wants==true); /* Crtcal Secton */ Wants=false; /* Remander secton */ Here, wants and wants are shared varables, whch are ntalzed to false. Whch one of the followng statements s TRUE about the above construct? (A) It does not ensure mutual excluson. (B) It does not ensure bounded watng. (C) It requres that processes enter the crtcal secton n strct alternaton. (D) It does not prevent deadlocks, but ensures mutual excluson. 59. Informaton about a collecton of students s gven by the relaton studnfo(studid, name, sex). The relaton enroll(studid, courseid) gves whch student has enrolled for (or taken) what course(s). Assume that every course s taken by at least one male and at least one female student. What does the followng relatonal algebra expresson represent? (( ( σ sex= ( studinfo) ) ( enroll) ) enroll) Π Π Π courseid studid "female" courseid (A) Courses n whch all the female students are enrolled. (B) Courses n whch a proper subset of female students are enrolled. (C) Courses n whch only male students are enrolled. (D) None of the above n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 3

CS Computer Scence: Gate 007 Paper 60. Consder the relaton employee(name, sex, supervsorname) wth name as the key. supervsorname gves the name of the supervsor of the employee under consderaton. What does the followng Tuple Relatonal Calculus query produce? { e.name employee ( e) ( x) employee ( x ) x.supervsorname e.name x.sex = "male" (A) Names of employees wth a male supervsor. (B) Names of employees wth no mmedate male subordnates. (C) Names of employees wth no mmedate female subordnates. (D) Names of employees wth a female supervsor. 6. Consder the table employee(empid, name, department, salary) and the two queres Q, Q below. Assumng that department 5 has more than one employee, and we want to fnd the employees who get hgher salary than anyone n the department 5, whch one of the statements s TRUE for any arbtrary employee table? Q : Select e.empid From employee e Where not exsts (Select * From employee s where s.department = 5 and s.salary >=e.salary) Q : Select e.empid From employee e Where e.salary > Any (Select dstnct salary From employee s Where s.department = 5 ) (A) Q s the correct query (B) Q s the correct query (C) Both Q and Q produce the same answer. (D) Nether Q nor Q s the correct query 6. Whch one of the followng statements f FALSE? (A) Any relaton wth two attrbutes s n BCNF (B) A relaton n whch every key has only one attrbute s n NF (C) A prme attrbute can be transtvely dependent on a key n a 3 NF relaton. (D) A prme attrbute can be transtvely dependent on a key n a BCNF relaton. 63. The order of a leaf node n a B + tree s the maxmum number of (value, data record ponter) pars t can hold. Gven that the block sze s K bytes, data record ponter s 7 bytes long, the value feld s 9 bytes long and a block ponter s 6 bytes long, what s the order of the leaf node? (A) 63 (B) 64 (C) 67 (D) 68 n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 4

CS Computer Scence: Gate 007 Paper 64. Consder the followng schedules nvolvng two transactons. Whch one of the followng statements s TRUE? ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) S : r X ; r Y ; r X ; r Y ; w Y ; w X S : r X ; r X ; r Y ; w Y ; r Y ; w X (A) Both S and S are conflct seralzable. (B) S s conflct seralzable and S s not conflct seralzable. (C) S s not conflct seralzable and S s conflct seralzable. (D) Both S and S are not conflct seralzable. 65. There are n statons n a slotted LAN. Each staton attempts to transmt wth a probablty p n each tme slot. What s the probablty that ONLY one staton transmts n a gven tme slot? n (A) np ( p) n (B) ( p) n (C) p ( p) (D) ( ) n p 7 66. In a token rng network the transmsson speed s 0 bps and the propagaton speed s 00 metres/µs. The -bt delay n ths network s equvalent to: (A) 500 metres of cable. (C) 0 metres of cable. (B) 00 metres of cable. (D) 50 metres of cable. 67. The address of a class B host s to be splt nto subnets wth a 6-bt subnet number. What s the maxmum number of subnets and the maxmum number of hosts n each subnet? (A) 6 subnets and 64 hosts. (C) 6 subnets and 0 hosts. (B) 64 subnets and 64 hosts. (D) 64 subnets and 04 hosts. 68. The message 0000 s to be transmtted usng the CRC polynomal protect t from errors. The message that should be transmtted s: (A) 0000000 (B) 00000 (C) 0000 (D) 000000 3 x + to 69. The dstance between two statons M and N s L klometers. All frames are K bts long. The propagaton delay per klometer s t seconds. Let R bts/second be the channel capacty. Assumng that processng delay s neglgble, the mnmum number of bts for the sequence number feld n a frame for maxmum utlzaton, when the sldng wndow protocol s used, s: LtR + K (A) log K LtR + K (C) log K LtR (B) log K LtR + K (D) log K n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 5

CS Computer Scence: Gate 007 Paper 70. Match the followng: (P) SMTP () Applcaton layer (Q) BGP () Transport layer (R) TCP (3) Data lnk layer (S) PPP (4) Network layer (5) Physcal layer (A) P - Q - R - 3 S - 5 (B) P - Q - 4 R - S - 3 (C) P - Q - 4 R - S - 5 (D) P - Q - 4 R - S - 3 Common Data Questons Common Data for Questons 7, 7, 73: Consder the followng program segment. Here R, R and R3 are the general purpose regsters. Instructon Operaton Instructon sze (no.of words) MOV R, (3000) R m[3000] LOOP: MOV R, (R3) R M[R3] ADD R, R R R + R MOV (R3), R M[R3] R INC R3 R3 R3 + DEC R R R BNZ LOOP Branch on not zero HALT Stop Assume that the content of memory locaton 3000 s 0 and the content of the regster R3 s 000. The content of each of the memory locatons from 000 to 00 s 00. The program s loaded from the memory locaton 000. All the numbers are n decmal. 7. Assume that the memory s word addressable. The number of memory references for accessng the data n executng the program completely s: (A) 0 (B) (C) 0 (D) 7. Assume that the memory s word addressable. After the executon of ths program, the content of memory locaton 00 s: (A) 00 (B) 0 (C) 0 (D) 0 n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 6

CS Computer Scence: Gate 007 Paper 73. Assume that the memory s byte addressable and the word sze s 3 bts. If an nterrupt occurs durng the executon of the nstructon INC R3, what return address wll be pushed on to the stack? (A) 005 (B) 00 (C) 04 (D) 040 Common Data for Questons 74, 75: Consder the followng Fnte State Automaton: q 3 b b a b a q 0 q q a a b 74. The language accepted by ths automaton s gven by the regular expresson (A) * * * * b ab ab ab (B) ( a b) * * + (C) ( ) * b a a + b (D) b * ab * ab * 75. The mnmum state automaton equvalent to the above FSA has the followng number of states (A) (B) (C) 3 (D) 4 Lnked Answer Questons: Q.76 to Q.85 Carry Two Marks Each Statement for Lnked Answer Questons 76 & 77: Suppose the letters a, b, c, d, e, f have probabltes,,,,,, 4 8 6 3 3 respectvely. 76. Whch of the followng s the Huffman code for the letter a, b, c, d, e, f? (A) 0, 0, 0, 0, 0, (B), 0, 0, 00, 00, 000 (C), 0, 0, 00, 000, 0000 (D) 0, 00, 00, 000, 00, 77. What s the average length of the correct answer to Q.76? (A) 3 (B).875 (C).5 (D).9375 Statement for Lnked Answer Questons 78 & 79: Consder the CFG wth { S, A, B as the non-termnal alphabet, {, alphabet, S as the start symbol and the followng set of producton rules: a b as the termnal n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 7

CS Computer Scence: Gate 007 Paper S ab S ba B b A a B bs A as B abb S baa 78. Whch of the followng strngs s generated by the grammar? (A) aaaabb (B) aabbbb (C) aabbab (D) abbbba 79. For the correct answer strngs to Q.78, how many dervaton trees are there? (A) (B) (C) 3 (D) 4 Statement for Lnked Answer Questons 80 & 8: 6 Consder a machne wth a byte addressable man memory of bytes. Assume that a drect mapped data cache consstng of 3 lnes of 64 bytes each s used n the system. A 50 50 two-dmensonal array of bytes s stored n the man memory startng from memory locaton 00H. Assume that the data cache s ntally empty. The complete array s accessed twce. Assume that the contents of the data cache do not change n between the two accesses. 80. How many data cache msses wll occur n total? (A) 48 (B) 50 (C) 56 (D) 59 8. Whch of the followng lnes of the data cache wll be replaced by new blocks n accessng the array for the second tme? (A) lne 4 to lne (B) lne 4 to lne (C) lne 0 to lne 7 (D) lne 0 to lne 8 Statement for Lnked Answer Questons 8 & 83: A process has been allocated 3 page frames. Assume that none of the pages of the process are avalable n the memory ntally. The process makes the followng sequence of page references (reference strng):,,, 3, 7, 4, 5, 6, 3, 8. If optmal page replacement polcy s used, how many page faults occur for the above reference strng? (A) 7 (B) 8 (C) 9 (D) 0 83. Least Recently Used (LRU) page replacement polcy s a practcal approxmaton to optmal page replacement. For the above reference strng, how many more page faults occur wth LRU than wth the optmal page replacement polcy? (A) 0 (B) (C) (D) 3 n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 8

Statement for Lnked Answer Questons 84 & 85: CS Computer Scence: Gate 007 Paper Suppose that a robot s placed on the Cartesan plane. At each step t s allowed to move, j then t can move to ether ether one unt up or one unt rght,.e., f t s at ( ) ( +, j) or (, j + ). 84. How many dstnct paths are there for the robot to reach the pont (0,0) startng from the ntal poston (0,0)? (A) (C) 0 0 (B) 0 0 (D) None of the above 85. Suppose that the robot s not allowed to traverse the lne segment from (4,4) to (5,4). Wth ths constrant, how many dstnct paths are there for the robot to reach (0,0) startng from (0,0)? (A) (C) 9 (B) 8 4 5 9 0 8 (D) 0 4 5 n any form wthout the wrtten permsson. Dscuss ths questons paper at www.gatementor.com. 9