منتدى برامج نت | برامج نت | دليل المواقع | العاب فلاش | برامج | عيادة الطب | Free software
العاب افلام موقع منتديات

المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : أخر طلب ارجوكم لا تخذلوني


معاناة دمعة
12-15-2007, 02:30 PM
الدكتور طالب حل السؤال و علي 50 علامة الرجاء المساعدة
السؤال:
radix sort:
an example :

Original, unsorted list:
170, 45, 75, 90, 2, 24, 802, 66

Sorting by least significant digit (1s place) gives:
170, 90, 2, 802, 24, 45, 75, 66

Notice that we keep 2 before 802, because 2 occurred before 802 in the original list, and similarly for 170 and 90.

Sorting by next digit (10s place) gives:
2, 802, 24, 45, 66, 170, 75, 90

Sorting by most significant digit (100s place) gives:
2, 24, 45, 66, 75, 90, 170, 802

your program should do the following:
1.write a function which implements the LCD radix sort
2.generate 1000 random numbers and store it in a arry, the numbers should be consist from 4 digits at least
3.choose any other sorting algorithm and implement it
4.compute the number of swapping which made by radix sort and compute the number of swapping made by the selected algorithm
5.compute the time of radix sort and compare it with the time of the selected algorithm
6.the two algorithms should be applied on the same data which mean that the original array cannot be changed
7.your program must have a menu

xlogan
12-15-2007, 02:39 PM
طيب ، ممتاز ، بس انا ناسي الـ radix sort كيف بيشتغل ، والشرح مو واضح كفاية
عندك مرجع اقرا منه كيف بيشتغل

معاناة دمعة
12-15-2007, 02:57 PM
الي أعطانا أي الدكتور هو :
radix sort:
is a sorting algorithm that sorts integers by processing individual digits.Two classifications of radix sort are least significant digit(MSD) radix sort .LSD radix sorts process the integer representations starting from the least significant digit and move towards the most significant digit. MSD radix sorts work the other way around .LSD radix sorts typically use the following sorting order:

* the integer representations that are processed by sorting algorithms are often called "keys"

*short keys come before longer keys

*keys of the same lenght are sorted inorder

*this coincides with the normal order of integer representation ,such as the sequence 0,1,2,3,4,5,6,7,8,9

xlogan
12-15-2007, 02:59 PM
لا والله متعب حاله ، طيب انا بعمل بحث عليه ، وبحاول اعمله باسرع وقت ممكن ، بس متى مطلوب المشروع منكم ،

معاناة دمعة
12-15-2007, 03:05 PM
هو كتير متعب حالوا
التسليم يوم الاثنين قبل العيد
بحاول اني أجلوا لبعد العيد

معاناة دمعة
12-15-2007, 03:07 PM
انا لقيت الشرح هذا بس ما فهمت اشي
شرح الأنيميشن :
1- يتم فرز الأرقام حسب خانة الآحاد .
2- يتم جمع الأرقام المفروزة ابتداءً من خانة الصفر وحتى خانة 9
3- يتم الفرز من جديد حسب خانة العشرات .
4- يتم جمع الأرقام المفروزة من خانة الصفر وحتى خانة 9
5 و 6 - إذا كانت هناك أرقام تحوي خانة المئات أو الآلاف نكرر عمليتي الفرز والجمع .
7- في النهاية نحصل على الأرقام مرتبة .