Apply the table compression algorithm in Figure 5.22 to the table shown in Figure 5.20, presenting rows in the order 1, 5, 2, 4, 3. Compare the success of compression with the result presented in Figure 5.23.
23. Although table-compression is an NP-complete problem, explain why the following heuristic works well in practice. Rows are considered in order of decreasing density of non default entries. (That is, rows with the greatest number of non default entries are considered first.)
Apply this heuristic to the table shown in Figure 5.20 and describe the results.
Figure 5.20
Figure 5.22
Figure 5.23