Sail E0 Webinar

MCQs

Total Questions : 65 | Page 5 of 7 pages
Question 41.

A binary operation `oplus` on a set of integers is defined as `x``oplus`  `y` = `x^2` + `y^2`.  Which one of the
following statements is `TRUE` about`oplus` ?


  1.    Commutative but not associative
  2.    Both commutative and associative
  3.    Associative but not commutative
  4.    Neither commutative nor associative
 Discuss Question
Answer: Option A. -> Commutative but not associative

`x``oplus`  `y` = `x^2` + `y^2` = `y^2` + `x^2` = `y``oplus`  `x`

`:.`  commutative

Not associative, since, for example

 ( 1`oplus` 2 ) `oplus` 3 `ne` 1 `oplus` ( 2`oplus` 3 )



Question 42.

                                                                              1      `x`       `x^2`

Which one of the following does `NOT` equal           1       `y`        `y^2`    ?

                                                                              1       `z`       `z^2`



  1.    1 `x`(`x` + 1) `x` + 1; 1 y(y + 1) y + 1; 1 z(z + 1) z + 1;
  2.    1 x + 1 `x^2` + 1; 1 y + 1 `y^2` + 1; 1 z + 1 `z^2` + 1;
  3.    0 x - y `x^2` - `y^2`; 0 y - z `y^2` - `z^2`; 1 z `z^2`
  4.    2 x + y `x^2` + `y^2`; 2 y + z `y^2` + `z^2`; 1 z `z^2`
 Discuss Question
Answer: Option A. -> 1 `x`(`x` + 1) `x` + 1; 1 y(y + 1) y + 1; 1 z(z + 1) z + 1;

If matrix B is obtained from matrix A by replacing the `1^(th)` row by itself plus k times 

the `m^(th)` row, for1 `ne` m  then det(B)=det(A). With this property given matrix is 

equal to the matrices
given in options (B),(C) and (D). 



Question 43.

Suppose p is number of cars per minute passing through a certain road junction between 5
PM and 6PM, and p has a Poisson distribution with mean 3. What is the probability of
observing fewer than 3 cars during any given minute in this interval? 


  1.    8 /(2`e^3`)
  2.    9 /(2`e^3`)
  3.    17 /(2`e^3`)
  4.    26 /(2`e^3`)
 Discuss Question
Answer: Option C. -> 17 /(2`e^3`)

P(p < 3) = P(p = 0) +P(p = 1) + P(p = 2)

=`(e^(-lambda) lambda^0)/(0!)` + `(e^(-lambda) lambda^1)/(1!)` + `(e^(-lambda) lambda^2)/(2!)` (where `lambda` = 3)

= `e^(-3)` + `e^(-3)` x 3 + `(e^(-3) xx 9)/2`

= `e^(-3)` `(1 + 3 +9/2)` = `17/(2e^3)`



Question 44.

The smallest integer than can be represented by an 8 - bit number in 2's complement form is 


  1.    -256
  2.    -128
  3.    -127
  4.    0
 Discuss Question
Answer: Option B. -> -128

`-` `2^(8 - 1)` = -128 . Range is -`2^((n - 1))` to + `2^((n - 1))` - 1


Question 45.

In the following truth table, V = 1 if and only if the input is valid. 

                        Inputs                         Outputs  

`D_0`           `D_1`        `D_2`         `D_3`         `X_0`         `X_1`        V  

 0             0           0            0            X           X           0

 1             0           0            0            0           0           1 

 X             1           0            0            0           1           1  

 X             X           1            0            1           0           1

 X             X           X            1            1           1           1

  What function does the truth table represent?  


  1.    Priority encoder
  2.    Decoder
  3.    Multiplexer
  4.    Demultiplexer
 Discuss Question
Answer: Option A. -> Priority encoder

4 to 2 priority encoder. 


Question 46.

Which one of the following is the tightest upper bound that represents the number of swaps
required to sort n numbers using selection sort? 


  1.    O(log n)
  2.    O(n)
  3.    O(n log n)
  4.    O(`n^2`)
 Discuss Question
Answer: Option B. -> O(n)

The maximum number of swaps that takes place in selection sort on n numbers is n 


Question 47.

Consider the languages `L_1` = `Phi` and `L_2` = {a} . Which one of the following represents `L_1``L_2`*`U``L_1`* = ?


  1.    {`in`}
  2.    `Phi`
  3.    a*
  4.    {`epsi`, a}
 Discuss Question
Answer: Option A. -> {`in`}

Concatenation of empty language with any language will give the empty language and `L_1`* = `Phi`* = `in` . Hence `L_1``L_2`*`U``L_1`* = {`in` }



Question 48.

What is the maximum number of reduce moves that can be taken by a

 bottom-up parser for a
grammar with no epsilon- and unit-production 

(i.e., of type A and A a `rightarrow` `in` `rightarrow` ) to parse a
string with n tokens?  


  1.    n/2
  2.    n - 1
  3.    2n - 1
  4.    `2^n`
 Discuss Question
Answer: Option B. -> n - 1

To have maximum number of reduce moves, all the productions will be of the typeA`rightarrow` `alpha` `beta` 

(where `alpha` and `beta` could be terminals or non-terminals). Consider the following illustration
then:  

Input String :`a_1``a_2``a_3`........`a_(n - 2)` `a_(n - 1)` `a_n`

                                                    `uparrow`

                   `a_1``a_2``a_3`........`a_(n - 2)` A                    

                                         `uparrow`

                     `a_1``a_2``a_3`................A                      n - 1 moves

                                      `.`

                                      `.`

                                      `.`

                                      `.`

                                      `.`

                    `a_1` `a_2`

                       A

                                                



Question 49.

A scheduling algorithm assigns  priority proportional  to the waiting  time of a process. Every 

process starts with priority zero(the lowest priority). The scheduler re-evaluates the process

 priorities every T  time units  and decides  the next  process to schedule. Which  one of the

 following is TRUE if the processes have no I/O operations and all arrive at time zero?  


  1.    This algorithm is equivalent to the first-come-first-serve algorithm
  2.    This algorithm is equivalent to the round-robin algorithm
  3.    This algorithm is equivalent to the shortest-job-first algorithm
  4.    This algorithm is equivalent to the shortest-remaining-time-first algorithm
 Discuss Question
Answer: Option B. -> This algorithm is equivalent to the round-robin algorithm

The given scheduling definition takes two parameters, one is dynamically assigned 

processpriority and the other is 'T' time unit to re-evaluate the process priorities. 

This dynamically assigned priority  will be deciding processes  order in ready queue

of round  robin algorithm  whose  time  quantum  is same as ‘T’ time units. As all the

 processes are  arriving at  the  same  time, they will be given same  priority but soon 

after  first 'T`  time  burst
remaining processes will get higher priorities  


Question 50.

Which one of the following is the tightest upper bound that represents the time complexity of
inserting an object into a binary search tree of n nodes?


  1.    O(1)
  2.    O(log n)
  3.    O(n)
  4.    O(n log n)
 Discuss Question
Answer: Option C. -> O(n)

For skewed binary search tree on n nodes, the tightest upper bound to insert a node is O(n)  


Latest Videos

Latest Test Papers