MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The files x1, x2, x3 are 3 files of length 30, 20, 10 records each. What is the optimal merge pattern value?
A
110
B
90
C
60
D
50
Explanation: 

Detailed explanation-1: -Q. The files x1, x2, x3 are 3 files of length 30, 20, 10 records each. What is the optimal merge pattern value? Explanation : None.

Detailed explanation-2: -When two or more sorted files are to be merged altogether to form a single file, the minimum computations are done to reach this file are known as Optimal Merge Pattern. If more than 2 files need to be merged then it can be done in pairs. For example, if need to merge 4 files A, B, C, D.

Detailed explanation-3: -the time complexity is O(nlogn), If we use simple list and perform linear search to get the minimum sized file, the time complexity is O(n2).

Detailed explanation-4: -Complexity Analysis Construction of heap takes O(logn) time. The total running time of this algorithm is O(nlogn).

Detailed explanation-5: -A binary merge tree is a binary tree with external nodes representing entities and internal nodes representing merges of these entities. 2. Optimal binary merge tree: An optimal binary merge tree is a binary merge tree where the sum of paths from root to external nodes is optimal (e.g. minimum).

There is 1 question to complete.