# In the info underneathWhen the King of Vortzegia found that there was a petrol shortage, he introduced a petrol rationing system according to the 3-digit number on a car's number plate People could...

In the info underneath

When the King of Vortzegia found that there was a petrol shortage, he introduced a petrol rationing system according to the 3-digit number on a car's number plate

People could only buy petrol on:

Monday: If the three digit number was odd

Tuesday: If the Digit sum of the number was greater than ten

Wednesday: If the number was a multiple of 3

Thursday: If the digit sum of the number was less than 15

Friday: if at least 2 of the 3 digits were the same

Saturday: if the three digit number was less than 500

Sunday: if each of the digits was less than six

Questions:

c) with what number plate can you only fill up on six days

d) The prime minister had a number which allowed him to buy only once a week what is the largest possible number plate?

mlehuzzah | Certified Educator

c) There are several answers to this.  We just need to pick one day on which a person is UNABLE to get gas, and the rest of the days they are able to get gas.

Here are some examples

No gas on Monday: 444
No gas on Tuesday: 333, 441, 111
No gas on Wednesday: 455, 355, 353, 155
No gas on Thursday: there is actually no way to do this
No gas on Friday: 435, 345, 453
No gas on Saturday: 525
No gas on Sunday: 363

Why Thursday can't be the day:

To "fail" Thursday, we must have `A+B+C>=15`

To "pass" Saturday, `A<=4`

To "pass" Sunday, `B<=5` and `c<=5`

`4+5+5` is the largest sum, possible to "pass" Saturday and Sunday
But that is not enough to "fail" Thursday

d)
He may only buy once per week.  Let's say his license plate has the digits
ABC

Consider the Tuesday and Thursday rules:

At least one of these must be true:

If `A+B+C<=10` he may buy on Thursday

If `10<A+B+C<15` he may buy on Tuesday and Thursday

If `A+B+C>=15` he may buy on Tuesday

Thus, EVERYONE may always buy on at least one of Tuesday and Thursday.  If he can only buy on one day, then he must not be able to buy on M,W,F,S,S.  Thus:

By Monday's rule, C is even
By Wednesday's rule, A+B+C is not divisible by 3
By Friday's rule, each of A,B,C must be distinct (no two of the digits in his plate can be equal)
By Saturday's rule, A>4
By Sunday's rule, at least one of the digits must be 6 or more

Also, it can't be that: 10<A+B+C<15

Now, we want to find the largest possible plate:

We first try to make a plate with A=9 (if there is such a plate, it must be larger than any possible plate with `A != 9`)

Now consider B.  B can't be 9, else the pm could buy gas on Friday.  We try the next largest possible number, 8.

So:  98_

C can't be 9 or 8, because then the pm could buy gas on Friday.  We try the next largest number, 7.  But then the pm could buy gas on Monday and Wednesday, so we try 6:

986

It is not odd;
not a multiple of 3;
the sum of the digits is not less than 15;
No two digits are the same
not less than 500
not all digits less than 6

Thus the pm can only buy gas on one day, Tuesday.  This is the largest such plate, since at each digit we used the largest possible digit still satisfying the conditions