• + 1 comment

    Put 0 in place of the given example matrix[1][0] that is in place of 56 and watch the algo fail. even chatgpt agreed with me ! * the “pick-the-max-of-four” per orbit is not a correct algorithm; it just gives you an upper bound.

    If you want the true maximum, you have to account for the fact that every row flip simultaneously affects both orbits in that row, and every column flip affects both orbits in that column. In other words, your decisions for (0,0) and (0,1) are coupled through row 0, and your decisions for (1,0) and (1,1) are coupled through row 1 (and similarly for the two columns). *