Relation-set Following Operation
- Relation-set following operation is a concept that generalizes the successor step from binary relations to advanced query algebras, integrating set-image and process-mining queries.
- It employs extended relational algebra and succinct data structures to support efficient navigation, ordering, and enumeration over complex relation sets.
- Applications span in-database process mining and subset optimization, leveraging optimized ordering and limiting operators for scalable analytic performance.
A relation-set following operation generalizes the “successor”/“next”/“image” concept from binary relations to complex query algebras, succinct representations, and higher-order data models. It provides a unifying formal lens connecting database subset selection and optimization, process-mining “directly-follows” queries, and set-image operations on compact binary relations. Modern research establishes that navigation, enumeration, and optimization over sets of relations (solution sets, ordered pairs, or labeled images) can be described and efficiently implemented using a mixture of extended relational algebra, succinct data structures, and carefully constructed ordering and limiting operators.
1. Formal Definitions and Core Constructs
Let be a binary relation. The classic set following or image operation, given , is
and, symmetrically for , the preimage is (Barbay et al., 2012).
This primitive underpins more elaborate operations in higher-order relational algebra. In “Relational Algebras for Subset Selection and Optimisation,” solution sets are defined as
with $\dom(U)=\{I_U\subseteq Base_U\times Decision_U ~|~ \pi_{Base_U}(I_U)=Base_U \wedge (Base_U\to Decision_U)\}$, and manipulations always proceed via the characteristic function (Pratten et al., 8 Sep 2025).
A particularly important class is directly follows in event logs, where (in an event table Log with case identifier and time ):
0
where 1 collects disjoint renamed attributes (Dijkman et al., 2017).
2. Algebraic Laws and Expressiveness
All set-following and solution-set operators in these frameworks demonstrate closure under natural extensions of union, intersection, difference, join, selection, rename, and projection, provided these are “lifted” to work over relation sets. Notably, the characteristic-function 2 composition encodes the classical Boolean algebraic properties (commutativity, associativity, distributivity) (Pratten et al., 8 Sep 2025).
Ordering and limiting (“next”/“following”) extend the algebra to support navigation and search:
- 3 transforms a (potentially exponential) solution set 4 into a sequence ordered by objective 5.
- 6 yields the top-7 solutions — this sequence realizes “step”/“follow”/“successor” semantics, where 8 is “first,” 9 is the 0-th, and so on (Pratten et al., 8 Sep 2025).
For directly-follows, equivalence properties include:
- Selection/disjunction push-down:
1
- Projection push-down and join commutation, enabling efficient query optimization, are similarly formalized (Dijkman et al., 2017).
3. Data Structures and Enumeration Algorithms
Succinct binary relation representations play a central role for efficient set-following. BinRel-Str, BinRel-WT (wavelet tree), BinRel-GWT (generalized wavelet tree), and BRWT (binary-relation wavelet tree) each offer tradeoffs in space and query time (Barbay et al., 2012).
In BinRel-WT, storing a bitmap 2 and a string 3 (object-major order of labels), allows the operation 4 in 5 time. Wavelet trees support enumeration via rank and select primitives at each node for logarithmic time per followed element.
Algorithmically, enumeration is realized by an outer loop incrementing through 6, each time calling 7 (see Section 3 of (Barbay et al., 2012)) to retrieve the 8-th image.
For higher-order solution sets, enumeration is algebraized via repeated application of ordering and limiting; practically, one executes an ORDER BY and increments an OFFSET (in e.g. SQL) or evaluates LIMIT 9 for successive 0 (Pratten et al., 8 Sep 2025).
4. Application Domains
Relation-set following is operational in several settings:
- In-database Process Mining: Directly-follows is foundational for constructing directly-follows graphs used in process discovery, e.g. by Inductive Miner. Native operators (e.g. DIRECTLYFOLLOWS in H2) permit scalable in-database mining, with process discovery queries and immediate construction of frequency tables optimized in 1 time (Syamsiyah et al., 2018, Dijkman et al., 2017).
- Subset Selection and Optimization in Databases: Solution-set following underpins practical prescriptive analytics (e.g., batch selection, assignment, scheduling optimizations) by producing and stepping through candidate relation instances (Pratten et al., 8 Sep 2025).
- Compact Indexes and Succinct Data Structures: The set-image operation, and its enumeration, is crucial for text indexing, labeled graphs, and information retrieval over relational data, where only the set of followed objects (or labels) is required efficiently (Barbay et al., 2012).
5. Compilation and Implementation Strategies
Relational algebraic set-sequence navigation does not require explicit successor operators as primitives. Instead, the canonical approach (articulated in (Pratten et al., 8 Sep 2025)) is:
- Construct a solution set (via 2 or binary relation representation);
- Apply objective-based sorting (3) to produce a sorted sequence;
- Extract the next/desired solution via a limit/offset operator (4).
For standard RDBMSs, this model is compiled via a homomorphism 5 to ordinary relational constructs:
- Attributes are flattened (6-replica per 7-row);
- Constraints become Boolean predicates in WHERE;
- ORDER BY plus LIMIT/OFFSET or window/row_number yields enumerated navigation (e.g., “next solution”) (Pratten et al., 8 Sep 2025).
Native implementations of set-following (e.g., for directly-follows) leverage tuple sorting and per-case scans, outperforming nested SQL approaches by avoiding 8 blowup and enabling interactive scalability on multi-million-event logs (Syamsiyah et al., 2018, Dijkman et al., 2017).
6. Comparative Performance and Theoretical Properties
Space and time guarantees for the principal representations and operations are summarized below:
| Model | Space | Per-Image Time | Notes |
|---|---|---|---|
| BinRel-WT | 9 | 0 (per element) | General set image 1 |
| BinRel-GWT | 2 | 3 | Larger fan-out; optimal for large 4 |
| Solution-set order+limit | - | Output-sensitive | Couples with relational optimizer (Pratten et al., 8 Sep 2025) |
| Directly-follows (native) | - | 5 abstraction | Linear retrieval (6), 7 output |
Native database implementations that exploit selection/projection pushdown and streaming produce significant performance improvements and avoid memory/disk bottlenecks common to nested-query or non-native approaches (Syamsiyah et al., 2018, Dijkman et al., 2017).
7. Theoretical and Practical Significance
The relation-set following operation unifies the expression and navigation of both simple relation images and the distinctly higher-order problem of stepping through ordered sets of solutions to combinatorial database queries. Its formalization in higher-order relational algebra (8) and succinct data structures provides strong closure and expressivity properties, as well as tractable enumeration and optimization for both theoretical analysis and real-world applications. Efficient implementations, both at the index and relational-engine level, are essential for scalable analytics, complex event pattern discovery, and prescriptive query answering in modern data-intensive systems (Pratten et al., 8 Sep 2025, Dijkman et al., 2017, Syamsiyah et al., 2018, Barbay et al., 2012).