Finding Max Product in NxM Matrix Without Duplicate Rows/Cols

AI Thread Summary
To find the maximum product of M entries in an NxM matrix without sharing rows or columns, a brute force approach can be used, especially if N and M are small. The challenge increases with larger matrices due to the exponential number of combinations. While an ideal algorithm may not be readily available, incorporating heuristics into the brute force method could enhance efficiency. The problem is particularly complex when matrix entries can be negative, but since the entries are probabilities and always positive, this simplifies the search. A faster solution that approximates the maximum product is desired for practical applications.
Chuck37
Messages
51
Reaction score
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
Hey Chuck37.

I've never heard of the maximum product: can you outline what this corresponds to?
 
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.
 
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 \frac{n!}{(n-m)!} 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.
 
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.
 
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.
 
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Replies
10
Views
2K
Replies
7
Views
2K
Replies
7
Views
2K
Replies
7
Views
3K
Replies
2
Views
1K
Replies
9
Views
1K
Back
Top