

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Solved assignment for Algorithm Fundamentals. Submitted to Prof. Jeevanlata Khatri at Avinashilingam University. It includes: Radix, Sort, Intermediate, Stable, Array, Digits, Induction, Hypothesis, Elements
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Your assignment must be uploaded / submitted before or on May 02, 2012
Please view the assignment submission process document provided to you by the Virtual University.
Please note that your assignment will not be graded if:
Note: Material that is an exact copy from handouts or internet would be graded Zero marks. Your solution should consist of the material found through different sources and written in your own words.
Use induction to prove that radix sort works. Where does your proof need the assumption that the intermediate sort is stable?
Basis: If d = 1, thereโs only one digit, so sorting on that digit sorts the array. Inductive step: Assuming that radix sort works for d (^) โ 1 digits, we will show that it works for d digits.
Radix sort sorts separately on each digit, starting from digit 1. Thus, radix sort of d digits, which sorts on digits 1 ,... , d is equivalent to radix sort of the low-order d (^) โ 1 digits followed by a sort on digit d****. By our induction hypothesis, the sort of the low- order d (^) โ 1 digits works, so just before the sort on digit d , the elements are in order according to their low-order d (^) โ 1 digits.
The sort on digit d will order the elements by their d th^ digit. Consider two elements, a and b , with d th^ digits ad and b (^) d respectively.
docsity.com