CT5 CS Final

17
1. How many characters per second (7 bits + 1 parity) can be transmitted over a 2400 bps line if the transfer is synchronous (1 start and 1 stop bit)? (a) 300 (b) 240 (c) 250 (d) 275 2. The probability that a number selected at random between 100 and 999 (both included) will not contain the digit 8 is (a) (b) (c) (d) 3. Let A and B be two sets. ~A and ~B denote the complements of the sets A and B. If BA, the set is equal to (a) ~ A B (b) A B (c) ~ A ~B (d) A - B 4. Which of the following is false? (a) (b) (c) (d) 5. Which of the following compiler modules normally does the Type Checking? (a) Syntax directed translation (b) lexical analysis (c) Syntax analysis (d) code optimization 6. is a (a) Partial recursive function (b) Recursive function (c) Projection function (d) None 7. The true statement(s) is/are A. A relation is computable by a non-deterministic recursive finite- domain program if and only if it is computable by a non- deterministic pushdown transducer. B. Pushdown transducers whose output components are ignored are called pushdown automata.

Transcript of CT5 CS Final

Page 1: CT5 CS Final

1. How many characters per second (7 bits + 1 parity) can be transmitted over a 2400 bps line if the transfer is synchronous (1 start and 1 stop bit)?

(a) 300 (b) 240 (c) 250 (d) 275

2. The probability that a number selected at random between 100 and 999 (both included) will not contain the digit 8 is

(a) (b) (c) (d)

3. Let A and B be two sets. ~A and ~B denote the complements of the sets A and B.

If BA, the set is equal to

(a) ~ A B (b) A B (c) ~ A ~B (d) A - B

4. Which of the following is false?

(a) (b)

(c) (d)

5. Which of the following compiler modules normally does the Type Checking?

(a) Syntax directed translation (b) lexical analysis

(c) Syntax analysis (d) code optimization

6. is a

(a) Partial recursive function (b) Recursive function

(c) Projection function (d) None

7. The true statement(s) is/are

A. A relation is computable by a non-deterministic recursive finite-domain program if and only if it is computable by a non-deterministic pushdown transducer.

B. Pushdown transducers whose output components are ignored are called pushdown automata.

(a) A only (b) B only (c) A and B (d) None of these

8. Consider the grammar with productions S aSa, S bSb,

S . The grammar is

(a) context sensitive and regular (b) context free but not regular

(c) regular (d) recursively enumerable

q0 q1 q2

a

ab

b

a

a b

b

0 0z z

Page 2: CT5 CS Final

9.

The language accepted by the above Non-deterministic pushdown automata is

(a) (b)

(c) (d)

10. What is the value of x and y if

(a) 16, 10 (b) 6, 16 (c) 8, 11 (d) 3, 7

11. Minimization of the Boolean function is

(a) (b) (c) (d)

12. A hash function randomly distributes records one by one in a space that can hold x number of records. The probability that the mth record is the first record to result in collision is

(a) (x-1) (x-2) ….. (x-(m-2)) (m-1) /xm-1

(b) (x-1) (x-2) ….. (x-(m-1)) (m-1) /xm-1

(c) (x-1) (x-2) ….. (x-(m-2)) (m-1) /xm

(d) (x-1) (x-2) ….. (x-(m-1)) (m-1) /xm

13. In application layer, the directory service, which helps us to locate people, resources, services or objects, is

(a) Domain Name System

(b) Light Weight Directory Access Protocol

(c) Simple Object Access Protocol

(d) Multipurpose Internet Mail Extension

14. f(x) and g(x) are two functions differentiable in [0,1], such that f(0)=2;

g(0)=0; f(1) = 6; g(1)=2. Then

(a) there must exist a constant C in (0,1), such that f’ (c) = 2g’ (c)

(b) there must exist a constant C in [0,1], such that f’ (c) = 2g’ (c)

(c) there must exist a constant C in (0,1), such that 2f’ (c) = g’ (c)

(d) there must exist a constant C in [0,1], such that 2f’ (c) = g’ (c)

Page 3: CT5 CS Final

15. The term used to represent the phenomenon that a computer is more likely to communicate with the same computer repeatedly than to communicate with a new computer each time is

(a) Spatial locality of reference (b) DMA

(c) Polling (d) Temporal locality of reference

16. In which of the following cases, linked list implementation of sparse matrices consumes the same memory space as the conventional way of storing the entire array(or matrix)

(Assume all data-types need the same amount of storage)

(a) 5x6 matrix with 9 non-zero entries

(b) 5x6 matrix with 8 non-zero entries

(c) 6x5 matrix with 8 non-zero entries

(d) 6x5 matrix with 9 non-zero entries

17. If there are ‘n’ elements to be sorted with ‘m’ different key values using bin sort, the time taken is

(a) O(mlog n) (b) O(nm) (c) O(m+n) (d) (n+m)

18. Let n is a positive integer, and the solution for is

(a) (b) (c) 0 (d)

19. Memory protection is of no use in a

(a) single user system (b) non-multiprogramming system

(c) non-multitasking system (d) none of the above

20. Consider the following functional dependencies

(S.No, Pno) hours, S.No sname, Pno (pname, plocation) in a relation (S.No, Pno, hours, sname, pname, plocation). After decomposition, the relation (Pno, pname, plocation) is

(a) in second normal form

(b) in BCNF but not in third normal form

(c) in first normal form

(d) in 4th normal form

21. Consider a database for Employee as shown below:

Emp( Empno,Ename,Job,Hiredate,Sal,Deptno)

The query that lists all employees who are not working in department 30 and who earn more than all employees working in department 30 is

(a) select * from EMP where SAL > (select SAL from EMP where DEPTNO<>30)

(b) select * from EMP where SAL > in (select SAL from EMP where DEPTNO= 30) and DEPTNO not in 30.

Page 4: CT5 CS Final

(c) select * from EMP where SAL > all ( select SAL from EMP where DEPTNO=30) and DEPTNO <> 30.

(d) select * from EMP where SAL > (select DEPTNO from EMP where DEPTNO <>30)

22. Assume there are two problems K1, K2 are in P. Every problem in P is logspace reducible to K1 and K2. Then, the problems K1,K2 are in

(a) NP-complete (b) P-complete but not P-hard

(c) P-hard and P-complete (d) None of the above

23. If T(1) = O(1), match the following :

I. 1. T(n)= O(n logn)

II. 2. T(n)= O(n2)

III. 3. T(n) = O(log2n)

IV. 4. T(n) = O(n)

(a) I – 3, II – 2, III – 4, IV - 1 (b) I – 4, II – 3, III – 1, IV - 2

(c) I – 1, II – 4, III – 3, IV - 2 (d) I – 3, II – 1, III – 2, IV - 4

24. Choose the correct statement:

(a) A file having two-dimensional layout of data elements is called as a flat file.

(b) The index table where files are stored in reverse order is called as the inverted list

(c) Uniquely defined primary key always consists of a single field

(d) All of the above

25. Which of the following is false?

(a) Non –relocatable programs can be executed at any area of storage

(b) Relocatable programs consists of codes and information about relocation

(c) Self-relocatable programs can change itself the address sensitive location

(d) None of these

26. A shift-reduce parser causes out the actions specified within traces after performing the rule.

S xxW {print “0”}

S y {print “1”}

W sz {print “2”}

What is the translation of “xxxxxxyzzz” using the syntax directed translation scheme described by the above rules?

(a) 1110202 (b) 0201021 (c) 1202020 (d) 1222021

Page 5: CT5 CS Final

27. The true assertions about Recursive Descent Parser are:

(A) Recursive Descent Parser is a kind of LL parser

(B) It recursively constructs the parse tree bottom-up.

(C) It directly translates the grammar into recursive code and hence very easy to implement.

(a) A and B only (b) B and C only

(c) A and C only (d) A, B and C

28. Which of the following is called as self-healing network?

(a) Token Ring (b) FDDI (c) CDDI (d) ATM

29. Consider the grammar,

S AaAbc/AbBAc

BA AB

Bb bb

Ab ab

Aa aa

Which of the following sentences can be derived by this grammar?

(a) ababc (b) aaabc (c) abbbc (d) abcbca

30. A garbage collection system software

(a) collects all free spaces

(b) collects all allocated spaces but not used spaces

(c) frees all allocated spaces but not used spaces

(d) None of these

GROUP II

Question No.31 to 80 will carry 2 marks each for every correct answer and there will be a negative mark of 0.5 for every wrong answer. Marks will not be reduced if the question is not attempted.

31. What is the average turn around time of the following problem?

CPU Bus time Priority

350 5

125 2

Page 6: CT5 CS Final

475 3

250 1

75 4

(a) 1275 (b) 925 (c) 735 (d) 850

32. Which of the following scheduling policy is well suited for a time-shared OS

(a) Shortest job first (b) Round Robin

(c) First-come-first-serve (d) Elevator

33. Consider a system using unspanned blocking and 100 byte blocks. A file contains records of size 20, 50, 35, 70, 40, and 20 bytes. What is the total percent of space that will be wasted, in the blocks allocated for the file?

(a) 52% (b) 39% (c) 41.25% (d) 65.4%

34. Match the files with their extension.

Files Extension

P. Archive p. PS

Q. Batch q. sh

R.Word Processor

r. tar

S. Print s. rrf

(a) P – r, Q – s, R – p, S - q (b) P – q, Q – s, R – p, S - r

(c) P – s, Q – q, R – p, S - r (d) P – r, Q – q, R – s, S - p

35. Which of the following is true?

(a) Access to cached copy is less efficient than access to original

(b) Buffer holds only existing copy of a data item

(c) A buffer is a memory that stores data when they are deleted from a device

(d) None of these

36. Consider a magnetic tape of transport speed 100 inches per second with a recording density of 1200 bytes per inch. The time taken to write 5,00,000 bytes of data grouped in 50 characters with a blocking factor of 10 is

(a) 10 secs (b) 2 secs (c) 5 secs (d) 9 secs

Page 7: CT5 CS Final

37. Which of the following is false?

(a) Segmentation suffers from external fragmentation

(b) Page frames allocated to a process should be in contiguous memory locations

(c) Segmented memory can be paged

(d) Static paging algorithm allocates a fixed number of page frames to a process when it is created.

38. If we move or delete a record to which another record contains a pointer , then that pointer is called as

(a) pinned pointer (b) dangling pointer

(c) pointless pointer (d) meaningless pointer

39. Match the following:

A. Secondary index 1. Functional dependency

B. Non-procedural query language 2. B-tree

C. Closure of a set of attributes 3. Domain calculus

D. Natural join 4. Relational algebraic operations

(a) A – 2, B – 3, C – 1, D - 4 (b) A – 3, B – 1, C – 2, D - 4

(c) A – 2, B – 4, C – 1, D - 3 (d) A – 3, B – 2, C – 4, D - 1

40. With respect to the properties of continuous function, which of the following is true?

I. Let f, g are two continuous functions at ‘a’, then is continuous at the point

‘a’ irrespective of the value of g(a).

II. If f is a continuous function defined on closed interval [a,b] such that f(a) and f(b) are of opposite signs, then there exists at least one solution of the equation f(x) = 0 in the open interval (a,b).

(a) II only (b) I and II

(c) I only (d) Both I and II are false

41. Consider the schema R = (S,T,U,V) and the dependencies S T, T U, U V and V S, let R = (R1 and R2) be a decomposition such that R1 R2 = , the decomposition is in

(a) 2 NF but not in 3NF (b) 3 NF

(c) BCNF (d) 4NF

42. A text is made up of the characters 1111,0,110,1110 and 10 denoted by a,b,c,d,e each occurring with the probability 0.12, 0.4, 0.15 , 0.08, and 0.25 . The optimal coding technique will have the average length of

(a) 2.15 (b) 3.01 (c) 2.3 (d) 1.78

43. Translate the following tuple relational calculus expression into English language

Page 8: CT5 CS Final

{t/S student (t[s_name] = s[s_name] u course (u[s_no] = s[s_no] u[course_name] = “CS”))}

(a) set of all tuples of student name

(b) set of all tuples of student name studying “CS” course.

(c) set of all tuples of student name with same course number and student number who are studying “CS” course

(d) None of these

44. Select distinct E.name from employee as E, project as P where E.s-no = P.s-no and P.dept= “Computer” order by E.name.

The above query yields which of the following result?

(a) a list of Employee names working in “Computer” department in ascending order.

(b) a list of Employee names working in “Computer” department in descending order.

(c) a list of Employee names working in “Computer” department and have different roll numbers in descending order.

(d) a list of Employee names working in “Computer” department having more than one roll number in ascending order.

45. A software that allows a personal computer to pretend as a computer terminal is (a) terminal adapter (b) bulletin board

(c) modem (d) terminal emulation

46. Which of the following is true?

(a) The time complexity of Breadth-first-search is the same as that of depth first search

(b) Each undirected graph has forward and backward edges

(c) A connected graph with two articulation points is said to be bi-connected

(d) None of these

47. The true statement(s) about 10 Base 5 is/are

A. In 10 Base 5 Ethernet cable, there is a marking for every 2.5 meters to show the paths of taps.

B. The transceiver in 10 Base 5 Ethernet can handle carrier detection and collision detection

C. We are allowed to attach upto 8 nearby computers to a transceiver, in 10 Base 5.

(a) A only (b) A, B and C (c) B and C only (d) A and C only

48. Using Best first search for a shortest path from A to Z, the order in which nodes are considered best for the path is

A

C B

D

EF

Z

7

2

10 15

31

6

9

2

7

4

Page 9: CT5 CS Final

(a) A – C – F – D – E (b) A – C – F - E

(c) A – C – F – E – B (d) A – C – F - D

49. 6 files F1, F2 ,F3, F4, F5, F6 have 100, 200, 50, 80, 120 , 150 number of records respectively. In what order should they be stored so as to optimize access time.

Assume each file is accessed with the same frequency

(a) F3 F4 F1 F5 F6 F2

(b) F2 F6 F5 F1 F4 F3

(c) F1 F2 F3 F4 F5 F6

(d) ordering is immaterial as all files are accessed with the same frequency

50. _______tour (cycle) that includes all the vertices is used to find the minimum sum of edge weights in an undirected graph.

(a) Kruskal’s (b) Hamiltonian

(c) Back tracking (d) None of these

51. A C++ keyword that is not ‘C’ key word is

(a) bitand (b) register (c) volatile (d) static

52. Consider a, b are unsigned integer variables, a=06DB7. The result of this expression b = a >> 6 is

(a) 001AB (b) 00AD2 (c) 00AB2 (d) 001B6

53. Determine the correctness or otherwise of the following Assertion [s] and the Reason [r]

Assertion (s): The principal advantage of using piggy backing is a better use of the available channel bandwidth.

Reason (r): Acknowledgements are temporarily delayed and attached to the next outgoing data frame as a field.

(a) Both [s] and [r] are true and [r] is the correct reason for [s]

(b) Both [s] and [r] are true but [r] is not the correct reason for [s]

(c) Both [s] and [r] are false

(d) [s] is true but [r] is false

Page 10: CT5 CS Final

54. Find the output of the following program

int *p,*q;

p=(int *)1000;

q=(int *)2000;

printf("%d",(q-p));

(a) 500 (b) 1000 (c) 250 (d) 4000

55. Determine the correctness or otherwise of the following Assertion [s] and the Reason [r]

Assertion (s): The state of a composite object is directly affected by the presence or absence of one or more of its component objects.

Reason(r): The component objects can be directly referenced via the public interface of their corresponding composite object.

(a) Both [s] and [r] are true and [r] is the correct reason for [s]

(b) Both [s] and [r] are true but [r] is not the correct reason for [s]

(c) Both [s] and [r] are false

(d) [s] is true but [r] is false

56. Let a function f:RR satisfy the equation f(x+y) = f(x)+ f(y), for all x,yR. If f is continuous at x=0, then

(a) f is continuous for all x R.

(b) the number of points of discontinuity of f greater than 10.

(c) the number of points of discontinuity of f must be infinite

(d) none of the above

57. The true statements regarding remote procedure call are

A. Client stub represents client procedure in the server’s address space

B. Server stub represents server procedure in the client’s address space

C. The process of packing the parameters into the message is called marshalling.

D. In RPC, passing parameters using pointers is impossible.

(a) A and B only (b) C and D only

(c) A, B, C and D (d) A, B and C only

58. To delete the minimum element in a d-heap, which has N nodes the time taken is

(a) O (d log d) (b) O (log d) (c) O (d logd N) (d) (N)

59. The number of comparisons required by Binary insertion sort to sort ‘n’ elements is

(a) O (log n) (b) O (n2)

(c) O (n log n) (d) O (n)

Page 11: CT5 CS Final

60. A. In Big-endian, the most significant byte is assigned the highest address and the least significant byte is assigned the lowest address.

B. In little-endian, the most significant byte is assigned the lowest address and the least significant byte is assigned the highest address.

C. Motorola 6800 series uses big-endian method.

D. Intel 8086 series uses little-endian method.

(a) Only A and B are true (b) Only C and D true

(c) A and C are true (d) A, B, C and D are true

61. Determine the correctness or otherwise of the following Assertion [s] and the Reason [r]

Assertion (s): An AVL tree is called a height–balanced 1–tree (HB (1) tree).

Reason (r): The maximum amount of difference allowed between the heights of any two sub-trees sharing a common root is 1.

(a) Both [s] and [r] are true and [r] is the correct reason for [s]

(b) Both [s] and [r] are true but [r] is not the correct reason for [s]

(c) Both [s] and [r] are false

(d) [s] is true but [r] is false

62. In the register addressing mode

(a) the operand is given explicitly in the instruction

(b) the address of the operand is specified in the instruction

(c) the register containing the address of the operand is specified in the instruction

(d) the data is stored in the register and it is referred using the particular register.

63. The interrupt at which the external device supplies the address to restart the execution is

(a) Vectored interrupt (b) non-maskable interrupt

(c) maskable interrupt (d) non-vectored interrupt

The following information pertains to Questions 64 and 65:

Consider a complete Balanced binary tree having 200000 keys. The binary tree is divided into pages of size 4 Kilobytes, each page is capable of holding 63 keys/reference field pairs.

64. The number of seeks required for a worst-case search of the completely full binary tree before it was divided into pages is (approximately)

(a) 27 (b) 16 (c) 18 (d) 21

65. The number of seeks required for the paged versions of the binary tree is (approximately)

(a) 4 (b) 3 (c) 5 (d) 2

Page 12: CT5 CS Final

66. Minimize the Boolean function f(w,x,y,z) =

(a) (b) (c) (d)

67. Statement A : The no of temporary variables needed to swap two values is 1.

Statement B : The no of temporary variables needed to swap two values is 0.

Statement C : The logical OR can be used to swap two values.

Statement E : The logical NAND can be used to swap two values.

Statement F : The logical XOR can be used to swap two values.

(a) A,C, E are true (b) only B is true

(c) B,C,E, F are true (d) Both B and F are true

68. Which of the following is true?

(a) The function has a growth rate greater than that of any exponential function.

(b) Function has lesser growth rate than that of any polynomial

(c) Function has a growth rate greater than

(d) All of these

69. Which of the following problem is not NP-complete?

(a) Given a graph G and an integer K. Does V(G) contain an independent set of K vertices?

(b) Given a finite set S of positive integers and an integer N(the number of bins). Does there exist a partition of S into N or fewer subsets such that the sum of the integers in each subset is <= K?

(c) Given a Graph G and an integer K. Can the vertices of G be properly colored in K or fewer colors?

(d) None of the above.

70. The disjunctive normal form of

(a) (b)

(c) (d)

71. Which of the following formula is valid?

(a) (b)

(c)

Page 13: CT5 CS Final

(d)

72. If A and B are mutually exclusive and then is

(a) (b) (c) (d)

73. Determine the correctness or otherwise of the following Assertion [s] and the Reason [r]

Assertion (s): Whenever the CPU is multiplexed, two pairs of context switches occur.

Reason (r): Context switching part requires load and store operations to save the register contents.

(a) Both [s] and [r] are true and [r] is the correct reason for [s]

(b) Both [s] and [r] are true but [r] is not the correct reason for [s]

(c) Both [s] and [r] are false

(d) [s] is true but [r] is false

74. A farmer buys 4 cows, 3 pigs, 2 hens from a man who has 6 cows, 5 pigs, 5 hens. How many choices are there for the farmer?

(a) 2,500 (b) 3,000 (c) 1,500 (d) 1,000

75. The solution for the recurrence relation given T(0) =1, T(1) = 6 is

(a) (b) (c) (d)

76. Determine the correctness or otherwise of the following Assertion [s] and the Reason [r]

Assertion (s): The height of a complete binary tree is O(log N).

Reason (r): The complete binary tree of height ‘n’ has nodes between 2n and 2n+1 – 1.

(a) Both [s] and [r] are true and [r] is the correct reason for [s]

(b) Both [s] and [r] are true but [r] is not the correct reason for [s]

(c) Both [s] and [r] are false

(d) [s] is true but [r] is false

77. Suppose A and B are two nn square matrices, the time required to compute multiplication of A and B is

(a) O(N3) (b) (N2)

(c) O(N2) (d) (N2)

Page 14: CT5 CS Final

The following information pertains to Questions 78 and 79:

In Bit-Map protocol, each contention period consists of exactly N slots. If station 0 has a frame to send, it transmits a 1-bit during the zeroth slot. No other station is allowed to transmit during this slot. In general, a station j may announce that it has a frame to send by inserting a 1-bit into slot j. Let overhead per frame is N bits and the amount of data is d bits.

78. How long does a station, s, have to wait in the worst case before it can start transmitting its frame over a LAN that uses Basic Bit Map protocol?

(a) (N-1)d bit times (b) (N-1)/d bit times

(c) N+(N-1)d bit times (d) (N-1)d+N*log d bit times.

79. Assume a High load in the network, that is all the stations have something to send all the time, then the efficiency is

(a) d/(N+d) (b) d/(d+1) (c) N/(N+d) (d) N/(d+1)

80. Ethernet uses _____________ coordination scheme

(a) Time division multiple access

(b) Frequency division multiple access

(c) Code division multiple access

(d) Carrier sense multiple access