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

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