%Facts %----- % for ancestor parent(mary, marc). parent(john, mary). parent(tom, john). % for graph algorithms g('a', 'b', 3). g('a', 'c', 2). g('b', 'd', 2). g('b', 'e', 3). g('c', 'd', 4). g('c', 'f', 3). g('d', 'f', 2). g('e', 'f', 1).