100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Resumen

Summary COMPREHENSIVE NOTES ON DIJKSTRA'S ALGORITHM

Puntuación
-
Vendido
-
Páginas
2
Subido en
03-07-2024
Escrito en
2023/2024

Includes enough information for A-level students and degree level students, comprehensive notes on Dijkstra's shortest-path algorithm | A-level content | A* Revision

Institución
Grado

Vista previa del contenido

1 Theory
1.1 Relaxation
Dijkstra’s algorithm uses the technique of relaxation. For each vertex v ∈ V
in the graph G = (V, E), we maintain an attribute v.d which represents the
upper bound on the weight of a shortest path from source s to v, thus it is a
shortest-path estimate. Also for each vertex v we maintain a predecessor
v.π that is either another vertex or null.

A pseudocode implementation of the algorithm to initialise the shortest-path
estimates and predecessors is given below:
1 initialise_source(G, s)
2 for each vertex v in G.V
3 v.d = infinity
4 v.pi = null
5 s.d = 0
This initialises v.π = for all v ∈ V , s.d = 0, and v.d = inf for v ∈ V − s

Relaxing an edge (u, v) consists of testing if the shortest path to v found so
far can be improved by going through u. If so, v.d and v.π can be updated,
more specifically a decrease in the shortest-path estimate and subsequent up-
dates to v’s predecessor attribute.

A pseudocode implementation of the algorithm to perform one relaxation step
on an edge (u, v) is given as follows:

6 relax(u, v, w)
7 if v.d > u.d + w(u, v)
8 v.d = u.d + w(u, v)
9 v.pi = u

1.2 Dijkstra’s algorithm
Dijkstra’s algorithm solves the single-source shortest-paths problem on a weighted,
directed graph for the case that all edge weights are non-negative.

G = (V, E), w(u, v) ≥ 0 for each edge (u, v) ∈ E

A set S of vertices is maintained whose final shortest-path weights from the
source s have already been determined
The vertex u ∈ V − S is repeatedly selected with the shortest-path estimate,
adds u to S, and relaxes all edges leaving u

A pseudocode implementation is given below:



1

Escuela, estudio y materia

Nivel de Estudio
Editores
Tema
Curso

Información del documento

Subido en
3 de julio de 2024
Número de páginas
2
Escrito en
2023/2024
Tipo
Resumen

Temas

$4.88
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
riley4 Heathfield
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
34
Miembro desde
1 año
Número de seguidores
1
Documentos
4
Última venta
7 meses hace

5.0

3 reseñas

5
3
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes