here is the recurrence for solving this

R[i, j] = (M[i,j] == 0 ? 0 : 1 + min( R[i-1, j], R[i-1, j-1], R[i,,j-1] ) );

On Tue, Mar 13, 2012 at 11:48 AM, rahul sharma <[email protected]>wrote:

>
>  April 4, 2010
>
> Given a binary matrix, find out the maximum size square sub-matrix with
> all 1s.
>
> For example, consider the below binary matrix.
>
>    0  1  1  0  1
>    1  1  0  1  0
>    0  1  1  1  0
>    1  1  1  1  0
>    1  1  1  1  1
>    0  0  0  0  0
>
> The maximum square sub-matrix with all set bits is
>
>     1  1  1
>     1  1  1
>     1  1  1
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to