complexity theory - Maximum two-dimensional subset-sum -


i'm given task write algorithm compute maximum 2 dimensional subset, of matrix of integers. - i'm not interested in such algorithm, i'm more interested in knowing complexity best worse-case can possibly solve this.

our current algorithm o(n^3).

i've been considering, alike divide , conquer, splitting matrix number of sub-matrices, adding elements within matrices; , thereby limiting number of matrices 1 have consider in order find approximate solution.

worst case (exhaustive search) no worse o(n^3). there several descriptions of on web.

best case can far better: o(1). if of elements non-negative, answer matrix itself. if elements non-positive, answer element has value closest zero.

likewise if there entire rows/columns on edges of matrix nothing non-positive integers, can chop these off in search.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -