Number of compatible trees with an ancestry matrix
As hinted in the comments by @j_random_hacker, ancestry matrix, if valid, characterizes a unique rooted tree. A simple algorithm would be to create the tree from leaves to the root or vice versa.