跳到主要內容

臺灣博碩士論文加值系統

(44.192.115.114) 您好!臺灣時間:2023/09/30 18:05
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

我願授權國圖
: 
twitterline
研究生:簡啟仁
研究生(外文):Jian, Chi-Ren
論文名稱:平均花費最低之排序與應用
論文名稱(外文):Minimum-Expect-Cost Selection and Sorting Algorithms & Application
指導教授:楊柏因
指導教授(外文):Bo-Yin Yang
學位類別:碩士
校院名稱:淡江大學
系所名稱:數學學系
學門:數學及統計學門
學類:數學學類
論文種類:學術論文
論文出版年:1998
畢業學年度:86
語文別:中文
論文頁數:30
中文關鍵詞:排序演算法選取
外文關鍵詞:sortalgorithmsselection
相關次數:
  • 被引用被引用:0
  • 點閱點閱:179
  • 評分評分:
  • 下載下載:0
  • 收藏至我的研究室書目清單書目收藏:0
根據統計電腦在執行運算的過程中,大約有四分之一的時間耗費在排
序的工作上,因此,一個適當的排序法便能大幅縮短電腦運算的時間,如
此一來電腦就能在更短的時間內完成使用者賦予其任務。 近二,三十年
來,有許許多多的人致力於排序法的改進,而 所發展出的排序法也各
有其優缺點,如廣泛使用於電腦上的快速排序法,插入排序法,合 併排序
法…等等,但是始終無法找到一個有效率且適合各種狀況的方法來解決排
序的問題。
在電腦的排序過程中,耗費最多時間的動作,不外乎比較(Compare)和移
動(Move), 尤其是比較所耗費的時間,一般來說更是遠超過移動所花費
的時間,所以減少比較的次數,便是改良排序法的不二法門。排序所耗費
的平均比較次數(Average Number of Comparison),是最常用來
量度一個排序法的優劣。在這篇論文中我們以快速排序法 (Quick-
sort)為主軸並以3個元素取中間數(median-of-3)之最佳選擇法與7個元素
之合併 插入排序法(MI7:Merge Insertion sort of seven elements)為
其前置作業,加速快速 排序法的執行效率。在這篇論文我們可導出如下
的漸進式 1.快速排序法 ~ 2n log n
2.快速排序法以median-of-3為前置作業 ~ (1.714285714)n log n
3.快速排序法以MI7為前置作業 ~ (1.642228739)n log n
因此利用前置作業的確可增進快速排序法之執行效率,而在實際的測試中
,快速排序法以median-of-3為前置作業約比快速排序法快30%左右,而快
速排序法以MI7為前置作業 又約比快速排序法以median-of-3為前置作業
快5~10%左右。

Sorting is generally considered to be one of the most
fundamental problems in computer science. It is said that about
a quarter of computer cycles used are spent sorting. So, a
suitable sorting method can improve computer working
efficiently. In this 20th century, there are many people studied
in how to improve the method, which is efficiently and suit
any case to solve the sorting problems. There are several
useful methods that usually to be used in computer. For example,
Insertion sort, Quicksort, Merge sort and so on. Each method
has its strengths and weaknesses and none is "universally"
efficient, the ideal of "adaptive sorting algorithms" or "input
sensitive algorithms" naturally arises. In the following
paper we take a point of view by considering
persorting algorithms i.e. planed to mixed two or more methods
cooperative to increasing the efficient of sorting. In general a
presorting algorithm especially for a simple as sorting, must
be simple and efficient. In the procedure of sorting in
computer that spent more times are "Compare" and "Move",
especially for "Compare". Compare spent more times than Move
(When the memory enough in computer). So, how to reduce the
numbers of comparison in sorting algorithms is very important.
We often use the average number of comparison to determine the
sorting algorithms. Because if we can reduced the average
number of comparison in sorting algorithm then we will
improve this sorting. In this paper we use two presorting
algorithms as follows to improve Quicksort algorithms.
[median-of-3] The optimal method for three element to find the
second ordered element. It takes 8/3 times
in average for finding second element.
[MI7 : Merge Insertion sort of seven elements] Merge Insertion
sort of seven elements, It takes 62784/5040
times in average in Merge Insertion sort of
seven elements. From a more
practical viewpoint, there is a different approach to these
problems. If we fix a sorting algorithm, we may ask questions as
how to tune it so that it is less input sensitive and, more
relevant to this paper, how topreproess inputs to increase the
average efficiency of the algorithm. We denote q is the
average number of comparison for Quicksort, q-3-∞ is the
average number of comparison for Quicksort using persorting
algorithm "median-of-3", q-MI7-∞ is the average number
of comparison for Quicksort using presorting algorithm
"MI7". We can introduce the following asymptotic
[Quicksort] => q ~ 2n log n
[Quicksort using median-of-3] => q-3-∞ ~ (1.714285714)n log n
[Quicksort using MI7] => q-MI7-∞~ (1.642228739)n log n
It is easily to show that Quicksort using median-of-3 is better
than Quicksort and Quicksort using MI7 is better than
Quicksort using median-of-3. In the end of this paper we provide
C language program and Maple language program. In our
machine test using these programs, we get the results as
follows. Quicksort using median-of-3 is better than Quicksort
about 30%. Quicksort using MI7 is better than Quicksort
using median-of-3 about 5%~10%, In general about 8%. Although,
Quicksort using MI7 is not a optimal sorting algorithm, but it
is really a good algorithm.

QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top