0 ratings 0% found this document useful (0 votes) 23 views 10 pages DU Spring 2020 Question
The document outlines the Master of Science Admission Test for the Department of Computer Science and Engineering at the University of Dhaka, consisting of 50 questions with a total of 150 marks. It includes various topics such as probability, statistics, programming, and algorithms, with multiple-choice questions and their respective options. The test aims to assess the candidates' knowledge and skills relevant to the field of computer science and engineering.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save DU Spring 2020 Question For Later Department of Computer Science and Engineering
University of Dhaka
Master of Science Admission Test (Spring 2020)
Time: 2 Hours Total Marks: 150
1,
>
[Answer all the following 50 questions, each of which has equal merits of 3.
No marks will be deduced for a wrong answer.]
Suppose there are 5 discrete random variables in an environment, namely A:, Az, A, Ac and As, the
sizes of their domains are 4, 5, 6, 2 and 3, respectively.
() How many entries should be in the full joint distribution involving all five variables in order
to perform probabilistic inferences in this environment?
(ii) Now, suppose a domain expert decides that the variables Az, As and As are independent of
the other two variables. Now, how many entries should be in the full joint distribution
involving all five variables?
(iii) Now, further suppose that another domain expert opines that among the variables A:, As
and As, the following relationship holds: As and As are conditionally independent, given A:
Now, how many entries should be in the full joint distribution involving all five variables?
(i) 20 (ii) 12 (ii) 22 B. (i) 720 (ii) 63 (ii) 42
(i) 720 (i) 48 (iil) 63 D. None of the options is correct
‘Suppose 5% of all laptops manufactured by a large electronics company are defective. Fifty laptops
are randomly selected from the production line of this company. The selected laptops are inspected
to determine whether each of them is defective or good. What is the probablity that exactly 1 (one)
of these 50 (fifty) laptops is defective?
0.202 B. 0.192
0.004 D. None of the options is correct
A diagnostic test has a probability 0.95 of giving a positive result when applied to a person suffering
from a certain disease, and a probability 0.10 of giving a (false) positive when applied to a non-
sufferer. It is estimated that 0.5% of the population are sufferers. Suppose that the test is now
administered to a person about whom we have no relevant information relating to the disease (apart
from the fact that he/she comes from this population). if the person is diagnosed as positive by the
test, what is the probability that the person has indeed the disease?
0.1810 B. 0.475
0.50 D. None of the options is correct
Page 1 of 10The two means that are heavily used in Statistics are arithmetic mean and geometric mean. Which
statement is true regarding these two means?
Arithmetic mean is less affected by outlier —_—B.
data points
Geometric mean is always strictly less than.
the arithmetic mean
Geometric mean is not suitable for a dataset if
any of the data points is 0
Both b and care correct
If a8 car is having a displace from point A to point B in t sec which is expressed by equation
y(t) = 2+ t+ 1. Which of the following statement is true?
The car is moving with constant acceleration _B.
Neither acceleration nor velocity is constant.
am
What is the value of
The car is moving with constant velocity
Both the acceleration and velocity are
constants
i.e., nth derivative of x”) for m= n? (Note: °Pe, °C and ! stand for usual
permutation, combination and factorial notations, respectively.)
al B,
nxn) o.
mp, xm)
0
Consider the following system of two linear equations involving three variables:
xty=6 () 2x+y-32=10
Choose the best statement:
The system has absolutely no solution since 8.
there are two equations but three (unknown)
variables
‘The system has infinitely many solutions since _D.
6 - x; then substituting
this value to Eq. (2) we get x = 3z + 4; now for
each possible value of z, we get a solution,
thereby yielding infinitely many solutions
from Eq. (1) we get
(2)
The system has a unique solution since we can
) and then solve for x
and y as follows: from Eq, (1) we get y= 6 -x;
then substituting this value to Eq. (2) we get
4andy=2
Ignore z (Le, assume z
x= 4; s0 the solution is:
None of the options is correct
Consider the following Deterministic Finite Automaton (DFA).
Let’s denote the set of eight bit strings whose second, third, sixth and seventh bits are 1. Find the
number of strings that are accepted by the DFA wherein the initial state is A.
a; 8
©
Page 2 of 10
2
None of the options is correct9.
10.
11.
12.
13.
14.
A
c
Which one of the following is true for the above automaton?
b*ab*abtab* 8. bta(atb}*
btab*ab* D. (a+b)*
S$ aSa | bSb | a] b
‘The language accepted by the above grammar over the alphabet {a,b} is the set of:
All palindromes B. All odd length palindromes
Alleven length palindromes D. None of the Above
Consider following two user-defined functions written in C.
void hello4() {for (;;) printf{"hello\n"); }
void hello2(){ printf’hello\n"); hello2(); }
void hello3() { hello3(); printf("hello\n"); }
Which of the following statement is not true?
hello2() will not run faster than hello1() B. All of them will continue to utilize CPU cycles
indefinitely
hello3() will not give same output as hello2() D.hello1() will use lower stack memory than
hetlo3()
What will be the output of the following block of code written in C?
int a= 65, * ptr;
char** ptr2;
ptr= Ba;
ptr2 = (char**) &ptr;
printf("%c", **(int**)ptr2);
A B. 65
Compile time error D. Garbage value
Let the initial values of two integer variables x and i are 10 and 3, respectively. What will be the value
of x after exiting from the following while loop in C?
while (i) {x= (x << i) + (>> isis}
2250 8. 860
155 D. 15
Which of the following statement is wrong?
Static class cannot have runtime B. Singleton class may have a public constructor
polymorphism
Singleton class has only one instance, but D. Singleton class can be serialized
static class may have many instances
Page 3 of 1015.
16.
17.
18.
‘Suppose each course in an M.S, program has different mark distribution rules. Your automated result
Processing system just has two requirements. It accepts a “Course” type object that must have
calculateTotalMarks function which will return total marks a student has obtained out of 100 in that
particular course. At the same time, each course must also have a grade calculation function which
cannot vary for different courses. Which of the following is a suitable choice for the above scenario
and would not give any error if a “Course” type object is supplied.
An interface “Course” with B. Aregular class “Course” with calculateGrade
calculateTotalMarks and calculateGrade function implementation. Each individual
function. individual course will implement the course class will extend “Course” class
interface
‘An abstract class “Course” with final D. Aregular class “Grade” with final
implementation of calculateGrade method implementation of calculateGrade method and
along with an abstract method an interface “Course”. Each individual course
calculateTotalMarks. Each individual course een
class will extend “Course” class
Which of the following statement is not an accurate difference between structure and class?
Structures do not require constructor, classes 8. Fields are automatically initialized with classes
do whereas structures are not
‘The structure can't contain a volatile field --O. Structure uses heap whereas class uses stack
whereas the class can
Which of the following is an example of late binding?
Class A has static method M. Class Bextends A B, Class A has method M. Class B extends A and re-
writes method M with same signature
Class A has two methods both named M but D. Class A overloads “>” operator
have different signatures
What does the following C doe segment will print?
char str[] = "Hello From CSEDU";
char* ptr = str;
printf("8s", ptr + ptr[O}-ptr[13]+ ptr[15]- ptr[12]+1);
Hello From CSEDU B. CSEDU
From CSEDU D. Garbage String
Suppose, x=30, y=20 and z =:
segment?
int var = (x ((x * y) & (x < yi) (y 4 ((2* y) & 2 < yINs
27 8. 37
50 D. 47
7. Then what will value of variable var after executing following C code
Page 4 of 1020.
21,
23.
24.
A
A linear-probing hash table of length 10 uses the hash function h(x) = x mod 10. After inserting six
integer keys into an initially empty hash table, the array of keys is:
fo]? [2 [3 [4 5 [6 |7 [8 [9
a2 |= 34/52 [46 | 33
is not the insertion sequence? Assume that the length of the hash table does
not change during the insertions.
42, 23, 34, 52, 46, 33 B. 42, 34, 52, 23, 46, 33
42, 23, 34, 46, 52, 33 D. 34, 23, 42,52, 46, 33
Consider an algorithm that solves problems of size NV by solving one sub-problem of size N/2 and
performing some processing taking some constant time c. Answer the following question.
(i) Which of the following recurrence relation represents the time complexity of the algorithm?
(ii) Which one is the correct solution of the above recurrence relation?
(i) TIN)=2T(N/2}+e (1) O(N) B. (i) T(N)=T(N/2}+c (ii) O(N)
(i) TIN)=2T(N/2}4e ii) O(log N) D. (i) T(N)=T(N/2)+c (ii) O(log N)
You are given 6, 1, 2, 3,4, 5, 7, 8, 9, 10, 11.as the pre-order (root, left-subtree, right-subtree) traversal
of the node labels of a Binary Search Tree. What is the length of the shortest path between the node
Sand node 11?
6 8
10
You are given an array V consisting N (N is odd) unique integers. Assume O-based indexing for V. You
are also given another integer X. You need to determine whether X is equal to the median of V. Which
of the following is the fastest (and correct) algorithm to determine this?
Sort V in ascending order. Compare B. Search X in V using binary-search algorithm. If X
Vifloor(N/2}] with X is found in position floor(N/2) of V then X is the
median, else not
Count number of integers in V which are D. Count number of integers in V which are
smaller than X. If this count is equal to greater or equal to X. If this count is equal to
floor(N/2) then X is the median, else not (N+1)/2 then X is the median, else not
You are given an array V consisting N integers. Assume O-based indexing for V. You are also given
another integer X which you want to find in V. You will be using the following code snippet (written
in C/C++) of binary search to find X in V. For which of the following V and X pair, the given binary
search snippet will successfully find (return 1) X in V?
int binary search(int V[J, int N, int X){
int low = 0, high = N - 1, mid;
while(low <= high) (
mid = (low + high) /2;
if (V{mid] X) return 1;
else if(V(mid] > X) high = mid - 1
else low = mid + 1;
}
return 0;
)
V={1,3,5,2,4),X=3 B. V=(1,2,3,4,5,X=6
V={5,4, 3,2, 1}, X=2 D. V={1,3,5,2,4},
Page 5 of 1025.
26.
27.
28.
29.
30.
31.
Given a directed weighted graph, we usually need Dijkstra’s algorithm to find the shortest path for a
single source. But if the graph has some special property then sometimes Breadth First Search (BFS)
will be sufficient to correctly determine the shortest path. In which of the following case BFS may not
produce correct shortest path for a graph?
‘The graph is a tree with no edge weights B. The graph isa directed acyclic graph with
constant edge weights
The graph isa tree with negative edge D. The graph is undirected with positive edge
weights weights
Lucky numbers are those which are positive and doesn’t have consecutive 1's in its decimal
representation. For example, 1, 12, 1550, 10102301 etc. are all Lucky numbers. But 11, 40110, 1011
etc, are not Lucky numbers. How many Lucky numbers are there with length 3 (three digits in decimal
representation with no leading zeroes)?
900 B. 882
999 D. 872
In merge sort, we always split the array in two almost equal parts. We merge them after recursively
sorting both parts. We know the running time of merge sort is O(N Ig N) where N is the size of the
array that we are sorting. What is the running time of merge sort if we split the array in two parts by
taking only the first element as the first part and rest of them as the second part (instead of splitting
them equally)? You should assume that we still recursively sort the two parts and merge them.
O(N) B. O(NIgN)
O(N?) D. O(N? ig N)
A networking company uses a compression technique to encode the message before transmitting
over the network, Suppose the message contains the following characters with their frequency
(character: frequency) - ‘a’: 5, ‘b’:9, ‘c’: 12, ‘d’: 13, ‘e’: 16, ‘f: 45. The message is compressed using
Huffman coding. Which character will need the minimum number of bits to encode? How many bits
will it need?
‘The character is ‘a’. It will need 1 bit to B. The characteris ‘’. It will need 2 bit to encode
encode
‘The character is ‘a’. It will need 4 bit to D. The character is ‘f’. It will need 1 bit to encode
encode
Two fair dice are tossed, What is the probability that the sum of the dots shown on the upper faces
is less than 9?
24/36 B. 25/36
26/36 D. 27/36
Consider the two events from rolling a die. The event A is even numbers and the event B is prime
numbers. The events are:
dependent B. Independent
mutually exclusive D. None of a, bande
‘Agent MOR-007 received a new task to determine a house in Dhaka city isin a safe condition. A house
is safe if all the resident in the house does not eat onion and salt. Agent MOR-007 doesn’t have time
to visit each house. So he derives a probability distribution. According to this distribution, the
probability that at least one person in a house eat onion is 0.4 and the probability that all the residents
of that house don’t eat salt is 0.8. The eating behavior in each house is independent. Now, determine
the safe probability of 3rd house.
0.08 B. 0.12
0.32 D. 0.48
Page 6 of 1032.
33.
34,
35.
36.
37.
Consider a small database containing information of employees of different branches of an
organization with only entity sets ‘employee’ and ‘branch’. The employee entity set has attributes
emp_id, emp_name, address, emp_city and cell. The branch entity set contains attributes branch_id,
branch_name and branch_city. A binary relationship set ‘works’ exists between employee and branch
with many to one relationship from employee to branch. The works relationship set also has
descriptive attributes designation, salary and date_of_ joining.
What non-trivial functional dependencies will exist in works shecma?
emp_id -> branch_id B. emp_id -> branch_id, designation
emp_Id > branch_id, salary, date_of joining D. all ofa, bandc
The usual relationship among different keys in a relation schema is Primary key < Candidate Key <
Super key. If we design a schema to establish relationship Primary Key = Candidate Key = Super Key,
the schema may have _no. of attribute/s.
a B 2
3 D. Any
‘What is/are the problem/s of 3NF decomposition?
lossless join is not achieved. B. dependency is not preserved
may introduce null values D. allofa,bande
Each of the three processes (arrived at the same time) takes a total of 10ns to finish, where it
consumes 2ns to read from and write to a shared (among them) file. The kernel needs 7ns to load a
file from the disk. In a round-robin schedule, calculate the average waiting time of the processes
where time quanta are 6ns, and the processes read and write to the file only once at 4ns (run-time)
11.33 ns B. 13.33 ns
15.33 ns D. 14.33ns
Let a system has three resources 1, A2, A3 and three processes P1, P2, P2. Row matrix A represent
the number of instances of each resource type and P matrix show the current allocation of each
resource type.
ton
A= [2 2 2)P [ 1 |
11 0.
Now, let the processes P2 and P3 request for one instance of resource type A1 and A2 respectively.
Determine which of the processes are in deadlock if the request is granted?
P1and P2 are in deadlock 8. P2and P3 are in deadlock
All the processes are in deadlock D. None of them
An operating system employs many change algorithms to select a page to replace. A page is recently
referenced or not is stored in two bits. Ifa page Is referenced, a1’ bit is inserted in the MSB position
and right-shifted; if not, I’ is subtracted from the LSB bit position. Let the kernel accessed page one
for the last three of four times slots, and never accessed page two, and accessed page three in the
last time slot. At the end of the fifth time slot, a page fault occurs; therefore, a page needs to be
replaced. Determine the page for the replacement. Assume at the fifth time slot; kernel access a page
from ROM.
Page 1 B. Page 2
Page 3 D. Page from ROM
Page 7 of 1038.
39.
41.
43.
In a Unix/Linux file system, a disk block contains 512 bytes. The file system required 16 bytes to keep
the block information. The file system entity i-node contains eight direct index block info, one double
indirect index block, and one triple indirect inclex block. For a record located in a 24576-byte location
ina file. How many read and write access required to update the record.
‘two read and one write B. two write and two read
four read and two write D. three read and one write
hard-disk system contains five disks platters attached to a spindle. What would be the total head
movement if the secondary storage management system using the elevator algorithm for the
following track request? Assume the current disk position is on cylinder 50, and the previously
accessed cylinder was 25. Tracks are numbered from 0 to n.
76, 266, 51, 223, 370, 95
86 8. 330
945 D. 60
Consider the given four scenarios (i) Process experienced page fault (ii) Divide by zero (il) process
opena file & (iv) process terminated. Determine which answer is correct.
Process (i) and {ii) terminates 8. For (iv) process going to the waiting state
Context switch occurs for any of the condition D. Process in (iii) terminates because the file does
from (i) to {iv) not exist
In a TCP connection, the initial sequence number at the client side is $240. The client opens the
connection, sends three segments, the second of which carries 1000 bytes of data, and closes the
connection. The sequence number in (i) SYN segment, (i) data segment, and (il) FIN segments sent
by the client are:
0, 1000, 1001 B, 5240,1000,5241
5240, 5241, 6241 D. 0,5240, 6240
Suppose datagrams are limited to 1,500 bytes (including header) between source Host A and
destination Host B. Assuming a 20-byte IP header and a 20-byte TCP header, total numbers of
datagrams would be required to send an MP3 file of size of 4 million bytes:
2703 B. 2740
2710 D. 2730
A client makes remote procedure calls to a server. The client takes 7 ms to compute the arguments
for each request, and the server takes 12 ms to process each request. The local OS processing time
for each send or receive operation is 0.7 ms, and the network time to transmit each request or reply
message is 5 ms. Marshalling or unmarshalling takes 0.7 ms per message. The time taken by the client
to generate and get the reply of a request (in case of a single threaded system)
26.9 ms, B. 32.6ms
30 ms D. 31.2ms
Page 8 of 1044,
45.
46.
MMK isa secret, talented and hardworking agent (but he self-proclaimed that he is lazy). He used the
following program to determine the total number of workdays in a non-leap year.
def is_mmk_workday ( day number , month , total_days )
will_work = day number ¢ ( month & (total _dayst2))
return will_work
def get_total_days in month ( month ) :
if ( month == 2) : return 29
if ( month <= 7) and ( monthe2 == 1): return 31
elif ( month >8) and ( month2 == 1): return 30
return 31
def get_total_number_of_workdays_in year ( }
total_mak workday ~ 0
for month in range (1, 13}
frange generate number in range [start , end) , i.e. excluding end
total_days = get_total_days_in_month ( month }
for day in range ( 1, total_days )
if ( is mmk workday { day, month , total days} )
total_mmk workday = total_mmk workday + 1
print { month , total_mmk workday )
return total_mmk workday
print ( get_total_number_of workdays in year ( ) }
Help MMK to determine the total number of workdays in a non-leap year.
60 BL 44
90 D. 134
‘The Turing Test, proposed by Alan Turing (1950), was designed to provide a satisfactory operational
definition of intelligence. A computer passes the test if a human interrogator, after posing some
written questions, cannot tell whether the written responses come from a person or from a
computer. In order to pass this specific test, which one of the following four capabilities a computer
would need to possess,
Natural Language Processing, Knowledge B, Natural Language Processing, Knowledge
Representation, Automated Reasoning and Representation, Automated Reasoning and
Machine Learning Computer Vision
Natural Language Processing, Knowledge D. Machine Learning, Knowledge Representation,
Representation, Robotics and Computer Automated Reasoning and Computer Vision
Vision
It is obvious that the performance of heuristic search algorithms depends on the quality of the
heuristic function. Which of the following is not a way to construct good heuristics?
by relaxing the problem definitions 8. _ by storing precomputed solution costs for
subproblems in a pattern database
by learning from experience with the D. by developing a meta-heuristic approach
problem class
Which of the following grammar(s) cannot be dealt with the Push Down Automata, according to the
Chomsky Classification of Grammars? Here, V = {S, A, B, Chand T= {a, b, +, *}
Sa | aaab B. AAS | a*B
A> Ba | Sa A~ Baha | aaaAAAaab
Boble B>baale
S>A| BAC D. None of the choices.
A> aaaBa | Sb
Bo bale
Page 9 of 1048.
50.
In which of the following scenario, the prototyping model of software development is well suited?
When requirements are well defined B, For projects with large development teams
When a customer cannot define D. None of the choices
requirements clearly
Which of the following is NOT part of the Agile Manifesto?
Individuals and interactions over processes _B, Working software over comprehensive
and tools documentation
Contract negotiation over customer D. Responding to change over following a plan
collaboration
(2)
| © LA
Terniory
1
ed ota
eo ay
+ Vieweia
Ee ©
@ (by
Figure: (a) The principal states and territories of Australia. Colouring this map can be viewed as a
constraint satisfaction problem (CSP). The goal is to assign colours to each region so that no
neighbouring regions have the same colour. (b) The map-colourings problem represented as a
constraint graph
Why formulate a problem as a CSP? One reason is that the CSPs yield a natural representation for a
wide variety of problems; if you already have a CSP-solving system, itis often easier to solve a problem
using it than to design a custom solution using another search technique. In addition, CSP solvers can
be faster than state-space searchers because the CSP solver can quickly eliminate large swatches of
the search space. For example, once we have chosen {SA = blue} in the Australia problem, we can
conclude that none of the five neighbouring variables can take on the value blue. Thus, by taking
advantage of this constraint propagation, we have only 32 assignments to look at for the five
neighbouring variables. Now, without taking advantage of constraint propagation, how many
assignments a search procedure would have to consider?
64 B. 243
28 D. 256
Page 10 of 10