How to Solve the Winnie the Pooh Graph Problem?

  • Thread starter Qch
  • Start date
  • Tags
    Graph
In summary, 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. His algorithm is to bury honey pots near the road segments in a tree, which guarantees that each path from vertex A to vertex B contains at least one of the edges.
  • #1
Qch
2
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
  • #2
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.
 

1. What is the "Winnie the Pooh Graph Problem"?

The "Winnie the Pooh Graph Problem" is a mathematical problem that involves finding the shortest path for Winnie the Pooh to take in order to visit all of his friends in the Hundred Acre Wood.

2. How does the problem relate to Winnie the Pooh?

The problem is based on the beloved character, Winnie the Pooh, and his desire to visit all of his friends in the Hundred Acre Wood. It uses his journey as a fun and relatable way to teach about graph theory and shortest path algorithms.

3. What is the significance of this problem?

This problem is significant because it is a real-world application of graph theory and shortest path algorithms. It also serves as a fun and engaging way to introduce these concepts to students and make them more relatable and understandable.

4. What is the solution to the "Winnie the Pooh Graph Problem"?

The solution to this problem involves using a graph to represent the locations of Winnie the Pooh's friends in the Hundred Acre Wood, and then finding the shortest path that visits all of them. This can be done using algorithms such as Dijkstra's algorithm or A* search.

5. What can we learn from the "Winnie the Pooh Graph Problem"?

This problem teaches us about graph theory and its applications in real-world scenarios. It also helps to develop critical thinking and problem-solving skills by challenging us to find the most efficient path for Winnie the Pooh to visit all of his friends.

Similar threads

  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
12
Views
3K
  • Atomic and Condensed Matter
Replies
2
Views
4K
Back
Top