1. A method for packing a plurality of input rectangles into a target rectangle, comprising: permuting a plurality of input rectangles into an ordered list; marking the plurality of rectangles in the ordered list as unaccepted; selecting a next unaccepted rectangle from the ordered list beginning with a first rectangle in the list; determining whether the next rectangle is a last unaccepted rectangle; accepting the next rectangle, if true, otherwise; accepting the next rectangle with a probability p; marking the next rectangle as accepted; and repeating from the selecting step.