Sunteți pe pagina 1din 9

English

Least Cost Routing Algorithm

Least Cost Routing, or LCR, is a process to find the most inexpensive way to route phone calls. It is
the process of analyzing, selecting and directing the path of outbound and inbound communications
traffic depending on which path delivers the best rates. For example, if a telecom company in
Ontario is looking for a calling path to Chicago, they will assess the calling rates for a selection of
telecom companies operating in Chicago, then choose the provider that offers the cheapest rate.

There are two algorithms for calculating the lowest cost, the Djikstra algorithm and the Bellman Ford
algorithm.

Bellman Ford algorithm


The Bellman-Ford algorithm calculates the shortest distance (from one source) on a weighted graph.
The point from one source is that it calculates all the shortest distances that start from one node
point. Dijkstra's algorithm can more quickly find the same thing as long as there are no negative
edges. Then the Bellman-Ford algorithm is only used if there is a negative weighted side. The
emergence of this algorithm is quite helpful if the weight of a graph is negative.

Application of Bellman Ford algorithm in routing:

In the Bellman-Ford routing algorithm is used in distance vector routing protocols, for example
Routing Information Protocol (RIP). This algorithm is distributed because it involves the number of
nodes (routers) in the Autonomous system, IP network collections are usually owned by the ISP. The
steps are as follows:

Each node calculates the distance between itself and all other nodes in the AS and stores this
information as a table.
Each node sends a table to all neighboring nodes.
When a node receives a distance table from its neighbors, it calculates the shortest route to all other
nodes and updates the table itself to describe the changes that occur

The main weaknesses of the Bellman-Ford algorithm are as follows:

Not good for large scale networks


Changes in network topology do not run quickly because updates are spread node-by-node.
Count to infinity (if a link or node experiences a failure then the node cannot be reached from
several other node sets, other nodes can spend time looping to infinity gradually increasing their
estimates of the failure, and while there may be a routing loop ).

Example of the bellman ford algorithm:

The first step


Second step

Third step

Fourth step
Fifth step

Sixth step

Seventh step

Djikstra's Algorithm

Dijkstra's algorithm, (according to Edsger Dijkstra's inventor), is an algorithm used to solve the
shortest path problem for a directed graph.
This algorithm was replicated in the 1959 journal Mathematical Numerische entitled "A Note on Two
Problems in Connection with Graphs" and is considered a greedy algorithm.
The problem of the shortest route from one point to another is a classic optimization problem that is
widely used to test a proposed algorithm. The shortest route problem is considered good enough to
represent the optimization problem, because the problem is easy to understand (only sums all edges
traversed) but has many solution choices.

According to Andrew Goldberg, a Microsoft Research researcher in Silicon Valley, said there are
many reasons why researchers continue to study the problem of finding the shortest path. "The
shortest path is an optimization problem that is relevant for various applications, such as network
routing, games, circuit design, and mapping".

The mathematical description for the graph can be represented G = {V. E}, which means a graph (G)
is defined by a set of vertices (Vertex = V) and Edge collections (E).
Dijkstra's algorithm works by making a path to one optimal node at each step. So in step n, there are
at least n nodes that we already know are the shortest path. The Dijkstra algorithm steps can be
done with the following steps:

1. Determine which point will be the initial node, then give the weight of the distance at the first
node to the closest node one by one, Dijkstra will carry out search development from one point to
another and to the next point step by step.

2. Give the weight value (distance) for each point to another point, then set the value of 0 at the
initial node and the infinite value with respect to other nodes (not filled in) 2.

3. Set all nodes that have not been traversed and set the initial node as "Departure node"

4. From the departure node, consider the neighboring node that has not yet been crossed and
calculate the distance from the departure point. If this distance is smaller than the previous distance
(which has been previously recorded) delete old data, re-save the distance data with the new
distance

5. When we finish considering each distance from the neighboring node, mark the node that was
passed as "Node skipped". Nodes that are skipped will never be checked again, the saved distance is
the last distance and the minimum weight.

6. Set "Node not yet passed" with the smallest distance (from the departure node) as the next
"Departure Node" and repeat step e.
Indonesia

Algoritma Least Cost Routing

Least Cost Routing, atau LCR, adalah proses untuk menemukan cara paling murah untuk merutekan
panggilan telepon. Ini adalah proses menganalisis, memilih dan mengarahkan jalur lalu lintas
komunikasi keluar dan masuk tergantung pada jalur mana yang memberikan tarif terbaik. Misalnya,
jika perusahaan telekomunikasi di Ontario mencari jalur panggilan ke Chicago, mereka akan menilai
tarif panggilan untuk pilihan perusahaan telekomunikasi yang beroperasi di Chicago, kemudian
memilih penyedia yang menawarkan tarif termurah.

Ada dua algoritma untuk menghitung biaya termurah yaitu Algoritma Djikstra dan Algoritma Bellman
Ford.

Algoritma Bellman Ford

Algoritma Bellman-Ford menghitung jarak terpendek (dari satu sumber) pada sebuah graf berbobot.
Maksudnya dari satu sumber ialah bahwa ia menghitung semua jarak terpendek yang berawal dari
satu titik node. Algoritma Dijkstra dapat lebih cepat mencari hal yang sama dengan syarat tidak ada
sisi (edge) yang berbobot negatif. Maka Algoritma Bellman-Ford hanya digunakan jika ada sisi
berbobot negatif. Muncul nya Algoritma ini cukup membantu jika bobot dari suatu graf bernilai
negatif.

Pengaplikasian algoritma Bellman Ford dalam routing:

Dalam routing algoritma Bellman-Ford adalah digunakan dalam distance vector routing protocol,
misalnya Routing Information Protocol (RIP). Algoritma ini didistribusikan karena melibatkan jumlah
node (router) dalam Autonomous system, koleksi jaringan IP biasanya dimiliki oleh ISP. Adapun
langkah-langkah nya sebagai berikut:

Setiap node menghitung jarak antara dirinya dan semua node lain dalam AS dan menyimpan
informasi ini sebagai sebuah tabel.

Setiap node mengirimkan tabel ke semua node tetangga.

Ketika sebuah node menerima tabel jarak dari tetangganya, ia menghitung rute terpendek ke semua
node lainnya dan update tabel sendiri untuk menggambarkan perubahan yang terjadi

Kelemahan utama dari algoritma Bellman-Ford adalah sebagai berikut:

Kurang baik untuk jaringan berskala besar

Perubahan topologi jaringan tidak berjalan dengan cepat karena update tersebar node-by-node.

Menghitung sampai tak terhingga (jika link atau node mengalami sebuat kegagalan maka node tidak
dapat dicapai dari beberapa set node lain, node yang lain dapat menghabiskan waktu untuk looping
sampai tak terhingga secara bertahap meningkatkan perkiraan mereka dari kegagalan itu, dan
sementara itu mungkin ada routing loop).
Contoh Algoritma Bellman Ford :

Langkah Pertama

Langkah Kedua

Langkah Ketiga

Langkah Keempat
Langkah Kelima

Langkah Keenam

Langkah Ketujuh

Algoritma Djikstra
Algoritme Dijkstra, (sesuai penemunya Edsger Dijkstra), adalah sebuah algoritma yang dipakai dalam
memecahkan permasalahan jarak terpendek (shortest path problem) untuk sebuah graf berarah
(directed graph).

Algoritma ini dioublikasikan pada tahun 1959 jurnal Numerische Mathematik yang berjudul “A Note
on Two Problems in Connexion with Graphs” dan dianggap sebagai algoritma greedy.

Permasalahan rute terpendek dari sebuah titik ke akhir titik lain adalah sebuah masalah klasik
optimasi yang banyak digunakan untuk menguji sebuah algoritma yang diusulkan. Permasalahan
rute terpendek dianggap cukup baik untuk mewakili masalah optimisasi, karena permasalahannya
mudah dimengerti (hanya menjumlahkan seluruh edge yang dilalui) namun memiliki banyak pilihan
solusi.

Menurut Andrew Goldberg peneliti Microsoft Research Silicon Valley, mengatakan ada banyak
alasan mengapa peneliti terus mempelajari masalah pencarian jalan terpendek. “Jalan terpendek
adalah masalah optimasi yang relevan untuk berbagai macam aplikasi, seperti jaringan routing,
game, desain sirkuit, dan pemetaan”.

Diskripsi matematis untuk grafik dapat diwakili G = {V. E}, yang berarti sebuah grafik (G)
didefenisikan oleh satu set simpul (Vertex = V) dan koleksi Edge (E).

Algoritma Dijkstra bekerja dengan membuat jalur ke satu simpul optimal pada setiap langkah. Jadi
pada langkah ke n, setidaknya ada n node yang sudah kita tahu jalur terpendek. Langkah-langkah
algoritma Dijkstra dapat dilakukan dengan langkah-langkah berikut:

1. Tentukan titik mana yang akan menjadi node awal, lalu beri bobot jarak pada node pertama
ke node terdekat satu per satu, Dijkstra akan melakukan pengembangan pencarian dari satu
titik ke titik lain dan ke titik selanjutnya tahap demi tahap.
2. Beri nilai bobot (jarak) untuk setiap titik ke titik lainnya, lalu set nilai 0 pada node awal dan
nilai tak hingga terhadap node lain (belum terisi) 2.
3. Set semua node yang belum dilalui dan set node awal sebagai “Node keberangkatan”
4. Dari node keberangkatan, pertimbangkan node tetangga yang belum dilalui dan hitung
jaraknya dari titik keberangkatan. Jika jarak ini lebih kecil dari jarak sebelumnya (yang telah
terekam sebelumnya) hapus data lama, simpan ulang data jarak dengan jarak yang baru
5. Saat kita selesai mempertimbangkan setiap jarak terhadap node tetangga, tandai node yang
telah dilalui sebagai “Node dilewati”. Node yang dilewati tidak akan pernah di cek kembali,
jarak yang disimpan adalah jarak terakhir dan yang paling minimal bobotnya.
6. Set “Node belum dilewati” dengan jarak terkecil (dari node keberangkatan) sebagai “Node
Keberangkatan” selanjutnya dan ulangi langkah e.
Referensi

https://mti.binus.ac.id/2017/11/28/algoritma-dijkstra/

https://transnexus.com/whitepapers/lcr-challenges/

http://belajar-routing.blogspot.com/2011/05/algoritma-bellman-ford.html

S-ar putea să vă placă și