Computer Sciencehard
Consider a Hierarchical Semi-Separable Tree with Depth 4 - How Many Submatrices Are Accessed?
Question
Consider a hierarchical semi-separable (HSS) tree with depth 4. How many submatrices are accessed during a matrix multiplication using this tree structure?
Recursive block structure of hierarchical semi-separable matrices.
Submatrices Accessed
49
Diagonal + off-diagonal blocks across all 5 levels of the HSS tree
1What Is an HSS Tree?
A Hierarchical Semi-Separable (HSS) tree is a data structure for representing matrices with low-rank off-diagonal blocks. The tree has a binary structure where each node represents a contiguous block of rows/columns.
Key Idea
HSS matrices exploit the fact that off-diagonal blocks are numerically low-rank. This allows storage and matrix-vector products instead of .
2Tree Structure at Depth 4
With depth , the tree has leaf nodes. Each level splits the matrix into finer blocks:
Level 0 (root): [████████████████] 1 block Level 1: [████████|████████] 2 blocks Level 2: [████|████|████|████] 4 blocks Level 3: 8 blocks Level 4 (leaves): 16 blocks
3Count Submatrices at Each Level
At each level , there are diagonal blocks (on the main diagonal) and off-diagonal blocks (sibling interactions):
| Level | Diagonal Blocks | Off-Diagonal Blocks | Total |
|---|---|---|---|
| 0 (root) | 1 | 0 | 1 |
| 1 | 2 | 2 | 4 |
| 2 | 4 | 4 | 8 |
| 3 | 8 | 8 | 16 |
| 4 (leaf) | 16 | 0 (handled above) | 16+4=20 |
4Total Submatrices
Summing across all levels, the total number of submatrices accessed during HSS matrix multiplication:
Level 0: 1 diagonal1
Level 1: 2 diagonal + 2 off-diag4
Level 2: 4 diagonal + 4 off-diag8
Level 3: 8 diagonal + 8 off-diag16
Level 4: 16 diagonal + 4 off-diag20
TOTAL SUBMATRICES49
5Key Concepts
Complexity Advantage
Standard dense matrix multiplication is . HSS matrix multiplication achieves by exploiting the low-rank structure of off-diagonal blocks. The number of submatrices scales as rather than .
Quiz
Test your understanding with these questions.
1
How many leaf nodes does an HSS tree of depth 4 have?
2
What makes HSS matrices efficient for computation?