Algorithms to calculate family relationships.