Skip to main content
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate

Computer Science> Programming Languages

arXiv:2404.03641 (cs)
[Submitted on 4 Apr 2024 (v1), last revised 7 Dec 2024 (this version, v4)]

Title:Amortized Analysis via Coalgebra

View PDF
Abstract: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, one bounds the total cost encountered throughout a session. Traditionally, amortized analysis has been phrased inductively, quantifying over finite sequences of operations. Connecting to prior work on coalgebraic semantics for data structures, we develop the alternative perspective that amortized analysis is naturally viewed coalgebraically in a category of cost algebras, 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 sample effects, non-commutative printing and randomization. To support imprecise amortized upper bounds, we adapt our discussion to the bicategorical setting, where a potential function is a colax morphism of coalgebras. We support algebraic and coalgebraic operations simultaneously by using coalgebras for an endoprofunctor instead of an endofunctor, combining potential using a monoidal structure on the underlying category. Finally, we compose amortization arguments in the indexed category of coalgebras to implement one amortized data structure in terms of others.
Subjects: Programming Languages (cs.PL); Data Structures and Algorithms (cs.DS); Category Theory (math.CT)
Cite as: arXiv:2404.03641 [cs.PL]
(or arXiv:2404.03641v4 [cs.PL] for this version)
https://doi.org/10.48550/arXiv.2404.03641
Journal reference: Electronic Notes in Theoretical Informatics and Computer Science, Volume 4 - Proceedings of MFPS XL (December 11, 2024) entics:14797
Related DOI: https://doi.org/10.46298/entics.14797

Submission history

From: Michael Mislove [view email]
[v1] Thu, 4 Apr 2024 17:57:22 UTC (40 KB)
[v2] 2024年6月10日 15:54:22 UTC (42 KB)
[v3] 2024年11月17日 20:11:48 UTC (46 KB)
[v4] Sat, 7 Dec 2024 20:34:43 UTC (53 KB)
Full-text links:

Access Paper:

  • View PDF
  • TeX Source
Current browse context:
cs.PL
Change to browse by:

References & Citations

export BibTeX citation

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

AltStyle によって変換されたページ (->オリジナル) /