Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So let's call the persons B C F M S.</p> <p>Basically everyone can live anywhere, so we have this starting situation:</p> <pre><code>[BCFMS] [BCFMS] [BCFMS] [BCFMS] [BCFMS] </code></pre> <p>Now you do say</p> <blockquote> <p>Baker does not live on the top floor.</p> </blockquote> <p>So We'll have</p> <pre><code>[BCFMS] [BCFMS] [BCFMS] [BCFMS] [CFMS] </code></pre> <blockquote> <p>Cooper does not live on the bottom floor.</p> </blockquote> <p>So we end up with:</p> <pre><code>[BFMS] [BCFMS] [BCFMS] [BCFMS] [CFMS] </code></pre> <blockquote> <p>Fletcher does not live on either the top or the bottom floor.</p> </blockquote> <p>Ookay:</p> <pre><code>[BMS] [BCFMS] [BCFMS] [BCFMS] [CMS] </code></pre> <blockquote> <p>Miller lives on a higher floor than does Cooper.</p> </blockquote> <p>Ok, so M cannot be on a lower position than C:</p> <pre><code>[BS] [BCFS] [BCFMS] [BCFMS] [CMS] </code></pre> <p>And also, C cannot be on the last floor, because M must be above him:</p> <pre><code>[BS] [BCFS] [BCFMS] [BCFMS] [MS] </code></pre> <blockquote> <p>(A): Smith does not live on a floor adjacent to Fletcher’s.</p> <p>(B): Fletcher does not live on a floor adjacent to Cooper’s. </p> </blockquote> <p>So there's no S-F, F-S, F-C or C-F on adjacent "boxes" (floors).</p> <p>And we also know that</p> <blockquote> <p>(C): live on different floors of an apartment house</p> </blockquote> <p>Conforming to (C), we have two possible situations, the first floor being B's or S's</p> <p>Let's take the second case (because we know (A) about him)</p> <pre><code>[S] [BCFS] [BCFMS] [BCFMS] [MS] </code></pre> <p>According to (A):</p> <pre><code>[S] [BC] [BCF] [BCF] [M] </code></pre> <p>So we also know that M lives above C (the previous step is true already, as we know M for sure being on the last floor by now):</p> <pre><code>[S] [BC] [BCF] [BCF] [M] </code></pre> <p>According to (B), neither F nor C can be on the 3rd floor, and under the influence of (C), we ultimately get the only one possible permutation because of further reductions (only one person per floor):</p> <pre><code>[S] [C] [B] [F] [M] </code></pre> <p>So here is the solution:</p> <p><strong>Smith, Cooper, Baker, Fletcher, Miller</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload