flash_96's blog

By flash_96, 18 months ago, In English

Given a square binary matrix(NxN, N<=55) with zeros and ones, task is to minimize the cost to convert all the ones to zeros by selecting a square submatrix and convert all the ones inside it to zeros where the cost of the operation is length of the side of the square submatrix chosen.

My initial idea was to consider a cell with the row and column having only zeroes. Then find possible best answer by considering the cell(creating partition like a border with the row and col which cannot be used, essentially reducing the actual dimension of the matrix by 1) or excluding. I'm not able to memoize this and also don't see any dependencies on previous states.

Would appreciate if someone could point me to right direction or a similar problem or a paper. (Somehow this gives me a hint of np complete/incomplete but I don't know much about those topics)

Thanks!

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it