The first diminishing increment sort. On each pass, ‘i’ sets
of n/i items are sorted, typically with insertion sort. On each
succeeding pass, i is reduced until it is 1 for the last pass. A
good series of i values is important to efficiency [1].
Invented by Donald Shell in 1959, the shell sort is the most
efficient of the O(n2
) class of sorting algorithms [4]. Of
course, the shell sort is also the most complex of the O(n2
)
algorithms.
The shell sort is a "diminishing increment sort", better
known as a "comb sort" to the unwashed programming
masses. The algorithm makes multiple passes through the list,
and each time sorts a number of equally sized sets using the
insertion sort [5]. The size of the set to be sorted gets larger
with each pass through the list, until the set consists of the
entire list. (Note that as the size of the set increases, the
number of sets to be sorted decreases.) This sets the insertion
sort up for an almost-best case run each iteration with a
complexity that approaches O(n) [9,10].
The items contained in each set are not contiguous, rather ,
if there are i sets then a set is composed of every i-th element.
For example, if there are 3 sets then the first set would contain
the elements located at positions 1, 4, 7 and so on. The second
set would contain the elements located at positions 2, 5, 8, and
so on; while the third set would contain the items located at
positions 3, 6, 9, and so on.[6]
The size of the sets used for each iteration has a major
impact on the efficiency of the sort. The algorithm provides
efficient execution for medium-size lists.
Along with the benefit of being robust, the algorithm is
considered to be somewhat complex and not nearly as
The first diminishing increment sort. On each pass, ‘i’ setsof n/i items are sorted, typically with insertion sort. On eachsucceeding pass, i is reduced until it is 1 for the last pass. Agood series of i values is important to efficiency [1].Invented by Donald Shell in 1959, the shell sort is the mostefficient of the O(n2) class of sorting algorithms [4]. Ofcourse, the shell sort is also the most complex of the O(n2)algorithms.The shell sort is a "diminishing increment sort", betterknown as a "comb sort" to the unwashed programmingmasses. The algorithm makes multiple passes through the list,and each time sorts a number of equally sized sets using theinsertion sort [5]. The size of the set to be sorted gets largerwith each pass through the list, until the set consists of theentire list. (Note that as the size of the set increases, thenumber of sets to be sorted decreases.) This sets the insertionsort up for an almost-best case run each iteration with acomplexity that approaches O(n) [9,10].The items contained in each set are not contiguous, rather ,if there are i sets then a set is composed of every i-th element.For example, if there are 3 sets then the first set would containthe elements located at positions 1, 4, 7 and so on. The secondset would contain the elements located at positions 2, 5, 8, andso on; while the third set would contain the items located atpositions 3, 6, 9, and so on.[6]The size of the sets used for each iteration has a majorimpact on the efficiency of the sort. The algorithm providesefficient execution for medium-size lists.Along with the benefit of being robust, the algorithm isconsidered to be somewhat complex and not nearly as
การแปล กรุณารอสักครู่..

เรียงลำดับการเพิ่มขึ้นลดลงเป็นครั้งแรก เมื่อวันที่ผ่านแต่ละ 'i'
ชุดของn / i รายการจะเรียงลำดับโดยปกติจะมีการจัดเรียงแทรก ในแต่ละผ่านประสบความสำเร็จผมจะลดลงจนกว่าจะมี 1 สำหรับผ่านที่ผ่านมา ชุดที่ดีของค่าฉันเป็นสิ่งสำคัญที่มีประสิทธิภาพ [1]. การประดิษฐ์คิดค้นโดยโดนัลด์เชลล์ในปี 1959, การจัดเรียงเปลือกเป็นส่วนใหญ่ที่มีประสิทธิภาพของO (n 2) ระดับของขั้นตอนวิธีการเรียงลำดับ [4] ของหลักสูตรการจัดเรียงเปลือกยังเป็นที่ซับซ้อนมากที่สุดของ O (n 2) ขั้นตอนวิธีการ. การจัดเรียงเปลือกคือ "การเรียงลำดับการเพิ่มขึ้นลดน้อยลง" ดีที่เรียกว่า"การจัดเรียงหวี" เพื่อการเขียนโปรแกรมไม่เคยอาบน้ำมวลชน ขั้นตอนวิธีการที่ทำให้หลาย ๆ คนที่ผ่านมาผ่านรายการและในแต่ละครั้งจะเรียงลำดับจำนวนของชุดขนาดเท่ากันโดยใช้การแทรกการเรียงลำดับ[5] ขนาดของชุดที่จะได้รับมีขนาดใหญ่เรียงกันผ่านรายการจนกระทั่งชุดประกอบด้วยรายการทั้งหมด (โปรดทราบว่าขนาดของการเพิ่มชุดที่จำนวนของชุดเพื่อจะแยกลดลง.) ชุดนี้แทรกการเรียงลำดับสำหรับกรณีที่เกือบจะดีที่สุดเรียกซ้ำกันที่มีความซับซ้อนที่แนวทางO (n) [9,10] . รายการที่มีอยู่ในแต่ละชุดจะไม่ต่อเนื่องกัน แต่ถ้ามีชุดฉันแล้วชุดประกอบด้วยทุกองค์ประกอบที่i. ตัวอย่างเช่นถ้ามี 3 ชุดแล้วชุดแรกจะมีองค์ประกอบอยู่ที่ตำแหน่งที่1 , 4, 7 และอื่น ๆ ที่สองชุดจะมีองค์ประกอบอยู่ที่ตำแหน่งที่ 2, 5, 8, และอื่นๆ ; ในขณะที่ชุดที่สามจะมีรายการที่อยู่ที่ตำแหน่งที่ 3, 6, 9, และอื่น ๆ . [6] ขนาดของชุดที่ใช้สำหรับแต่ละซ้ำมีที่สำคัญส่งผลกระทบต่อประสิทธิภาพของการจัดเรียงที่ อัลกอริทึมมีการดำเนินการที่มีประสิทธิภาพสำหรับรายการขนาดกลาง. พร้อมกับผลประโยชน์ที่แข็งแกร่งของการเป็นอัลกอริทึมเป็นถือว่าเป็นที่ค่อนข้างซับซ้อนและไม่ได้เกือบเป็น
การแปล กรุณารอสักครู่..

แรกให้เพิ่มประเภท ผ่านแต่ละ ' ' ชุด
n / ฉันรายการจะถูกจัดเรียงโดยทั่วไปกับการจัดเรียง ในแต่ละ
ประสบความสำเร็จผ่าน ฉันก็จะลดลงจนเป็น 1 ในผ่านล่าสุด เป็นชุดของหนูค่า
ที่ดีเป็นสิ่งสำคัญเพื่อประสิทธิภาพ [ 1 ] .
คิดค้นโดยโดนัลด์เชลล์ในปี 1959 , เชลล์เรียงเป็นส่วนใหญ่ที่มีประสิทธิภาพของ O ( N2
) [ 4 ] คลาสของขั้นตอนวิธีการเรียงลำดับ ของ
หลักสูตรเชลล์เรียงยังซับซ้อนที่สุดของ O ( N2
)
เชลล์เรียงลำดับขั้นตอนวิธี คือ " ลดการจัดเรียง " ดีกว่า
เรียกว่า " หวีเรียง " ฝูงการเขียนโปรแกรม
ไม่เคยซัก วิธีทำให้หลายผ่านรายการ
และแต่ละครั้งประเภทจำนวนเท่า ๆ กันขนาด ชุดโดยใช้
การเรียงลำดับแบบแทรก [ 5 ] ขนาดของชุดจะเรียงได้ขนาดใหญ่
กับการผ่านแต่ละผ่านรายการจนประกอบด้วย
รายการทั้งหมด ( ทราบว่าเป็นขนาดของชุด เพิ่มขึ้น
จำนวนชุดจะเรียงลดลง ) ชุดนี้ การจัดเรียงขึ้น
สําหรับกรณีเกือบที่สุดวิ่งแต่ละซ้ำกับ
ความซับซ้อนที่วิธีการ O ( n ) [ 9,10 ] .
รายการที่มีอยู่ในแต่ละชุดจะไม่ต่อเนื่อง แต่
ถ้าไม่มีผมชุดแล้วชุดประกอบด้วยทุกองค์ประกอบ i-th .
ตัวอย่างเช่นถ้ามี 3 ชุดแล้ว ชุดแรกจะประกอบด้วย
องค์ประกอบอยู่ที่ตำแหน่งที่ 1 , 4 , 7 และ ชุดสอง
จะประกอบด้วยองค์ประกอบอยู่ที่ตำแหน่ง 2 , 5 , 8 , และ
ดังนั้น ในขณะที่ชุด 3 ก็มีรายการอยู่ที่
ตำแหน่ง 3 , 6 , 9 , และดังนั้นเมื่อ . [ 6 ]
ขนาดของชุดที่ใช้ในแต่ละ iteration มีผลกระทบหลัก
บน ประสิทธิภาพของการจัดเรียง ขั้นตอนวิธีให้
การดำเนินการที่มีประสิทธิภาพสำหรับรายการขนาดกลาง
พร้อมกับประโยชน์ของการ สามารถเป็นกลไก
ถือว่าค่อนข้างซับซ้อนและไม่ได้เกือบเป็น
การแปล กรุณารอสักครู่..
