brain
tamnd's digital brain — notes, problems, research
41641 notes
Let $X(a,n)$ denote the random variable whose expectation is $R(a,n)$ as defined in (55).
Let $H(m,n)$ denote the number of comparisons performed by Hwang and Lin’s binary merging algorithm when merging $A_1<\cdots<A_m$ with $B_1<\cdots<B_n$ under worst-case behavior.
Let $M$ be the table size and let $n$ keys be stored, with load factor $\alpha = \frac{n}{M}.$ A single-hashing scheme assigns to each key $K$ a home address $h(K)\in{0,\dots,M-1}$, and associates wit...
The reviewer is correct that the previous argument failed at the single-trajectory constraint.
We restart from the permutation model, since this avoids any circular use of symmetry or exchangeability.
Let the 31 keys be the most common English words in Fig.
Let the Fibonacci tree of order $k$ be defined as usual: a node of order $t$ has a left child of order $t-1$ and a right child of order $t-2$.
A 2-3 tree is a rooted ordered tree in which every internal node has either two or three children and contains respectively one or two keys, and in which all external nodes occur at the same level.
We restart from the correct inequality and determine the full integer solution set carefully.
We restart from the definition of the condition and first extract its actual global consequence, instead of interpreting it geometrically.
The mistake is that Mr.
We reanalyse the process without symmetry shortcuts that are not grounded in the algorithm, and we reduce everything to an explicit counting over induced insertion orders on the final 3-key tree.
We give a complete proof consisting of a tight upper bound (algorithm) and a correct adversary lower bound.
The main issue in the previous solution is that it never uses a usable structural form of the relation.
Let $a_1 a_2 \dots a_n$ be a random permutation of ${1,2,\dots,n}$.
The modification introduces an additional equality case in the comparison step of Algorithm M so that records from the first file are omitted whenever their keys also occur in the second file.
We restart the argument cleanly and avoid any reliance on incorrect monotonicity substitutions.
Let \begin{pmatrix} a_1&a_2&\cdots&a_9\\ b_1&b_2&\cdots&b_9 \end{pmatrix}
The argument fails because it replaces the algorithm of Exercise 25 with an unrelated Touchard model and then manipulates that model without any link to run termination.
Let f_p(z)=z^p-z^{p-1}-\cdots-z-1,\qquad p>2, and define
**Exercise 5.
The previous solution fails because it replaces the actual construction of Caron’s polyphase schedule with an unproven symmetry argument.
Let $R_1,\dots,R_N$ be the file and let $d(K_i,A)$ be the distance from record $R_i$ to the given argument $A$.
Let $T=P+1\ge 3$ tapes be given.
We restart from a correct model of TAOCP replacement selection (“natural selection”) and avoid any assumption of independence or uniform heap ranks.
Let $K_1, K_2, \dots, K_r$ be the binary keys, each a finite string over ${0,1}$, and let $T$ be the binary trie formed by these keys.
Let $T \ge 4$ tapes be available.
We restart the argument from the definition used in this section of TAOCP, where $V_r(n)$ denotes the generalized power sum V_r(n) = \sum_{k=1}^n k^r, extended to complex $r$ by analytic continuation.
The probability distribution (5) is p_k = 2^{-k}\quad (1 \le k \le N-1), \qquad p_N = 2^{-(N-1)}.
Let $S_M$ be the set of all permutations of $\{0,1,\dots,M-1\}$, and let $\mathbb{P}$ be a probability assignment on $S_M$ that is equivalent to uniform probing in the sense of Theorem U.
Let $S$ be the total number of runs in the file.
Let C^*(w)=\min_T \sum_{v} w_v d_v(T) be the optimal alphabetic tree cost for the ordered weight sequence
The error in the previous solution is the assumption that column-wise uniformity of the permutations implies optimality of all coefficients $c_k$.
The previous solution failed because it tried to analyze the function $\delta(t)=d(t,i)-d(t,i+1)$ directly on the cycle, where it is not monotone and in fact has multiple regime changes.
Let $A_n, B_n, C_n, D_n, E_n$ be the cascade sequences of Section 5.
Algorithm C still works if $i$ varies from $2$ up to $N$ in step C2 instead of from $N$ down to $2$, because the comparisons made in step C4 depend only on the relative ordering of $K_i$ and $K_j$, no...
The core mistake in the previous argument is the attempt to manufacture a per-level varying radix structure from tape-role behavior.
In the modified Algorithm D, step D3 sets c\leftarrow0, and each time step D4 is entered, the counter is first increased:
In MIX arithmetic, the instruction `DIV d` interprets the concatenation $AX$ as a single signed integer formed with $A$ as the high-order word and $X$ as the low-order word.
A correct proof must specify an invariant state of the polyphase algorithm and show that this invariant is exactly the Fibonacci decomposition encoded by Fibonacci trees.
Let a variable-length key $K$ be a finite sequence of MIX characters $K = c_1 c_2 \dots c_\ell,$ where each $c_i$ is an element of a fixed alphabet of radix $r$ (for MIX, typically $r = 64$ or $r = 10...
Let $P = T-1 \ge 2$.
Let $T$ be a binary search tree with cost C(T)=\sum_{i=1}^n p_i\,\mathrm{depth}(k_i)+\sum_{i=0}^n q_i\,\mathrm{depth}(d_i), where all $p_i,q_i\ge 0$ and $p_n=q_n=0$.
The previous solution fails because it treats the problem as one of extracting information from a fixed probabilistic comparison outcome, whereas the task is a deterministic decision problem in the co...
Let the comparison used in Algorithm R for the selection tree be denoted by $\prec$, where in the original algorithm $a \prec b$ means that key $a$ is smaller than key $b$.
Let $M \ge 2$ and consider a random $M$-ary trie built from $N$ keys, where each digit of each key is independently uniformly distributed in ${0,1,\dots,M-1}$.
Let $K$ be the number of records in a fixed bucket.
Let a weight-balanced tree be a binary tree in which there exists a fixed constant $0 < \alpha \le \tfrac{1}{2}$ such that for every internal node $v$ with subtree size $n(v)$, its left and right subt...
We give a complete corrected proof by isolating the precise mechanism that guarantees both row and column inequalities during each bumping operation, without circular reasoning.
Let $T=4$, so $P=T-1=3$ and the tape-splitting polyphase merge uses the 3-way Fibonacci system defined by the third-order recurrence F_n = F_{n-1}+F_{n-2}+F_{n-3}\quad (n\ge 3), with initial values de...
The error in the proposed solution occurs at the change of variables and the resulting failure to preserve the structure needed for an incomplete gamma representation.
The error in the previous solution is not the use of Perron–Frobenius itself, but the attempt to justify it through an incorrect state-space model.
A selection tree used for replacement selection represents $P$ external nodes as the leaves of a complete binary tree, with internal nodes storing comparison results along the path to the root.
Let ${F_n^{(p)}}_{n\ge 0}$ denote the $p$th-order Fibonacci numbers defined in Section 5.
The distribution sort of Exercise 5.
Let the given search algorithm be represented by a finite decision tree $T$.
Let $I(T)$ denote the internal path length of a tree $T$, defined as the sum of the depths of all internal nodes of $T$, where the root has depth $0$ and each child increases depth by $1$.
Algorithm M (as used in Section 5.
Let $T_N$ be the Coffman–Eve $M$-ary digital search tree built from $N$ independent random infinite strings over an alphabet of size $M>2$.
We restart the counting from the actual behavior of step D3, since the previous argument misidentified what is being counted.
Let the table have size $M$, with $n$ stored keys and load factor $\alpha=n/M$.
Let $p_k$ be probabilities on ${1,2,\dots,N}$ with $\sum_{k=1}^N p_k=1$.
Let $n$ be fixed and consider Pratt’s sorting network constructed from all 3-smooth numbers d = 2^i 3^j \le n.
The computation performed by Program L does not fail arithmetically when $K = 0$.
The exercise statement is incomplete.
Let e[i,j]=\min_{k=i}^j\bigl(e[i,k-1]+e[k+1,j]+w[i,j]\bigr), \qquad r[i,j]\in\arg\min.
Let $p_{ij} = \Pr(X = x_i, Y = y_j)$, $p_i = \Pr(X = x_i) = \sum_j p_{ij}$, and $q_j = \Pr(Y = y_j) = \sum_i p_{ij}$.
We restart the analysis from the definition of **four-way replacement selection** (TAOCP §5.
We restart from the definitions of the two quantities in Knuth’s merging model.
Let F(z)=\frac{p(z)}{q(z)}, \qquad G(z)=\frac{p(z)}{q(z)^2}.
The previous solution failed because it replaced Algorithm D with an unproved “Fibonacci level” abstraction and then reasoned about dummy runs in that model.
Let a rooted ordered tree $T$ have $n$ leaves.
Let $T_n$ be a binary search tree built from a uniformly random permutation of $n$ distinct keys, so every BST shape consistent with in-order orderings occurs with the standard BST probability model.
The previous solution fails because it never executes the MIX program in Table 1 and never derives an actual address from the algorithm.
The correct way to rework the example is to stay inside TAOCP’s randomized striping model: each run is striped across the $Q$ disks by a fixed permutation of disk numbers, and successive blocks of a r...
Let there be $T=6$ tapes, so $P=5$ input tapes and one output tape.
Let $T_n$ be a digital search tree constructed by Algorithm D from $n$ keys $K_1,\dots,K_n$, where the keys are independent infinite binary sequences with each bit independently $0$ or $1$ with probab...
By equation (42), the quantity $Q_o(M,N)$ satisfies Q_o(M,N) = 1 + \frac{N}{M} Q_o(M,N-1).
Let $p_1, p_2, \dots, p_N$ be the probabilities that the argument equals $K_1, K_2, \dots, K_N$, with $\sum_{i=1}^N p_i = 1$.
From equation (42), $Q_o(M,N)$ is given by the finite sum Q_o(M,N)=\sum_{k=0}^{N} \binom{N}{k}\frac{k!
For $n>0$, the recurrence $P_n=\sum_{k=1}^{n} \binom{n}{k} P_{n-k}$ together with $P_0=1$ is multiplied by $z^n/n!$ and summed over all $n\ge 1$.
Unusual activity has been detected from your device.
Let $I_n$ denote the internal path length of the random BST built from $n$ keys.
We compare cascade sorting on three tapes (Algorithm C) with polyphase merging on three tapes (Algorithm 5.
The review identifies three genuine failures: an unjustified symmetry factor, an unsupported intermediate bound, and a mismatch between the run decomposition and the claimed inequality.
Let the positions be $1,2,\dots,N$.
Let the incoming keys be $K_1, K_2, \ldots, K_n$, arriving in an arbitrary order.
Let $l$ and $u$ be the current indices in Algorithm B (binary search on a sorted table $K_1 < \cdots < K_n$), with sentinels $K_0 = -\infty$ and $K_{n+1} = +\infty$.
Let each initial run $i$ have weight $w_i$.
Let w = 3111231423342244 a word on $\{1,2,3,4\}$ having 5 runs (maximal weakly increasing consecutive blocks).
Algorithm R performs a sequence of $p$ distribution passes, each pass grouping records into $M$ FIFO queues according to a single digit $a_{p+1-k}$.
Let $M$ be the number of hash addresses and let $n$ be the number of occupied cells at the moment a new key $K$ is inserted by Algorithm C.
Let the initial distribution place $S$ runs onto $P$ input tapes for a $P$-way merge under Algorithm F in Section 5.
The previous solution failed to align with TAOCP macro-language conventions because it relied on undefined return semantics and did not specify a formal output interface.
We restart from the definition of marking in the TAOCP model and avoid any auxiliary pipeline assumptions.
The earlier solution fails primarily because it never instantiates Algorithm C’s actual state mechanism: a 5-way polyphase merge on six tapes driven by a 5-term Fibonacci-type (pentanacci) distributio...
**Exercise 5.
Let the multireel file consist of a sequence of records distributed over several reels, with no restriction on where a run begins or ends relative to reel boundaries.
Let $(P_1,\dots,P_n)$ be uniformly distributed over the simplex $P_k>0,\quad \sum_{k=1}^n P_k = 1.$ The entropy is $H(P_1,\dots,P_n) = -\sum_{k=1}^n P_k \log P_k.$ By symmetry, $\mathbb{E}[H(P_1,\dots...
The original attempt fails mainly because it mixes abstract register notation with MIX conventions and omits the actual pointer manipulation required by Algorithm D.