If you want a grade, okay, and essentially this is the format that we expect you for

this particular assignment, okay?

You're going to give the objective function, you're going to give a flag

which is opt and I'll come back to that in a moment but this is a 0, 1 value, okay?

And then you will basically output the solutions,

and in this particular case it's going to be a long list of 0 and 1s, okay?

Telling you whether this item has been selected in the solution or not, okay?

If we have n items, there will be n entries inside that list, okay?

So, this is a very particular example, okay?

So, what you see here, this is essentially,

a knapsack problem with four item, really challenging, right?

And the capacity of the knapsack is 11.

And then what you see in this list is the values and

the weights of every one of the item, okay?

So, the first one has value of 8 and a weight of 4 and

the second one has a value of 10 and a weight 5, okay?

And so this is an example of input data file, okay?

So, you can expect to a sum that will be a little bit longer than this one.

And, this is your output here.

You're basically saying, this is a solution which has a value of 19.

This is the sum of the value of all the items.

I have absolutely no clue whether this is optimal, that's why you put a 0 there.

This is this flag.

This flag is telling you, I don't know, if this is optimal,

I haven't proven it, okay?

If it's a 1, that means that, I have a proof that this is the optimal solution.

And then you see the particular solution here, okay?

The solution here is 0 0 1 1,

which basically means that I select item three and four.

If you look at item three and four, you see that the value is indeed 19, and

you see that the capacity is indeed 11, so this is a feasible solution.

Now, as I told you many times,

this is one these beautiful features of NP complete problem, okay?

I can check very quickly if what you submit is actually a solution, okay?

And obviously, I can very quickly compute the objective function, okay?

So, this is what I can always do when you are submitting an assignment, okay?

Now, how do you actually implement the assignment?

Remember, we talked about these two scripts, Python script, that we have.

The first one is the solver script,

which basically is the core of your assignment, okay?

So, what you will have is essentially the input and the output and

then in the middle, your solver, okay?

So, when we provide this script, we'll always have some code that

outputs a completely simple solution in general, okay?

And so the input is going to basically be this file here,

okay, giving you all the data that you need to compute it.

And basically the first lines here are basically parsing that input

data to output a very simple solution in the script we are giving you, okay?

Obviously, you will want to replay this simple solution with something which is

much more sophisticated.

And then the last part here,

what you're computing here, what you're outputting there, is basically the output.

And this output will have to have this format, okay?

So, this is the critical part here, okay, the output, sorry, the output here.