Saddle Point Assignment

CSC 7000-002 Algorithms & Programming
Fall 1999, Mendel 115
Dr. David Matuszek

In game theory, a saddle point in a numerical array is a number that is larger than or equal to every number in its column, and smaller than or equal to every number in its row.

First, read in the following array:

-7 -11 -7
-7 -90 -7
-9 -10 -9
-7 -12 -7

Next, find the minimum in each row, and find the maximum in each column, and put these in separate arrays. Hint: you will need two loops for each array, one to loop over the rows [columns], and an inside loop to find the minimum [maximum] value in each row [column]. Print out these two arrays, each on a single line (don't try to do anything fancy with the output).

-7 -11 -7
-7 -90 -7
-9 -10 -9
-7 -12 -7
-11
-90
-10
-12
-7 -10 -7
 

Finally, find and print the minimum value of the column maxima (-10), and the maximum value of the row minima (also -10). If these are equal, print that you have a saddle point, and give the row and column number in which it occurs. If these two numbers are unequal, print a message saying that there is no saddle point.

Purpose of this assignment:

Notes: