Although this definition only covers the situation in which i ≥ j, it can be used to estimate any kinship coefficient because ϕij(X) = ϕji(X). The definition reflects the fact that males carry only one allele for X-linked genes, inherited from their mother. Females carry two alleles, one inherited from each parent. The functions mother(i) and father(i) return indexes for the parents of i.