brain
tamnd's digital brain — notes, problems, research
41265 notes
Let $C(N)=\log_b N$ for a constant $b>1$ to be determined.
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 condition (31) be the 2-descending condition for binary search trees: for every node $P$, every node $Q$ in the subtree rooted at $\mathrm{LLINK}(P)$ satisfies $\mathrm{KEY}(Q) < \mathrm{KEY}(P)$,...
The previous solution fails because it replaces MIX instruction semantics with an unsupported linear model and ignores control flow.
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$.
The flaw in the previous solution is the attempt to characterize the event using the original suffix $R_2,\dots,R_n$ without tracking how a bubble sort pass changes the array after the first compariso...
We restart from the actual stochastic structure of tertiary clustering and keep track of the dependence that was incorrectly removed in the previous solution.
No.
Let the keys be $K_y, K_0, K_1, \dots, K_n$ with $K_y < K_0 < K_1 < \cdots < K_n.$ At every stage, Algorithm A inserts the new key as a leaf in the rightmost position of the current tree, since each n...
No.
Let $X_n$ denote the number of descents in a random permutation of ${1,2,\dots,n}$.
We now reconstruct equation (21) from the standard context of Section 5.
Let $H$ be a matrix whose rows are hash functions $h : \mathcal{K} \to {0,1,\dots,M-1}$, and whose columns correspond to keys.
The issue is not merely tree degeneracy at $P=2$, but the fact that Algorithm R implicitly assumes the existence of at least one comparison.
Exercise 16 describes the standard heap insertion operation: append the new key at the end of the heap and repeatedly interchange it with its parent until the heap property is restored.
The failure of the original solution is the artificial reduction to a fixed window $t_0,\dots,t_{2N-1}$.
Let the 31 keys be the most common English words in Fig.
We restart from the correct objective formulation and avoid any local “node-only” rotation arguments.
We must construct an **extended ternary decision tree for sorting four elements drawn from $\{-1,0,+1\}$** using comparison nodes with outcomes $<,=,>$, and determine a tree with **minimum average num...
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.
Algorithm F forecasts the next input operation by examining the last records currently present in the active buffers.
Let $p_k$ be probabilities on ${1,2,\dots,N}$ with $\sum_{k=1}^N p_k=1$.
Let $S$ be the number of elevator stops required by a fixed scheduling method applied to a uniformly random permutation of the $bn$ people among the $bn$ desks.
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 from the cascade structure in Algorithm C and derive equation (14) in a way that correctly matches the backward extension construction and applies Lagrange inversion in its valid form.
The proposed interchange is not valid in general, because it violates a dependency in the control flow of Program C.
**Corrected Solution for Exercise 5.
Let the original order-$P$ bubble sort be defined as in Section 5.
We reconstruct the argument in a fully standard comparison-model framework and remove all heuristic claims.
We now give a fully corrected TAOCP-style solution, aligning directly with recurrence (4) for $A_N$ and definition (5) for $C_N$, and avoiding heuristic arguments.
Let N(a,b,c) denote the number of permutations of the multiset
After Step 3 the current front keys of the four runs are $503,\ 170,\ 426,\ 612$ after the replacement of $154$ by $426$.
The original argument fails because it never establishes a real comparison between the two quantities $M(k+m,n)$ and $M(k,n)+M(m,n)$.
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 $n$ be the total number of distinct elements.
Let $T=6$ in the notation of the section, and write X_n = (A_n, B_n, C_n, D_n, E_n)^T .
The reviewer is correct on all four failure points.
Fix $m<n$.
Working
Let $T_k$ denote the Fibonacci tree of order $k$.
Patricia trees represent a set of strings by a compressed trie in which each branching decision is determined by inspecting selected character positions, and in which nodes are arranged so that every...
The statement concerns three families of quantities $X_n(m)$, $Y_n(m)$, $S_n(m)$, together with a primed variant $X'_{n-1}(m)$.
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 violates MIX syntax (memory increment and malformed immediate comparisons) and because it does not specify a legitimate instruction-level control structure tied...
Let elements arrive in a sequence at times $t = 1,2,\ldots$.
Let $Q$ be the node selected for deletion, chosen uniformly from the $N$ nodes of a binary search tree formed by random insertion of $N$ keys.
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 $A_n, B_n, C_n, D_n, E_n$ be the cascade sequences of Section 5.
Let a FORTRAN identifier be a string $K = c_1 c_2 \dots c_n$ with $1 \le n \le 10$, and let the proposed hash function be h(K) = \text{leftmost byte of } K.
Let the tapes be $0,1,\dots,P$, where tape $q$ is the designated output tape and the remaining $P$ tapes are work tapes.
Let a file consist of $N$ records with totally ordered keys.
**Exercise 5.
Let $K_m$ denote $K^{(p)}$, the number of sequences of length $m$ consisting of $0$’s and $1$’s that contain no $p$ consecutive $1$’s.
Working
The errors in the previous solution stem from two issues: (i) failure to verify that the transformation “descending run = apply $x \mapsto 1-x$” preserves the structural hypotheses of Theorem K at the...
Six tapes are partitioned into three logical pairs.
Let $H$ be a matrix with $R$ rows and one column for every possible key $K$.
The previous solution failed because it replaced the actual dependent probing process by an unjustified permutation model.
The main issue in the previous solution is that it never uses a usable structural form of the relation.
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...
Let $w_1,\dots,w_n$ be nonnegative with $w_1+\cdots+w_n=1$.
After 14 outputs, all but two elements have been replaced by $-\infty$ in the tournament structure of Fig.
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...
Let the keys be K_1<K_2<\cdots<K_{10}, and let the unsuccessful-search intervals (gaps) be
The previous argument fails because it replaces Floyd’s comparison accounting with informal “reuse” claims and an invalid decomposition into independent subproblems.
The previous argument failed because it replaced the polyphase state space with an incorrect arithmetic model.
(a) The permutation $376981452$ has the disjoint cycle decomposition (1\,3\,6\,4\,9\,2\,7)(5\,8).
The previous solution correctly implemented a left-to-right maximum search, but it never established the _inter-iteration structure_ that makes the modification useful.
The sequence is defined explicitly by g_0 = \lfloor 4\cdot 2^0 \rfloor,\qquad g_{k+1} = \lfloor 2^{g_k} \rfloor.
Let $\theta \in (0,1)$ be irrational, and let the sequence of points ${n\theta}$ be inserted into $[0,1]$ as in Theorem S of Section 6.
**Corrected Solution: Exercise 5.
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 two sorted sequences have lengths $m$ and $n$.
The previous solution failed because it used unsupported structural claims about cycles and an undefined “charging” argument.
We work in the setting of Algorithm C, where each key $x$ is inserted into a singly linked chain for bucket $h(x)$ by _inserting at the head_.
Let the table size be $M$, with $n$ stored keys and load factor $p=n/M$.
The error in the previous solution occurs at exactly one decisive point: the computation of m_k=\left\lfloor \frac{r_k}{2}\right\rfloor from the binary expansion of $N$.
The reviewer is correct: the proposed solution does not address the problem at all.
**Corrected Solution to Exercise 5.
Let the sequence maintained by the Garsia–Wachs algorithm be $L = (l_1, l_2, \dots, l_m)$ in symmetric order.
Let $K_a(n)$ denote the number of ordered (plane) rooted trees with $n$ nodes in which every leaf is at distance exactly $a$ from the root.
Let $T_7$ denote a balanced binary tree with $7$ internal nodes.
Let the given search algorithm be represented by a finite decision tree $T$.
Let the table have size $M$, with $n$ stored keys and load factor $\alpha=n/M$.
Let $K$ be the number of records in a fixed bucket.
The search for $613$ proceeds from the root by repeated comparison with the keys in each visited node, following the rightmost pointer at each step since $613$ exceeds every key encountered in Fig.
A _t-ary search tree_ is taken in the standard sense of Section 6.
Let $T$ be a rooted tree with $n>0$ leaves, and let the degree path length $(6)$ be defined as in Section 5.
Let M= \begin{pmatrix} q_1&q_2&\cdots&q_n\\ p_1&p_2&\cdots&p_n
Let $L = 23{,}000{,}000$.
Let $G_n$ be the $n$-cube with vertex set $\{0,1\}^n$.
Let ${F_n^{(p)}}_{n\ge 0}$ denote the $p$th-order Fibonacci numbers defined in Section 5.
Let $b_j$ be the number of external nodes at level $j$.
Let $P$ be a pointer to a record, with $FIRST$ pointing to the first record and the last record linked to the sentinel $A$.
We restart the argument cleanly and avoid any reliance on incorrect monotonicity substitutions.
The error in the previous solution is not cosmetic.
Let f_p(z)=z^p-z^{p-1}-\cdots-z-1,\qquad p>2, and define
The previous solution fails because it attempts to repair the situation by adding an external phase.
Let $M$ be the table size and $N$ the number of occupied cells under simple uniform hashing, so that all $\binom{M}{N}$ occupied sets are equally likely.
The reviewer is correct that the previous solution replaced Program F’s frequency model with an unjustified uniform-visitation assumption.