Share
Explore BrainMass

Path through an array

Solve the following path through an array problem.
You must get the largest possible sum of 6 entries, one from each row, by starting at the best place in the 6th row, and moving between rows by going straight up, or by moving one column to the right or left.

0 -1 2 -4 -2 -2
1 1 -1 1 -1 1
-1 1 -2 -1 0 1
0 -2 -1 -4 0 -2
1 -1 -2 2 -1 -1
1 3 -1 -2 1 -2

b) suppose you solve the "path through an array" problem twice: as above, working up and also working down starting at row #1. Explain why you get the same sum. Do you also get the same collection of optimal paths?

Solution Summary

This shows how to solve a path through an array problem.

$2.19