1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# coding=utf-8 id = 102 number = 9 visible = True facts = 'family_relations' solution = '''\ connected(X, X, _). connected(X, Y, N) :- N > 0, N1 is N - 1, ( parent(X, Z) ; parent(Z, X) ), connected(Z, Y, N1). '''