This article introduces a new optimization method to improve mergesort's runtime complexity, when sorting sequences that have equal keys to $O(n log_2 k)$, where $k$ is the number of distinct keys in the sequence. When $k$ is constant, it is evident that mergesort is capable of achieving linear time by utilizing linked lists as its underlying data structure. Mergesort linked list implementations can be optimized by introducing a new mechanism to group elements with equal keys together, thus allowing merge algorithm to achieve linear time.


翻译:本条引入了一种新的优化方法, 以改善合并的运行时间复杂性, 当排序键等于$O(n log_ 2 k) 的序列时, 美元是序列中不同键的数量。 当 $K$ 不变时, 合并的状态显然能够通过使用链接列表作为其基本数据结构实现线性时间。 合并的状态链接列表的实施可以通过引入将等键元素组合在一起的新机制得到优化, 从而允许合并算法实现线性时间 。

0
下载
关闭预览

相关内容

最新《Transformers模型》教程,64页ppt
专知会员服务
325+阅读 · 2020年11月26日
知识图谱推理,50页ppt,Salesforce首席科学家Richard Socher
专知会员服务
111+阅读 · 2020年6月10日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Arxiv
0+阅读 · 2021年2月18日
Arxiv
0+阅读 · 2021年2月18日
Arxiv
3+阅读 · 2018年2月24日
VIP会员
相关VIP内容
最新《Transformers模型》教程,64页ppt
专知会员服务
325+阅读 · 2020年11月26日
知识图谱推理,50页ppt,Salesforce首席科学家Richard Socher
专知会员服务
111+阅读 · 2020年6月10日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
相关论文
Arxiv
0+阅读 · 2021年2月18日
Arxiv
0+阅读 · 2021年2月18日
Arxiv
3+阅读 · 2018年2月24日
Top
微信扫码咨询专知VIP会员