Re: [algogeeks] Re: Maximize Subsquare

2011-11-26 Thread tech coder
@ Chunyuan Ge *have u checked ur solution . ur solution is to find the submatrix all filled with 1 , but the question say that 1 can be at boundaries. * On Wed, Nov 23, 2011 at 3:00 PM, kumar raja rajkumar.cs...@gmail.comwrote: @Dark prince : what is meant by Allones(i,0.k) what subsquare he

[algogeeks] Re: Maximize Subsquare

2011-11-26 Thread vikas
allOnes(row, column, len) so allone(i, 0, k) will check if A[i][0] to A[i][k] has all the ones similarly another allone should check for all column values. so algo is if you come across any i, j which is '1' , then check for sq ending at i-1, j-1 and all the borders , if all are ones, store the

Re: [algogeeks] Re: Maximize Subsquare

2011-11-23 Thread kumar raja
@Dark prince : what is meant by Allones(i,0.k) what subsquare he is considering here?? On 22 November 2011 23:57, DarkPrince darkprince...@gmail.com wrote: It means that the Borders of the mavximum rectangle should hav all 1s irrespective the elements inside the rectangles , it can be either 0

Re: [algogeeks] Re: Maximize Subsquare

2011-11-22 Thread kumar raja
@Vikas : what is the meaning of Allones function?? On 8 November 2011 15:13, Chunyuan Ge hhy...@gmail.com wrote: Say you define ur matrix in M then if (M(i,j) = 1) Sq(i,j) = min(Sq(i-1,j),Sq(i-1,j-1),Sq(i, j-1)) + 1 else Sq(i,j) = 0 On Tue, Nov 8, 2011 at 7:27 AM, vikas

[algogeeks] Re: Maximize Subsquare

2011-11-22 Thread DarkPrince
It means that the Borders of the mavximum rectangle should hav all 1s irrespective the elements inside the rectangles , it can be either 0 or 1 . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] Re: Maximize Subsquare

2011-11-22 Thread DarkPrince
It means that the Borders of the mavximum rectangle should hav all 1s irrespective the elements inside the rectangles , it can be either 0 or 1 . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Re: Maximize Subsquare

2011-11-08 Thread Chunyuan Ge
Say you define ur matrix in M then if (M(i,j) = 1) Sq(i,j) = min(Sq(i-1,j),Sq(i-1,j-1),Sq(i, j-1)) + 1 else Sq(i,j) = 0 On Tue, Nov 8, 2011 at 7:27 AM, vikas vikas.rastogi2...@gmail.com wrote: try this: sq(i, j)= k is maximum sqare possible ending at i, j and has length k in the

[algogeeks] Re: Maximize Subsquare

2011-11-07 Thread vikas
try this: sq(i, j)= k is maximum sqare possible ending at i, j and has length k in the matrix iXj sq(i, j) = k if {sq( i -1, j-1) AllOnes(i,0, k) AllOnes(0, j, k)} = 1 if sq(i, j) == 1 = 0 otherwise On