Computer Science Engineering (CSE)

 An e-NFA is ___________ in representation.
  • a)
    Quintuple
  • b)
    Quadruple
  • c)
    Triple
  • d)
    None of the mentioned
Correct answer is option 'A'. Can you explain this answer?

NAVDEEP SINGH answered  •  yesterday
Correct Answer :- A
Explanation : An e-NFA consist of 5 tuples: A=(Q, S, d, q0, F)
Note: e is never a member of SAn e-NFA consist of 5 tuples: A=(Q, S, d, q0, F)
Note: e is never a member of S.

If every non-key attribute is functionally dependent on the primary key, then the relation will be in
  • a)
    First normal form
  • b)
    Third normal form
  • c)
    Second normal form
  • d)
    Fourth normal form
Correct answer is option 'C'. Can you explain this answer?

DHIRENDRA GUPTA answered  •  yesterday
Conditions for various normal forms:
  1. 1 NF – A relation R is in first normal form (1NF) if and only if all underlying domains contain atomic values only.
  2. 2 NF – A relation R is in second normal form (2NF) if and only if it is in 1NF and every non-key attribute is fully dependent on the primary key.
  3. 3 NF – A relation R is in third normal form (3NF) if and only if it is in 2NF and every non-key attribute is non-transitively dependent on the primary key.
  4. BCNF – A relation R is in Boyce-Codd normal form (BCNF) if and only if every determinant is a candidate key.
Example:
Relation R(XYZ) with functional dependencies {X -> Y, Y -> Z, X -> Z}.
Notice here Y -> Z, in question it is not mention that non prime attribute is only dependent on primary key so this FD is perfectly valid.
This relation is in 2NF but not in 3NF because of every non-key attribute is transitively dependent on the primary key. Here {X} will be candidate key.

Following algorithm (s) can be used to sort n integers in the range [1 ... n3] in O(n) time?
  • a)
    Heap sort
  • b)
    Quick sort
  • c)
    Merge sort
  • d)
    Radix sort
Correct answer is option 'D'. Can you explain this answer?

SPARSH PANWAR answered  •  yesterday
Radix sort is a non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys which share same position and value. So it take O(n) time.

Which of the following is the average number of key comparisons done by sequential reach in the successful case?
  • a)
  • b)
    n/2
  • c)
    (n + 1)
  • d)
    2n
Correct answer is option 'A'. Can you explain this answer?

ASHUTOSH ARYAN answered  •  2 days ago
in linear or sequential search the maximum number of comparisons are (n) for V elements hence the number of comparisons when the element to be found is at the middle of the array

= n/2 [If n is even]
In general average case = 

Fetching relevant content for you