410 views

1 Answer

Best answer
3 votes
3 votes

The question actually belongs to optimal merge..Let us see through the given question how we do optimal merge..It is similar to Huffman Coding..In each step , here also we pick up 2 files which have 1st and 2nd minimum no of records or sizes whatever we say.

a) So in this case we have 1st 2 minimums = 40 and 50 and the files corresponding to them are F4 and F6..Now on merging these 2 , we get resultant new merged file having 40 + 50 = 90 records.Now this file is also considered for comparision.

b) Now we have minimum out of the nodes : 70 and 90 and corresponding to 70 we have F3 , hence next file  that will come in the sequence is F3 and weight of the merged file hence  =   70 + 90 = 160..

c) Next F is merged  so no of merges now becomes  =  160 + 100  = 260

d) Then F2 is merged so no of merges now becomes  =  260 + 200 = 460

e) And finally F5 is merged so no of merges now becomes  = 460 + 250  = 710

Hence total no of merge operations that are performed  =  90 + 160 + 260 + 460 + 710  

                                                                                =  1680

So average no of merges per file          =     1680 /  6

                                                         =      280

Hence option D) should be the correct option for 1st part and option C) for the 2nd part since it is closest to 280 and approximate is being asked..

selected by

Related questions

1 votes
1 votes
1 answer
1
dragonball asked Jan 10, 2018
617 views
Given disk size is 40 MB.Block Size is 8KB .The size of the bit map is ..... bits.Plz describe the answer with a proper diagram so that I could visualize the things as I ...
1 votes
1 votes
1 answer
2
iarnav asked Apr 11, 2017
1,850 views
Hello, please kindly list out the topics which are needed to be studied from topic file system?!You can also pinpoint the topics from Galvin book 7th edition.
1 votes
1 votes
0 answers
3
2 votes
2 votes
1 answer
4
Rahul Jain25 asked Oct 25, 2016
824 views