Megan and the parcels of tiles

It was lunchtime on one of those hot cloudless days that occasionally afflict this side of the country this time of year (it was the fifth Friday in July). I had already settled down, with my ice-cream, in the middle of a bench at one of the picnic tables on the edge of the park, waiting for Megan, when I saw her come from the Kalorie Kram across the street, bearing lunch. She didn't climb into the middle of the bench opposite -- tricky, perhaps, in that calf-length pencil skirt -- but perched on the end.

"Gosh, I'm glad to be out of that stuffy office", she began. She has a part-time job at the tile shop. It's a small business run by Messrs. Fish & Repp -- the name's confused some customers, she tells me. A few munches later, she went on. "Curious thing happened recently, with a couple of our online orders. Did I tell you, we've started selling some of our tiles online? The customer selects the sort of tiles and types the number of tiles into the web page. Now some sorts of tile come in packs. So we work out how to make up the number the customer ordered, in packs. Then Simon out the back of our shop puts the packs into parcels for posting. We don't charge separately for postage, we just mark up the price per tile."

"Ah -- Simon's problem is how to find room to fit the packs into the parcels. So how big..."

"No, that's not the problem -- it's more the weight. You see, with the courier we use, we mustn't pack more than 25kg into a parcel. Anyway, yesterday, we got an online order for white ceramic tiles. That sort come in packs of 7 and 11, and the packs weigh 7kg and 11kg."

"What strange numbers."

"Yeah -- dunno why they package them like that. Still, it means that so long as the order's big enough we can make up the exact number the customer ordered. If it's a small order like 16 or something, then we have to split a pack, but we avoid that if possible. So Simon said Good job that order isn't too big -- we've only got 20 packs of 'em in stock. But that's more than enough for that order."

"OK, with you so far."

"But here's the funny thing. This morning, another online order. Same sort of tiles, five tiles more. We still had enough of them in stock, but this time Simon managed to pack 'em into one parcel less than that other time. Boss was giving him grief over how come he needed one parcel more with that other order, and do you know how much the postal charges are..."

So, how many tiles were in each of those orders, and how many parcels were used for each?

• Nice to see Megan again – elias Aug 4 '16 at 9:12
• What a nice puzzle! I would like to introduce this problem to others. May I use it on my puzzle column? My column will be issued in Korean. – P.-S. Park May 31 '18 at 5:38
• @P.-S.Park Certainly you may, so long as you credit me as the inventor of the puzzle. – Rosie F May 31 '18 at 6:50

The orders were

70 and 75

and they used

4 parcels and 3 parcels, respectively.

Explanation:

This is far from an elegant math proof, but it gets the answer nonetheless.

The main thing to observe is that one parcel can fit exactly one 11-pack and two 7-packs. $11+7+7 = 25$
It's clear from this that the larger order fills parcels in this pattern, but the smaller order can't. So we're looking for a multiple of 25 which meets these criteria. Also, Megan didn't say that they broke up a pack, so the numbers must be able to be made exactly out of 7 and 11.

$25$ doesn't work, since it's impossible to make 20 out of 11 and 7.

- $20$ isn't a multiple of 7.
- $20 = 1*11 + 9$, 9 isn't a multiple of 7.

$50$ won't work either. 45 also can't be made:

- $45$ isn't a multiple of 7. - $45 = 1*11 + 34$, 34 isn't a multiple of 7.
- $45 = 2*11 + 23$, 23 isn't a multiple of 7.
- $45 = 3*11 + 12$, 12 isn't a multiple of 7.
- $45 = 4*11 + 1$, 1 isn't a multiple of 7.

$75$ is the first multiple of 25 this works for. The only way to form $70$ is with $10$ 7-packs:

- $70 = 1*11 + 59$, 59 isn't a multiple of 7.
- $70 = 2*11 + 48$, 48 isn't a multiple of 7.
- $70 = 3*11 + 37$, 37 isn't a multiple of 7.
- $70 = 4*11 + 26$, 26 isn't a multiple of 7.
- $70 = 5*11 + 15$, 15 isn't a multiple of 7.
- $70 = 6*11 + 4$, 4 isn't a multiple of 7.

Since no amount of 11-packs can be used in creating $70$, you have to use $10$ 7-packs. You can fit $3$ 7-packs into a parcel (since that will weigh 21kg). This means you need $3$ parcels containing $3$ packs, and $1$ containing $1$, totalling 4 parcels.

The order of $75$ can be done with three parcels containing an 11-pack and $2$ 7-packs, each of which weighing 25kg.

Furthermore, this lines up with Megan's comment about them having 20 packs. $10$ 7-packs plus $3$ 11-packs and another $6$ 7-packs is $19$ packs.

JS Fiddle used to help verify

• Nice to see the detailed explanation why 25 and 50 don't work. Otherwise we've reached the same conclusion. – elias Aug 3 '16 at 17:42
• Well answered. The point of "we've only got 20 packs" was to exclude a similar situation with 95-100. – Rosie F Aug 3 '16 at 17:49

There were

70 and 75 tiles ordered, needing 4 and 3 parcels respectively.
70 can only be composed as 10x7 if we prefer not to split packs.
Only three 7kg packs fit in a single parcel's limit of 25 kgs, so ten packs need 4 parcels.
However, 75 can be composed as 6x7+3x11, making up 3 25kg parcels: each containing two 7kg packs and a 11kg one.
This is 19 packs altogether, so they really don't run out of the 20 packs.

I completed BusinessCat's code so it now outputs how many parcels are needed optimally for orders which can be fulfilled without splitting any packs.

The upper limit of 112 for the tiles comes from the fact, that the two orders together can be satisfied from 20 packs at most, which can be 20*11=220 tiles at most, and the second order contains 5 tiles more than the first.

Orders which can be fulfilled by different setups of packs (e.g. 84 can be 7x11kg+1x7kg or 12x7kg) are listed with all the possible setups.

A possible solution to the original question may appear only around those numbers where the monotonity of the number of parcels breaks - a larger number of tiles resulting in a smaller number of needed parcels. Checking all those possibilities leaves us with the pair of 70 and 75 as the only solution.