COSC 1P03: To Devise, and Implement, a Recursive Solution - IT/Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task:

Task:

Objective:

To devise, and implement, a recursive solution. This time, with backtracking! Background: It's time to move to bigger and better things! And of course, the most common factor when considering a big move is... the crippling instinct to hoard everything you've ever accumulated, and haul all your worthless crap over to the new home! Thankfully, everything's already boxed-up, though the boxen are of different dimensions. The moving van is available in different dimensions and geometries, and you need to be able to neatly fit everything in. Of course, not every combination of boxen and moving vans will work out, even if the maximum theoretical volume exceeds the total volume to stow (since hacking boxen in half with a chainsaw is frowned upon). There are many algorithms for packing the boxen, but we'll be using a single specific mandatory one. Before we get to the algorithm, let's cover the requirements:

• Each box will have a width and a height ? These are expressed in feet ? You may not tip over the box, or rotate it (that would damage the contents)

• Every box will be exactly one foot deep ? Since you can't rotate, this just means you're placing boxen in discrete layers

• All boxen must be placed stably: ? The bottom-most boxen must be right on the floor of the van ? Boxen may stack on boxen, but only if completely supported

• When such solutions exist, you must always prefer the furthest-back layer, and the leftmost side ? You can just consider 'layer zero' to be the furthest-back

• A solution only exists if all boxen can be placed

• You'll encounter the most-treasured boxen first, so you can't consider looking for a place for later boxen until the current one's placed somewhere ? Yes, this can technically force a 'fail' state even if it wouldn't have otherwise been possible You'll be getting the data for both the van and the boxen from a single text file.

• The text file will either be onelayer_tricky.txt or something specified as a commandline argument

• The first line is the dimensions of the van: depth height width ? These three are tab-separated

• The second line is the number of boxen • And then, for however many boxen: height width ? Again, tab-separated ? You don't need to worry about the depth of a box, since it's always 1 foot On the next page, we'll walk through an example with only a single depth, to clarify the algorithm.

The above  COSC 1P03: IT Assignment has been solved by our  IT Assignment  Experts at onlineassignmentbank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.