matrix_chain_order
Computes the parenthesization order that minimizes scalar multiplications when multiplying a matrix chain, using an array of dimensions.
Instructions
Find the optimal parenthesization for matrix chain multiplication to minimize scalar multiplications.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dimensions | Yes | Array of matrix dimensions. For N matrices, provide N+1 values: [r1, c1/r2, c2/r3, ..., cN] |