To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 2311
2310  |  2312
Subject: 
Re: How to maximize 90-piece bags?
Newsgroups: 
lugnet.off-topic.geek
Date: 
Wed, 8 Nov 2000 00:28:23 GMT
Viewed: 
1728 times
  
In lugnet.lego.direct, Todd Lehman writes:
In lugnet.lego.direct, Larry Pieniazek writes:
- Some number of 90 count bag(s) of 1x1 Plates - White
- Some number of 90 count bag(s) of 1x1 Plates - Black
- Some number of 90 count bag(s) of 1x1 Plates - Grey
- Some number of 90 count bag(s) of 1x1 Plates - Dark Grey
- Some number of 90 count bag(s) of 1x1 Plates - Light Grey

Ho ho!!!

Clearly we need a design that uses 92 (or 182) of each thing so that they
have to supply 88 extra of each color but one. (91 wouldn't work, they
always give one extra.)

Hmm.  I bet they're *really* 90-count bags and the extras are for if you go
over 88, not 90.  That is, I'll speculate that if you need 87 or 88, you get
one bag.  But if you need 89, 90, 91, 92, or any number up to 176, you get
two bags.  (Just a guess.)

Anyway, ya, this is an interesting partitioning problem.  The goal would be
to get as many "free" elements as possible.  I wonder if a straightforward
greedy 1/5 partition is optimal for this?

Let's see...first, there are 44 x 44 = 1936 squares to cover.  Note that 88
(which is 90 minus 2 -- a coincidence?) evenly divides 1936 (22 x 88 = 1936).
So it should be easy to "tip the scales" toward extra bags.

A first-order crude approximation on the theoretical upper bound of an optimal
solution is 1936 + 90 x 5, or 2386.  Of course, it's likely that no solution
exists which yields this high quantity, but you can probably get pretty close
to it.

Well, here's one solution -- I haven't proven that it's optimal, but I
conjecture that it is optimal given certain assumptions.  Assuming the
threshold for each bag is 88 and you get actual 90-ct bags, then

  353 Black => 5 bags of 90 Black
  353 DGray => 5 bags of 90 DGray
  353 MGray => 5 bags of 90 MGray
  353 LGray => 5 bags of 90 LGray
  353 White => 5 bags of 90 White

would result in 2250 elements.  (353 is 88 x 4 + 1.)

Now, since 353 x 5 = 1765 is much less than 1936, it makes sense, not knowing
the precise partitioning rules, to "pad" the required quantities.  Thus

  387 Black => 5 bags of 90 Black
  387 DGray => 5 bags of 90 DGray
  387 MGray => 5 bags of 90 MGray
  387 LGray => 5 bags of 90 LGray
  388 White => 5 bags of 90 White

adds up perfectly to requiring precisely 1936 elements, yet receiving 2250
elements.

But, if we assume that we know the precise partitioning rules, are there
better (less greedy) ways to "spend" the "padding"?  Look how much is wasted:
(387 - 353) x 5 is 170 -- almost two whole bags!

  353 Black => 5 bags of 90 Black
  353 DGray => 5 bags of 90 DGray
  353 MGray => 5 bags of 90 MGray
  353 LGray => 5 bags of 90 LGray
  524 White => 6 bags of 90 White

adds up to requiring 1936 elements, yet receiving now 2340 elements!  But is
this the best we can do?  No, we're still wasting padding here, because it
only takes 441 elements to result in 6 bags, not the full 524 we have left
over.  Unfortunately, the excess 83 (524 - 441) isn't enough to push another
bag up to the next integral quantity.

Therefore, it makes more sense to distribute the 83 evenly across all colors
as follows:

  369 Black => 5 bags of 90 Black
  369 DGray => 5 bags of 90 DGray
  369 MGray => 5 bags of 90 MGray
  369 LGray => 5 bags of 90 LGray
  460 White => 6 bags of 90 White

I believe this is an optimal solution (proof left as an exercise to the
reader) with sufficient padding to ensure a total of 26 bags of 90 elements,
for a total of 2340 elements, whether the threshold is 88->90 or 89->91 or
90->92.  This gives approximately 10% padding on each color in the worst case
scenario of 90->92.

Now the question is, what would I do with several thousand 1x1 plates?!  :-)

And if I subtract the cost of a 48x48 gray baseplate (normal US$10??) and
sloped bricks around the boder from the US$29.99 price of the mosaic, is it
worth $.007 (that's 0.7 cents) per 1x1 plate?  Seems like an excellent deal
if I need 1x1 plates!  :-s

--Todd

FWIW, my first order resulted in:
   1 Black => 1 bag of 90 Black
   1 DGray => 1 bag of 90 DGray
   1 MGray => 1 bag of 90 MGray
   1932 LGray => 22 bags of 90 LGray
   1 White => 1 bag of 90 White

What did everyone else order?

-Jon



Message has 2 Replies:
  Re: How to maximize 90-piece bags?
 
(...) LOL!!!! Beauty! Will we be seeing these on BAYLIT anytime soon? I could use about 50 or 100 light gray 1x1 plates and would be happy to pay $.05 apiece for them. But I don't need a whole 48x48 baseplate full of them. --Todd (24 years ago, 8-Nov-00, to lugnet.off-topic.geek, lugnet.market.buy-sell-trade)
  Re: How to maximize 90-piece bags?
 
(...) <snip> (...) I want to order exactly what you ordered if it is indeed the *new* gray, and they (TLC) don't tweek your image. Rich -- Have Fun! C-Ya! Legoman34 ***** Legoman34 (Richard W. Schamus)... (My views do not necessarily express the (...) (24 years ago, 8-Nov-00, to lugnet.off-topic.geek)

Message is in Reply To:
  How to maximize 90-piece bags?
 
(...) Hmm. I bet they're *really* 90-count bags and the extras are for if you go over 88, not 90. That is, I'll speculate that if you need 87 or 88, you get one bag. But if you need 89, 90, 91, 92, or any number up to 176, you get two bags. (Just a (...) (24 years ago, 7-Nov-00, to lugnet.lego.direct, lugnet.off-topic.geek)

100 Messages in This Thread:
(Inline display suppressed due to large size. Click Dots below to view.)
Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR