A bipartite graph (aka bigraph) is a graph whose vertices can be divided into two disjoint sets such that vertices from one set only connect to the vertices from the other set and not each other. Applications where they arise include resource planning and coding theory.
Questions tagged [bipartite]
378 questions
3
votes
1 answer
NetworkX bipartite color mixes up order
I have created a bipartite graph using NetworkX and would like to colour the two sets separately. I use the color() function from networkX bipartite module. However, the order of the nodes is different in the color dict than in the B.nodes, for…

monadoboi
- 1,651
- 3
- 16
- 26
3
votes
2 answers
Complete bipartite graph from objects in nested NSArray
I'm looking to write a method that takes an arbitrary number of NSArray objects, and returns a nested array of all possible complete combinations of the members of that array.
As I've been told in answer to this question, I'm looking to create a…

Chris Ladd
- 2,795
- 1
- 29
- 22
3
votes
1 answer
Weighted Bipartite Matching covering one partition
I have a problem here, that I managed to reduce to a weighted bipartite match problem. Basically, I have a bipartite graph with partitions A and B, and a set of edges with weights. In my case, |A|~=20 and |B| =300.
I want to find a set of edges…

name
- 71
- 4
3
votes
1 answer
Bipartite graph projection error (igraph, RStudio)
I am using rstudio version 0.99.879 and the package igraph version 1.0.1. My question is closely related to this one on the same problem: igraph package in RStudio: Bipartite graph projection error However, my question is more related to the data…

Stefan_W
- 163
- 3
- 12
3
votes
2 answers
How to find maximal subgraph of bipartite graph with valence constraint?
I have a bipartite graph. I'll refer to red-nodes and black-nodes of the respective disjoint sets.
I would like to know how to find a connected induced subgraph that maximizes the number of red-nodes while ensuring that all black nodes in the…

Alec Jacobson
- 6,032
- 5
- 51
- 88
3
votes
1 answer
R igraph Bipartite Graph, why are my weights not showing?
I am using R and the package igraph to create a bipartite graph based on an incidence matrix, but my weights are not showing? I’ve added an example of what I’m trying to do below. I’ve set weighted=TRUE, and would expect the edges to have different…

MatAff
- 1,250
- 14
- 26
3
votes
0 answers
bipartite graph in networkx said it is not bipartite
I am constructing a bipartite graph from a list of files with networkx:
https://networkx.github.io/documentation/networkx-1.10/reference/algorithms.bipartite.html?highlight=bipartite
for i, f in enumerate(glob.glob("*.json")):
with open( f ,…

user305883
- 1,635
- 2
- 24
- 48
3
votes
2 answers
Find unknown permutation from string pairs
Say I have a bunch of string pairs, representing "before" and "after" values. To give a simple example:
aaaabbbb -> aabbbbaa
abbbbbbb -> bbbbbbab
aaabbbaa -> abbbaaaa
cccccccc -> cccccccc
How would I determine that one possible permutation…

Derek Ross
- 75
- 5
3
votes
1 answer
How to work with multipartite graphs in NetworkX or igraph?
I'm working with mutipartite networks, specifically in this case with a quadripartite one. First of all, in NetworkX it seems that only is possible to work with complete multipartite networks trough nx.complete_multipartite_graph(), and not with…

Jorge
- 83
- 10
3
votes
0 answers
How to list all possible maximal bipartite matchings in R?
I have an incidence matrix:
Q = matrix(c(0,1,1,1,0,1,1,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0), nrow = 5, ncol=5)
rownames(Q) = c(64,32,47,42,58)
colnames(Q) = c(49,64,88,31,13)
I would like to list all possible max bipartite matchings.
Using…

ig272
- 31
- 1
3
votes
1 answer
Maximum weights bipartite matching with weighted vertices
I have a bipartite graph with two sets of vertices A and B. Edges have no weights. However, vertices in one of the sets(say set B) have positive weights assigned to them (wb1,wb2...)
I want to find a matching in this bipartite graph so as to…

newguy
- 31
- 1
3
votes
1 answer
An extension of bipartite graph maximum matching
Assume that there are two graphs like this:
We aim to find the matching correspondences between the two graph.And now we use a method to calculate the similarity of two nodes between the two graphs.
w(A,1) means the similarity of the node A from…

GaoYu
- 31
- 3
3
votes
1 answer
Weighted Bimodal Bipartite Graph Projection conserving original weights
I have a large ( 36k vertices, 50k edges ) weighted bimodal bipartite graph and I would like to generate a projection that not only count the neighbors like the default weighted implementation but also sum the weights on the edges. You can think of…

Oeufcoque Penteano
- 593
- 5
- 25
3
votes
1 answer
Random Walk on Bipartite Graph with Gremlin
I would like to rank items according to a given users preference (items liked by the user) based on a random walk on a directed bipartite graph using gremlin in groovy.
The graph has the following basic structure:
[User1] ---'likes'---> [ItemA]…

Faber
- 1,504
- 2
- 13
- 21
3
votes
1 answer
Connected components of bipartite graphs in matlab
I have two types of data, X and Y. Every x in X is associated with some number of Ys, and every y in Y may or may not be associated with some number of Xs.
Xs don't associate with other Xs and Ys don't associate with other Ys. So the situation looks…

rhombidodecahedron
- 7,693
- 11
- 58
- 91