Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
can anyone give me an example of this algorithm? Can it be longest common increasing subsequence?
It seems to be a minimum path length to reach v from s(starting point) where E is the set of edges from vertex u to vertex v.
Looks like an algorithm to find the shortest path in a graph.
d(v) is shortest path from vertex s to v moving along edges where the cost of an edge from u to v is c(u,v).
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
So, I have an assignment that I have to represent both adjacent and incidence matrixes statically and then, use a greedy algorithm to find the shortest path (I guess that it can be lowest cost as well, not sure) that goes through all vertices having 1 as origin.
Here's an image of the graph:
I'm kinda lost on how to do it, could somebody please give me some tips?
Greedy Algorithm:
While (Not at node 1)
{
if already visited current node, fail.
look at all current node's exit costs and choose the lowest as next destination.
go to next location.
}
success.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
how can I get longest path in unweighted undirected graph if each node can be visited only once? Thanks for help! // I am new to graphs.I've found out that each edge can be visited only once,not node.Node can be visited more times.Does it mean that my graph is directed? Thanks
This is obviously an NP-complete problem, as Hamiltonian path problem can be reduced to this one. So you will most probably have no polynomial solution here. For non-polynomial you can just use brute force, or try to adapt numerous Hamiltonian path approaches.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Say you were given a black box that solves a clique problem in constant time.
You give the black box an undirected graph G with a bound k and it outputs either "Yes" or "No" that the graph G has a clique with at least k vertices.
How would you use this black box to find the vertices of a maximum clique in polynomial time?
As a hint, think about what happens if you choose a node from the graph, delete it, and then check whether there's still a k-clique. The black box will either say that there is or that there isn't. What do you learn if there still is a k-clique? What do you learn if there isn't?
Hope this helps!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
N-numbers , d1,d2,d3..dn are given.
How do we check if it is possible to construct a undirected graph with vertices v1,v2,v3,...vn with degress d1,d2,...dn respectively.
Graph should not contain multiple edges between the same pair of nodes, or "loop" edges
(where both end vertices are the same node).
Also, what is the running time of the algorithm ?
This is what Wikipedia calls the graph realization problem, solvable by the Havel--Hakimi algorithm. Start with a graph having n vertices, v1..vn, and 0 edges. Define the deficit of a vertex vk to be the difference between dk and the current degree of vk. Repeatedly choose the vertex vk with the largest deficit D and connect it to the D other vertices having the D largest deficits. If a vertex would have negative deficit, then the instance is unsolvable. Otherwise, we terminate with a solution. I'll leave the running time as an exercise.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I was trying to solve a basic clique problem but i have stucked at some following points:
what is is the minimum size of the largest clique in any graph with N nodes and M edges
To Find the largest clique in a graph
Please tell me difference between above two statement.
The first is a question about the set of all graphs with N nodes and M edges. The second question appears to be about a particular graph (although it seems to be out of context).
It might be better to ask this on https://math.stackexchange.com/