Suppose I have network with 4 nodes and 4 edges as shown below
All possible paths from source node 1 to destination node 4 are
{{A,C}, {A,B,D}}
From these possible paths, I want to create a zero-one matrix, where number of rows represents the number of paths and number of columns represents the number of edges in a network. The matrix takes 1 as entry if the edge is present in the path to reach destination node, and 0 as its entry if it is not. For above network, path matrix is
[1 0 1 0; 1 1 0 1] This is because all possible paths are two and hence two rows, and there are 4 edges and hence 4 columns. I have a large complex network with 15 nodes and 107 paths to which I need to apply this technique. Please help.