blob: 932d4cfbe12d7cc3891f1510e0b553ac1d3b7342 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# coding=utf-8
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 = {}
|