How do I convert a simple weighted graph to a hypergraph? - graph

I have found a partitioning algorithm that works on hypergraphs and its name is hMETIS, but my input is in the form of a simple weighted graph. Is there any technique that maps a graph to a hypergraph?

In general: No.
A graph contains information on binary interactions between two vertices, and there is no way to extract the information about the higher order interactions.
In short, if I give you a hypergraph I can use (multiple methods) to turn it into a graph, but that graph could be the result of multiple hypergraphs.
There are a few exceptions to this, notably if you have more information about the vertices outside of the graph, or if the graph is bipartite.

Related

What is the most efficient way to represent an directed dynamic massive 3D graph?

I know that there are many techniques to represent graphs.
Suppose I have a directed massive 3D graph with 100,000 nodes at maximum.
Suppose the graph looks somewhat like the following:
Suppose each node of the graph has three pieces of information:
A 30-character string as a label
floating point values as coordinates
three integer values
The graph is dynamic. I.e., connections frequently change, and the nodes frequently change their coordinates.
What would be the most efficient way to represent this graph in computer memory so that I can apply mathematical operations on each node?
Should I use data structures, or should I use big-data analytics or ML?

Similarity of Graphs in a Forest

I have a set of disconnected graphs, each one represented by a set of triples (head, edge, tail).
Given a new graph, I want to find which graph in the forest is structurally most similar to the new graph.
I am able to create feature vectors representing individual nodes and edges for each graph, but I dont understand how to represent and use them for the purpose of finding similarity.

graph similarity having multiple edges between two nodes

There are many theories about calculating of graph similarity such as vertex edge overlap, jacard, co-sine, edit distance, signature similarity, lambda distance, deltacon so on. These things are based on single edge of the graph. But there are many graphs having multiple edges in real world.
Given similar two graphs like above, how could we calculate graph similarity?
Using previous graph similarity, there are only 2-dimension vector and the entry is just scalar that is number, but in multiple edge's graph, the entry should be tuple. Because there are one more actions between nodes. For the previous method, it could be called who-knows-whom schem, but latter graph, it could be said who-knows-whom*-how*. I think the previous mothods could be used for the multiple edge's graph easily, so there aren't logic or methods about it.
Thanks in advance!
There is not "the" way yo compute graph similarity.
Depending on your data and problem, very different approaches may be good. In many cases, simply merging the two edges into one makes perfect sense. For example, if I have two roads of capacity x and y to go from A to B - for many analyses this is comparable to having just one rode, with the combined capacity.

Graph distances as a dist object

I have a graph with undirected weighted links, and I want to process the graph distance between all of its pairs of nodes. Because it is a large graph, I would like to get the result as a dist object (by opposition to a full, symmetric, matrix).
Is there a way to do that with igraph? According to the documentation, it doesn't seem so, but I may be missing something. Obviously, I don't want to get the full symmetric matrix and convert it using as.dist().
Is there any alternative R library allowing to get this result?
Thanks.

R: Adding vertex attributes to a network (using statnet)

I'm currently doing a Network Analysis in R, using the Statnet package (http://statnet.csde.washington.edu/)
So far I have been able to:
1) Construct Social Networks using the network() function. The information I had was originally contained in a incidence matrix form (one row per project, project members in the columns), which I transformed to adjency (socio-matrix) form before building the networks in R.
2) Plot the networks and compute general statistics (both for the overall network and for network vertexes)
3) Add external vertex attributes to the networks
4) Plot the networks with vertexes in different colors according to their attributes.
Right now I would like to complement my analysis by adding edge attributes to the network (to differentiate relationships, for example different kinds of projects).
I know I can use the set.edge.attribute() function, and that I need to input a vector of the same size as the total of edges that exist in the network. However, I don't know exactly how to sort this vector of edge attributes, in order for the function to assign them correctly to the corresponding edges.
Anybody knows how the network() function sorts edges internally? Any ideas on how to sort my vector of edge attributes in order to get a appropriate matching?
Thanks in advance for your help!
The network() function can create networks from various types of inputs (such as an edgelist or an adjacency matrix) so it would help if you gave a bit more of a code example explaining how you are creating the network and the format of the structure your edge attribute data are in.
I believe that in general network() will create the edges in the same order as the input edgelist. So if your edge attribute vector is in the same order as your original data, you should be able to use set.edge.attribute() safely. If your edge attributes are in a matrix form, you can use set.edge.value().

Resources