summaryrefslogtreecommitdiff
path: root/prolog/problems/family_relations/descendant_2/common.py
blob: 53320b3b05a089d5e97ee6248e7548feedb6873d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# coding=utf-8

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).
'''