bfs, dfs, a* & dijkstra algorithms - find the shortest route
-
We got an assignment where we have to find the shortest route between S and G and use the bfs, dfs, a* & dijkstra algorithms. I'm not sure I did the steps correctly, I'd love to know if I made a mistake and where. For example in dijksra, when I got to point T I didn't know exactly what to do, if it was possible to end the search and go straight to G, or as I did - go to D and then to G. Regarding the *A, I'm not at all sure that I did it right.. at least the table of steps.. I would appreciate your help. Pdf: Ex0[^]
-
We got an assignment where we have to find the shortest route between S and G and use the bfs, dfs, a* & dijkstra algorithms. I'm not sure I did the steps correctly, I'd love to know if I made a mistake and where. For example in dijksra, when I got to point T I didn't know exactly what to do, if it was possible to end the search and go straight to G, or as I did - go to D and then to G. Regarding the *A, I'm not at all sure that I did it right.. at least the table of steps.. I would appreciate your help. Pdf: Ex0[^]
Help with what? You showed no code, and nobody in their right mind is going to click on your link.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
-
Help with what? You showed no code, and nobody in their right mind is going to click on your link.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
its just a pdf file, scan it if you want to. I'm new here and didn't find a way to upload img Smallpdf.com[^]
-
its just a pdf file, scan it if you want to. I'm new here and didn't find a way to upload img Smallpdf.com[^]
Still on a clicking a link. I told you the code shows up in a post here, or nothing gets answered. Posting images is not allowed, for obvious abuse reasons. What on earth is so difficult about copying RELEVANT code from your IDE into the little post window and wrapping it in PRE tags?
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
-
Still on a clicking a link. I told you the code shows up in a post here, or nothing gets answered. Posting images is not allowed, for obvious abuse reasons. What on earth is so difficult about copying RELEVANT code from your IDE into the little post window and wrapping it in PRE tags?
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
It's not a code, it's a graph where we have to find the shortest route from point to point using an algorithm.
-
We got an assignment where we have to find the shortest route between S and G and use the bfs, dfs, a* & dijkstra algorithms. I'm not sure I did the steps correctly, I'd love to know if I made a mistake and where. For example in dijksra, when I got to point T I didn't know exactly what to do, if it was possible to end the search and go straight to G, or as I did - go to D and then to G. Regarding the *A, I'm not at all sure that I did it right.. at least the table of steps.. I would appreciate your help. Pdf: Ex0[^]
You're, in effect, asking us to confirm the validity of "your steps". That would be the job of whoever gave you the "assignment". As it stands, that would require too much effort on our part ("read my pdf").
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
-
It's not a code, it's a graph where we have to find the shortest route from point to point using an algorithm.
Then that's a question for your teacher.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
-
We got an assignment where we have to find the shortest route between S and G and use the bfs, dfs, a* & dijkstra algorithms. I'm not sure I did the steps correctly, I'd love to know if I made a mistake and where. For example in dijksra, when I got to point T I didn't know exactly what to do, if it was possible to end the search and go straight to G, or as I did - go to D and then to G. Regarding the *A, I'm not at all sure that I did it right.. at least the table of steps.. I would appreciate your help. Pdf: Ex0[^]
I suspect strongly that there are multiple sites which specialize in discussions of math. Your question is probably better asked there. You might want to phrase it more carefully with more detail. (But that might just be that it so long that I have looked at stuff like that that I cannot judge the question.)
-
We got an assignment where we have to find the shortest route between S and G and use the bfs, dfs, a* & dijkstra algorithms. I'm not sure I did the steps correctly, I'd love to know if I made a mistake and where. For example in dijksra, when I got to point T I didn't know exactly what to do, if it was possible to end the search and go straight to G, or as I did - go to D and then to G. Regarding the *A, I'm not at all sure that I did it right.. at least the table of steps.. I would appreciate your help. Pdf: Ex0[^]
So we know the node S and we know the node G, we've got a bunch of links leading out of S, and we've a bunch of links leading to G. And armed with that information we want to find the shortest path. So one way is exhaustive enumeration of the entire graph starting from S, and following links from. And the other way is exhaustive enumeration of the entire graph starting at G, and following links to. And both of those will work, but require enumeration of the entire graph, ad we want to be a little clever. So what do we do? What we do is push out little bubbles from S and G, one link away, two links away, and so on. And we keep a list of nodes for S and G in the bubbles. And eventually a node in the S bubble turns out to be a node in the G bubble, or vice versa, and you've found a path, and the shortest path for most graphs. And then, knowing a bit about the graph topology, we can refine things a bit to speed up the normal case search. But get the two bubbles system working first, and then come back, and we'll discuss how to refine.