1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Empty Boxes Invariant/Algorithmic Problem

  1. Jan 25, 2014 #1
    I've been trying to figure this out for a couple of hours and I just don't know how to work it out, I have attempted to create a valid statement for the algorithm, but I just don't know what I'm doing.

    I would be greatly appreciative for any help I could get on this.

    Thanks!

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

    Twenty-five large empty boxes are placed on a table. An unknown
    number of the boxes is selected and, into each, seven medium boxes are placed. An
    unknown number of the medium boxes is selected and, into each, seven small boxes
    are placed.

    At the end of this process there are 291 boxes in total. How many empty boxes
    are there? You should use the following steps in order to solve the problem.

    1. Introduce the variables e and t for the number of empty and the number of
    total boxes, respectively.
    2. Identify the information that is given about the initial and final values of e and
    t.
    3. Model the process of putting seven boxes inside a box as an assignment to e
    and t.
    4. Calculate an invariant of the assignment.
    5. Combine the previous steps to deduce the final value of e .

    2. Relevant equations
    3. The attempt at a solution
    Initial:
    e = 25
    t = 291
    Final:
    e = ?
    t = 291

    (e-t)[e, t := e+7, t-1]
    =
    (e+7) – (t-1)
    =
    e-t-5
     
    Last edited: Jan 25, 2014
  2. jcsd
  3. Jan 25, 2014 #2

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    Hi SpunkyDonutz! Welcome to PF! :smile:
    The question is asking for the total number of empty large boxes, plus empty medium boxes, plus all the small boxes (since they're all empty anyway).

    Try the first stage (before any of the small boxes have arrived) … if n large boxes are filled, how many empty boxes are there? … then try the final stage.
     
  4. Jan 25, 2014 #3
    So essentially the assignment should look something like this?
    e := (25 - L) + (8 - M) + 8

    and the invariant is going to be t - e?

    Thanks for the reply too!
     
  5. Jan 25, 2014 #4

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    why? :confused:

    (and shouldn't there be some 7s in there?)
     
  6. Jan 25, 2014 #5
    Derp, I meant 7 instead of 8 :$

    Well if there's 25 large boxes in total, and L amount of filled boxes, you would substitute L from 25.
    And you would do the same with the medium boxes.
    Then add them up and add the amount of small boxes on (since they're always empty).
     
  7. Jan 25, 2014 #6

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    you mean (25 - L) + (7 - M) + 7 ?

    but what about that huge number of medium boxes that end up empty? :confused:
     
  8. Jan 25, 2014 #7
    I'm confused now :confused:
     
  9. Jan 25, 2014 #8

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    the medium boxes that don't have small boxes inside are all empty
     
  10. Jan 25, 2014 #9
    I know that much, I'm just confused about how to work that out
     
  11. Jan 25, 2014 #10

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    sorry, but we're not going to give you the answer

    you'll have to work it out​
     
  12. Jan 25, 2014 #11
    I know, I don't expect the answer, just hopefully something that'll help flick the switch.
    Is this more along the right lines?
    e := (25 - L) + (7 - m) + (7 - s)
     
  13. Jan 25, 2014 #12

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    ?? :confused:

    explain​
     
  14. Jan 25, 2014 #13
    25 - L = the amount of empty large boxes
    7 - M = the amount of empty medium boxes
    7 - S = the amount of empty small boxes
     
  15. Jan 25, 2014 #14

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    why?? :confused:
     
  16. Jan 25, 2014 #15
    Ahh, I see what you mean now...

    7-7M

    7M - because there are 7 boxes placed and M are full?
     
  17. Jan 25, 2014 #16

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    ??

    is L the number of large boxes that are filled?

    if so, what is total number of medium boxes?​
     
  18. Jan 25, 2014 #17
    Yeah, L, M and S are the total amount filled.
    8*L?
     
  19. Jan 25, 2014 #18

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    you mean 7*L

    and the total number of small boxes?
     
  20. Jan 25, 2014 #19
    That would be 7*M
     
  21. Jan 25, 2014 #20

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    yes :smile:

    ok so what is the total number of empty boxes?

    (and what is the total number of all boxes, in terms of L and M?)

    btw, i didn't notice …
    … no, none of the small boxes are filled :redface:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted