People having different ages residing on different floors of a building

Here is the riddle:

Eight people, 'A', 'B', 'C', 'D', 'E', 'F', 'G', and 'H' live in an eight–story building. The lowest floor is numbered '1' and the topmost floor is numbered '8'. The peoples' ages are $$20$$, $$24$$, $$26$$, $$27$$, $$29$$, $$31$$, $$34$$, and $$38$$, but not necessarily in the same order.

• F lives three floors above the one who is $$27$$ years old.
• C lives just above F.
• The difference of age between A and C is the same as the difference between D and H.
• The one who is $$34$$ years old is living on the top floor.
• Only two people are older than F.
• B is $$26$$ years old.
• H is older than to F.
• The number of floors above D is the same as the number below E.
• C lives on an odd numbered floor.
• B lives just above the one who is $$24$$ years old.
• D is 5 years elder to G.
• One person lives between G and the one who is 24 years old.
• The difference of age between A and B is at least $$3$$ years.
• The number of floors between G and C is the same as A and E.

Is the solution to the above problem:

D 34

G 29

B 26

C 24

F 31

A 20

H 38

E 27

Source: Q 6-10

Yes, and you don't need all the clues to deduce it

Reasoning

B is 26 years old.
Only two persons are elder to F. $$\Rightarrow$$ F is 31.
D is 5 years elder to G $$\Rightarrow$$ D is 29 or 34 and G is 24 or 29, respectively.
One person lives between G and the one who is 24 years old $$\Rightarrow$$ G must now be 29 and D is 34.
H is elder to F $$\Rightarrow$$ H must be 38
The difference of age between A and C is same as difference between D and H. $$\Rightarrow$$ A and C differ by 4 years (hence 20 and 24 in some order) $$\Rightarrow$$ E is 27 since it is the only age left.
Difference of age between A and B is at least 3 years. $$\Rightarrow$$ A must be 20 $$\Rightarrow$$ C must be 24.

The ages of all the occupants have been deduced at this point

The one who is 34 years old is living on top floor. $$\Rightarrow$$ D lives on the top floor.
The number of floors above D is same as below E $$\Rightarrow$$ E lives on the bottom floor.
F lives three floors above the one who is 27 years old. $$\Rightarrow$$ F lives on floor 4.
C lives just above F. $$\Rightarrow$$ C lives on floor 5
B lives just above the one who is 24 years old. $$\Rightarrow$$ B lives on floor 6.
One person lives between G and the one who is 24 years old. $$\Rightarrow$$ G is 2 floors away from C (either floor 3 or 7).
The number of floors between G and C is same as A and E. $$\Rightarrow$$ A lives on floor 3 $$\Rightarrow$$ G lives on floor 7 $$\Rightarrow$$ H lives on floor 2 since it is the only one left

Hence, we've deduced all the ages and floors.

Unused (superfluous) clue

C lives on an odd numbered floor.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 30, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6088922023773193, "perplexity": 1020.006787262185}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-18/segments/1555578721441.77/warc/CC-MAIN-20190425114058-20190425140058-00336.warc.gz"}