Shop OBEX P1 Docs P2 Docs Learn Events
Browser's Math Puzzle — Parallax Forums

Browser's Math Puzzle

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2011-09-28 22:43 in General Discussion
Every day, between 3 and 5 p.m. I give Browser one shrimp as a treat. He expects it, and it brings him in if he's outside, where he'd be coyote bait after dark. (Mmmm! Heavily-marbled feline flank!) I get the shrimp from Costco in a frozen ziplock bag that contains about 120 pieces. Each time Browser gets a treat, I open the bag, pull out a piece, and defrost it in the microwave. 'Trouble is, every time I open the bag and let air in, the remaining glazed pieces sublime a bit until their protective coating of ice is gone and they start to freezer burn. By the time the bag is nearly empty, the remaining pieces are pretty far gone, and Browser glares at me like, "What the hey? It's supposed to be treat time, and you give me this?!!"

So lately, I've hit on the idea that, if I transfer X pieces from the main bag to a smaller ziplock bag and retrieve them from there until its empty, then refill it, I can reduce the total air exposure that each piece of frozen shrimp receives. So here's the puzzle. Given the hypothetical condition that each new bag contains 120 pieces of shrimp and that each piece of shrimp in any bag receives an equal dose of air exposure every time the bag is opened, what is the optimum value for X to reduce the maximum exposure to air that any one piece of shrimp receives before all the pieces from the original bag are gone?

-Phil
«1

Comments

  • W9GFOW9GFO Posts: 4,010
    edited 2011-09-27 23:07
    Solution: get a walk-in freezer!
  • TubularTubular Posts: 4,717
    edited 2011-09-27 23:08
    Browser texted me his solution to this:-

    "Phil, stop being such a tighta**e and read the recommended serving size. It ain't 1 shrimp. Problem solved QED
    - Browser"
  • W9GFOW9GFO Posts: 4,010
    edited 2011-09-28 00:02
    Since currently the shrimps are lasting until the bag is nearly empty I think the optimum number is two. That will cut your exposures in half.

    There must be a more complex way to solve the problem though. :)

    I'm going to guess that the real answer is 11.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-28 00:25
    Impossible to solve without knowing the rate of freezer burn. Two is likely the best solution. But you would have to divide into two and three bags and collect data on the undivided bag, the divided into two, and the divided into three in order for any real empirical conclusion.

    Browser may not be glaring about the freezer burn so much as the one shrimp policy. Are these small shrimp, average sized, or jumbo? Again, the size is yet another determining factor.
  • TubularTubular Posts: 4,717
    edited 2011-09-28 00:50
    W9GFO wrote: »
    Since currently the shrimps are lasting until the bag is nearly empty I think the optimum number is two. That will cut your exposures in half.

    There must be a more complex way to solve the problem though. :)

    I'm going to guess that the real answer is 11.

    Yeah I think 11 is a mighty good guess. I tested 10 and 12 which look "close to the minimum".
  • Heater.Heater. Posts: 21,230
    edited 2011-09-28 01:46
    Like all good cats that Browser has got you well trained.
    So much so that this problem keeps you awake at night.
    And now it's going to make us sleepless as well...
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-09-28 02:18
    FRESH SHRIMPZ!
    2 per day!
  • Heater.Heater. Posts: 21,230
    edited 2011-09-28 03:42
    I recently got this sneaking suspicion that there was some kind of "global cat consciousness" by which all cats were in communication as a single being.
    Turns out they do it through the internet via their human slaves.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-09-28 04:17
    Stop being so stingy and give Browser an extra treat each Sunday. Then you will not have the problem. Easily solved and no maths involved. Why do you complicate this so???
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-09-28 04:36
    Heater. wrote: »
    through the internet via their human slaves.

    We prefer "trusted minion" or "thumbed companion".
  • jdoleckijdolecki Posts: 726
    edited 2011-09-28 04:42
    Get a hopper to store the shrimp in for the freezer.

    Cut a hole in he freezer door for a chute.

    Put a Propeller on the fridge door to keep track of the time and open the chute door.

    Put a sensor on the chute to make sure 1 piece of shrimp was discharged.

    Have and RFID tag on the cat to check if he is indoors or outdoors.

    If indoors feed the cat

    If outdoors open door so cat can come in.

    Now the fridge can feed the cat automatically and you dont have to touch the smelly shrimp again.
  • Heater.Heater. Posts: 21,230
    edited 2011-09-28 04:52
    mindrobots,

    Was that you or your cat speaking?:)
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-09-28 04:54
    Day One:
    1) Remove shrimp 4 at a time
    2) Defrost one (meanie) for immediate consumption
    3) place remaining shimpz in proper fridge safe container in fridge for next 3 days
    Day Two:
    - Defrost shrimp from fridge if needed
    Day Three:
    - Serve defrosted shrimp (chilled if acceptable)
    Day Four:
    - Serve final shrimp, slightly chilled
    Day Five:
    - Repeat process from Day One

    You've reduced exposure of frozen shrimp by a factor of four
    You've reduced Browser's energy footprint by up to 1/2 if chilled shrimp are acceptable
    Shrimp easily stay fresh in the fridge for the three days and this could probably be done on a 5 day cycle for even further savings and still retain freshness.
  • jdoleckijdolecki Posts: 726
    edited 2011-09-28 05:43
    Does the Cat like sauce with the shrimp?
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-09-28 06:26
    Every day... Browser glares at me like, "What the hey? It's supposed to be treat time, and you give me this?!!"...

    Phil,
    you're best bet is to totally replace your present situation with a clean, well-illuminated aquarium.

    Fish never complain about what you feed them.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-09-28 06:36
    X = √ 120

    or

    N = 120 / X ; N = X ; simplified equals ... X = 120/ X


    X = 10.95 ... = 11

    Total exposure = X * 2 = 21.91 ... =22


    I revise my answer to X = 8 ... final answer (solution later)
  • RichKRichK Posts: 54
    edited 2011-09-28 07:49
    Probably optimum to serve one bag per day. Make the cat more tasty for the coyote too, slower and easier to catch. Might only need one bag then because it's doubtful Browser could outrun anything after 120 shrimp. Might need to force feed those last few.

    Wait, the question is about optimizing the shrimp exposure. I stopped at the coyote bait. According to our local trapper, cat is their favorite food. Apparently the cats think the coyote will react like a dog does and leave them alone after a hiss and scratch. According to my wife's collection of fowl, they also like chickens, turkeys and ducks. And 2 cats in the last 2 years.

    Ok.
    120 bags, each shrimp has 1 exposure. Anytime you open a bag and not take out the shrimp that is an extra exposure that counts against you. The last shrimp in a bag of 11 has 10 exposures on it. The next to the last has 9. Is that counted as 19 exposures or only 2? Each shrimp in the bag becomes less appetizing. I guess it depends on what level of decay Browser is willing to put up with, can he deal with nasty shrimp a couple days in a row before they become tasty and wholesome again?
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2011-09-28 07:54
    There are further variables needed really, because this is somewhat dependent on length of time to take 1 vs 11, put in vs take out, etc.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-28 08:11
    This is the best I could come up with. Anyone know of a formula for this calculation?

    Transfer #1, Qty. of shrimp 19, Max Exposure 20
    Transfer #2, Qty. of shrimp 18, Max Exposure 20
    Transfer #3, Qty. of shrimp 17, Max Exposure 20
    Transfer #4, Qty. of shrimp 16, Max Exposure 20
    Transfer #5, Qty. of shrimp 15, Max Exposure 20
    Transfer #6, Qty. of shrimp 14 , Max Exposure 20
    Transfer #7, Qty. of shrimp 13, Max Exposure 20
    Remaining, Qty. of shrimp 8 , Max Exposure 15
  • TubularTubular Posts: 4,717
    edited 2011-09-28 08:13
    Well, here's my take on it, refilling the small bag every 11 days. The very last shrimp has (I think) 20 exposures

    And here's my answer in graphical form, generated on the Prop with Kye's 160x120 driver, and using Viewport's new ability to stream that 160x120 video buffer to the PC...

    attachment.php?attachmentid=85476&d=1317222769
    1024 x 531 - 55K
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-09-28 08:19
    There are many solutions to this problem.

    - Buy 120 ziplock bags and put 1 shrimp in each bag.
    - Buy several ice trays and freeze each shrimp in an ice cube
    - Buy live shrimp and keep them in an aquarium
    - Replace Browser with a real pet
    - Replace Browser with a robotic pet (You probably won't be able to tell the difference)
    - Move to a place near the ocean/gulf where there are shrimpers, drive out to the docks in the morning when the shrimp boats are coming in, purchase one shrimp from them, keep it alive during the day, and feed it to your cat in the evening. Repeat this process each day.
    - Move to a place where there aren't any coyotes
    - Move to a place where it is very cold or very hot or rains all the time, and you won't need to bribe your cat to come inside.
    - Live on a boat and the cat probably won't go out much
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-28 08:30
    Wow! I had no idea the puzzle would attract this much overnight attention. My gut tells me that the square-root solution is correct, assuming equal exposure to take out 1 vs. 11, and zero for putting in. (Thanks, Erik, for pointing out the need for clarification.)

    Tubular, your graph is over the top! Wow!

    Mindrobots' "defrost more than one at a time" solution, while interesting, won't work with Browser, I'm afraid. He won't eat shrimp that's sat thawed in the fridge. I think it takes the microwave to release the shrimpy aroma from each piece as it thaws immediately before serving.

    BTW, these aren't little popcorn shrimp, which is what he used to get until the lady next door fed him the good stuff. Ever since, I've had to buy the 60-count variety -- tail-off, of course.

    Now, as to the "solutions" offered by the non-cat people -- you know who you are -- Mr. Browser is not amused but assumes that rehabilitation is still possible. His twelve-step program will be offered in major cities across the country beginning in November. Seating is limited, so reserve your place now! :)

    -Phil
  • jdoleckijdolecki Posts: 726
    edited 2011-09-28 08:32
    Or you could just give the shrimp to the cyotes and they will not care about the cat anymore.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-09-28 08:47
    Celebrities are like that! They preach green living to everybody but when it comes down to their lifestyle and a little sacrifice, then it's not an issue. Cats are doubly like that....our cats are only concerned about conserving THEIR energy, not any other energy!!
  • davejamesdavejames Posts: 4,047
    edited 2011-09-28 10:26
    Mindrobots' "defrost more than one at a time" solution, while interesting, won't work with Browser, I'm afraid. He won't eat shrimp that's sat thawed in the fridge.

    Mr. Pilgrim - you MUST place restrictions on your pet and show him that YOU'RE the boss!! The pet must know its limitations and respond with all deference. It must........(what?)

    Um, excuse me for a moment...

    (...ohhhhh, you're a pretty boy! Look at you! Ohhhhh, nice kitty. Such a good boy!)

    Pardon me, my cat's water bowl requires refreshing...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-28 12:35
    If you treat this as a calculus minimization problem, with the number of shrimps in the small bag (X) being a continuous variable, the maximum exposure of the last piece served (i.e. the number of bag openings it's subjected to) is:
    E = X + 120/X

    Taking the first derivative, and setting to zero, we get:
    d/dX (E) = 1 - 120/(X2)

    which is zero when X = √120. So E = 22 in discrete space, as others have determined.

    Now that's with constant X for each transfer. If X is allowed to vary from transfer to transfer, can E be reduced further? What happens if X is taken to be the square root of the number of shrimp remaining in the large bag at each transfer?

    -Phil
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-09-28 13:12
    The number of exposures would be 15 if the first bag full was 15, the next bag full is 14, the next one 13, and so on. Summing up 1 through 15 is 120.

    One of my other solutions from my previous post would really be a heck of lot easier. :)
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-09-28 13:45
    The correct answer is:

    1 shrimp per small zipper bag, no more than 60 bags, and you eat the other half much sooner than the four months of total freezer time for the whole Costco package. (The 1 per bag limits your handling of the fish each day.) Even cooked seafood has a limited shelf life in the best of home freezers, which seldom get under 0 degrees. Commercial freezers, including the ones at Costco, are below 0 degrees.

    While the microbes won't grow at 0 deg, the texture and taste go downhill after just a month. Browser wanted me to remind you that the 120-day supply is longer than you should be keeping it, so it doesn't really matter how you divvy it up. The air exposure and partial rethawing each time aren't helping, but it's not the whole story.

    Browser's solution was to have you feed feed him 2+ shrimpies a day, but remind him what kidney stones (and a catheter) feel like.

    -- Gordon
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-09-28 14:06
    I would suggest storing the shrimp in a dewar flask of liquid nitrogen. You can extract a single shrimp out each day with a long pair of tongs. Just don't drop the shrimp -- it will shatter. You have to refill the flask every few days as the liquid nitrogen boils off, but I'm sure Browser is worth it. :)

    Shrimp should keep fine in liquid nitrogen for years, so you could do a life-time buy and save some money on the shrimp by buying it in a large quantity. An internet search showed that human embyos can be frozen in liquid nitrogen for several years, and produce a healthy baby. A boy was born in May of last year after being frozen for 20 years. Hey, I read it on the internet. It's got to be true.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-09-28 14:15
    Mindrobots' "defrost more than one at a time" solution, while interesting, won't work with Browser, I'm afraid. He won't eat shrimp that's sat thawed in the fridge. I think it takes the microwave to release the shrimpy aroma from each piece as it thaws immediately before serving.

    BTW, these aren't little popcorn shrimp, which is what he used to get until the lady next door fed him the good stuff. Ever since, I've had to buy the 60-count variety -- tail-off, of course.

    This is the difference between cats and dogs. Cats have a distinct flavor preference, yet my dog will go nuts over a pack of moldy bacon. I can't tell if that is extremely annoying or gratifying because you know your pet is intelligent enough to have a preference. :)

    BTW I'm surprised that Browser himself has not shown up in this thread.
Sign In or Register to comment.