All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic > Liars and Knights
Lies, truth, and logic (Posted on 2017-02-09) Difficulty: 3 of 5
A,B,C,D & E- 5 persons of different ages - share the same birthday date.
Overheard at their joint birthday party:

A said to B: I'm nine years older than E
A said to B: Your age is exactly 70% greater than mine.
B said to C: E is younger than you.
C said to D: The difference between our ages is six years.
C said to A: I'm ten years older than you.
C said to A: B is younger than D.
B said to C: "The difference between your age and D is the same as the difference between D and E.
They were not always telling the truth.
Whenever one of them spoke to someone older, everything they said was true,- but when speaking to someone younger, everything they said was false.

and their ages were:

No Solution Yet Submitted by Ady TZIDON    
Rating: 1.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Lots of solutions even between 20 and 40 | Comment 1 of 2
In order of A, B, C, D, E:

25 24 26 23 20
26 25 28 24 20
26 25 27 24 21
27 25 28 24 20
27 26 28 24 20
27 26 30 25 20
27 26 29 25 21
27 26 28 25 22
28 26 30 25 20
28 26 29 25 21
28 27 30 25 20
28 27 29 25 21
28 27 31 26 21
28 27 30 26 22
28 27 29 26 23
29 27 31 26 21
29 27 30 26 22
29 28 31 26 21
29 28 30 26 22
29 28 32 27 22
29 28 31 27 23
29 28 30 27 24
30 28 34 27 20
30 28 32 27 22
30 28 31 27 23
30 29 34 27 20
30 29 36 28 20
30 29 32 27 22
30 29 31 27 23
30 29 33 28 23
30 29 32 28 24
30 29 31 28 25
31 28 34 27 20
31 29 34 27 20
31 29 36 28 20
31 29 35 28 21
31 29 33 28 23
31 29 32 28 24
31 30 34 27 20
31 30 36 28 20
31 30 38 29 20
31 30 35 28 21
31 30 37 29 21
31 30 33 28 23
31 30 32 28 24
31 30 34 29 24
31 30 33 29 25
31 30 32 29 26
32 28 34 27 20
32 29 34 27 20
32 29 36 28 20
32 29 35 28 21
32 30 34 27 20
32 30 36 28 20
32 30 38 29 20
32 30 35 28 21
32 30 37 29 21
32 30 36 29 22
32 30 34 29 24
32 30 33 29 25
32 31 34 27 20
32 31 36 28 20
32 31 38 29 20
32 31 40 30 20
32 31 35 28 21
32 31 37 29 21
32 31 39 30 21
32 31 36 29 22
32 31 38 30 22
32 31 34 29 24
32 31 33 29 25
32 31 35 30 25
32 31 34 30 26
32 31 33 30 27
33 28 34 27 20
33 29 34 27 20
33 29 36 28 20
33 29 35 28 21
33 30 34 27 20
33 30 36 28 20
33 30 38 29 20
33 30 35 28 21
33 30 37 29 21
33 30 36 29 22
33 31 34 27 20
33 31 36 28 20
33 31 38 29 20
33 31 40 30 20
33 31 35 28 21
33 31 37 29 21
33 31 39 30 21
33 31 36 29 22
33 31 38 30 22
33 31 37 30 23
33 31 35 30 25
33 31 34 30 26
33 32 34 27 20
33 32 36 28 20
33 32 38 29 20
33 32 40 30 20
33 32 35 28 21
33 32 37 29 21
33 32 39 30 21
33 32 36 29 22
33 32 38 30 22
33 32 40 31 22
33 32 37 30 23
33 32 39 31 23
33 32 35 30 25
33 32 34 30 26
33 32 36 31 26
33 32 35 31 27
33 32 34 31 28
34 29 36 28 20
34 29 35 28 21
34 30 36 28 20
34 30 38 29 20
34 30 35 28 21
34 30 37 29 21
34 30 36 29 22
34 31 36 28 20
34 31 38 29 20
34 31 40 30 20
34 31 35 28 21
34 31 37 29 21
34 31 39 30 21
34 31 36 29 22
34 31 38 30 22
34 31 37 30 23
34 32 36 28 20
34 32 38 29 20
34 32 40 30 20
34 32 35 28 21
34 32 37 29 21
34 32 39 30 21
34 32 36 29 22
34 32 38 30 22
34 32 40 31 22
34 32 37 30 23
34 32 39 31 23
34 32 38 31 24
34 32 36 31 26
34 32 35 31 27
34 33 36 28 20
34 33 38 29 20
34 33 40 30 20
34 33 35 28 21
34 33 37 29 21
34 33 39 30 21
34 33 36 29 22
34 33 38 30 22
34 33 40 31 22
34 33 37 30 23
34 33 39 31 23
34 33 38 31 24
34 33 40 32 24
34 33 36 31 26
34 33 35 31 27
34 33 37 32 27
34 33 36 32 28
34 33 35 32 29
35 29 36 28 20
35 30 36 28 20
35 30 38 29 20
35 30 37 29 21
35 30 36 29 22
35 31 36 28 20
35 31 38 29 20
35 31 40 30 20
35 31 37 29 21
35 31 39 30 21
35 31 36 29 22
35 31 38 30 22
35 31 37 30 23
35 32 36 28 20
35 32 38 29 20
35 32 40 30 20
35 32 37 29 21
35 32 39 30 21
35 32 36 29 22
35 32 38 30 22
35 32 40 31 22
35 32 37 30 23
35 32 39 31 23
35 32 38 31 24
35 33 36 28 20
35 33 38 29 20
35 33 40 30 20
35 33 37 29 21
35 33 39 30 21
35 33 36 29 22
35 33 38 30 22
35 33 40 31 22
35 33 37 30 23
35 33 39 31 23
35 33 38 31 24
35 33 40 32 24
35 33 39 32 25
35 33 37 32 27
35 33 36 32 28
35 34 36 28 20
35 34 38 29 20
35 34 40 30 20
35 34 37 29 21
35 34 39 30 21
35 34 36 29 22
35 34 38 30 22
35 34 40 31 22
35 34 37 30 23
35 34 39 31 23
35 34 38 31 24
35 34 40 32 24
35 34 39 32 25
35 34 37 32 27
35 34 36 32 28
35 34 38 33 28
35 34 37 33 29
35 34 36 33 30
36 30 38 29 20
36 30 37 29 21
36 31 38 29 20
36 31 40 30 20
36 31 37 29 21
36 31 39 30 21
36 31 38 30 22
36 31 37 30 23
36 32 38 29 20
36 32 40 30 20
36 32 37 29 21
36 32 39 30 21
36 32 38 30 22
36 32 40 31 22
36 32 37 30 23
36 32 39 31 23
36 32 38 31 24
36 33 38 29 20
36 33 40 30 20
36 33 37 29 21
36 33 39 30 21
36 33 38 30 22
36 33 40 31 22
36 33 37 30 23
36 33 39 31 23
36 33 38 31 24
36 33 40 32 24
36 33 39 32 25
36 34 38 29 20
36 34 40 30 20
36 34 37 29 21
36 34 39 30 21
36 34 38 30 22
36 34 40 31 22
36 34 37 30 23
36 34 39 31 23
36 34 38 31 24
36 34 40 32 24
36 34 39 32 25
36 34 40 33 26
36 34 38 33 28
36 34 37 33 29
36 35 38 29 20
36 35 40 30 20
36 35 37 29 21
36 35 39 30 21
36 35 38 30 22
36 35 40 31 22
36 35 37 30 23
36 35 39 31 23
36 35 38 31 24
36 35 40 32 24
36 35 39 32 25
36 35 40 33 26
36 35 38 33 28
36 35 37 33 29
36 35 39 34 29
36 35 38 34 30
36 35 37 34 31
37 30 38 29 20
37 31 38 29 20
37 31 40 30 20
37 31 39 30 21
37 31 38 30 22
37 32 38 29 20
37 32 40 30 20
37 32 39 30 21
37 32 38 30 22
37 32 40 31 22
37 32 39 31 23
37 32 38 31 24
37 33 38 29 20
37 33 40 30 20
37 33 39 30 21
37 33 38 30 22
37 33 40 31 22
37 33 39 31 23
37 33 38 31 24
37 33 40 32 24
37 33 39 32 25
37 34 38 29 20
37 34 40 30 20
37 34 39 30 21
37 34 38 30 22
37 34 40 31 22
37 34 39 31 23
37 34 38 31 24
37 34 40 32 24
37 34 39 32 25
37 34 40 33 26
37 35 38 29 20
37 35 40 30 20
37 35 39 30 21
37 35 38 30 22
37 35 40 31 22
37 35 39 31 23
37 35 38 31 24
37 35 40 32 24
37 35 39 32 25
37 35 40 33 26
37 35 39 34 29
37 35 38 34 30
37 36 38 29 20
37 36 40 30 20
37 36 39 30 21
37 36 38 30 22
37 36 40 31 22
37 36 39 31 23
37 36 38 31 24
37 36 40 32 24
37 36 39 32 25
37 36 40 33 26
37 36 39 34 29
37 36 38 34 30
37 36 40 35 30
37 36 39 35 31
37 36 38 35 32
38 31 40 30 20
38 31 39 30 21
38 32 40 30 20
38 32 39 30 21
38 32 40 31 22
38 32 39 31 23
38 33 40 30 20
38 33 39 30 21
38 33 40 31 22
38 33 39 31 23
38 33 40 32 24
38 33 39 32 25
38 34 40 30 20
38 34 39 30 21
38 34 40 31 22
38 34 39 31 23
38 34 40 32 24
38 34 39 32 25
38 34 40 33 26
38 35 40 30 20
38 35 39 30 21
38 35 40 31 22
38 35 39 31 23
38 35 40 32 24
38 35 39 32 25
38 35 40 33 26
38 36 40 30 20
38 36 39 30 21
38 36 40 31 22
38 36 39 31 23
38 36 40 32 24
38 36 39 32 25
38 36 40 33 26
38 36 40 35 30
38 36 39 35 31
38 37 40 30 20
38 37 39 30 21
38 37 40 31 22
38 37 39 31 23
38 37 40 32 24
38 37 39 32 25
38 37 40 33 26
38 37 40 35 30
38 37 39 35 31
38 37 40 36 32
38 37 39 36 33
39 31 40 30 20
39 32 40 30 20
39 32 40 31 22
39 33 40 30 20
39 33 40 31 22
39 33 40 32 24
39 34 40 30 20
39 34 40 31 22
39 34 40 32 24
39 34 40 33 26
39 35 40 30 20
39 35 40 31 22
39 35 40 32 24
39 35 40 33 26
39 36 40 30 20
39 36 40 31 22
39 36 40 32 24
39 36 40 33 26
39 37 40 30 20
39 37 40 31 22
39 37 40 32 24
39 37 40 33 26
39 37 40 36 32
39 38 40 30 20
39 38 40 31 22
39 38 40 32 24
39 38 40 33 26
39 38 40 36 32
39 38 40 37 34

DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 
 For a = 20 To 40
 For b = 20 To 40
  If b = a Then GoTo Nextb
  DoEvents
   If a < b And b * 10 <> a * 17 Or a > b And b * 10 = a * 17 Then GoTo Nextb
 For e = 20 To 40
  If e = a Or e = b Then GoTo Nexte
  DoEvents
   If a < b And a <> e + 9 Then GoTo Nexte
   If a > b And a = e + 9 Then GoTo Nexte
 For c = 20 To 40
  If c = a Or c = b Or c = a Then GoTo Nextc
  DoEvents
   If b < c And e >= c Then GoTo Nextc
   If b > c And e < c Then GoTo Nextc
   If c < a And c <> a + 10 Then GoTo Nextc
   If c > a And c = a + 10 Then GoTo Nextc
 For d = 20 To 40
  If d = a Or d = b Or d = e Or d = c Then GoTo Nextd
  DoEvents
   If c < d And Abs(c - d) <> 6 Then GoTo Nextd
   If c > d And Abs(c - d) = 6 Then GoTo Nextd
   If c < a And b >= d Then GoTo Nextd
   If c > a And b < d Then GoTo Nextd
   If b < c And Abs(c - d) <> Abs(d - e) Then GoTo Nextd
   If b > c And Abs(c - d) = Abs(d - e) Then GoTo Nextd
   
   
   Text1.Text = Text1.Text & a & Str(b) & Str(c) & Str(d) & Str(e) & crlf
   
   
Nextd:
 Next d
Nextc:
 Next c
Nexte:
 Next e
Nextb:
 Next b
Nexta:
 Next a
 
 
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub


  Posted by Charlie on 2017-02-09 21:31:10
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (10)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information