Given a set of car weights, the program will allocate them to port and starboard sides of the ferry so that the weight of the port side will be within 2% of the weight of the starboard side.