## Problem 236

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

Don't post any spoilers
quilan
Posts: 182
Joined: Fri Aug 03, 2007 11:08 pm

### Problem 236

So I decided to actually sit down & try and decode what the heck Problem 236 (View Problem) was trying to ask. Unfortunately, after pecking through a few examples I was unable to actually get any meaningful results with the example ratio.

Is it trying to ask the following:
(a,b) = number of Caviar gone bad for 'A' and 'B' respectively.
(c,d) = number of Cake gone bad for 'A' and 'B' respectively.
... (e,f) == Joint, (g,h) == Port, (i,j) = Truffles

Thus, for per-product:
b/640 = m*a/5248
d/1888 = m*c/1312
...

And overall-rate:
(a+c+e+g+i)/18880 = m*(b+d+f+h+j)/15744

I can clear any info from the post (even though I haven't even come close to writing an algorithm for it as I'm still piecing together the word problem) if needed. I just need to know if this an accurate assessment of the initial question for 236?
ex ~100%'er... until the gf came along.

ed_r
Posts: 1009
Joined: Sun Jul 29, 2007 10:57 am

### Re: Problem 236

I think that's it.
!647 = &8FDF4C

Lord_Farin
Posts: 239
Joined: Wed Jul 01, 2009 10:43 am
Location: Netherlands

### Re: Problem 236

There is another of those annoying character set problems:
"Although the suppliers try very hard to ship their goods in perfect condition, there is inevitably some spoilage â€“ i.e. products gone bad."

hk
Posts: 10714
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

### Re: Problem 236

Fixed, I hope.

Lord_Farin
Posts: 239
Joined: Wed Jul 01, 2009 10:43 am
Location: Netherlands

### Re: Problem 236

Yups, nice hyphen there now

LarryBlake
Posts: 100
Joined: Sat Aug 29, 2009 8:49 pm

### Re: Problem 236

Can we assume an integer number of spoiled items? There couldn't be 16/7 spoiled caviar, would there?

Marcus_Andrews
Posts: 1472
Joined: Wed Nov 09, 2011 5:23 pm

### Re: Problem 236

Yep -- integers only.

jinetic
Posts: 1
Joined: Sun Feb 09, 2014 1:00 pm

### Re: Problem 236

I somehow ended up with a program that produced 36 possible values of m (as opposed to the expected 35). According to the solution forum, 1107 / 1003 was my extraneous solution; however, I think the following counts for spoiled products satisfy the conditions given in the problem for m = 1107 / 1003:

Supplier A:
0 / 5248
85 / 1312
0 / 2624
2210 / 5760
0 / 3936

Supplier B:
0 / 640
135 / 1888
0 / 3776
1599 / 3766
0 / 5664

mpiotte
Posts: 1914
Joined: Tue May 08, 2012 5:40 pm

### Re: Problem 236

there is inevitably some spoilage
each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A'
These quotes from the problem statement exclude solutions with no spoilage for one of more products.

pjt33
Posts: 28
Joined: Mon Oct 06, 2008 6:14 pm

### Re: Problem 236

mpiotte wrote:
Sun Feb 09, 2014 1:43 pm
there is inevitably some spoilage
each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A'
These quotes from the problem statement exclude solutions with no spoilage for one of more products.
I think that is less than crystal clear. It's a perfectly reasonable (and, in general, more natural) interpretation of the first quote that the total number of spoiled items over all products is non-zero. The second quote changes subtly when the rest of the sentence is added, and it appears to be equivalent to the statement that there is an m greater than unity such that each of the five per-product spoilage rates for 'B' is m times the same product's spoilage rate for 'A'.