summaryrefslogtreecommitdiff
path: root/prolog/problems/family_relations/descendant_2/common.py
blob: 408b3c72fbf6c8db509f925fac3a7bf78ad17cab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
id = 101
group = 'family_relations'
number = 8
visible = True
facts = 'family_relations'

solution = '''\
descendant(X, Y) :-
  parent(Y, X).
descendant(X, Y) :-
  parent(Y, Z),
  descendant(X, Z).
'''