Dijkstra s algorithm
This presentation is the property of its rightful owner.
Sponsored Links
1 / 13

Dijkstra’s Algorithm PowerPoint PPT Presentation


  • 91 Views
  • Uploaded on
  • Presentation posted in: General

Dijkstra’s Algorithm. Terminology. Graph (G) : A set of items connected by edges. Each item in a graph is called a vertex or edge. Vertex (V) : An item in a graph, sometimes referred to as a node. (A node is a unit of reference in a data structure.)

Download Presentation

Dijkstra’s Algorithm

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Dijkstra s algorithm

Dijkstra’s Algorithm


Terminology

Terminology

  • Graph (G) : A set of items connected by edges. Each item in a graph is called a vertex or edge.

  • Vertex (V) : An item in a graph, sometimes referred to as a node. (A node is a unit of reference in a data structure.)

  • Edge (E) : A connection between two vertices of a graph.

  • Weighted Graph : A graph which has a weight, or number, associated with each edge.


Dijkstra s algorithm is

Dijkstra’s Algorithm is…

  • Named after it’s creator E.W. Dijkstra. He is a Professor of Mathematic at the University of Amsterdam.

  • An algorithm for finding the shortest path between two vertices (or nodes). This algorithm has the added benefit of finding the shortest path from a given source to all points in the graph at the same time. Because of this it is sometimes referred to as the single-source shortest path algorithm

  • Requires all edged weights to be positive.

  • Its time efficiency is O (E log V).


Dijkstra s algorithm

GRAPH


Dijkstra s algorithm

Step 1 Dijkstra’s Algorithm

A can see B and C

B WINS WITH A COST OF 30!


Dijkstra s algorithm

Step 2 Dijkstra’s Algorithm

B can see C and D

C WINS WITH A COST OF 40!


Dijkstra s algorithm

Step 3 Dijkstra’s Algorithm

C can see D and E

E WINS WITH A COST OF 50!


Dijkstra s algorithm

Step 4 Dijkstra’s Algorithm

E sees nothing… However, other nodes are seen from previously seen vertices.


Dijkstra s algorithm

Completed Dijkstra’s Algorithm


Dijkstra s algorithm

Generates the following Arrays:


Dijkstra s algorithm

Dijkstra’s Algorithm is GREEDY!

  • A Greedy Algorithm is defined as follows:

  • An algorithm that always takes the best immediate or local, solution while finding an answer. Greedy algorithms find the overall or globally optimal solution.


Dijkstra s algorithm

Warshall’s Algorithm

O (V3)

Floyd’s Algorithm

O (V3)

Dijkstra’s Algorithm

O (E Log V)

Dijkstra WINS!!!


Dijkstra s algorithm

Group D Presentation

1)Warshall’s Algorithm

2)Floyd’s Algorithm

3)Dijkstra’s Algorithm

Prepared by:

Michael Cicarella Gabriela Ruz Marius Janusaitis


  • Login