Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Question!!!

Question!!!

Scheduled Pinned Locked Moved C#
algorithmsquestion
10 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nightmare_112
    wrote on last edited by
    #1

    i need the algorithm for the a program that can gives a the shortest path between two spacific points and you are given the distance between every two points

    E C P D 4 Replies Last reply
    0
    • N nightmare_112

      i need the algorithm for the a program that can gives a the shortest path between two spacific points and you are given the distance between every two points

      E Offline
      E Offline
      Eric Dahlvang
      wrote on last edited by
      #2

      nightmare_112 wrote:

      i need the algorithm for the a program that can gives a the shortest path between two spacific points

      Maybe you need a new major. (Okay, I know that was mean...but I couldn't resist.) See here: wiki Shortest Path[^]

      --EricDV Sig--------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters

      1 Reply Last reply
      0
      • N nightmare_112

        i need the algorithm for the a program that can gives a the shortest path between two spacific points and you are given the distance between every two points

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        You need google ?

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        N 1 Reply Last reply
        0
        • N nightmare_112

          i need the algorithm for the a program that can gives a the shortest path between two spacific points and you are given the distance between every two points

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          http://blogs.msdn.com/chabrook/archive/2006/02/13/Shortest-Path-Algorithm-_2D00_-QuickGraph.aspx[^]

          the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
          Deja View - the feeling that you've seen this post before.

          1 Reply Last reply
          0
          • N nightmare_112

            i need the algorithm for the a program that can gives a the shortest path between two spacific points and you are given the distance between every two points

            D Offline
            D Offline
            dead_link
            wrote on last edited by
            #5

            It's not a question. :| If you have a complete set of distances (edges) between every two of all points then the shortest way between two given points will be line segment that connects these two points. If you mean one of typical graph problems then try reading this article.

            D 1 Reply Last reply
            0
            • D dead_link

              It's not a question. :| If you have a complete set of distances (edges) between every two of all points then the shortest way between two given points will be line segment that connects these two points. If you mean one of typical graph problems then try reading this article.

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #6

              dead_link wrote:

              If you have a complete set of distances (edges) between every two of all points then the shortest way between two given points will be line segment that connects these two points.

              Not neccesarily. Your statement also requires the triangle inequality to hold true. AB 1 BC 1 AC 10 The shortest path from A to C is AB-BC, not AC.

              -- Rules of thumb should not be taken for the whole hand.

              L D 2 Replies Last reply
              0
              • D Dan Neely

                dead_link wrote:

                If you have a complete set of distances (edges) between every two of all points then the shortest way between two given points will be line segment that connects these two points.

                Not neccesarily. Your statement also requires the triangle inequality to hold true. AB 1 BC 1 AC 10 The shortest path from A to C is AB-BC, not AC.

                -- Rules of thumb should not be taken for the whole hand.

                L Offline
                L Offline
                likefood
                wrote on last edited by
                #7

                Correct me if I'm wrong, but those segments (AB, BC, and AC) cannot be a triangle (the length of one side HAS to be less than the sum of the lengths of the other two sides).:) If I'm misunderstanding the discussion, it wouldn't be a first time, so just tell me, "That's not what we're talking about," and I'll back out gracefully. Just thought I'd throw in two cents.

                -Daniel Typing too fast fro my owngood

                D 1 Reply Last reply
                0
                • L likefood

                  Correct me if I'm wrong, but those segments (AB, BC, and AC) cannot be a triangle (the length of one side HAS to be less than the sum of the lengths of the other two sides).:) If I'm misunderstanding the discussion, it wouldn't be a first time, so just tell me, "That's not what we're talking about," and I'll back out gracefully. Just thought I'd throw in two cents.

                  -Daniel Typing too fast fro my owngood

                  D Offline
                  D Offline
                  Dan Neely
                  wrote on last edited by
                  #8

                  You're completely correct, on a flat surface the segments don't make a triangle. The triangle inequality states that for any A, B, and C that AB + BC > AC. Dead_link's answer implictly assumed that the inequality was in place, but the OP never made it an actual condition of his problem.

                  -- Rules of thumb should not be taken for the whole hand.

                  1 Reply Last reply
                  0
                  • C Christian Graus

                    You need google ?

                    Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

                    N Offline
                    N Offline
                    Not Active
                    wrote on last edited by
                    #9

                    What's the shortest path to to Google?


                    only two letters away from being an asset

                    1 Reply Last reply
                    0
                    • D Dan Neely

                      dead_link wrote:

                      If you have a complete set of distances (edges) between every two of all points then the shortest way between two given points will be line segment that connects these two points.

                      Not neccesarily. Your statement also requires the triangle inequality to hold true. AB 1 BC 1 AC 10 The shortest path from A to C is AB-BC, not AC.

                      -- Rules of thumb should not be taken for the whole hand.

                      D Offline
                      D Offline
                      dead_link
                      wrote on last edited by
                      #10

                      Oh, yes. I know it. But the word "distance" lets me think about points on a surface and about simple geometric task. :)

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups