I haven't got an answer for this, but trying to understand the question because it looks interesting, and hopefully will prompt some responses from the likes of @Ksharp et al. After a little digging on the web, the keyword for this question is probably bipartite network. Looks like the nodes are in two sets , and connections always go from one set to the other, never between nodes in the same set, A node in one set can be connected to between zero and all of the nodes in the other set. The question shows 5 nodes.with three nodes in one set and two nodes in the other set, and the question tells is how many other nodes each node is connected to. These can be expressed as a table, with a 1 representing a connection between two nodes. The nodes are all equivalent so the row order and column order doesn't matter. List 2 Node List 2 Node Row Total List 1 Node 1 1 2 List 1 Node 1 1 List 1 Node 1 1 Column Total 3 1 4 The three list one nodes are connected to 2,1,1 list two nodes respectively and these correspond to the row totals. The two list one nodes are connected to 3 and 1 list one respectively and these correspond to the column totals. The total number nodes list one is connected to = total number of nodes list 2 is connected to = 4. The table shown above is the only way to represent this configuration (given row and col order don't matter). This can be extended to any number of nodes in list1 and list 2 , and any configuration of connections has a unique representation. A fully connected 3 *2 network where every list one node is connected to every list two node would have 1's in each cell, 2's for each row total, 3's for each col total and 6 in total. I think any bipartite network can be represented by a matrix in this way It may be that the first step to solving this would be to work out which cells have a 1 based on the row and column total that the data in the question gives us. by solving equations like. eg for the rows ( L1N1,L2N1) + (L1N1,L2N2) =2 ( L1N2,L2N1) + (L1N2,L2N2) =1 ( L1N3,L2N1) + (L1N3,L2N2) =1 for the cols (L1N1,L2N1) + (L1N2,L2N1) +(L1N3,L2N1)=3 (L1N1,L2N2) + (L1N2,L2N2) +(L1N3,L2N2)=1 where (LxNy,LwNz) = 0 or 1 The question goes on to give the total number of connections that each node has, like a weighting. If we have already worked out which cells are populated List 2 Node List 2 Node Row Total List 1 Node ? ? 10 List 1 Node ? 5 List 1 Node ? 5 Column Total 15 5 20 This table ,if we work out numbers to replace the ?'s and give the nodes names (ID1-ID5), would be a representation of the OP's output with 20 observations. So then maybe the problem comes down to solving ( L1N1,L2N1) + (L1N1,L2N2) =10 ( L1N2,L2N1) + (L1N2,L2N2) =5 ( L1N3,L2N1) + (L1N3,L2N2) =5 for the cols (L1N1,L2N1) + (L1N2,L2N1) +(L1N3,L2N1)=15 (L1N1,L2N2) + (L1N2,L2N2) +(L1N3,L2N2)=5 where (LxNy,LwNz) may be 0 if there is no connection.
... View more