Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Chunk Sort

Chunk Sort

Ratings: (0)|Views: 116 |Likes:
Published by ijcsis
the objective of this paper is to develop new efficient sorting technique known as Chunk Sort. Chunk sort is based on the idea of Merge Sort. In this sort divide main data list into number of sub list then sort sub list and combine them until the whole list become sorted. The difference between merge sort and chunk sort is, merge sort merge two sub list in to one, but chunk sort merge three sub list in to single sorted list. It is fast then many existing sorting techniques including merge sort and quick sort. Running Cost analysis and the result obtained after implementation are provided in the graphical form with an objective to compare the efficiency of the technique with quick sort and merge sort, as both are consider as efficient and fast one.
the objective of this paper is to develop new efficient sorting technique known as Chunk Sort. Chunk sort is based on the idea of Merge Sort. In this sort divide main data list into number of sub list then sort sub list and combine them until the whole list become sorted. The difference between merge sort and chunk sort is, merge sort merge two sub list in to one, but chunk sort merge three sub list in to single sorted list. It is fast then many existing sorting techniques including merge sort and quick sort. Running Cost analysis and the result obtained after implementation are provided in the graphical form with an objective to compare the efficiency of the technique with quick sort and merge sort, as both are consider as efficient and fast one.

More info:

Published by: ijcsis on Aug 13, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/12/2010

pdf

text

original

 
Chunk Sort
Syed Zaki Hassan Kazmi
Department of Computer ScienceIQRA University Islamabad CampusPakistanzaki.mzd@gmail.com
Syeda Sobia Hassan Kazmi
Department of Computer ScienceThe University Of Azad Jammu And Kashmir Muzaffarabad A.K, Pakistanfajar_zara@hotmail.com
Syeda Shehla Kazmi
Department of Computing & MathematicsManchester Metropolitan University,United Kingdomshehla_kazmi@hotmail.com
Syed Raza Hussain Bukhari
Department of Computer ScienceThe University Of Azad Jammu And Kashmir Muzaffarabad A.K, Pakistanrazabukhari@hotmail.com
 Abstract
—the objective of this paper is to develop new efficientsorting technique known as Chunk Sort. Chunk sort is basedon the idea of Merge Sort. In this sort divide main data list intonumber of sub list then sort sub list and combine them untilthe whole list become sorted. The difference between mergesort and chunk sort is, merge sort merge two sub list in to one,but chunk sort merge three sub list in to single sorted list. It isfast then many existing sorting techniques including merge sortand quick sort. Running Cost analysis and the result obtainedafter implementation are provided in the graphical form withan objective to compare the efficiency of the technique withquick sort and merge sort, as both are consider as efficient andfast one.
 Keywords-Sorting;Merge Sort; Quick Sort.
I.
 
I
 NTRODUCTION
Algorithms have a vital and key role in solving thecomputational problems, informally an algorithm is a welldefined computational procedure that takes input and produces output. Algorithm is a tool or a sequence of stepsto solve the computational problems [1].An Algorithm is a step by step process to solve a particular problem in a finite amount of time and has afundamental and key role in solving the computational problems. Informally an algorithm is a well-definedcomputational procedure that takes input and producesoutput. So a Sorting Algorithm is the step by step process bywhich data is organized into a particular increasing or decreasing order, i.e. in ascending and descending order.Data can be in numerical or character form in particular andcan be in other forms as well. There are a lot of sortingtechniques, currently used in industry and academia, toarrange the data of various forms and from different areas.Sorting is of substantial importance as the human isobsessed in keeping the ordered information/knowledge. Tosearch the particular data efficiently the arrangement of datais very important. To facilitate the human, computersconsume a substantial time in ordering the data. Thecomputational problems always have a cumbersome effecton the researchers on one hand and open the opportunitiesfor them on the other hand.The study in hand proposes a new sorting technique thatis tested and analyzed against merge sort and quick sort to provide its efficiency.This paper is organized as follows; Section II presents a brief review of existing sorting algorithms. Section III presents the description of proposed solution. Section IV presents the proposed algorithm. Section V presentsRunning Cost Analysis. Section VI present comparison between chunk sort with merge sort and quick sort. SectionVII ends with concluding remarks.II.
 
A
 
B
RIEF
EVIEW
O
F
E
XISTING
S
ORTING
A
LGORITHMS
 A number of sorting techniques are currently used in thefield of computer science. This section will briefly discusssome of the trendy sorting techniques among them. Theseare following:
 A.
 
 Merge Sort 
Merge sort is an
O
(
n
log
n
) sorting algorithm. It belongsto the family “Sorting by Merging”. It is an example of thedivide and conquer algorithmic paradigm. It was proposed by John von Neumann in 1945 (Cormen T. H, Leiserson C.E., Rivest R. L. and Stein C. [1990] 2001). Conceptually, amerge sort works as follows:1.
 
If the list is of length 0 or 1, then it is alreadysorted. Otherwise:2.
 
Divide the unsorted list into two sublists of abouthalf the size.3.
 
Sort each sublist recursively by re-applying mergesort.4.
 
Merge the two sublists back into one sorted list.
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 4, July 2010162http://sites.google.com/site/ijcsis/ISSN 1947-5500
 
 B.
 
Quick Sort 
Quick sort is another well-known sorting algorithm and base on divide-and-conquer paradigm. Its worst-caserunning time is
Θ
(n²) having a list of n items. In spite of slow worst-case running time, quick sort is often the best practical choice for sorting the lists because it is extremelyefficient on the average running time i.e.
Θ
(nlogn). In mostreal-world data it is possible to make design choices whichminimize the probability of requiring quadratic time(Cormen T. H, Leiserson C. E., Rivest R. L. and Stein C.Quicksort 2001).III.
 
C
HUNK 
S
ORT
 Chunk sort is based on the idea of Merge Sort. In this sortdivide main data list into number of sub list then sort sub listand combine them until the whole list become sorted. Thedifference between merge sort and chunk sort is, merge sortmerge two sub list in to one, but in chunk sort merge threesub list in to single sorted list. It is fast then many existingsorting techniques including merge sort and quick sort.Conceptually, a Chunk sort works as follows:1.
 
If the list is of length 0 or 1, then it is alreadysorted. Otherwise:2.
 
Divide the unsorted list into three sublists.3.
 
Sort each sublist.4.
 
Merge the three sublists back into one sorted list.IV.
 
A
LGORITHM
:
 
P
SEUDO
C
ODE
 
Square Root Sort (arr)temp = temperary Arrayl = length[arr]length = lt = l / 4sqr = 3sqrr = 1 p2 = 0while sqrr != l{ p1 = 0 p3 = 0while p3 < l{r = 2 p3 = p3 + sqr if p3 > l{ p3 = l}while p2 != p3 - 1{ p4 = p2 + 1 p2 = p2 + sqrr if p2 >= p3{ p2 = p3 - 1}if r % 2 == 0{if arr[p1] >= arr[p2]{r = r + 1 j = p1for k = p4; k <= p2; k++{temp[j] = arr[k] j++}x = p1while x != p4{temp[j] = arr[x]x++ j++}}else{If arr[p4]<arr[p4-1]{r = r + 1 j=p1x=p4for k = p1; k <= p2; k++{if arr[j] <= arr[x]{temp[k] = arr[j] j++if j == p4{k++while k <= p2{temp[k] = arr[x]x++k++
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 4, July 2010163http://sites.google.com/site/ijcsis/ISSN 1947-5500
 
} }}else{temp[k] = arr[x]x++if(x>p2){k++while k<=p2{temp[k] = arr[j] j++k++} }}}}}}else{if temp[p1] >= arr[p2]{r = r + 1; j = p1for k = p4; k <= p2; k++{arr[j] = arr[k] j++}x = p1while x != p4{arr[j] = temp[x]x++ j++}}else{if arr[p4] < temp[p4 - 1]{r = r + 1 j = p1x = p4for k = p1; k <= p2; k++{if temp[j] <= arr[x]{arr[k] = temp[j] j++if j == p4{k++while k <= p2{arr[k] = arr[x]x++k++}}}else{arr[k] = arr[x]x++if x > p2{k++while k <= p2{arr[k] = temp[j] j++k++}}}}}else{r = r + 1for k = p1; k <p4; k++{arr[k] = temp[k]}}}}}if r % 2 != 0 && p1 != p2{for j = p1; j <= p2; j++{arr[j] = temp[j]}} p1 = p2 + 1 p2 = p1 + sqrr - 1}sqrr = sqr  p2 = sqrr - 1if sqr >= t{sqr = l}else{sqr = sqr * 3}}
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 8, No. 4, July 2010164http://sites.google.com/site/ijcsis/ISSN 1947-5500

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->