There are 9 houses in Spookytown which gives out candies to children for Trick or Treat. Each house gives a distinct number of candies, such that the number of candies the houses give form a consecutive progression. That is, if one house gives 42 candies, another gives 43, and so on.
Four children, Wes, Michaela, Laurel, and Connor went to ask for candies at this village. Each went to four houses. Surprisingly, each of the children went and asked for candies in such fashion:
No two children went to the same four houses.
No child went to a house that gave candies whose number was 1 more or 1 less to the house that gave them before.
No house gave out candies more than twice.
Meanwhile, Asher the bully was waiting for these kids to get their candies so that he could hoard them all. Wes, having the most candies, received 112. If the house giving the most and the house giving the second least number of candies were only visited once, how many candies will Asher have all in all?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let denote the candies each house give equal to a , a + 1 , .... , a + 8 .
A house can be visited twice at most and the 2 houses a + 8 and a + 1 are only visited once each only. 4 kids will visit 9 houses for a total of 16 times. However, we observe that if the maximum number of visits to the 7 houses a , a + 2 , a + 3 , a + 4 , a + 5 , a + 6 , a + 7 is 2 ∗ 7 = 1 4 , plus 2 for house a + 8 and a + 1 which is 16. Hence, all the houses a , a + 2 , a + 3 , a + 4 , a + 5 , a + 6 , a + 7 are visited twice each.
Therefore, the total number of candies is a ∗ 2 + ( a + 1 ) + ( a + 2 ) ∗ 2 + ( a + 3 ) ∗ 2 + ( a + 4 ) ∗ 2 + ( a + 5 ) ∗ 2 + ( a + 6 ) ∗ 2 + ( a + 7 ) ∗ 2 + ( a + 8 ) = 1 6 a + 6 3
The number of candies that Wes have is 4 a + x where x is the sum of 4 distinct numbers picked from 0 to 8. That also means, x must be divisible by 4 since 112 is divisible by 4.
Each kid will visit 4 houses, and the difference between the numbers of candies each house give must be larger than 1. Given that the lowest number of candies the kid received is a + t , then the the second least number of candies he/she also receives should be at least a + t + 2 , the third least should be at least a + t + 4 and the most should be at least a + t + 6 .
Hence, a kid will receive 4 a + 4 t + 1 2 ≥ 4 a + 1 2 candies. The maximum number of candies a kid can receive can be found to be ( a + 8 ) + ( a + 6 ) + ( a + 4 ) + ( a + 2 ) = 4 a + 2 0 . The number of candies that Wes can take, therefore, can only be 4 a + 1 6 or 4 a + 2 0 .
If Wes takes only 4 a + 1 6 candies, then the maximum total number of candies is 4 a + 1 6 + ( 4 a + 1 5 ) ∗ 3 = 1 6 a + 6 1 , which is smaller than our total number of candies 1 6 a + 6 3 .
To prove that 4a + 20 is the right number of candies for Wes, we can find the houses each kid visits as below.
We have 4 a + 2 0 = 1 1 2 ⇒ a = 2 3
⇒ 1 6 a + 6 3 = 4 3 1