www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# CS502 Assignment No 2 Solution & Discussion Due Date: 02-05-2012

Assignment Statements:

Question 1:

Use induction to prove that radix sort works. Where does your proof need the assumption that the intermediate sort is stable?

Views: 1560

Attachments:

### Replies to This Discussion

need idea solution plz.. some one upload soon . :)

plzzzzzzzzzzz koi idea solution upload kren

any body have a solution tu plzzzzzzz upload it. tody is lastdate............

Bro aj last date ha koi to ideal solution share kre

here is the solution.....100% surely correct hai.

bt plz every one write it his own words so that we all can get good marks.

file attach ha.

Attachments:

simply it is idea solution and 100% correct.

Exercise 8.3-3
Use induction to prove that radix sort works. Where does your proof need the assumption that the intermediate sort is stable?
solution:
Basis: If $d = 1$, sorting on that digit sorts the array correctly.
Inductive step: Assume that RADIX-SORT sorts $d-1$ digits correctly. Consider two elements $a$ and $b$, with their $d$th digit $a_d$ and $b_d$ respectively.
(1) $a_d > b_d$ and $b_d > a_d$ : RADIX-SORT works correctly, because of most significant bit dominates regardless of the lower $d-1$ digits.
(2) $a_d = b_d$ : RADIX-SORT leaves $a$ and $b$ in the same order because it is stable sort. The order is correct since lower $d-1$ digits sorts correctly. That's why we need that the intermediate sort must be stable.

thanks more

thanks dear bro

more thanks for guide line

plzz upload idea solution aj last date hai plzzzzzzzzzzzzzzz

upload tu hochaka he Areeba check karay na

1

2

3

4

5

## Latest Activity

Hina Tahir joined + M.Tariq Malik's group

### MGT603 Strategic Management

2 hours ago
Hina Tahir joined + M.Tariq Malik's group

### MGT510 Total Quality Management (alt. code=MGMT510)

3 hours ago
Hina Tahir joined + M.Tariq Malik's group

### MGMT628 Organizational Development (alt. code=HRM628)

3 hours ago
SAK joined + M.Tariq Malik's group

### MGT502 Organizational Behavior

3 hours ago
SAK joined + M.Tariq Malik's group

### CS504 Software Engineering - I

3 hours ago
SAK joined + M.Tariq Malik's group

### CS403 Database Management Systems

3 hours ago
SAK joined + M.Tariq Malik's group

### CS401 Computer Architecture and Assembly Language Programming

3 hours ago
SAK joined + M.Tariq Malik's group

3 hours ago