TAOCP 2.4: Multilinked Structures
Section 2.4 exercises: 15/15 solved.
Section 2.4. Multilinked Structures
Exercises from TAOCP Volume 1 Section 2.4: 15/15 solved.
| # | Rating | Category | Status | Time |
|---|---|---|---|---|
| 1 | [**] | verified | 44s | |
| 2 | [**] | verified | 2m15s | |
| 3 | [**] | verified | 1m13s | |
| 4 | [**] | verified | 2m27s | |
| 5 | [**] | solved | 1m37s | |
| 6 | [**] | verified | 44s | |
| 7 | [**] | verified | 47s | |
| 8 | [**] | solved | 31s | |
| 9 | [**] | solved | 1m14s | |
| 10 | [**] | verified | 2m56s | |
| 11 | [**] | verified | 1m18s | |
| 12 | [**] | verified | 1m32s | |
| 13 | [**] | verified | 9m26s | |
| 14 | [**] | solved | 2m51s | |
| 15 | [**] | solved | 1m06s |
TAOCP 2.4 Exercise 1
A COBOL data description is a rooted ordered forest in which each group item is followed in the source listing by the complete specification of its immediate subordinate items before the next item of...
TAOCP 2.4 Exercise 2
**Corrected Solution to Exercise 2.
TAOCP 2.4 Exercise 3
Algorithm A needs only one change in the step that determines the parent of a newly read item.
TAOCP 2.4 Exercise 4
Let rule (c) be the COBOL requirement that whenever two consecutive entries have level numbers $L_i$ and $L_{i+1}$, and $L_{i+1}>L_i$, the new level number must be the smallest level number that has a...
TAOCP 2.4 Exercise 5
Algorithm B is modified by replacing the indexed access to $P_k$ with sequential traversal of the linked structure beginning at $T$.
TAOCP 2.4 Exercise 6
Rule (c) is removed, so Algorithm B must no longer reject repeated names within a group.
TAOCP 2.4 Exercise 7
“MOVE CORRESPONDING SALES TO PURCHASES” means that each elementary data item occurring in both group structures SALES and PURCHASES, identified by the same name within the COBOL record hierarchy, is t...
TAOCP 2.4 Exercise 8
The statement "`MOVE CORRESPONDING \(\alpha\) TO \(\beta\)`" is exactly the same as "`MOVE \(\alpha\) TO \(\beta\)`" when the structures $\alpha$ and $\beta$ are _identical in layout and names of fiel...
TAOCP 2.4 Exercise 9
Please provide the statement of Algorithm C from Section 2.
TAOCP 2.4 Exercise 10
(a) In Algorithm B, the node $S$ is a Data Table entry.
TAOCP 2.4 Exercise 11
Algorithm B spends much of its time locating all occurrences of a given name.
TAOCP 2.4 Exercise 12
Let the Data Table entries be stored in preorder, and let the structure stack be represented by the chain of `PREV` links exactly as in Algorithm B.
TAOCP 2.4 Exercise 13
**Exercise 2.
TAOCP 2.4 Exercise 14
To perform the function of Algorithm C with the representation of exercise 12, insert the new item exactly as before by setting its `PREV` field to the preceding item in the same group and setting its...