合并排序算法论文教程范本.docxVIP

  1. 1、本文档共8页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
合并排序算法研究1(1.河南大学 计算机与信息工程学院,河南 开封 475004)摘要:分治法是一种非常重要的解题方法,其基本思想是将一个规模为N的问题分解为K个规模较小的子问题,这些子问题互相独立且与原问题相同,递归的了解这些子问题,然后将各子问题的解合并得到原问题的解。合并排序算法即是运用分治策略来实现对N个元素进行排序的算法。文章论述的目的是建立在分治法的基础上,采用递归,非递归和自然合并排序三种方法来实现的合并排序算法,同时通过三种方法的时间复杂度和空间复杂度对三种方法的计算过程进行深入的探讨和研究,在仔细分析三种算法的优点和缺点并进行比较之后,最终得出对于所给的n元素数组已排序好序的极端情况,采用自然合并排序方法实现的合并排序算法明显优于非递归和递归方法实现的合并排序算法,因为它的合并过程中所需的合并次数较少时间复杂度最低。关键词:合并排序;递归;分治法;非递归Research on merge sort algorithmDUAN Xiao-yu11(College of Computer Science and Information Engineering, Henan University, Kaifeng475004, China)Abstract: The method is a very important problem solving method, the basic idea is to be a problem of size N K is decomposed into smaller sub problems, these problems are independent of each other and with the same problem, recursive understanding of these problems, and then combine their solutions to solve the original the solution of the problem. Merge sort algorithm is used to divide and conquer strategy to achieve sort of N element algorithm. This article aims to establish a recursive divide and conquer based on merge sort algorithm, non recursive merge sort and natural three ways to realize the in-depth discussion and research carried out at the same time through the three methods of time and space complexity of the three methods of the calculation process, after careful analysis advantages and disadvantages of these three algorithms were compared, obtained for n elements to the array is sorted by the extreme situation, natural merge sort merge sort algorithm implementation method is obviously better than the merge sort algorithm non recursive and recursive method to realize, because the required in the course of its merger with fewer the minimum time complexity.Key words: merge sort;Recursion;Divide and conquer method;non-recursive0引言分治策略是一种在排序算法中应用最多的方法之一,之前的研究当中都是对合并排序进行递归和非递归的研究但并未对自然合并排序进行详细的研究比较,本文的目的即对三种方法进行探讨并通过时间复杂度和空间复杂度来比较并得出结论。1分治法概述1.1分治法的描述所谓分治法,是指对一个输人规模为n的问题,用某种可行的方法把输人分割成1个子集从而产生k个规模较小的子问题,解出k个子问题后,再用某种方法把它们组合成原来问题的解

文档评论(0)

1112111 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档