Ordering matrix multiplication
code
1 | /* r contains number of columns for each of the N matrices */ |
Optimal binary search tree
$T(N) = \sum p_i (1+d_i)$
All-pairs shortest path
code
1 | /* A[ ] contains the adjacency matrix with A[ i ][ i ] = 0 */ |
Nice to meet you :)
1 | /* r contains number of columns for each of the N matrices */ |
$T(N) = \sum p_i (1+d_i)$
1 | /* A[ ] contains the adjacency matrix with A[ i ][ i ] = 0 */ |