GATE CSE
Give the correct matching for the following pairs:
Group - 1
(A) $${\rm O}(\log n)$$(B) $${\rm O}(n)$$
(C) $${\rm O}(n\log n)$$
(D) $${\rm O}({n^2})$$
Group - 2
(P) Selection(Q) Insertion sort
(R) Binary search
(S) Merge sort
A : array [ 1... 10] [1... 15] of integer;
Assuming that each integer takes one memory locations the array is stored in row-major order and the first element of the array is stored at location 100, what is the address of the element A[i] [j]?
function fun (x:integer):integer;
Begin
If x > 100 then fun : x – 10
Else fun : fun(fun (x + 11))
End;
Book–id
Subject–Category–of–book
Name–of–Author
Nationality–of–Author
With book–id as the primary key.
(a) What is the highest normal form satisfied by this relation?
(b) Suppose the attributes Book–title and Author–address are added to the relation, and the primary key is changed to {Name–of–Author, Book–title}, what will be the highest normal form satisfied by the relation?
Book–id
Subject–Category–of–book
Name–of–Author
Nationality–of–Author
With book–id as the primary key.
(a) What is the highest normal form satisfied by this relation?
(b) Suppose the attributes Book–title and Author–address are added to the relation, and the primary key is changed to {Name–of–Author, Book–title}, what will be the highest normal form satisfied by the relation?
Suppose we have a database consisting of the following three relations.
FREQUENTS (student, parlor) giving the parlors each student visits.
SERVES (parlor, ice-cream) indicating what kind of ice-creams each parlor serves.
LIKES (student, ice-cream) indicating what ice-creams each student likes.
(Assume that each student likes at least one ice-cream and frequents at least one parlor)Express the following in SQL:
Print the students that frequent at least one parlor that serves some ice-cream that they like.
There are five records in a database.
Name | Age | Occupation | Category |
---|---|---|---|
Rama | 27 | CON | A |
Abdul | 22 | ENG | A |
Jennifer |
28 | DOC | B |
Maya | 32 | SER | D |
Dev | 24 | MUS | C |
There is an index file associated with this and it contains the values 1, 3, 2, 5 and 4. Which one of the fields is the index built from?
Which of the following is a factor of $$\Delta $$ ?
(a) Show that for every a in A
a * a = a
(b) Show that for every a, b in A
a * b * a = a
(c) Show that for every a, b, c in A
a * b * c = a * c
$${\Pi _1}\, = \,\{ \{ a,\,\,b,\,\,c\,\} \,,\,\{ d\} \,\} $$
(a) List the ordered pairs of the equivalence relations induced by $${\Pi _1}$$
(b) Draw the graph of the above equivalence relation.
(i)$$\,\,\,\,{R_1} \cup {R_2}$$ is an euivalence relation
(ii)$$\,\,\,\,{R_1} \cap {R_2}$$ is an equivalence relation
Which of the following is correct?
x + 2y = 5
4x + 8y = 12
3x + 6y + 3z = 15 This set
$$\,\,\,\,\,\,\,{x_n} = 2{x_{n - 1}} - 1\,\,n > 1$$
$$\,\,\,\,\,\,\,{x_1} = 2$$
(b) Integrate $$\,\,\,\int\limits_{ - \pi }^\pi {x\,\cos \,x\,dx} $$
I stay only if you go

What will be the size of the partition (in physical memory) required to load (and run) this program?

When will the $$20$$ $$K$$ job complete?
program side-effect (input, output);
var x, result: integer:
fucntion f (var x:integer):integer;
begin
x:x+1;f:=x;
end
begin
x:=5
result:=f(x)*f(x)
writeln(result)
end
Function fun (x:integer):integer;
Begin
If x > 100 then fun : x – 10
Else fun : fun(fun (x + 11))
End;