Problem

Monge arraysAn m × n array A of real numbers is a Monge array if for all i, j, k, and l su...

Monge arrays

An m × n array A of real numbers is a Monge array if for all i, j, k, and l such that 1 ≤ i<km and 1 ≤ j<l<n, we have

A[i,j] + A[k,l] ≤ A[i,l] + A[k,j].

In other words, whenever we pick two rows and two columns of a Monge array and consider the four elements at the intersections of the rows and the columns, the sum of the upper-left and lower-right elements is less or equal to the sum of the lower-left and upper-right elements. For example, the following array is Monge:

10

17

13

28

23

17

22

16

29

23

24

28

22

34

24

11

13

6

17

7

45

44

32

37

23

36

33

19

21

6

75

66

51

53

34

a. Prove that an array is Monge if and only if for all i = 1,2,…, m - 1 and j = 1,2,…, n - 1, we have

A[i, j] + A[i + 1, j + 1] ≤ A[i, j + 1] + A[i + 1, j].

(Hint: For the “only if” part, use induction separately on rows and columns.)


b. The following array is not Monge. Change one element in order to make it Monge. (Hint: Use part (a).)

37

23

22

32

21

6

7

10

53

34

30

31

32

13

9

6

43

21

15

8


c. Let f(i) be the index of the column containing the leftmost minimum element of row i. Prove that f(l) ≤ f (2) ≤…<f(m) for any m × n Monge array.


d. Here is a description of a divide-and-conquer algorithm that computes the leftmost minimum element in each row of an m × n Monge array A:

Construct a submatrix A' of A consisting of the even-numbered rows of A.

Recursively determine the leftmost minimum for each row of A'. Then compute the leftmost minimum in the odd-numbered rows of A.

Explain how to compute the leftmost minimum in the odd-numbered rows of A (given that the leftmost minimum of the even-numbered rows is known) in O(m + n) time.


e. Write the recurrence describing the running time of the algorithm described in part (d). Show that its solution is O(m + n log m).

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 4.P
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT