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 O(n)O(n) storage and O(n)O(n) matrix-vector products instead of O(n2)O(n^2).

2Tree Structure at Depth 4

With depth d=4d = 4, the tree has 24=162^4 = 16 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 \ell, there are diagonal blocks (on the main diagonal) and off-diagonal blocks (sibling interactions):
LevelDiagonal BlocksOff-Diagonal BlocksTotal
0 (root)101
1224
2448
38816
4 (leaf)160 (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 O(n3)O(n^3). HSS matrix multiplication achieves O(n)O(n) by exploiting the low-rank structure of off-diagonal blocks. The number of submatrices scales as O(n)O(n) rather than O(n2)O(n^2).

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?