Skip to main content
Fig. 3 | Algorithms for Molecular Biology

Fig. 3

From: A linear-time algorithm that avoids inverses and computes Jackknife (leave-one-out) products like convolutions or other operators in commutative semigroups

Fig. 3

A (rootless) complementary segment tree. This figure illustrates the rootless complementary segment tree constructed in the downward phase of the Jackknife Product algorithm from the rootless segment tree in Fig. 2. The downward phase starts by initializing the topmost row \(\bar{L}_{m - 1}\) (\(m = 3\)) with the topmost row \(L_{m - 1}\) of the rootless segment tree. The row \(L_{2}\) in Fig. 2 and the row \(\bar{L}_{2}\) in Fig. 3, e.g., contain 22 and 11. For each \(\bar{L}_{k - 1} \left[ j \right]\) in Fig. 3, downward arrows run from \(\bar{L}_{k} \left[ {\alpha_{k} \left( j \right)} \right]\) to \(\bar{L}_{k - 1} \left[ j \right]\). As they indicate, each node in \(\bar{L}_{k}\) contributes to its 2 “nieces” in Fig. 2 to produce the next row down in Fig. 3, e.g., \(\bar{L}_{2} \left[ 1 \right] = 11\) contributes to its nieces \(L_{1} \left[ 0 \right] = 13\) and \(L_{1} \left[ 1 \right] = 9\) in the segment, to produce \(\bar{L}_{1} \left[ 0 \right] = 13 + 11 = 24\) and \(\bar{L}_{1} \left[ 1 \right] = 9 + 11 = 20\) in the complementary segment tree. The rest of the complementary segment tree is constructed recursively downward to \(\bar{L}_{0}\), just as \(\bar{L}_{1}\) was constructed from \(\bar{L}_{2}\). In Fig. 2, the elements of \(L_{0}\) (in squares) total 33. To demonstrate the effect of the Jackknife Product algorithm, subtract in turn in Fig. 3 each element (25, 28, 30, 27, 26, 29, 33, 33) in the bottom row \(\bar{L}_{0}\) from the total 33. The result (8, 5, 3, 6, 7, 4, 0, 0) is the bottom row \(L_{0}\) in Fig. 2 with successive pairs transposed, so \(\bar{L}_{0} \left[ j \right] = \bar{g}_{\tau \left( j \right)}\), or equivalently \(\bar{g}_{j} = \bar{L}_{0} \left[ {\tau \left( j \right)} \right]\)

Back to article page