2.3. Sequences and Families

A finite sequence can be represented as an ordered list of objects, all of which are from the same set or type (see Section 2.2). For example, the sequence \(a = [a_1, a_2, \dots, a_n]\) is written as

\[a = [a_1, a_2, \dots, a_n] = [a_i]_{i \in \{1, 2, \dots, n\}} = \family{a}\]

where each \(a_i \in A\), and \(\mathcal{I} = \{1, 2, \dots, n\}\) is the index set whose elements are used to identify objects within the sequence \(a\).

The elements \(a_i\) can be ordered only if the index set itself is ordered [1]—e.g because the elements of the set \(\mathbb{N}\) respect the order \(1 \lt 2 \lt 3 \lt \cdots\) , the elements of \(a\) are listed in that order, and \(a\) is, therefore, a sequence. However, if the index set has no ordering associated with it, then instead of \(a\) representing a sequence, it represents an indexed family, where the ordering of elements is not meaningful. Specifically, an indexed family \(b\) can be equivalently represented as:

\[b = [b_1, b_2, \dots, b_n] = [b_n, \dots, b_2, b_1] = \family{b}\]

or any of the \(n!\) orderings possible. The index set \(\isetdefault\) simply provides a mapping from an index to the data object itself.

Important

The order in which elements are presented to algorithms is not guaranteed in concurrent contexts. Phlex, therefore, processes indexed families of data and not sequences.

In some cases, it is convenient to represent a family’s index as a tuple of numbers, thus representing layers of nesting in the data organization (see Section 3.2). As an illustration, to use the RSE hierarchy from Section 1.2.1 one could specify

\[c = \ifamily{c}{\text{RSE}} = [c_{rse}]_{(r,s,e) \in \iset{\text{RSE}}}\]

to refer to a family of data products \(\textit{c}\), where the variables \(r\), \(s\), and \(e\) correspond to the identifiers for specific Runs, Subruns, and Events. The values that \(r\), \(s\), and \(e\) are permitted to take are determined by the members of the index set \(\iset{\text{RSE}}\), which contains triplets of numbers. The semantics of the indices depend on the use case, and it is usually best to denote the semantics along with the indices (e.g.):

\[c = [c_{rse}]_{(\text{Run}\ r,\ \text{Subrun}\ s,\ \text{Event}\ e) \in \iset{\text{RSE}}}\]

This avoids confusion when other data organizations are considered. For presentation purposes, however, we only include explicit semantics whenever it is necessary for describing the data-processing in question (e.g. Section 3.5.5).

The length of the family \(b\) above is denoted by \(|b|\), and it equals the cardinality of the index set: \(|b| = |\isetdefault|\). In this document, we also use the empty family, which has length 0, and whose elements can be indexed by the empty set:

\[[\ ] = [b_i]_{i \in \emptyset} \ .\]

We also use the notation \(\tilde{b}\) to denote a family whose elements are either Boolean true (\(\textsf{T}\)) or false (\(\textsf{F}\)), such as \(\tilde{b} = [\textsf{T}, \textsf{T}, \textsf{F}, \dots]\).

Footnotes