side of the largest square = H.C.F of length and breadth

total no. of squares = (length*breadth) / side^2

On Tue, Aug 2, 2011 at 7:27 PM, <vaibhavmitta...@gmail.com> wrote:

> A and B are length and breath of current rectangle to fill..
> in above example in the ques if i fill 1x1 squares along length of 3x5
> rectangle..i m left with a rectangle of 3x4(A x B) which i have to fill
> again..
>
>
> Regards
> VM
> NSIT, COE, 3rd yr
>
> On , Tushar Bindal <tushicom...@gmail.com> wrote:
> > i could not get what A and B stand for.
> > pls elaborate a bit more on that
> >
> > On Tue, Aug 2, 2011 at 7:03 PM, vaibhavmitta...@gmail.com> wrote:
> >
> > I guess in the above solution greedy wont wrk..i just assumed it
> wud..dint prove it..
> > nevertheless..we can replace dis with..
> >
> > F(A,B,a,b,x,N) = % fill + max( F(A,B-x,a,b,x,N-(squares filled across
> length)), F(A-x,B,a,b,x,N-(squares filled across breadth)) )
> >
> > Regards
> > VM
> > NSIT, COE, 3rd yr
> >
> >
> >
> > On , vaibhavmitta...@gmail.com wrote:
> > > With the binary search we can decide for a value of size of square with
> reasonable error..
> > > nw to check hw much % fill does that value of size gives..we can
> implement a dp..or a recursive substitute..
> >
> > > say size of rectangle is 'a' x 'b' and size of square chosen is 'x'..
> > > we hv to fill a grid with squares of size 'x'..so greedily fill the
> squares across the length of rectangle(subject to N)..
> >
> > > so recursive function wud luk sumthin like dis
> > > F(A,B,a,b,x,N) = gives the % fill = % fill + F(A,B-x,a,b,x,N-(squares
> filled across length))
> > > where A x B is size of rectangle to fill, a x b is maximum size of
> rectangle, x is size of square we are considering, N is remaining squares we
> can fill..
> >
> > > base cases wud be wen we cannot fill squares subjected to N = 0 or if A
> and B dont permit us to..
> > >
> > > I hope dis helps mam.
> > >
> > > Regards
> > > VM
> > > NSIT, COE, 3rd yr
> > >
> > > On , Kamakshii Aggarwal kamakshi...@gmail.com> wrote:
> >
> > > > @vaibhav:can u please elaborate?
> > > >
> > > > On Tue, Aug 2, 2011 at 6:31 PM, Vaibhav Mittal
> vaibhavmitta...@gmail.com> wrote:
> > > >
> >
> > > > dynamic programming with binary search should do it..
> > > >
> > > > Regards
> > > > VM
> > > > NSIT, COE, 3rd yr
> > > >
> > > >
> > > >
> > > > On Tue, Aug 2, 2011 at 6:19 PM, Kamakshii Aggarwal
> kamakshi...@gmail.com> wrote:
> >
> > > >
> > > > @sunny:yes all the squares should be of same size
> > > >
> > > >
> > > > On Tue, Aug 2, 2011 at 5:03 PM, Poised~ dip10c...@gmail.com> wrote:
> >
> > > >
> > > >
> > > >
> > > > @ narain-i didn't see that coming. thanks for the heads up.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> >
> > > >
> > > >
> > > > To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/oSuB8bJuqDcJ.
> >
> > > >
> > > >
> > > >
> > > > To post to this group, send email to algogeeks@googlegroups.com.
> > > >
> > > > To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> >
> > > >
> > > >
> > > > For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
> > > >
> > > >
> >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Kamakshi
> > > > kamakshi...@gmail.com
> >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > >
> > > > You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> >
> > > >
> > > >
> > > >
> > > > To post to this group, send email to algogeeks@googlegroups.com.
> > > >
> > > > To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> >
> > > >
> > > >
> > > > 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 algogeeks@googlegroups.com.
> > > >
> > > > To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> >
> > > >
> > > >
> > > > For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
> > > >
> > > >
> >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Kamakshi
> > > > kamakshi...@gmail.com
> >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> >
> > > >
> > > > To post to this group, send email to algogeeks@googlegroups.com.
> > > >
> > > > To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> >
> > > >
> > > >
> > > > 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 algogeeks@googlegroups.com.
> >
> > To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> >
> >
> > For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Tushar Bindal
> > Computer Engineering
> > Delhi College of Engineering
> > Mob: +919818442705
> > E-Mail : tushicom...@gmail.com
> >
> > Website: www.jugadengg.com
> >
> >
> >
> >
> >
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> >
> > To post to this group, send email to algogeeks@googlegroups.com.
> >
> > To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> >
> >
> > 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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
  best wishes!!
    Vaibhav
      MCA

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

Reply via email to