# Thread: Help with empty boxes..algorithmic problem.

1. ## Help with empty boxes..algorithmic problem.

Hi, i've been given this problem for homework but I am completely baffled..I can't even translate the first move into values on the variables..

Any help on this would be greatly appreciated..Sorry if i'm being a bit abrupt here but my head is fried at this stage..

Thanks Guys..

1. The problem statement, all variables and given/known data

Eleven large empty boxes are placed on a table. An unknown number of the boxes is selected and, into each, eight medium boxes are placed. An unknown number of the medium boxes is selected and, into each, eight small boxes are placed.

At the end of this process there are 102 empty boxes. How many boxes are there in total?

2. Relevant equations
3. The attempt at a solution

Variables:
e = number of empty boxes
f = number of full boxes

Initial Values:
e=11
f=0

2. Every time you fill a box, you increase the number of empty boxes by 7 (because you add 8 empty ones and fill one) and the total number of boxes by 8.

102-11=91 gives the number of extra empty boxes you will need.
91/7= 13 gives number of boxes that must be filled to achieve this
13*8= 104 gives extra boxes required.
104+11 = 115 is the total number of boxes

3. Ok,

I think I may be getting it.. what variables would you introduce then?

n: number of boxes
e: number of empty boxes

I need to discover an invariant for this.

I've tried modelling a move: fill 1 box

e:= e+7
n:=n+8

what possible invariants can I get from this? TBH i'm not sure if I even understnad what an invariant is and this is due in tommorrow