CS GATE Paper
|
|
|
- Iris Parker
- 9 years ago
- Views:
Transcription
1 Q. No. 0 Carry One Mark Each. Which one of the following in NOT necessarily a property of a Group? (A) Commutativity (B) Associativity (C) Existence of inverse for every element (D) Existence of identity. What is the chromatic number of an n-vertex simple connected graph which does not contain any odd length cycle? Assume n. (A) (B) 3 (C) n- (D) n 3. Which one of the following is TRUE for any simple connected undirected graph with more than vertices? (A) No two vertices have the same degree. (B) At least two vertices have the same degree. (C) At least three vertices have the same degree. (D) All vertices have the same degree. 4. Consider the binary relation R = {(x,y), (x,z), (z,x), (z,y)} on the set {x,y,z}. Which one of the following is TRUE? (A) R is symmetric but NOT antisymmetric (B) R is NOT symmetric but antisymmetric (C) R is both symmetric and antisymmetric (D) R is neither symmetric nor antisymmetric 5. (7) 8 is equivalent to (A) (7) (B) (08F) (C) (97) 0 (D) (0B7). What is the minimum number of gates required to implement the Boolean function (AB+C) if we have to use only -input NOR gates? (A) (B) 3 (C) 4 (D) 5 7. How many 3K x RAM chips are needed to provide a memory capacity of 5Kbytes? (A) 8 (B) 3 (C) 4 (D) 8 8. A CPU generally handles an interrupt by executing an interrupt service routine (A) As soon as an interrupt is raised (B) By checking the interrupt register at the end of fetch cycle. (C) By checking the interrupt register after finishing the execution of the current instruction. (D) By checking the interrupt register at fixed time intervals. written permission. Discuss this questions paper at Page of 3
2 9. In which one of the following page replacement policies, Belady s anomaly may occur? (A) FIFO (B) Optimal (C) LRU (D) MRU 0. The essential content(s) in each entry of a page table is / are (A) Virtual page number (B) Page frame number (C) Both virtual page number and page frame number (D) Access right information. What is the number of swaps required to sort n elements using selection sort, in the worst case? (A) θ (n) (B) θ (n log n) (C) θ (n ) (D) (n log n) θ. S asa bsb a b ;The language generated by the above grammar over the alphabet {a,b} is the set of (A) All palindromes. (B) All odd length palindromes. (C) Strings that begin and end with the same symbol (D) All even length palindromes. 3. Which of the following statement(s) is / are correct regarding Bellman-Ford shortest path algorithm? P. Always finds a negative weighted cycle, if one exists. Q. Finds whether any negative weighted cycle is reachable from the source. (A) P only (C) both P and Q (B) Q only (D) Neither P nor Q 4. Let π A be a problem that belongs to the class NP. Then which one of the following is TRUE? (A) There is no polynomial time algorithm for π A. (B) If πa can be solved deterministically in polynomial time, then P = NP. (C) If π A is NP-hard, then it is NP-complete. (D) π A may be undecidable. 5. Which one of the following languages over the alphabet {0,} is described by the regular expression: (0+)*0(0+)*0(0+)*? (A) The set of all strings containing the substring 00. (B) The set of all strings containing at most two 0 s. (C) The set of all strings containing at least two 0 s. (D) The set of all strings that begin and end with either 0 or. written permission. Discuss this questions paper at Page of 3
3 . Which one of the following is FALSE? (A) There is unique minimal DFA for every regular language (B) Every NFA can be converted to an equivalent PDA. (C) Complement of every context-free language is recursive. (D) Every nondeterministic PDA can be converted to an equivalent deterministic PDA. 7. Match all items in Group with correct options from those given in Group. Group Group P. Regular expression. Syntax analysis Q. Pushdown automata. Code generation R. Dataflow analysis 3. Lexical analysis S. Register allocation 4. Code optimization (A) P-4. Q-, R-, S-3 (B) P-3, Q-, R-4, S- (C) P-3, Q-4, R-, S- (D) P-, Q-, R-4, S-3 8. Consider the program below: # include < stdio.h > int fun(int n, int * f_p) { int t, f; if (n <= ) { *f_p = ; return ; } t = fun (n-, f_p); f = t+*f_p; *f_p = t; return f; } int main() { int x = 5; printf ("%d\ n", fun(5,& x)); return 0; } The value printed is (A) (B) 8 (C) 4 (D) 5 9. The coupling between different modules of a software is categorized as follows: I. Content coupling II. Common coupling III. Control coupling V. Data coupling IV Stamp coupling Coupling between modules can be ranked in the order of strongest (least desirable) to weakest (most desirable) as follows: (A) I-II-III-IV-V (B) V-IV-III-II-I (C) I-III-V -II-IV (D) IV-II-V -III-I written permission. Discuss this questions paper at Page 3 of 3
4 0. Consider the HTML table definition given below: < table border=> <tr> <td rowspan=> ab </td> <td colspan=> cd </td> </tr> <tr> <td> ef </td> <td rowspan=> gh </td> </tr> <tr> <td colspan=> ik </td> </tr> </table> The number of rows in each column and the number of columns in each row are: (A),,3 and,3, (B),,3 and,,3 (C),3, and,3, (D),3, and,,3 Q. No. 5 Carry Two Marks Each. An unbalanced dice (with faces, numbered from to ) is thrown. The probability that the face value is odd is 90% of the probability that the face value is even. The probability of getting any even numbered face is the same. If the probability that the face is even given that it is greater than 3 is 0.75, which one of the following options is closest to the probability that the face value exceeds 3? (A) (B) 0.48 (C) (D) For the composition table of a cyclic group shown below * a b c d a a b c d b b a d c c c d b a d d c a b Which one of the following choices is correct? (A) a, b are generators (C) c, d are generators (B) b, c are generators (D) d, a are generators 3. Which one of the following is the most appropriate logical formula to represent the statement? Gold and silver ornaments are precious. The following notations are used: G(x): x is a gold ornament S(x): x is a silver ornament P(x): x is precious ( ) ( ) (A) x P ( x ) G ( x ) S ( x ) (B) ( ) x G x S x P x ( ) (C) x G ( x ) S ( x ) P x (D) x G x S x P x written permission. Discuss this questions paper at Page 4 of 3
5 4. The binary operation is defined as follows P Q P Q T T T T F T F T F F F T Which one of the following is equivalent to P Q? (A) Q P (B) P Q (C) P Q (D) π / 4 tanx / tanx dx evaluates to 5. ( ) ( + ) 0 P Q (A) 0 (B) (C) ln (D) ln. Consider the following well-formed formulae: I. x P ( x) II. x P ( x) III. x P ( x) IV. x P ( x) Which of the above are equivalent? (A) I and III (B) I and IV (C) II and III (D) II and IV 7. Given the following state table of an FSM with two states A and B, one input and one output: Present State A Present State B Input Next State A Next State B Output If the initial state is A = 0, B=0, what is the minimum length of an input string which will take the machine to the state A=0, B= with Output=? (A) 3 (B) 4 (C) 5 (D) 8. Consider a 4 stage pipeline processor. The number of cycles needed by the four instructions I, I, I3, I4 in stages S, S, S3, S4 is shown below: S S S3 S4 I I 3 I3 3 I4 written permission. Discuss this questions paper at Page 5 of 3
6 What is the number of cycles needed to execute the following loop? For (i= to ) {I; I; I3; I4;} (A) (B) 3 (C) 8 (D) Consider a 4-way set associative cache (initially empty) with total cache blocks. The main memory consists of 5 blocks and the request for memory blocks is in the following order: 0, 55,, 4, 3, 8, 33, 59,, 9, 3, 8, 48, 3, 73, 9, 55. Which one of the following memory block will NOT be in cache if LRU replacement policy is used? (A) 3 (B) 8 (C) 9 (D) 30. Consider a system with 4 types of resources R (3 units), R ( units), R3 (3 units), R4 ( units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P, P, P3 request the sources as follows if executed independently. Process P: t=0: requests units of R t=: requests unit of R3 t=3: requests units of R t=5: releases unit of R and unit of R. t=7: releases unit of R3 t=8: requests units of R4 t=0: Finishes Process P: t=0: requests units of R3 t=: requests unit of R4 t=4: requests unit of R t=: releases unit of R3 t=8: Finishes Process P3: t=0: requests unit of R4 t=: requests units of R t=5: releases units of R t=7: requests unit of R t=8: requests unit of R3 t=9: Finishes Which one of the following statements is TRUE if all three processes run concurrently starting at time t=0? (A) All processes will finish without any deadlock (B) Only P and P will be in deadlock. (C) Only P and P3 will be in a deadlock. (D) All three processes will be in deadlock. 3. Consider a disk system with 00 cylinders. The requests to access the cylinders occur in following sequence: 4, 34, 0, 7, 9, 73,, 5,, 0 Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes ms to move from one cylinder to adjacent one and shortest seek time first policy is used? (A) 95ms (B) 9ms (C) 33ms (D) 7ms written permission. Discuss this questions paper at Page of 3
7 3. In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: B A D Start Re ady Running Ter min ated C E F Blocked Now consider the following statements: I. If a process makes a transition D, it would result in another process making transition A immediately. II. A process P in blocked state can make transition E while another process P is in running state. III. The OS uses preemptive scheduling. IV. The OS uses non-preemptive scheduling. Which of the above statements are TRUE? (A) I and II (B) I and III (C) II and III (D) II and IV 33. The enter_cs() and leave_cs() functions to implement critical section of a process are realized using test-and-set instruction as follows: void enter_cs(x) { } while test-and-set(x) ; void leave_cs(x) { } X=0; In the above solution, X is a memory location associated with the CS and is initialized to 0. Now consider the following statements: I. The above solution to CS problem is deadlock-free II. The solution is starvation free. III. The processes enter CS in FIFO order. IV More than one process can enter CS at the same time. Which of the above statements is TRUE? (A) I only (B) I and II (C) II and III (D) IV only written permission. Discuss this questions paper at Page 7 of 3
8 34. A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because (A) It reduces the memory access time to read or write a memory location. (B) It helps to reduce the size of page table needed to implement the virtual address space of a process. (C) It is required by the translation lookaside buffer. (D) It helps to reduce the number of page faults in page replacement algorithms. 35. The running time of an algorithm is represented by the following recurrence relation: T(n) = n n 3 n T + cn 3 otherwise Which one of the following represents the time complexity of the algorithm? (A) θ (n) (B) θ (n log n) (C) θ (n ) (D) θ (n log n) 3. The keys, 8, 3,, 3, 3, 5 and 5 are inserted into an initially empty hash table of length 0 using open addressing with hash function h(k) = k mod 0 and linear probing. What is the resultant hash table? (A) 0 (B) 0 (C) 0 (D) , 3 3,3, , What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0. (A) (B) 3 (C) 4 (D) Consider the following graph: 5 a 3 4 b 5 d e g c f written permission. Discuss this questions paper at Page 8 of 3
9 Which one of the following is NOT the sequence of edges added to the minimum spanning tree using Kruskal s algorithm? (A) (b,e) (e,f) (a,c) (b,c) (f,g) (c,d) (C) (b,e) (a,c) (e,f) (b,c) (f,g) (c,d) (B) (b,e) (e,f) (a,c) (f,g) (b,c) (c,d) (D) (b,e) (e,f) (b,c) (a,c) (f,g) (c,d) 39. In quick sort, for sorting n elements, the (n/4) th smallest element is selected as pivot using an O(n) time algorithm. What is the worst case time complexity of the quick sort? (A) θ (n) (B) θ (n log n) (C) θ (n ) (D) θ (n log n) 40. Let L = L I L, where L and L are languages as defined below: m m n m { } L = a b c a b m,n 0 i j k { } L = ab c i, j,k 0 Then L is (A) Not recursive (B) Regular (C) Context free but not regular (D) Recursively enumerable but not context free The above DFA accepts the set of all strings over {0,} that (A) begin either with 0 or (B) end with 0 (C) end with 00 (D) contain the substring Which of the following statements are TRUE? I There exist parsing algorithms for some programming languages whose 3 complexities are less than ( n ) θ. II A programming language which allows recursion can be implemented with static storage allocation. III No L-attributed definition can be evaluated in the framework of bottom-up parsing. IV Code improving transformations can be performed at both source language and intermediate code level. (A) I and II (B) I and IV (C) III and IV (D) I, III and IV written permission. Discuss this questions paper at Page 9 of 3
10 43. Consider two transactions T and T, and four schedules S, S, S 3, S 4 of T and T as given below: T :R x W x W y T :R x R y W y S :R x R x R y W x W y W y S :R x R x R y W x W y W y S 3 :R x W x R x W y R y W y S 4 :R x R y R x W x W y W y Which of the above schedules are conflict-serializable? (A) S and S (B) S and S 3 (C) S 3 only (D) S 4 only 44. The following key values are inserted into a B+ - tree in which order of the internal nodes is 3, and that of the leaf nodes is, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+ - tree is initially empty. 0, 3,, 8, 4,, The maximum number of times leaf nodes would get split up as a result of these insertions is (A) (B) 3 (C) 4 (D) Let R and S be relational schemes such that R={a,b,c} and S={c}. Now consider the following queries on the database: I. π ( r) π π ( r) s π ( r) R S R S R S R S,S { ( )} t t πr S r v r ( u s u = v s t = v R S ) II. t t πr S ( r ) u s v r ( u = v s t = v R S ) { } III. IV Select R.a, R.b From R,S Where R.c=S.c Which of the above queries are equivalent? (A) I and II (B) I and III (C) II and IV (D) III and IV 4. In the RSA public key cryptosystem, the private and public keys are (e,n) and (d,n) respectively, where n=p*q and p and q are large primes. Besides, n is public and p and q are private. Let M be an integer such that 0<M<n and φ n = p q. Now consider the following equations. I M ' e = M mod n II. ed mod n ' M = M d mod n III. ed mod ( n) φ IV. M ' e = M mod φ(n) ' M = M d mod φ(n) written permission. Discuss this questions paper at Page 0 of 3
11 Which of the above equations correctly represent RSA cryptosystem? (A) I and II (B) I and III (C) II and IV (D) III and IV 47. While opening a TCP connection, the initial sequence number is to be derived using a time-of-day (ToD) clock that keeps running even when the host is down. The low order 3 bits of the counter of the ToD clock is to be used for the initial sequence numbers. The clock counter increments once per millisecond. The maximum packet lifetime is given to be 4s. Which one of the choices given below is closest to the minimum permissible rate at which sequence numbers used for packets of a connection can increase? (A) 0.05/s (B) 0.04/s (C) 0.35/s (D) 0.37/s 48. Let G(x) be the generator polynomial used for CRC checking. What is the condition that should be satisfied by G(x) to detect odd number of bits in error? (A) G(x) contains more than two terms (B) G(x) does not divide +x k, for any k not exceeding the frame length (C) +x is a factor of G(x) (D) G(x) has an odd number of terms. 49. Which of the following statements are TRUE? I The context diagram should depict the system as a single bubble. II External entities should be identified clearly at all levels of DFDs. III Control information should not be represented in a DFD. IV A data store can be connected either to another data store or to an external entity. (A) II and III (B) II and III (C) I and III (D) I, II and III 50. Consider the following statements about the cyclomatic complexity of the control flow graph of a program module. Which of these are TRUE? I. The cyclomatic complexity of a module is equal to the maximum number of linearly independent circuits in the graph. II. The cyclomatic complexity of a module is the number of decisions in the module plus one, where a decision is effectively any conditional statement in the module. III. The cyclomatic complexity can also be used as a number of linearly independent paths that should be tested during path coverage testing. (A) I and II (B) II and III (C) I and III (D) I, II and III Common Data Questions: 5 & 5 A hard disk has 3 sectors per track, 0 platters each with recording surfaces and 000 cylinders. The address of a sector is given as a triple c,h,s, where c is the cylinder number, h is the surface number and s is the sector number. Thus, the 0 th sector is addressed as 0,0,0, the st sector as 0,0,, and so on 5. The address <400,, 9> corre4sponds tp sector number: (A) (B) (C) (D) The address of the 039 th sector is written permission. Discuss this questions paper at Page of 3
12 (A) 0,5,3 (B) 0,,30 (C) 0,,3 (D) 0,7,3 Common Data Questions: 53 & 54 A sub-sequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are given two sequences X[m] and Y[n] of lengths m and n, respectively, with indexes of X and Y starting from We wish to find the length of the longest common sub-sequence (LCS) of X[m] and Y[n] as l(m,n), where an incomplete recursive definition for the function l(i,j) to compute the length of the LCS of X[m] and Y[n] is given below: l i, j = 0, if either i=0 or j=0 = expr, if i,j>0 and X i- = Y j = expr, if i,j>0 and X i- = Y j Which one of the following options is correct? (A) expr l ( i, j) + (B) expr l ( i, j ) (C) expr max l ( i, j ), l ( i,j-) (D) expr max l ( i, j ), l( i,j) 54. The values of l(i,j) could be obtained by dynamic programming based on the correct recursive definition of l(i,j) of the form given above, using an array L[M,N], where M = m+ and N=n+, such that L[i,j] = l(i,j). Which one of the following statements would be TRUE regarding the dynamic programming solution for the recursive definition of l(i,j)? (A) All elements L should be initialized to 0 for the values of l(i,j) to be properly computed. (B) The values of l(i,j) may be computed in a row major order or column major order of L(M,N). (C) The values of l(i,j) cannot be computed in either row major order or column major order of L(M,N). (D) L[p,q] needs to be computed before L[r,s] if either p<r or q<s. Common Data Questions: 55 & 5 Consider the following relational schema: Suppliers(sid:integer, sname:string, city:string, street:string) Parts(pid:integer, pname:string, color:string) Catalog(sid:integer, pid:integer, cost:real) 55. Consider the following relational query on the above database: SELECT S.sname FROM Suppliers S WHERE S.sid NOT IN (SELECT C.sid FROM Catalog C WHERE C.pid NOT (SELECT P.pid FROM Parts P WHERE P.color<> 'blue')) written permission. Discuss this questions paper at Page of 3
13 EX CS GATE Paper Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query? (A) Find the names of all suppliers who have supplied a non-blue part. (B) Find the names of all suppliers who have not supplied a non-blue part. (C) Find the names of all suppliers who have supplied only blue parts. (D) Find the names of all suppliers who have not supplied only blue parts. 5. Assume that, in the suppliers relation above, each supplier and each street within a city has a unique name, and (sname, city) forms a candidate key. No other functional dependencies are implied other than those implied by primary and candidate keys. Which one of the following is TRUE about the above schema? (A) The schema is in BCNF (B) The schema is in 3NF but not in BCNF (C) The schema is in NF but not in 3NF (D) The schema is not in NF Linked Answer Questions: Q.57 to Q.0 Carry Two Marks Each Statement for Linked Answer Questions: 57 & 58 Frames of 000 bits are sent over a 0 bps duplex link between two hosts. The propagation time is 5ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link). 57. What is the minimum number of bits (l) that will be required to represent the sequence numbers distinctly? Assume that no time gap needs to be given between transmission of two frames. (A) l= (B) l=3 (C) l=4 (D) l=5 58. Suppose that the sliding window protocol is used with the sender window size of l, where l is the number of bits identified in the earlier part and acknowledgements are always piggy backed. After sending l frames, what is the minimum time the sender will have to wait before starting transmission of the next frame? (Identify the closest choice ignoring the frame processing time.) (A) ms (B) 8ms (C) 0ms (D) ms Statement for Linked Answer Questions: 59 & 0 Consider a binary max-heap implemented using an array. 59. Which one of the following array represents a binary max-heap? (A) { 5,,,3,0, 8,4 } (B) { 5,4,3,,0,8, } (C) { 5,4,,3,0, 8, } (D) { 5,4,,3,0,8, } 0. What is the content of the array after two delete operations on the correct answer to the previous question? (A) { 4,3,,0, 8 } (B) { 4,,3,8,0 } (C) { 4,3, 8,,0 } (D) { 4,3,,8,0 } written permission. Discuss this questions paper at Page 3 of 3
Chapter 13: Query Processing. Basic Steps in Query Processing
Chapter 13: Query Processing! Overview! Measures of Query Cost! Selection Operation! Sorting! Join Operation! Other Operations! Evaluation of Expressions 13.1 Basic Steps in Query Processing 1. Parsing
CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.
Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure
Compiler Construction
Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation
Why? A central concept in Computer Science. Algorithms are ubiquitous.
Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online
CS GATE Paper 2010 www.gateforum.com
Q. No. 1 25 Carry One Mark Each 1. Let G=(V, E) be a graph. Define d ξ G = i d, where i d is the number of vertices of degree d in G. If S and T are two different trees with ξ = ξ then (A) S d S T, = 2
Automata and Computability. Solutions to Exercises
Automata and Computability Solutions to Exercises Fall 25 Alexis Maciel Department of Computer Science Clarkson University Copyright c 25 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata
COMPUTER SCIENCE. Paper 1 (THEORY)
COMPUTER SCIENCE Paper 1 (THEORY) (Three hours) Maximum Marks: 70 (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) -----------------------------------------------------------------------------------------------------------------------
Midterm Practice Problems
6.042/8.062J Mathematics for Computer Science October 2, 200 Tom Leighton, Marten van Dijk, and Brooke Cowan Midterm Practice Problems Problem. [0 points] In problem set you showed that the nand operator
Finite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream
5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.
1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The
Discrete Mathematics Problems
Discrete Mathematics Problems William F. Klostermeyer School of Computing University of North Florida Jacksonville, FL 32224 E-mail: [email protected] Contents 0 Preface 3 1 Logic 5 1.1 Basics...............................
1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++
Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The
Sample Questions Csci 1112 A. Bellaachia
Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k
Finite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automata Informally, a state machine that comprehensively captures all possible states and transitions that a machine can take while responding to a stream (or
PES Institute of Technology-BSC QUESTION BANK
PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions
1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.
File: chap04, Chapter 04 1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1. 2. True or False? A gate is a device that accepts a single input signal and produces one
Questions and Answers in Computer Science. By Yonas Tesfazghi Weldeselassie http://www.ictp.trieste.it/ weldesel
Questions and Answers in Computer Science By Yonas Tesfazghi Weldeselassie http://www.ictp.trieste.it/ weldesel The Questions in this material are collected from Computer Science Subject Graduate Record
2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]
Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)
Lecture 1: Data Storage & Index
Lecture 1: Data Storage & Index R&G Chapter 8-11 Concurrency control Query Execution and Optimization Relational Operators File & Access Methods Buffer Management Disk Space Management Recovery Manager
Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology
Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information
GATE CS Topic wise Questions Computer Network
www.gatehelp.com GATE CS Topic wise Questions YEAR 23 Question. 1 Which of the following assertions is false about the internet Protocol (IP)? (A) It is possible for a computer to have multiple IP addresses
We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -
. (0 pts) We re going to play Final (exam) Jeopardy! Associate the following answers with the appropriate question. (You are given the "answers": Pick the "question" that goes best with each "answer".)
CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team
CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A
CS5310 Algorithms 3 credit hours 2 hours lecture and 2 hours recitation every week
CS5310 Algorithms 3 credit hours 2 hours lecture and 2 hours recitation every week This course is a continuation of the study of data structures and algorithms, emphasizing methods useful in practice.
Chapter 3. if 2 a i then location: = i. Page 40
Chapter 3 1. Describe an algorithm that takes a list of n integers a 1,a 2,,a n and finds the number of integers each greater than five in the list. Ans: procedure greaterthanfive(a 1,,a n : integers)
Formal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
Real-Time Scheduling (Part 1) (Working Draft) Real-Time System Example
Real-Time Scheduling (Part 1) (Working Draft) Insup Lee Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania www.cis.upenn.edu/~lee/ CIS 41,
1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.
1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated
4. How many integers between 2004 and 4002 are perfect squares?
5 is 0% of what number? What is the value of + 3 4 + 99 00? (alternating signs) 3 A frog is at the bottom of a well 0 feet deep It climbs up 3 feet every day, but slides back feet each night If it started
Operating Systems. Virtual Memory
Operating Systems Virtual Memory Virtual Memory Topics. Memory Hierarchy. Why Virtual Memory. Virtual Memory Issues. Virtual Memory Solutions. Locality of Reference. Virtual Memory with Segmentation. Page
Unit 1. 5. Write iterative and recursive C functions to find the greatest common divisor of two integers. [6]
Unit 1 1. Write the following statements in C : [4] Print the address of a float variable P. Declare and initialize an array to four characters a,b,c,d. 2. Declare a pointer to a function f which accepts
10CS35: Data Structures Using C
CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a
Physical Data Organization
Physical Data Organization Database design using logical model of the database - appropriate level for users to focus on - user independence from implementation details Performance - other major factor
In-Memory Database: Query Optimisation. S S Kausik (110050003) Aamod Kore (110050004) Mehul Goyal (110050017) Nisheeth Lahoti (110050027)
In-Memory Database: Query Optimisation S S Kausik (110050003) Aamod Kore (110050004) Mehul Goyal (110050017) Nisheeth Lahoti (110050027) Introduction Basic Idea Database Design Data Types Indexing Query
Solutions to Homework 6
Solutions to Homework 6 Debasish Das EECS Department, Northwestern University [email protected] 1 Problem 5.24 We want to find light spanning trees with certain special properties. Given is one example
CS : COMPUTER SCIENCE AND INFORMATION TECHNOLOGY
03 Question Booklet Code A CS : COMPUTER SCIENCE AND INFORMATION TECHNOLOGY Duration: Three Hours Maximum Marks: 00 Read the following instructions carefully.. Do not open the seal of the Question Booklet
C H A P T E R. Logic Circuits
C H A P T E R Logic Circuits Many important functions are naturally computed with straight-line programs, programs without loops or branches. Such computations are conveniently described with circuits,
Approximation Algorithms
Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms
CoNP and Function Problems
CoNP and Function Problems conp By definition, conp is the class of problems whose complement is in NP. NP is the class of problems that have succinct certificates. conp is therefore the class of problems
Data Structures Fibonacci Heaps, Amortized Analysis
Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:
Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction
Lecture 11 Dynamic Programming 11.1 Overview Dynamic Programming is a powerful technique that allows one to solve many different types of problems in time O(n 2 ) or O(n 3 ) for which a naive approach
A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:
Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)
Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products
Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing
Assessment Plan for CS and CIS Degree Programs Computer Science Dept. Texas A&M University - Commerce
Assessment Plan for CS and CIS Degree Programs Computer Science Dept. Texas A&M University - Commerce Program Objective #1 (PO1):Students will be able to demonstrate a broad knowledge of Computer Science
Division of Mathematical Sciences
Division of Mathematical Sciences Chair: Mohammad Ladan, Ph.D. The Division of Mathematical Sciences at Haigazian University includes Computer Science and Mathematics. The Bachelor of Science (B.S.) degree
Unit 4.3 - Storage Structures 1. Storage Structures. Unit 4.3
Storage Structures Unit 4.3 Unit 4.3 - Storage Structures 1 The Physical Store Storage Capacity Medium Transfer Rate Seek Time Main Memory 800 MB/s 500 MB Instant Hard Drive 10 MB/s 120 GB 10 ms CD-ROM
Introduction to Logic in Computer Science: Autumn 2006
Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding
DATABASE DESIGN - 1DL400
DATABASE DESIGN - 1DL400 Spring 2015 A course on modern database systems!! http://www.it.uu.se/research/group/udbl/kurser/dbii_vt15/ Kjell Orsborn! Uppsala Database Laboratory! Department of Information
Classification - Examples
Lecture 2 Scheduling 1 Classification - Examples 1 r j C max given: n jobs with processing times p 1,...,p n and release dates r 1,...,r n jobs have to be scheduled without preemption on one machine taking
Exam study sheet for CS2711. List of topics
Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure
CHAPTER 3 Boolean Algebra and Digital Logic
CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4
Answer Key. UNIVERSITY OF CALIFORNIA College of Engineering Department of EECS, Computer Science Division
Answer Key UNIVERSITY OF CALIFORNIA College of Engineering Department of EECS, Computer Science Division CS186 Fall 2003 Eben Haber Midterm Midterm Exam: Introduction to Database Systems This exam has
! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.
Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of
OS OBJECTIVE QUESTIONS
OS OBJECTIVE QUESTIONS Which one of the following is Little s formula Where n is the average queue length, W is the time that a process waits 1)n=Lambda*W 2)n=Lambda/W 3)n=Lambda^W 4)n=Lambda*(W-n) Answer:1
2010-2011 Assessment for Master s Degree Program Fall 2010 - Spring 2011 Computer Science Dept. Texas A&M University - Commerce
2010-2011 Assessment for Master s Degree Program Fall 2010 - Spring 2011 Computer Science Dept. Texas A&M University - Commerce Program Objective #1 (PO1):Students will be able to demonstrate a broad knowledge
2) Write in detail the issues in the design of code generator.
COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage
OPERATING SYSTEM - VIRTUAL MEMORY
OPERATING SYSTEM - VIRTUAL MEMORY http://www.tutorialspoint.com/operating_system/os_virtual_memory.htm Copyright tutorialspoint.com A computer can address more memory than the amount physically installed
Binary Adders: Half Adders and Full Adders
Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order
3515ICT Theory of Computation Turing Machines
Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation
Lecture 13 - Basic Number Theory.
Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted
Symbol Tables. Introduction
Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The
Algorithm Design and Analysis
Algorithm Design and Analysis LECTURE 27 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/6/2011 S. Raskhodnikova;
Factoring Polynomials
UNIT 11 Factoring Polynomials You can use polynomials to describe framing for art. 396 Unit 11 factoring polynomials A polynomial is an expression that has variables that represent numbers. A number can
Output: 12 18 30 72 90 87. struct treenode{ int data; struct treenode *left, *right; } struct treenode *tree_ptr;
50 20 70 10 30 69 90 14 35 68 85 98 16 22 60 34 (c) Execute the algorithm shown below using the tree shown above. Show the exact output produced by the algorithm. Assume that the initial call is: prob3(root)
Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction
1 if 1 x 0 1 if 0 x 1
Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or
2.3 WINDOW-TO-VIEWPORT COORDINATE TRANSFORMATION
2.3 WINDOW-TO-VIEWPORT COORDINATE TRANSFORMATION A world-coordinate area selected for display is called a window. An area on a display device to which a window is mapped is called a viewport. The window
Guessing Game: NP-Complete?
Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple
Introduction to Automata Theory. Reading: Chapter 1
Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a
Graphs without proper subgraphs of minimum degree 3 and short cycles
Graphs without proper subgraphs of minimum degree 3 and short cycles Lothar Narins, Alexey Pokrovskiy, Tibor Szabó Department of Mathematics, Freie Universität, Berlin, Germany. August 22, 2014 Abstract
NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University
NP-Completeness CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University 1 Hard Graph Problems Hard means no known solutions with
Unit 6. Loop statements
Unit 6 Loop statements Summary Repetition of statements The while statement Input loop Loop schemes The for statement The do statement Nested loops Flow control statements 6.1 Statements in Java Till now
Sources: On the Web: Slides will be available on:
C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,
CSE 326: Data Structures B-Trees and B+ Trees
Announcements (4//08) CSE 26: Data Structures B-Trees and B+ Trees Brian Curless Spring 2008 Midterm on Friday Special office hour: 4:-5: Thursday in Jaech Gallery (6 th floor of CSE building) This is
Chapter 8: Structures for Files. Truong Quynh Chi [email protected]. Spring- 2013
Chapter 8: Data Storage, Indexing Structures for Files Truong Quynh Chi [email protected] Spring- 2013 Overview of Database Design Process 2 Outline Data Storage Disk Storage Devices Files of Records
Partitioning under the hood in MySQL 5.5
Partitioning under the hood in MySQL 5.5 Mattias Jonsson, Partitioning developer Mikael Ronström, Partitioning author Who are we? Mikael is a founder of the technology behind NDB
Analysis of Binary Search algorithm and Selection Sort algorithm
Analysis of Binary Search algorithm and Selection Sort algorithm In this section we shall take up two representative problems in computer science, work out the algorithms based on the best strategy to
ECE 842 Report Implementation of Elliptic Curve Cryptography
ECE 842 Report Implementation of Elliptic Curve Cryptography Wei-Yang Lin December 15, 2004 Abstract The aim of this report is to illustrate the issues in implementing a practical elliptic curve cryptographic
CHAPTER 5. Number Theory. 1. Integers and Division. Discussion
CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a
Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging
Memory Management Outline Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging 1 Background Memory is a large array of bytes memory and registers are only storage CPU can
Compiler I: Syntax Analysis Human Thought
Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly
2.1 Increasing, Decreasing, and Piecewise Functions; Applications
2.1 Increasing, Decreasing, and Piecewise Functions; Applications Graph functions, looking for intervals on which the function is increasing, decreasing, or constant, and estimate relative maxima and minima.
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis Linda Shapiro Today Registration should be done. Homework 1 due 11:59 pm next Wednesday, January 14 Review math essential
QUEUES. Primitive Queue operations. enqueue (q, x): inserts item x at the rear of the queue q
QUEUES A queue is simply a waiting line that grows by adding elements to its end and shrinks by removing elements from the. Compared to stack, it reflects the more commonly used maxim in real-world, namely,
a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.
3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem
United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1
United States Naval Academy Electrical and Computer Engineering Department EC262 Exam 29 September 2. Do a page check now. You should have pages (cover & questions). 2. Read all problems in their entirety.
5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1
5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1 General Integer Linear Program: (ILP) min c T x Ax b x 0 integer Assumption: A, b integer The integrality condition
B.Sc.(Computer Science) and. B.Sc.(IT) Effective From July 2011
NEW Detailed Syllabus of B.Sc.(Computer Science) and B.Sc.(IT) Effective From July 2011 SEMESTER SYSTEM Scheme & Syllabus for B.Sc. (CS) Pass and Hons. Course Effective from July 2011 and onwards CLASS
CSE 135: Introduction to Theory of Computation Decidability and Recognizability
CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing
6.080/6.089 GITCS Feb 12, 2008. Lecture 3
6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my
Data Structure [Question Bank]
Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:
Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design
Chapter 6: Physical Database Design and Performance Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS 464 Spring 2003 Topic 23 Database
Data Storage - I: Memory Hierarchies & Disks
Data Storage - I: Memory Hierarchies & Disks W7-C, Spring 2005 Updated by M. Naci Akkøk, 27.02.2004 and 23.02.2005, based upon slides by Pål Halvorsen, 11.3.2002. Contains slides from: Hector Garcia-Molina,
Network (Tree) Topology Inference Based on Prüfer Sequence
Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 [email protected],
Part 2: Community Detection
Chapter 8: Graph Data Part 2: Community Detection Based on Leskovec, Rajaraman, Ullman 2014: Mining of Massive Datasets Big Data Management and Analytics Outline Community Detection - Social networks -
Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010
Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010 Student Name: ID: Part 1: Multiple-Choice Questions (17 questions, 1
Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb
Binary Search Trees Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 27 1 Properties of Binary Search Trees 2 Basic BST operations The worst-case time complexity of BST operations
