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

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