CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Cutting rectangles

    I would like to know this examples's solution. I write a heuristic algorithm for this but it is not good. I always divide with the less side of the rectangle and this algorithm isn't give the optimal solution.
    Please help.

    Here is the example: (cutting rectangle)

    http://www.oi.edu.pl/php/ceoi2004.ph...istory#1996-22

  2. #2
    Join Date
    Jun 2002
    Location
    Moscow, Russia.
    Posts
    2,176

    Re: Cutting rectangles

    It's simple dynamic programming problem. Create array 100x100 of answer caches and for each given rectangle optimize cutting in half.
    "Programs must be written for people to read, and only incidentally for machines to execute."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured