Graph distances as a dist object - r

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.

Related

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

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.

algorithm for 'generalized' matching in complete graphs

My problem is a generalization of a task solved by [Blossom algorithm] by Edmonds. The original task is the following: given a complete graph with weighted undirected edges, find a set of edges such that
1) every vertex of the graph is adjacent to only one edge from this set (i.e. vertices are grouped into pairs)
2) sum over weights of edges in this set is minimal.
Now, I would like to modify the first goal into
1') vertices are grouped into sets of 3 vertices (or in general, d vertices), and leave condition 2) unchanged.
My questions:
Do you know if this 'generalised' problem has a name?
Do you know about an algorithm solving it in number of steps being polynomial of number of vertices (like Blossom algorithm for an original problem)? I don't see a straightforward generalisation of Blossom algorithm, as it is based on looking for augmenting paths on a graph compressed to a bipartite graph (and uses here Hungarian algorithm). But augmenting paths do not seem to point to groups of vertices different than pairs.
Best regards,
Paweł

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.

How to compute the propinquity of a graph in R?

I would like to test if the geographical location of my vertices (ie I have a matrix giving the distance between each pair of actors of my network) has an influence on the presence/absence of edges. If I have correctly understood, this feature is called propinquity....
In other words, I would like to know if two vertices are more likely (or less likely) to be connected if their distance is small.
Do you have any idea of how to do that in R? I usually use igraph but if another library does that I will use it of course :-).

find coordinates of vertices of an undirected, unweighted graph

Suppose I have an undirected, unweighted graph, with 'N'(say) vertices. I'm trying to find the co-ordinates of the vertices of the graph.
I don't seem to understand, how can we get the coordinates of the graph, without any function being provided. Is there any standard method we adapt to get the co-ordinates of the graph?
I need these co-ordinates because I want to use them as input parameters(by collecting them and placing in a file and supplying this file as argument) to fd3 program, to calculate the fractal dimension of a network(given coordinates of graph).
I would use the Cluster Growing Method to get the fractal dimension of the system, as opposed to trying to use a box-counting algorithm. It is much better suited to the task when the vertices are not associated with physical space.

Resources