Sorting algorithms are fundamental to computer science, and their correctness criteria are well understood as rearranging elements of a list according to a specified total order on the underlying set of elements. As mathematical functions, they are functions on lists that perform combinatorial operations on the representation of the input list. In this paper, we study sorting algorithms conceptually as abstract sorting functions. There is a canonical surjection from the free monoid on a set (lists of elements) to the free commutative monoid on the same set (multisets of elements). We show that sorting functions determine a section (right inverse) to this surjection satisfying two axioms, that do not presuppose a total order on the underlying set. Then, we establish an equivalence between (decidable) total orders on the underlying set and correct sorting functions. The first part of the paper develops concepts from universal algebra from the point of view of functorial signatures, and gives constructions of free monoids and free commutative monoids in (univalent) type theory. Using these constructions, the second part of the paper develops the axiomatisation of sorting functions. The paper uses informal mathematical language, and comes with an accompanying formalisation in Cubical Agda.


翻译:排序算法是计算机科学的基础,其正确性准则被广泛理解为根据底层元素集上指定的全序关系对列表元素进行重排。作为数学函数,排序函数是对列表进行组合运算的函数,作用于输入列表的表征。本文从概念上将排序算法视为抽象排序函数进行研究。存在一个从集合上自由幺半群(元素列表)到同一集合上自由交换幺半群(元素多重集)的典范满射。我们证明排序函数确定了该满射的一个截面(右逆)且满足两个公理,这些公理并不预设底层集合上的全序关系。随后,我们建立了底层集合上的(可判定)全序关系与正确排序函数之间的等价性。论文第一部分从函子签名的视角发展泛代数概念,并在(单值)类型论中给出自由幺半群与自由交换幺半群的构造。基于这些构造,论文第二部分发展排序函数的公理化体系。本文采用非形式化的数学语言,并附带Cubical Agda的形式化实现。

0
下载
关闭预览

相关内容

排序是计算机内经常进行的一种操作,其目的是将一组“无序”的记录序列调整为“有序”的记录序列。分内部排序和外部排序。若整个排序过程不需要访问外存便能完成,则称此类排序问题为内部排序。反之,若参加排序的记录数量很大,整个序列的排序过程不可能在内存中完成,则称此类排序问题为外部排序。内部排序的过程是一个逐步扩大记录的有序序列长度的过程。
【SIGMOD教程】公平性排序:从价值到技术选择,120页ppt
专知会员服务
30+阅读 · 2023年7月13日
具有组合结构的统计推断和在线算法
专知会员服务
12+阅读 · 2022年12月13日
【RecSys22教程】多阶段推荐系统的神经重排序,90页ppt
专知会员服务
27+阅读 · 2022年9月30日
南大《时间序列分析 (Time Series Analysis)》课程,推荐!
专知会员服务
156+阅读 · 2022年3月31日
【2020新书】预训练Transformer模型的文本排序
专知会员服务
63+阅读 · 2020年10月18日
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
【关系抽取】从文本中进行关系抽取的几种不同的方法
深度学习自然语言处理
29+阅读 · 2020年3月30日
超像素、语义分割、实例分割、全景分割 傻傻分不清?
计算机视觉life
19+阅读 · 2018年11月27日
稀疏性的3个优势 -《稀疏统计学习及其应用》
遇见数学
15+阅读 · 2018年10月24日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
回归预测&时间序列预测
GBASE数据工程部数据团队
44+阅读 · 2017年5月17日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 4月14日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关资讯
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
【关系抽取】从文本中进行关系抽取的几种不同的方法
深度学习自然语言处理
29+阅读 · 2020年3月30日
超像素、语义分割、实例分割、全景分割 傻傻分不清?
计算机视觉life
19+阅读 · 2018年11月27日
稀疏性的3个优势 -《稀疏统计学习及其应用》
遇见数学
15+阅读 · 2018年10月24日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
回归预测&时间序列预测
GBASE数据工程部数据团队
44+阅读 · 2017年5月17日
相关基金
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员