question about external sorting

38 views
Skip to first unread message

Zheng Zhao

unread,
May 6, 2021, 12:09:51 AM5/6/21
to COMP9311-21T1
Hi tutor 
In the External sorting ppt slide 8. In pass1 we have 6 sorted runs of 20 pages. in the pass2 we should merge every 3 sorted runs, so in pass 2 the first pages should be 20+20+20=60, why in the ppt it should it was 80 pages and 28 pages?
And I notice in the practices, there is no practice related the external sorting, but it is part of the final exam. So could you please give us some related practices?


Best Wishes

Yu Hao

unread,
May 6, 2021, 9:12:07 PM5/6/21
to COMP9311-21T1
Hi Zheng,

Here B is 5, and B-1 is 4.
In Pass 1 we have 6 sorted runs and 20 pages for each. Then for pass2 there are ⌈6 / 4⌉ = 2 runs and each run contains 4*20 = 80. Since there are totally 108 pages, 108 - 80 = 28 for the second run.

Cheers,
Yu
Reply all
Reply to author
Forward
0 new messages