Minimum single edge weight to navigate through all nodes of a graph - graph

Given an undirected graph with weighted edges you are asked to find the minimum single edge weight to connect all nodes.
enter image description here
Given this graph the answer would be 3, as you can travel through all edges without using an edge with more than 3 weight.
What is an efficient way to solve this?

Related

Graph traversal with a minimum number of "steps" (steps based on edge parameters)

There is a bidirectional graph. The graph edges have parameters (let it be a color). A step is a transition from one vertex to another. If at a certain moment the already visited vertices have unvisited edges with the same parameters, then in 1 step it is possible to go through all the edges with the same parameters. Edges can have multiple parameters.
I need to find a traversal algorithm to visit all the vertices with a minimum number of "steps".
Example graph (1 and 2 are starting (visited) vertices):
graph example
Expected result: 6, 3 and 5, 4 and 7 (3 steps)
I want to iterate over all graph traversal options to find the best. But maybe there is any better algorithm for this task? If not, what is the best way to find all traversal options?

Assigning edge weights of a graph to nodes

I have got a graph network and the edges of the graph are weighted. Is there a way to distribute the edge weights to nodes?
I'd like to know if there is a way to derive node weight or edge weight from each other.
I noticed a similar post here, which is the inverse of my problem. I am not sure if there is a similar approach that can be used for my problem.
EDIT:
For instance, for a graph like this (created from the commands given here) and each edge has a weight associated with it.
Example: Nodes i and j are linked by edge $e_{ij}$ that has weight $w_{ij}$
If the node weights are denoted by $nw_i$ (i = 1 to Number of nodes), the weight of any two nodes should sum up to the weight of the edge that links those nodes. i.e. $nw_i$ + $nw_j$ should be equal to $w_{ij}$,
$nw_j$ + $nw_k$ should be equal to $w_{jk}$ and so on.

Why Gephi hides most of edges on graph?

I have a csv file with graph formatted as edge list, ie Source, Target, Label, Type (Directed), Weight (all weights = 1)
It consist of 31900 edges as i checked in Data laboratory.
Then i go to view my graph and in the Context (right top corner of Gephi) i see:
Nodes: 1869
Edges: 3160
Why number of edges is not 31900, why it's 10 times smaller??
My guess Gephi somehow reduce this number, because if i compute Average weighted degree it shows 17, so if i multiply 1869 * 17,01 = 31959 - exactly the number of edges.
So where that edges on graph?
Edge is a connection of nodes, so edges are equal(same) when its source and target is same. Though your data consist of 31900 edges, maybe there're many identical edge, I guess.
To validate this hypothesis, you can calculate the weight and you would see the edge now won't be 1 anymore. And the sum of the edge's weight are still 31900.

Representing a graph where nodes are also weights

Consider a graph that has weights on each of its nodes instead of between two nodes. Therefore the cost of traveling to a node would be the weight of that node.
1- How can we represent this graph?
2- Is there a minimum spanning path algorithm for this type of graph (or could we modify an existing algorithm)?
For example, consider a matrix. What path, when traveling from a certain number to another, would produce a minimum sum? (Keep in mind the graph must be directed)
if one don't want to adjust existing algorithms and use edge oriented approaches, one could transform node weights to edge weights. For every incoming edge of node v, one would save the weight of v to the edge. Thats the representation.
well, with the approach of 1. this is now easy to do with well known algorithms like MST.
You could also represent the graph as wished and hold the weight at the node. The algorithm simply didn't use Weight w = edge.weight(); it would use Weight w = edge.target().weight()
simply done. no big adjustments are necessary.
if you have to use adjacency matrix, you need a second array with node weights and in adjacency matrix are just 0 - for no edge or 1 - for an edge.
hope that helped

Sequence of number of vertices in a graph

I want to generate a sequence of the number of vertices in all graphs which each edge has the same number of leaving edges. I dont have to generate the whole sequence. Let's say the first 50 if exists.
I want:
Input: the number of edges leaving each vertex
Output: a sequence of the number of vertices
So far, I have looked at complete graphs. Complete graphs with n vertices always have n-1 edges leaving each vertex. But there are other kinds of graphs that have this property. For example, some polyhedrons, such as snub dodecahedron and truncated icosidodecahedron have this property.
How should I approach my problem?
I think you mean regular graphs:
http://en.wikipedia.org/wiki/Regular_graph
http://mathworld.wolfram.com/RegularGraph.html
I made a regular graph generator which isn't flawless by the way:
once you generate the nodes, say from 1 to n. You want regularity r.
For node 1, make connections to the following nodes until you reach degree r for node 1.
For node 2 you already have degree 1 (because of node 1), you connect again to further nodes until you reach degree r for node 2 too. And this way till the last node.
The flaw is that you can't define an r-regular graph for any number of nodes. The algorithm mentioned doesn't detect that, so some errors may occur. Also, this isn't a random r-regular graph generator, but instead give one possible solution.
I'm not much of an explainer, so please ask if the description lacks somewhere.

Resources