We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Finding the Pivot Row

A pivot row (and the corresponding pivot element) is found by obtaining a ratio by dividing each value in the last column by the corresponding value in the pivot column, excluding the last row (self.objective). The row with the smallest non-negative ratio is the pivot row. If there are no non-negative ratios, the problem doesn't have a solution and we need to abort.

Assignment

Complete the get_pivot_row method. It should return the index of the row to be pivoted and takes the index of the pivot column as input.

  1. no non-negative ratios, problem doesn't have a solution