In problem 55315, you had to calculate the number of multiplications required based on the positions of parenthesis.
This problem is a combination of the previous two. You have to place the parenthesis in the proper places so that minimum number of multiplications are required.
For instance, array= [1,2,3,2].
So there are three matrices A, B, and C.
you can multiply in two ways - A(BC) or (AB)C.
A(BC) - requires total 16 multiplications, while (AB)C requires total 12 multiplications. So the later one is the answer.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers3
Suggested Problems
-
9140 Solvers
-
1812 Solvers
-
Back to basics 3 - Temp Directory
382 Solvers
-
ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
593 Solvers
-
47 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!