Finding Max Product in NxM Matrix Without Duplicate Rows/Cols

In summary, the conversation discusses finding a simple algorithm to find the M entries with the maximum product in an NxM matrix, where N≥M and the entries do not share a row or column. The maximum product refers to the N entries that, when multiplied together, give the biggest value. The conversation also mentions the possibility of using brute force or implementing heuristics to solve this problem efficiently, especially when the matrix has a large number of combinations. It is also clarified that the values inside the matrix are probabilities and always positive.
  • #1
Chuck37
52
0
I'd like to find a simple algorithm to do the following.

If I have an NxM matrix, with N≥M, find the M entries with the maximum product that do not share a row or column.

It doesn't seem hard, but I'm not seeing it right off.
 
Mathematics news on Phys.org
  • #2
Hey Chuck37.

I've never heard of the maximum product: can you outline what this corresponds to?
 
  • #3
Wait, do you mean the maximum product as simply the result of multiplying the greatest non-intersecting plots of a MN matrix? Just to clarify

For example, in the 6-schematized matrix:

(1) (2)
(3) (4)
(5) (6)

the maximum product would be (5)(4) = 20 etc.
 
  • #4
I'm not sure what it physically corresponds to, but it sounds like an interesting problem. :smile:

Well let's start with brute force. If N,M are not too large you could try all [itex]\frac{n!}{(n-m)!}[/itex] combinations.

There might be a nice neat algorithm that does this really cleanly, but if that "ideal" algorithm can't be found then modifying brute force to add heuristics might work out ok.
 
  • #5
This sems a very hard problem if the matrix entries can be either positive or negative, because a positive maximum value might involve some negative elements of the matrix. It's hard to see how to solve that except by brute force.

If you want to think about more efficient searching strategies, it would probably be better to restruct the problem to positive numbers.
 
  • #6
Sorry I'm just getting back to this after the weekend. The values inside are probabilities and thus always positive. I have brute force currently implemented, but when the matrix gets big, there are a lot of combinations and since I have to do it a lot, it adds up.

Maximum product was intended just how it sounds, the N entries that when multiplied together give the biggest values - with no entries sharing a row or column (the example from Alcatrace IV is right). At this point I'd be happy with something that is close most of the time since I need speed.
 

Related to Finding Max Product in NxM Matrix Without Duplicate Rows/Cols

1. What is the purpose of finding the maximum product in a NxM matrix without duplicate rows/cols?

Finding the maximum product in a matrix without duplicate rows/cols allows us to identify the most efficient way to multiply numbers in a matrix, which can be useful in various mathematical and computational applications.

2. How is the maximum product calculated in a NxM matrix without duplicate rows/cols?

The maximum product in a matrix without duplicate rows/cols is calculated by finding the product of all the numbers in each row and column, and then comparing these products to find the largest value.

3. What is the significance of removing duplicate rows/cols when finding the maximum product in a matrix?

Removing duplicate rows/cols ensures that the product of each row and column is unique, allowing us to accurately compare and find the maximum product. If duplicate rows/cols are included, the maximum product may not be the most efficient or optimal solution.

4. Can the maximum product in a matrix without duplicate rows/cols be found using any specific algorithm?

Yes, there are various algorithms that can be used to find the maximum product in a matrix without duplicate rows/cols, such as the brute force method, dynamic programming, and greedy algorithms.

5. Are there any limitations or constraints when finding the maximum product in a NxM matrix without duplicate rows/cols?

One limitation is that the matrix must be numerical, as the maximum product cannot be calculated for non-numeric values. Additionally, the matrix must have at least one row and one column, and cannot contain duplicate rows/cols to accurately find the maximum product.

Similar threads

  • Programming and Computer Science
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
707
  • Differential Equations
Replies
7
Views
2K
  • Linear and Abstract Algebra
Replies
9
Views
918
  • General Math
Replies
11
Views
1K
  • Special and General Relativity
Replies
1
Views
568
Replies
2
Views
646
Replies
5
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
2K
Back
Top