summaryrefslogtreecommitdiff
path: root/prolog/problems/family_relations/connected_3/en.py
blob: 8fe1eed565e6f702cfeb93a9856f79ec6a96ec4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
id = 102
name = 'connected/3'
slug = 'check if two people are connected in the family tree'

description = '''\
<p><code>connected(X, Y, N)</code>: <code>X</code> and <code>Y</code> are connected with a series of (no more than <code>N</code>) parent/child relations.</p>
<pre>
  ?- connected(ana, morty, 10).
    false.
  ?- connected(ana, margaret, 10).
    true.
</pre>'''

hint = {}