As mentioned above, the shortest paths are calculated using suitable algorithms on the graph representations of the networks. Let the network be represented by graph G ( V, E ) and let the number of nodes be 'N'. For all the algorithms discussed below, the costs associated with the links are assumed to be positive. A node has zero cost w.r.t itself. Further, all the links are assumed to be symmetric, i.e. if di,j = cost of link from node i to node j, then d i,j = d j,i . The graph is assumed to be complete. If there exists no edge between two nodes, then a link of infinite cost is assumed. The algorithms given below find costs of the paths from all nodes to a particular node; the problem is equivalent to finding the cost of paths from a source to all destinations.
ดังที่ได้กล่าวข้างต้น , เส้นทางที่สั้นที่สุด โดยการใช้ขั้นตอนวิธีที่เหมาะสมบนกราฟเป็นตัวแทนของเครือข่าย ให้เครือข่ายถูกแสดงโดยกราฟ G ( V , E ) และให้หมายเลขของโหนดเป็น ' N ' สำหรับขั้นตอนวิธีการกล่าวถึงด้านล่าง , ค่าใช้จ่ายที่เกี่ยวข้องกับการเชื่อมโยงที่ถือว่าเป็นบวก โหนดมีศูนย์ต้นทุน w.r.t นั่นเอง เพิ่มเติมลิงก์ทั้งหมดจะถือว่าเป็นสมมาตร เช่น ถ้าตี้ , J = ต้นทุนของการเชื่อมโยงจากโหนดโหนด J ฉันแล้วฉัน , J = D J , ฉัน . กราฟจะถือว่าเสร็จสมบูรณ์ ถ้ามีอยู่แล้วไม่ขอบระหว่างสองจุดแล้ว ลิงค์ ของ ค่าอนันต์คือสมมติ อัลกอริทึมที่ระบุด้านล่าง พบว่า ต้นทุนของเส้นทางจากโหนดโหนดเฉพาะปัญหาคือ เทียบเท่ากับการหาต้นทุนของเส้นทางจากแหล่งไปยังปลายทางทั้งหมด
การแปล กรุณารอสักครู่..
