To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
We study the measure semantics for propositional modal logics, in which formulas are interpreted in the Lebesgue measure algebra${\cal M}$, or algebra of Borel subsets of the real interval [0,1] modulo sets of measure zero. It was shown in Lando (2012) and Fernández-Duque (2010) that the propositional modal logic S4 is complete for the Lebesgue measure algebra. The main result of the present paper is that every logic L aboveS4 is complete for some subalgebra of ${\cal M}$. Indeed, there is a single model over a subalgebra of ${\cal M}$ in which all nontheorems of L are refuted. This work builds on recent work by Bezhanishvili, Gabelaia, & Lucero-Bryan (2015) on the topological semantics for logics above S4. In Bezhanishvili et al., (2015), it is shown that there are logics above that are not the logic of any subalgebra of the interior algebra over the real line, ${\cal B}$(ℝ), but that every logic above is the logic of some subalgebra of the interior algebra over the rationals, ${\cal B}$(ℚ), and the interior algebra over Cantor space, ${\cal B}\left( {\cal C} \right)$.
This paper defines a new proof- and category-theoretic framework for classical linear logic that separates reasoning into one linear regime and two persistent regimes corresponding to ! and ?. The resulting linear/producer/consumer (LPC) logic puts the three classes of propositions on the same semantic footing, following Benton's linear/non-linear formulation of intuitionistic linear logic. Semantically, LPC corresponds to a system of three categories connected by adjunctions reflecting the LPC structure. The paper's meta-theoretic results include admissibility theorems for the cut and duality rules, and a translation of the LPC logic into category theory. The work also presents several concrete instances of the LPC model.
The second important notion in the logic of coalgebras, besides bisimularity, is invariance. Whereas a bisimulation is a binary relation on state spaces that is closed under transitions, an invariant is a predicate, or unary relation if you like, on a state space which is closed under transitions. This means, once an invariant holds, it will continue to hold, no matter which state transition operations are applied. That is: coalgebras maintain their invariants.
Invariants are important in the description of systems, because they often express certain implicit assumptions, such as this integer value will always be non-zero (so that dividing by the integer is safe), or the contents of this tank will never be below a given minimum value. Thus, invariants are ‘safety properties’, which express that something bad will never happen.
This chapter will introduce a general notion of invariant for a coalgebra, via predicate lifting. Predicate lifting is the unary analogue of relation lifting. First it will be introduced for polynomial functors on sets, but later also for more general functors, using the categorical logic introduced in Section 4.3. Various properties of invariants are established, in particular their intimate relation to subcoalgebras. An important application of invariants lies in a generic temporal logic for coalgebras, involving henceforth and eventually ♣ operators on predicates (on a state space for a coalgebra), which will be introduced in Section 6.4. It uses P as the greatest invariant that is contained in the predicate P. Further, invariants play a role in the construction of equalisers and products for coalgebras.
The operator P involves closure of the predicate P under all operations of a coalgebra. In many situations one also likes to express closure under specific operations only. This can be done via the modal logic for coalgebras introduced in Section 6.5. The modal operators are themselves described via a functor as signature, and the meaning of the operators is given by a suitable natural transformation. In examples it is shown how to use such operations to describe coalgebras satisfying certain logical assertions.
The semantics of such assertions – in a set-theoretic context – is the topic of the second part of this chapter, starting in Section 6.6. First, the relatively familiar situation of algebras satisfying assertions is reviewed.
One of the first data structures we encountered in Chapter 2 was a queue. The idea of dealing with some records on a FIFO – first in, first out – basis seems to be a reasonable choice and enjoys widespread acceptance. Nonetheless, there are situations in which the order should be different. A case in point would be the emergency room of any hospital: there is a constant influx of new potential patients, all waiting to being taken care of. However, they will be treated by order of medical urgency (which some professional has to assess) rather than by arrival time. Similarly, we all have many items on our to-do lists, but some of these items may be given a higher priority than others.
Translating the problem into mathematical terms, we are looking for a data structure we shall call a priority queue, storing a collection of records, each of which has been assigned a value considered as its priority. We wish to be able to perform updates, as inserting new elements, deleting others, or changing the priority of some. In addition, there should be fast access to the element with highest priority.
A simple solution could be a list that has been sorted by nonincreasing priority. The element with highest priority would then be the first, but updates might require time for a list of n records. Another option would be to use a search tree, which takes time to be built, as we shall see in Chapter 10, but then updating and extracting the maximum element can be done in time O(log n).
This chapter presents a better alternative. It uses a special form of a binary tree, called a heap and achieves O(log n) time updates and access to the maximum element in O(1). The time to build a heap of n elements is only O(n).
The name comes possibly from the fact that beside the rules given in the definition, there is little order between the elements of a heap, which conveys the impression of a disordered pile or elements that have been thrown one on another. It might remind many card games, in which the players throw cards in turn onto some pile, and only the top card is considered as being accessible.
After having mastered some high-level programming language and acquired knowledge in basic mathematics, it is time for a shift of attention. Instead of concentrating on the technical aspects of how to instruct a computer to perform a certain task, we switch to the more challenging question of what in fact should be done to solve a given problem. The aim of this book on data structures is to start acquainting the reader with the theoretical side of the art of writing computer programs. This may be considered as a first step in getting familiar with a series of similar fields, such as algorithms, complexity, and computability, that should be learned in parallel to improve practical programming skills.
The book is the result of several decades of teaching experience in data structures and algorithms. In particular, I have taught a course on Data Structures more than 30 times. The book is self-contained and does not assume any prior knowledge of data structures, just a comprehension of basic programming and mathematics tools generally learned at the very beginning of computer science or other related studies. In my university, the course is given in the second semester of the first year of the BSc program, with a prerequisite of Discrete Mathematics and Introduction to Programming, which are first-semester courses. The format is two hours of lecture plus two hours of exercises, led by a teaching assistant, per week.
I have tried to reproduce my oral teaching style in writing. I believe in associative learning, in which one topic leads to another, related one. Although this may divert attention from the central, currently treated subject, it is the cumulative impact of an entire section or chapter that matters. There was no intention to produce a comprehensive compendium of all there is to know about data structures but rather to provide a collection of what many could agree to be its basic ingredients and major building blocks, on which subsequent courses on algorithms could rely. In addition, many more advanced topics are mentioned.