GATE 2007 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2007

184 questions

MCQ 1841-mark 184

Questions 96–100 of 184

Q96Greedy Technique1 markMCQ−0.33 if wrong
Consider n jobs J1,J2…JnJ_1, J_2 \dots J_n such that job JiJ_i has execution time tit_i and a non-negative integer weight wiw_i. The weighted mean completion time of the jobs is defined to be ∑i=1nwiTi∑i=1nwi\frac{\sum_{i=1}^{n}w_iT_i}{\sum_{i=1}^{n}w_i}, where TiT_i is the completion time of job JiJ_i. Assuming that there is only one processor available, in what order must the jobs be executed in order to minimize the weighted mean completion time of the jobs?

Q97Greedy Technique1 markMCQ−0.33 if wrong
Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively.

What is the average length of the Huffman code for the letters a,b,c,d,e,f?

Q98Greedy Technique1 markMCQ−0.33 if wrong
Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively.

Which of the following is the Huffman code for the letter a, b, c, d, e, f?

Q99Dynamic Programming1 markMCQ−0.33 if wrong
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to move either one unit up or one unit right, i.e., if it is at (i,j) then it can move to either (i+1,j) or (i,j+1).

Suppose that the robot is not allowed to traverse the line segment from (4,4) to (5,4). With this constraint, how many distinct paths are there for the robot to reach (10,10) starting from (0,0)?

Q100Dynamic Programming1 markMCQ−0.33 if wrong
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to move either one unit up or one unit right, i.e., if it is at (i,j) then it can move to either (i+1,j) or (i,j+1).

How many distinct paths are there for the robot to reach the point (10,10) starting from the initial position (0,0)?