Q. Consider the following program written in pseudo-code. Assume that x and y are integers. The numberΒ ofΒ times that theΒ print statement is executed by the call Count(1024,1024) is_______. Ans: 10230
READ MORE +Q. Consider the following program written in pseudo-code. Assume that x and y are integers. The numberΒ ofΒ times that theΒ print statement is executed by the call Count(1024,1024) is_______. Ans: 10230
READ MORE +Q. Consider Guwahati (G) and Delhi (D) whose temperatures can be classified as high (π»), medium (π) and low (πΏ). Let π(π»πΊ) denote the probability that Guwahati has high temperature. Similarly, π(ππΊ) and π(πΏπΊ) denotes the probability of Guwahati having medium and low temperatures respectively. ...
READ MORE +Q. Let G be a graph with 100! vertices, with each vertex labelled by a distinct permutation of the numbers 1,2, β¦ , 100. There is an edge between vertices π’ and π£ if and only if the label of π’ can be obtained by swapping two adjacent numbers in the label of π£. Let π¦ denote the degree of a vertex ...
READ MORE +Q. Consider the following four relational schemas. For each schema, all non-trivial functional dependencies are listed. The underlined attributes are the respective primary keys. Schema I: Registration (rollno, courses) Field βcoursesβ is a set-valued attribute containing the set of courses ...
READ MORE +Q. Consider the relations r(A, B) and s(B, C), where s.B is a primary key and r.B is a foreign key referencing s.B. Consider the query Q:Β Β π β (ππ΅<5(π )) Let LOJ denote the natural left outer-join operation. Assume that r and s contain no null values. Which one of the following queries ...
READ MORE +Q. Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is π. Three semaphores empty, full and mutex are defined with respective initial values of 0, π and 1. Semaphore empty denotes the number of available slots in the buffer, for the consumer ...
READ MORE +Q. In a system, there are three types of resources: E, F and G. Four processes P0, P1, P2 and P3 execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max is the maximum number of instances of F ...
READ MORE +Q. Consider the following parse tree for the expression a#b$c$d#e#f, involving two binary operators $ and #. Which one of the following is correct for the given parse tree? A. $ has higher precedence and is left associative; # is right associative B. # has higher precedence and is ...
READ MORE +Q. A lexical analyzer uses the following patterns to recognize three tokens T1, T2, and T3 over the alphabet {a,b,c}. π1: π? (π|π)βπ π2: π? (π|π)βπ π3:Β Β π? (π|π)βπ Note that βx?β means 0 or 1 occurrence of the symbol x. Note also that the analyzer outputs the ...
READ MORE +Q. Consider the following problems. πΏ(πΊ) denotes the language generated by a grammar πΊ. πΏ(π) denotes the language accepted by a machine π. I. For an unrestricted grammar πΊ and a string π€, whether π€ β πΏ(πΊ) II. Given a Turing machine M, whether L(M) is regular III. Given two grammars πΊ1 and ...
READ MORE +