How to Solve the Winnie the Pooh Graph Problem?

  • Thread starter Thread starter Qch
  • Start date Start date
  • Tags Tags
    Graph
Click For Summary
SUMMARY

The Winnie the Pooh Graph Problem involves finding the smallest set of edges in an undirected, unweighted graph G = (V, E) such that every path from vertex A (Pooh's location) to vertex B (Tigra's location) includes at least one of these edges. The discussion highlights two rules for determining edge placement based on the number of edges connected to vertices A and B. The user has implemented an algorithm to find all paths but is seeking further guidance on optimizing edge selection when the number of edges is equal for both vertices.

PREREQUISITES
  • Understanding of graph theory concepts, specifically undirected and unweighted graphs.
  • Familiarity with pathfinding algorithms, such as Depth-First Search (DFS) or Breadth-First Search (BFS).
  • Knowledge of edge and vertex terminology in graph structures.
  • Basic programming skills to implement graph algorithms.
NEXT STEPS
  • Research the Minimum Edge Cover problem in graph theory.
  • Learn about network flow algorithms to optimize edge selection.
  • Explore the concept of Dominating Sets in graphs for effective edge placement.
  • Study the implementation of Dijkstra's algorithm for pathfinding in weighted graphs.
USEFUL FOR

Students and professionals in computer science, particularly those focusing on algorithms, graph theory, and optimization problems. This discussion is beneficial for anyone looking to enhance their understanding of graph traversal and edge selection strategies.

Qch
Messages
2
Reaction score
0
Hello,

I really need help solving the following problem. I only begin to get familiar with graphs and might have missed something, but I do not know how to solve this. Ok here goes, and sorry for my English in advance.

There is undirected, unweighted graph G = (V, E). Every edge in this graph is road segment, every vertex - crossroad.

Pooh lives in vertex "A" and Tigra in vertex "n - 1", where "n" is total number of vertexes. Winnie goes to his neighbor every week, but forgets to take his honey pot with him. That is why he decided that he will hide his honey pots near the road segments in a tree. But he is so f** lazy, that he wants to hide them in limited places.

The task is to implement the most effective algorithm, which will be able to find smallest possible edges set, at which Pooh will be able to hide his honey pots, that guarantee, that each path from vertex A to vertex B contains at least one of the edges.

So, in other words, whichever road Pooh would take he must be able to seat and eat his honey at least once.

What is already done:

I have already wrote an algorithm to find ALL paths from Pooh's home till Tigra's home. And now I'm stuck.

I know that:

1. if vertex A has more edges than last vertex - we burry honey pots near Tigra's house.
2. if vertex A has less edges than last vertex - we burry honey pots near Pooh's house.
3. I do not know what to do next.

So, if we have the following graph:

(1, 3), (3, 2), (3, 4), (2, 5), (2, 5)

and Pooh lives in 1 and Tigra in 5 than we burry a pot at (1, 3), because this road definitely will be taken (rule #1 works).

Assume that Pooh lives in 5 and Rigra in 1, than rule #2 applies.

But, what if we have the following graph, where we have the same number of edges from Tigra's and Pooh's house?

May be above algorithm is not right at all.

Any ideas?

Thank you in advance.
 
Technology news on Phys.org
You know what... :) as it always happens I wrote and asked for help and figured out a solution. I will code it and then post it here, just in case.

But, if you have your own, I will be glad to hear them.

Thank you.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 22 ·
Replies
22
Views
5K
Replies
19
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K