6,690 research outputs found
Strengthened Lazy Heaps: Surpassing the Lower Bounds for Binary Heaps
Let denote the number of elements currently in a data structure. An
in-place heap is stored in the first locations of an array, uses
extra space, and supports the operations: minimum, insert, and extract-min. We
introduce an in-place heap, for which minimum and insert take worst-case
time, and extract-min takes worst-case time and involves at most
element comparisons. The achieved bounds are optimal to within
additive constant terms for the number of element comparisons. In particular,
these bounds for both insert and extract-min -and the time bound for insert-
surpass the corresponding lower bounds known for binary heaps, though our data
structure is similar. In a binary heap, when viewed as a nearly complete binary
tree, every node other than the root obeys the heap property, i.e. the element
at a node is not smaller than that at its parent. To surpass the lower bound
for extract-min, we reinforce a stronger property at the bottom levels of the
heap that the element at any right child is not smaller than that at its left
sibling. To surpass the lower bound for insert, we buffer insertions and allow
nodes to violate heap order in relation to their parents
Amortised resource analysis with separation logic
Type-based amortised resource analysis following Hofmann and Jostāwhere resources are associated with individual elements of data structures and doled out to the programmer under a linear typing disciplineāhave been successful in providing concrete resource bounds for functional programs, with good support for inference. In this work we translate the idea of amortised resource analysis to imperative languages by embedding a logic of resources, based on Bunched Implications, within Separation Logic. The Separation Logic component allows us to assert the presence and shape of mutable data structures on the heap, while the resource component allows us to state the resources associated with each member of the structure. We present the logic on a small imperative language with procedures and mutable heap, based on Java bytecode. We have formalised the logic within the Coq proof assistant and extracted a certified verification condition generator. We demonstrate the logic on some examples, including proving termination of in-place list reversal on lists with cyclic tails
Stone-Type Dualities for Separation Logics
Stone-type duality theorems, which relate algebraic and
relational/topological models, are important tools in logic because -- in
addition to elegant abstraction -- they strengthen soundness and completeness
to a categorical equivalence, yielding a framework through which both algebraic
and topological methods can be brought to bear on a logic. We give a systematic
treatment of Stone-type duality for the structures that interpret bunched
logics, starting with the weakest systems, recovering the familiar BI and
Boolean BI (BBI), and extending to both classical and intuitionistic Separation
Logic. We demonstrate the uniformity and modularity of this analysis by
additionally capturing the bunched logics obtained by extending BI and BBI with
modalities and multiplicative connectives corresponding to disjunction,
negation and falsum. This includes the logic of separating modalities (LSM), De
Morgan BI (DMBI), Classical BI (CBI), and the sub-classical family of logics
extending Bi-intuitionistic (B)BI (Bi(B)BI). We additionally obtain as
corollaries soundness and completeness theorems for the specific Kripke-style
models of these logics as presented in the literature: for DMBI, the
sub-classical logics extending BiBI and a new bunched logic, Concurrent Kleene
BI (connecting our work to Concurrent Separation Logic), this is the first time
soundness and completeness theorems have been proved. We thus obtain a
comprehensive semantic account of the multiplicative variants of all standard
propositional connectives in the bunched logic setting. This approach
synthesises a variety of techniques from modal, substructural and categorical
logic and contextualizes the "resource semantics" interpretation underpinning
Separation Logic amongst them
Geometry Helps to Compare Persistence Diagrams
Exploiting geometric structure to improve the asymptotic complexity of
discrete assignment problems is a well-studied subject. In contrast, the
practical advantages of using geometry for such problems have not been
explored. We implement geometric variants of the Hopcroft--Karp algorithm for
bottleneck matching (based on previous work by Efrat el al.) and of the auction
algorithm by Bertsekas for Wasserstein distance computation. Both
implementations use k-d trees to replace a linear scan with a geometric
proximity query. Our interest in this problem stems from the desire to compute
distances between persistence diagrams, a problem that comes up frequently in
topological data analysis. We show that our geometric matching algorithms lead
to a substantial performance gain, both in running time and in memory
consumption, over their purely combinatorial counterparts. Moreover, our
implementation significantly outperforms the only other implementation
available for comparing persistence diagrams.Comment: 20 pages, 10 figures; extended version of paper published in ALENEX
201
- ā¦