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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dimensions": "<dimensions>"
},
"name": "matrix_chain_order"
}
}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] |