Comp Sci Find the length of Robin's route

  • Thread starter Thread starter chwala
  • Start date Start date
AI Thread Summary
Robin's route length is calculated to be 367 miles, derived from the shortest path combinations involving nodes A, C, E, and J. The discussion highlights the presence of odd nodes A and J, indicating the potential for an Eulerian circuit, and mentions the Chinese postman problem as a method to address situations where such a circuit does not exist. The total weight of the network, defined as the sum of the weights on all edges, is also discussed, with a specific reference to a figure of 315. The conversation emphasizes the importance of using algorithms like Dijkstra's for solving these types of problems. Understanding these concepts is crucial for effectively completing the assignment.
chwala
Gold Member
Messages
2,825
Reaction score
413
Homework Statement
Find the length of Robin's route. (See attached)
Relevant Equations
network models
1743287800581.png


I am self-studying this. My interest is on part b. Part A i found that to be easy.

Firstly, i note that nodes ##A## and ##J## are odd. Suggesting an Eulerian circuit. I also need to read about this chinese postman approach. If i can be directed on the key difference, then that's also fine.

Therefore we have the these paths to consider the pairing involving ##ACEJ## ,Robin starts at C and ends at E. Therefore, the possible combinations are ##3;[ AC + EJ, AE + CJ, AJ + CE]##.

From these three the shortest one is ##AC + EJ = (13+8) + (6+2+23)=52##miles.

The other two will each give ##82## miles. Therefore, the length of Robin's route is ##315 + 52= 367## miles. I also need to understand what they mean by total weight of network, but as far as the math-related part is concerned, I am conversant!

Blessings!!
 
Last edited:
Physics news on Phys.org
The purpose of the assignment is to use the algorithm. Not to find the answer with your own methods.
"Weight" refers to the attribute of a path that is to be minimized. So, it this case, it is the lengths.
 
.Scott said:
The purpose of the assignment is to use the algorithm. Not to find the answer with your own methods.
"Weight" refers to the attribute of a path that is to be minimized. So, it this case, it is the lengths.
@Scott A, I found the algorithm bit understandable as well. It's not difficult; I just posted the highlights, specifically the reasoning behind the question. If you have more insights, that's what I'm looking for, prompting this post.
 
Are you writing code? If so, which language?
 
.Scott said:
Are you writing code? If so, which language?
I meant on the nodes, I did not write a code, you could enlighten me on that.
 
.Scott said:
The wiki article on Dijkstr's algorithm uses pseudo code, but if you coded it using Python, JavaScript, C, etc., your computer come up with an answer.
This question from a Decision Maths paper raises doubts about whether students are required to use coding.
 
chwala said:
Firstly, i note that nodes ##A## and ##J## are odd. Suggesting an Eulerian circuit.

Can an Eulerian circuit exist in a network with odd nodes?

chwala said:
I also need to read about this chinese postman approach. If i can be directed on the key difference, then that's also fine.

The term "Chinese postman problem" refers to a problem like this where an Eulerian circuit does not exist. The approach to solving it is to add paths (of minimal length) to create an Eulerian circuit, which is what you have done.

chwala said:
I also need to understand what they mean by total weight of network

This is the figure 315 you have used.
 
chwala said:
Homework Statement: Find the length of Robin's route. (See attached)
Relevant Equations: network models

View attachment 359195

I am self-studying this. My interest is on part b. Part A i found that to be easy.

Firstly, i note that nodes ##A## and ##J## are odd. Suggesting an Eulerian circuit. I also need to read about this chinese postman approach. If i can be directed on the key difference, then that's also fine.

Therefore we have the these paths to consider the pairing involving ##ACEJ## ,Robin starts at C and ends at E. Therefore, the possible combinations are ##3;[ AC + EJ, AE + CJ, AJ + CE]##.

From these three the shortest one is ##AC + EJ = (13+8) + (6+2+23)=52##miles.

The other two will each give ##82## miles. Therefore, the length of Robin's route is ##315 + 52= 367## miles. I also need to understand what they mean by total weight of network, but as far as the math-related part is concerned, I am conversant!

Blessings!!
Total weight of an undirected network is the sum of the weights on all edges. It may differ for directed networks.
 

Similar threads

Back
Top