In the analysis of (3, 2, 1)-Shell Sort, it is notationally convenient to assume we are given
a linear array of size 3n. We assume the usual random permutation model for the data, in
which the ranks of the data are equally likely to be any of the permutations of {1, 2, . . . ,
3n}, each occurring with probability 1/(3n)!. We may assume that our data are 3n real
numbers from a continuous probability distribution, and because the probability integral
transform preserves ordering of the data, we may (and will) assume that the probability
distribution is uniform on (0,1). Prior to any sorting, we will denote our raw array by
X
1, Y1, Z1, X2, Y2, Z2, . . . , Xn, Yn, Zn,
where the X’s, Y’s, and Z’s may be taken to be mutually independent. The first stage of
the algorithm sorts the X’s, Y’s, and Z’s separately. Analogously to the case described in
Smythe and Wellner [17], if Cn denotes the number of comparisons made by (linear)
insertion sort to sort n random keys, the initial stage of (3, 2, 1)-Shell Sort makes three
runs of insertion sort on the subarrays X1, . . . , Xn, Y1, . . . , Yn, and Z1, . . . , Zn,
requiring
In the analysis of (3, 2, 1)-Shell Sort, it is notationally convenient to assume we are givena linear array of size 3n. We assume the usual random permutation model for the data, inwhich the ranks of the data are equally likely to be any of the permutations of {1, 2, . . . ,3n}, each occurring with probability 1/(3n)!. We may assume that our data are 3n realnumbers from a continuous probability distribution, and because the probability integraltransform preserves ordering of the data, we may (and will) assume that the probabilitydistribution is uniform on (0,1). Prior to any sorting, we will denote our raw array byX1, Y1, Z1, X2, Y2, Z2, . . . , Xn, Yn, Zn,where the X’s, Y’s, and Z’s may be taken to be mutually independent. The first stage ofthe algorithm sorts the X’s, Y’s, and Z’s separately. Analogously to the case described inSmythe and Wellner [17], if Cn denotes the number of comparisons made by (linear)insertion sort to sort n random keys, the initial stage of (3, 2, 1)-Shell Sort makes threeruns of insertion sort on the subarrays X1, . . . , Xn, Y1, . . . , Yn, and Z1, . . . , Zn,requiring
การแปล กรุณารอสักครู่..

ในการวิเคราะห์ของ (3, 2, 1) -Shell ประเภทก็จะสะดวก notationally
จะถือว่าเราจะได้รับอาร์เรย์เชิงเส้นของ3n ขนาด เราถือว่าการเปลี่ยนแปลงรูปแบบการสุ่มปกติสำหรับข้อมูลในที่จัดอันดับของข้อมูลที่มีแนวโน้มที่จะเป็นอย่างเท่าเทียมกันใด ๆ ของพีชคณิตของ {1, 2,
. . ,
3n} แต่ละที่เกิดขึ้นกับความน่าจะ 1 / (3n) !. เราอาจจะคิดว่าข้อมูลของเราเป็นจริง 3n
ตัวเลขจากการกระจายความน่าจะเป็นอย่างต่อเนื่องและน่าจะเป็นเพราะการหนึ่งแปลงรักษาการสั่งซื้อของข้อมูลที่เราอาจ (และจะ) คิดว่าน่าจะเป็นการจัดจำหน่ายเป็นชุดใน(0,1) ก่อนที่จะมีการเรียงลำดับใด ๆ เราจะแสดงอาร์เรย์ดิบของเราโดยX 1, Y1, Z1, X2, Y2, Z2, . . , Xn, Yn สังกะสีที่ของX, Y และ Z อาจจะนำไปเป็นอิสระร่วมกัน ขั้นตอนแรกของขั้นตอนวิธีการเรียงลำดับ X ของ Y และ Z ที่แยกต่างหาก analogously กับกรณีที่อธิบายไว้ในสมิตและเวลเนอร์[17] ถ้า Cn หมายถึงจำนวนของการเปรียบเทียบที่ทำโดย (เชิงเส้น) การจัดเรียงแทรกในการจัดเรียงปุ่มสุ่ม n, ระยะแรกของการ (3, 2, 1) -Shell ประเภททำให้สามวิ่งของการจัดเรียงแทรกใน X1 subarrays, . . , Xn, Y1, . . , Yn และ Z1, . . สังกะสีต้อง
การแปล กรุณารอสักครู่..

ในการวิเคราะห์ ( 3 , 2 , 1 ) - หอย เรียง เป็น notationally สะดวก ถือว่าเราได้รับ
อาร์เรย์เชิงเส้นขนาด 3N เราเดาแบบสุ่มการเปลี่ยนแปลงปกติข้อมูลใน
ซึ่งอันดับของข้อมูลจะมีโอกาสเท่าเทียมกันที่จะใด ๆของวิธีเรียงสับเปลี่ยนของ { 1 2 . . . . . . . .
3N } , , แต่ละเกิดขึ้นกับความน่าจะเป็น 1 / ( 3N ) เราอาจจะคิดว่าข้อมูลของเรา
3N ที่แท้จริงตัวเลขจากการแจกแจงความน่าจะเป็นของตัวแปรสุ่มแบบต่อเนื่อง เพราะน่าจะเป็นส่วนประกอบ
แปลงรักษาการสั่งซื้อของข้อมูลเราอาจ ( จะ ) สันนิษฐานว่าน่าจะเป็น
แจกจ่ายเครื่องแบบ ( 0.1 ) ก่อนที่จะมีการเรียงลำดับ เราจะแสดงอาร์เรย์ของเราดิบโดย
x
2 y1 Z1 , X2 , Y2 , เซสท์แอร์เวย์ , . . . . . . . . คริสเตียนใน , , , สังกะสี ,
ที่ X Y และ Z ก็อาจจะถ่ายเป็นอิสระแก่กันและกันเวทีแรกของ
ขั้นตอนวิธีการจัดเรียง X Y และ Z ก็แยกกัน analogously เพื่อกรณีที่อธิบายไว้ใน
สมิท wellner [ 17 ] และถ้า CN แสดงจำนวนของการเปรียบเทียบทำโดย ( เชิงเส้น )
n แทรก เรียงเรียงปุ่มแบบสุ่มระยะเริ่มต้น ( 3 , 2 , 1 ) - เชลล์เรียงทำให้สาม
วิ่งของการเรียงลำดับแบบแทรกใน subarrays x1 , . . . . . . . . คริสเตียน y1 , , , , , , , , . . . . . . . . ใน , และ , Z1 , . . . . . . . . , สังกะสี ,
ที่ต้องการ
การแปล กรุณารอสักครู่..
