Skip to main content
Post Reopened by Yuval Filmus algorithms
Typo ^^'
Source Link

Given an acyclic undirected graph alike to this one : enter image description here

(Here the centers arecenter is the nodesnode '2' and '6', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

EDIT : Here I try to find the radius i.e. the vertices who minimizes the maximum distance to any vertex of the graph, not the diameter, which is not the same since the radius is not always the half of the diameter. I found almost notingnothing about this online

Given an acyclic undirected graph alike to this one : enter image description here

(Here the centers are the nodes '2' and '6', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

EDIT : Here I try to find the radius i.e. the vertices who minimizes the maximum distance to any vertex of the graph, not the diameter, which is not the same since the radius is not always the half of the diameter. I found almost noting about this online

Given an acyclic undirected graph alike to this one : enter image description here

(Here the center is the node '2', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

EDIT : Here I try to find the radius i.e. the vertices who minimizes the maximum distance to any vertex of the graph, not the diameter, which is not the same since the radius is not always the half of the diameter. I found almost nothing about this online

added 41 characters in body
Source Link

Given an acyclic undirected graph alike to this one : enter image description here

(Here the centers are the nodes '2' and '6', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

EDIT : Here I try to find the radius i.e. the vertices who minimizes the maximum distance to any vertex of the graph, not the diameter, which is not the same since the radius is not always the half of the diameter. I found almost noting about this online

Given an acyclic undirected graph alike to this one : enter image description here

(Here the centers are the nodes '2' and '6', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

EDIT : Here I try to find the radius i.e. the vertices who minimizes the maximum distance to any vertex of the graph, not the diameter, which is not the same since the radius is not always the half of the diameter

Given an acyclic undirected graph alike to this one : enter image description here

(Here the centers are the nodes '2' and '6', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

EDIT : Here I try to find the radius i.e. the vertices who minimizes the maximum distance to any vertex of the graph, not the diameter, which is not the same since the radius is not always the half of the diameter. I found almost noting about this online

Corrected the question because of duplicates
Source Link

Efficient Algorithm to computercompute radius of tree

Given an acyclic undirected graph alike to this one : enter image description here

(Here the centers are the nodes '2' and '6', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

EDIT : Here I try to find the radius i.e. the vertices who minimizes the maximum distance to any vertex of the graph, not the diameter, which is not the same since the radius is not always the half of the diameter

Efficient Algorithm to computer radius of tree

Given an acyclic undirected graph alike to this one : enter image description here

(Here the centers are the nodes '2' and '6', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

Efficient Algorithm to compute radius of tree

Given an acyclic undirected graph alike to this one : enter image description here

(Here the centers are the nodes '2' and '6', and the radius is 5)

What is the most efficient (ideally in O(n)) way to compute the radius of the tree ?

I've already used different methods like :

  • Computing the eccentricity of every node, and retrieving the minimal value (the naive way)
  • Repeatedly removing every leaf until there are only one or two nodes left (the centers of the graph)
  • Using BFS, getting the two farthest points, computing their path and getting the node in the middle

Is there a way to do this computation more efficiently ?

EDIT : Here I try to find the radius i.e. the vertices who minimizes the maximum distance to any vertex of the graph, not the diameter, which is not the same since the radius is not always the half of the diameter

Post Closed as "Duplicate" by D.W. algorithms
Source Link
Loading