检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]重庆师范大学计算机与信息科学学院
出 处:《重庆三峡学院学报》2011年第3期53-57,共5页Journal of Chongqing Three Gorges University
基 金:重庆师范大学博士基金项目(10XLB006);重庆市教委科技项目(KJ100623)阶段性研究成果
摘 要:排序是计算机科学的基本问题之一.通过描述传统的、带标记的、双向的和交替排序四种冒泡排序算法,总结出它们的时间复杂度为O(n2)和空间复杂度为O(1).通过编程验证了四种排序算法在不同随机度情况下的性能,指出它们的适用原则:当随机度比较小时,应选取非传统冒泡排序算法;当随机度比较大时,则应选取传统冒泡排序算法.实验表明,四种算法的时间消耗与输入序列的规模近似地呈指数曲线关系,传统冒泡排序算法的时间消耗与输入序列随机度近似地呈水平直线关系,而其它三种算法的时间消耗与输入序列随机度呈40?左右的斜线关系.Sorting is the basic problem of computer science.After the introduction of four bubble sorting algorithm: traditional,marked flag,two-way bubble and alternate,the time and space complexity of these algorithms are summarized.They are all O(n2) and O(1).The performances of these algorithms are verified by programming.The result is that non-traditional sorting algorithms are less time-consuming than traditional ones when the random degree of input sequence is low;otherwise the traditional was less time-consuming.The experiment reveals three approximate relationships.One is four algorithms' time cost and input scale could be characterized by an exponential curve.The second is the traditional algorithm's time cost and random degree could be described by a horizontal line.The last is the non-traditional algorithms' time cost and random degree could be depicted by a line with the slope of 40?.
分 类 号:TP301[自动化与计算机技术—计算机系统结构]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.147