Amortized Analysis via Coalgebra
arxiv(2024)
摘要
Amortized analysis is a cost analysis technique for data structures in which
cost is studied in aggregate, rather than considering the maximum cost of a
single operation. Traditionally, amortized analysis has been phrased
inductively, in terms of finite sequences of operations. Connecting to prior
work on coalgebraic semantics for data structures, we develop the perspective
that amortized analysis is naturally viewed coalgebraically in the category of
algebras for a cost monad, where a morphism of coalgebras serves as a
first-class generalization of potential function suitable for integrating cost
and behavior. Using this simple definition, we consider amortization of other
effects, such as randomization, and we compose amortization arguments in the
indexed category of coalgebras. We generalize this to parallel data structure
usage patterns by using coalgebras for an endoprofunctor instead of an
endofunctor, combining potential using a monoidal structure on the underlying
category. Finally, we adapt our discussion to the bicategorical setting,
supporting imprecise amortized upper bounds.
更多查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要