A term for a binary matrix that represents paths in a tree

60 Views Asked by At

Is there a term for a 0-1 matrix whose rows correspond to the paths from root to leaf in a tree?

An example of such a matrix is:

1 1 0 0 0 0
1 0 1 1 0 0
1 0 1 0 1 1

It corresponds to the tree:

1 
|-- 2
|-- 3 
    |--4
    |--5
       |--6

There is a root (1) and three leaves (2, 4, 6) and each row in the matrix corresponds to a path from the root to one of these leaves.

1

There are 1 best solutions below

1
On

Such matrix is called the ancestor matrix of a binary tree.