Riddle#1:
There are five houses. We'll assume they're all in a row, and are numbered from left to right. We know the Norwegian is in the, first house:
House #1 #2 #3 #4 #5
Color ? ? ? ? ?
Natl Norweg ? ? ? ?
Bvrg ? ? ? ? ?
Smokes ? ? ? ? ?
Pet ? ? ? ? ?
Since the Brit lives in the red house, the Norwegian can't. We also know the Norwegian lives next to the blue house, so his house isn't blue. We also know that the green house is to the left of the white house; the Norwegian can't live in the white house since there is no house to the left, and can't live in the green house because his only neighbor, the one to the right, is known to live in the blue house. Therefore, the Norwegian lives in the yellow house.
We also know the owner of the yellow house smokes Dunhill, and that the Norwegian has a neighbor with a blue house (the Norwegian only has one neighbor, to the right.)
So here's what it looks like now:
House #1 #2 #3 #4 #5
Color Yellow Blue ? ? ?
Natl Norweg ? ? ? ?
Bevg ? ? ? ? ?
Smokes Dunhill ? ? ? ?
Pet ? ? ? ? ?
The man who keeps horses lives next to he man who smokes Dunhill; so the horse owner lives in the blue house. The center house's owner drinks milk, the green house's owner drinks coffee, and the green house is to the left of the white house. Since we know the left two houses are the yellow and blue houses, the only position for the green and white are green as the fourth and white as the fifth, since the middle (third) drinks milk and the owner of the green house drinks coffee. The middle house has to be red, and therefore is the Brit's. So now this is what we know:
House #1 #2 #3 #4 #5
Color Yellow Blue Red Green White
Natl Norweg ? Brit ? ?
Bevg ? ? Milk Coffee ?
Smokes Dunhill ? ? ? ?
Pet ? Horse ? ? ?
The owner who smokes BlueMaster drinks beer; since we know what houses #3 and #4 drink [and neither are beer] and we know what house #1 smokes [and its not BlueMaster], the only possibilities are houses #2 and #5. Keep this information in mind. Since it is evident house #1 cannot drink beer (only house #2 or #5 can), the only possible beverages for house #1 are water and tea, but since the Dane drinks tea, house #1 drinks water. The man who smokes Blends lives next to someone who drinks water; the only house next to #1 (the water-drinking house) is #2. The man who smokes Blends lives next to the one who has cats; so the cat-house is #1 or #3.
House #1 #2 #3 #4 #5
Color Yellow Blue Red Green White
Natl Norweg ? Brit ? ?
Bevg Water B/T? Milk Coffee B/T?
Smokes Dunhill Blends ? ? ?
Pet Cat? Horse Cat? ? ?
Since the Dane drinks tea, he must live in either house #2 or #5. The Swede and German could live in house #2, #4 or #5.
House #1 #2 #3 #4 #5
Color Yellow Blue Red Green White
Natl Norweg D/S/G? Brit S/G? D/S/G?
Bevg Water B/T? Milk Coffee B/T?
Smokes Dunhill Blends ? ? ?
Pet Cat? Horse Cat? ? ?
We know the beer-drinker smokes BlueMaster. The only houses that could drink beer are #2 and #5, but since we know that #2 smokes Blends, #5 must be the house which drinks beer and smokes BlueMaster, and #2 has to be the house that drinks tea and the house of the Dane. We can eliminate the possibility of the Dane's residence being house #5.
House #1 #2 #3 #4 #5
Color Yellow Blue Red Green White
Natl Norweg Dane Brit S/G? S/G?
Bevg Water Tea Milk Coffee Beer
Smokes Dunhill Blends ? ? BlueM
Pet Cat? Horse Cat? ? ?
We know the German smokes Prince. Therefore, he could not live at house #5 and therefore has to live at house #4. The Swede must live at house #5; we also know house #5 raises dogs since we know the Swede raises dogs, and that house #4 smokes Prince since the German smokes Prince.
House #1 #2 #3 #4 #5
Color Yellow Blue Red Green White
Natl Norweg Dane Brit German Swede
Bevg Water Tea Milk Coffee Beer
Smokes Dunhill Blends ? Prince BlueM
Pet Cat? Horse Cat? ? Dogs
The only possibility for house #3's smokes is Pall Mall; all of the others are taken. We know that whoever smokes Pall Mall raises birds; so house #3 raises birds, and house #1 therefore has cats, since the only houses which could have had cats were #1 and #3, and #3 has been eliminated.
This is the final answer:
House #1 #2 #3 #4 #5
Color Yellow Blue Red Green White
Natl Norweg Dane Brit German Swede
Bevg Water Tea Milk Coffee Beer
Smokes Dunhill Blends PallM Prince BlueM
Pet Cat Horse Birds ? Dogs
Riddle#2:
1+2+3+4+5+6+7+8+9=45, which is divisible by nine. (A divisibility rule for nine is that digit root is divisible by nine). So, we don't care what digit goes at the end!
Next, we can apply the divisibility by five rule. Every number that is divisible by five has to end in a zero or five. As we're not using zero, the fifth digit has to be five.
ABCD5FGHI
Next, we know that, at minimum, digits: B,D,F,H need to be even {2,4,6,8} as these need to be divisible by even numbers; this reduces down the solution set but we need more help. From the divisibility of three rule, A+B+C must be divisible by 3, as must D+5+F (all numbers divisible by six are also divisible by three).
Combing these, as we know D,F need to be from the set {2,4,6,8}, and that D+5+F needs to be divisible by three, out of all the combinations, only four are possible: 254 256 258 452 456 458 652 654 658 852 854 856.
Out of the four solutions: 258 456 654 852 we can eliminate two of these through application of the divisibility by four test (To be divisible by four, the last two digits must also be divisible by four). So, for ABCD to be divisible by four, then CD also needs to be divisible by four. As we need four even digits in positions B,D,F,H this means that A,C,E,G,I must be odd. For CD to be divisible by four, and with C being odd, then D cannot be 8 or 4. There are now just two possibilities: 258 456 654 852.
Let's investigate both of these:
ABC258GHI
Inserting one of the two remaining even digits in B,H {4,6}, then making sure A+B+C add up to multiple of three leads to just eight possible choices:
147258369
147258963
714258369
714258963
369258147
369258741
963258147
963258741
The divisibility test for eight is that the last three digits must be divisible by eight also. This rules out the arrangements ending -836, -814, and -874.
147258369
147258963
714258369
714258963
369258147
369258741
963258147
963258741
The remaining two fail the division test for seven digits. This path is a dead end with no solution.
147258369
147258963
714258369
714258963
369258147
369258741
963258147
963258741
ABC654GHI
The divisibility by eight test we used on the left (last three digits also divisible by eight), means than 4GH needs to be divisible by eight. H must be from the set {8,2}, but it can't be 8 as G is odd; in fact G has to be {3,7}.
With these constraints, there are eight potential solutions:
987654321
789654321
381654729
183654729
981654327
189654327
981654723
189654723
Manually applying the divisibility by seven test, only one solution survives.
987654321
789654321
381654729
183654729
981654327
189654327
981654723
189654723
The final answer is 381654729
Last edited by CHROMA360 on Fri Sep 21, 2018 4:52 pm; edited 2 times in total