Modern Algorithms and Data Structures - 1. Bloom Filters, Merkle TreesLorenzo Alberton
The first part of a series of talks about modern algorithms and data structures, used by nosql databases like HBase and Cassandra. An explanation of Bloom Filters and several derivates, and Merkle Trees.
Modern Algorithms and Data Structures - 1. Bloom Filters, Merkle TreesLorenzo Alberton
The first part of a series of talks about modern algorithms and data structures, used by nosql databases like HBase and Cassandra. An explanation of Bloom Filters and several derivates, and Merkle Trees.
BFS is the most commonly used approach. BFS is a traversing algorithm where you should start traversing from a selected node (source or starting node) and traverse the graph layerwise thus exploring the neighbor nodes (nodes which are directly connected to the source node.
In computer science, a data structure is a particular way of organizing data in a computer so that it can be used efficiently. Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks.
breadth-first search (BFS) is a strategy for searching in a graph when search is limited to essentially two operations
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures.
The Red Black Tree is one of the most popular implementation of sets and dictionaries. A red-black tree is a binary search tree in which each node is coloured red or black.
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking
BFS is the most commonly used approach. BFS is a traversing algorithm where you should start traversing from a selected node (source or starting node) and traverse the graph layerwise thus exploring the neighbor nodes (nodes which are directly connected to the source node.
In computer science, a data structure is a particular way of organizing data in a computer so that it can be used efficiently. Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks.
breadth-first search (BFS) is a strategy for searching in a graph when search is limited to essentially two operations
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures.
The Red Black Tree is one of the most popular implementation of sets and dictionaries. A red-black tree is a binary search tree in which each node is coloured red or black.
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking
x
y
2.5 3.0 3.5
-1.0 6 7 8
1.0 0 1 2
3.0 -6 -5 -4
MATH 223
FINAL EXAM REVIEW PACKET ANSWERS
(Fall 2012)
1. (a) increasing (b) decreasing
2. (a) 2 2( 3) 25y z− + = This is a cylinder parallel to the x-axis with radius 5.
(b) 3x = , 3x = − . These are vertical planes parallel to the yz-plane.
(c) 2 2 2z x y= + . This is a cone (one opening up and one opening down) centered on the z-axis.
3. There are many possible answers.
(a) 0x = produces the curve 23y z= − .
(b) 1y = produces the curves 23 cosz x= − and 23 cosz x= − − .
(c)
2
x
π
= produces the curves 3z = and 3z = − .
4. (a) (b) (i) 1 (ii) Increase (iii) Decrease
5. (a) Paraboloids centered on the x-axis, opening up in the positive x direction. 2 2x y z c= + +
(b) Spheres centered at the origin with radius 1 ln c− for 0 c e< ≤ . 2 2 2 1 lnx y z c+ + = −
6. (a) 6 am 11:30 am
(b) Temperature as a function of time at a depth of 20 cm.
(c) Temperature as a function of depth at noon.
7. ( , ) 2 3 2z f x y x y= = − −
8. (a) II, III, IV, VI (b) I (c) I, III, VI (d) VI (e) I, V
9. (a)
12
4 12
5
z x y= − + (b) There are many possible answers.
12
4
5
i j k+ −
(c)
3 569
2
10. (a) iii, vii (b) iv (c) viii (d) ii (e) v, vi (f) i, ix
11. There are many possible answers.
(a) ( )5 4 3
26
i j k− +
or ( )5 4 3
26
i j k− − +
(b) 2 3i j− +
(c)
4
cos
442
θ = , 1.38θ ≈ radians (d) ( )4 4 3
26
i j k− +
(e) 4 11 17i j k− − −
12. (a)
3
5
a = − (b)
1
3
a = (c) 2( 1) ( 2) 3( 3) 0x y z− − + + − = (d)
1 2 , 2 , 3 3x t y t z t= + = − − = +
13. 6 39i
or 6 39i−
14. (a)
( )
2
23 2 2
3 2
3 1
z x y x
x x y x y
∂
= −
∂ + + +
(b)
( )4
10 4 3
5
H
H T
f
H
+ +
=
−
(c)
2
2 2
1 1z
x y y x
∂
= − −
∂ ∂
15. (a) 2 2 24 ( 1) 3 ( 2) 2z e x e y e= − + − + (b) 4( 3) 8( 3) 6( 6) 0x y z− + − + − =
16. (a)
2sin(2 ) cos(2 )
5 5
v v
ds dv d
α α
α= +
(b) The distance s decreases if the angle α increases and the initial speed v remains constant.
(c) 0.0886α∆ ≈ − . The angle decreases by about 0.089 radians.
17. (a) The water is getting shallower.
4
( 1, 2)
17
uh − = −
(b) There are many possible answers. 3i j+
(c) 72 ft/min
18. (a)
( )
2 2 2
22 2 22
2 2
1 1 11
yz xyz z yz
grad i j k
x x xx
= − + + + + + +
(b) ( ) ( ) ( )( )2 2 2 2curl x y z i y z j xz k i zj yk+ + − + + = + −
(c) ( ) ( ) ( )( )2 3 3cos sec 2 cos sin sec tan 3z zdiv x i x y j e k x x x y y e+ + = − + +
(d)
37
3
(e) ( , , ) sin zg x y z xy e c= + +
19. ( , ) 4 3vG a b = −
20. (a) positive (b) negative (c) negative (d) negative (e) positive (f) zero
21. (a)
(.
The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. It is slower than Dijkstra's algorithm for the same problem, but more versatile, as it is capable of handling graphs in which some of the edge weights are negative numbers.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
Courier management system project report.pdfKamal Acharya
It is now-a-days very important for the people to send or receive articles like imported furniture, electronic items, gifts, business goods and the like. People depend vastly on different transport systems which mostly use the manual way of receiving and delivering the articles. There is no way to track the articles till they are received and there is no way to let the customer know what happened in transit, once he booked some articles. In such a situation, we need a system which completely computerizes the cargo activities including time to time tracking of the articles sent. This need is fulfilled by Courier Management System software which is online software for the cargo management people that enables them to receive the goods from a source and send them to a required destination and track their status from time to time.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
2. Shortest Path Problem
In data structures,
• Shortest path problem is a problem of finding the shortest path(s) between
vertices of a given graph.
• Shortest path between two vertices is a path that has the least cost as compared
to all other existing paths.
Shortest Path Algorithms
• Shortest path algorithms are a family of algorithms used for solving the shortest
path problem.
3. Types of Shortest Path Problem
Various types of shortest path problem are
S
1. Single-pair shortest path problem.
2. Single-source shortest path problem.
3. Single-destination shortest path problem.
4. All pairs shortest path problem.
4. Single-Pair Shortest Path Problem
• It is a shortest path problem where the shortest path between a given pair of
vertices is computed.
Single-Source Shortest Path Problem
• It is a shortest path problem where the shortest path from a given source
vertex to all other remaining vertices is computed.
• Dijkstra’s Algorithm and Bellman Ford Algorithm are the famous
algorithms used for solving single-source shortest path problem.
5. Single-Destination Shortest Path Problem
• It is a shortest path problem where the shortest path from all the vertices to a
single destination vertex is computed.
• By reversing the direction of each edge in the graph, this problem reduces to
single-source shortest path problem.
• Dijkstra’s Algorithm is a famous algorithm adapted for solving single-
destination shortest path problem.
All Pairs Shortest Path Problem
• It is a shortest path problem where the shortest path between every pair of
vertices is computed.
• Floyd-Warshall Algorithm and Johnson’s Algorithm are the famous
algorithms used for solving All pairs shortest path problem.
6. Some Algorithms
When no negative edges
• Using Dijkstra’s algorithm: O(V3)
• Using Binary heap implementation: O(VE lg V)
• Using Fibonacci heap: O(VE + V2 log V)
When no negative cycles
• Floyd-Warshall : O(V3) time
When negative cycles
• Using Bellman-Ford algorithm: O(V2 E) = O(V4 )
• Johnson : O(VE + V2 log V) time based on a clever combination of Bellman-Ford and
Dijkstra
7. Floyd-Warshall Algorithm
• It is used to solve All Pairs Shortest Path Problem.
• It computes the shortest path between every pair of vertices of the given graph.
• Floyd-Warshall Algorithm is an example of dynamic programming approach.
17. Time Complexity
• Floyd-Warshall Algorithm consists of three loops over all the nodes.
• The inner most loop consists of only constant complexity operations.
• Hence, the asymptotic complexity of Floyd-Warshall algorithm is
O(n3).
• Here, n is the number of nodes in the given graph.
18. When Floyd-Warshall Algorithm is Used?
• Floyd-Warshall Algorithm is best suited for dense graphs.
• This is because its complexity depends only on the number of
vertices in the given graph.
• For sparse graphs, Johnson’s Algorithm is more suitable.
19. Johnson’s Algorithm
• Johnson's algorithm is a way to find the shortest paths between all pairs
of vertices in an edge-weighted, directed graph.
• It allows some of the edge weights to be negative numbers, but no
negative-weight cycles may exist.It turns all negative values into non-
negative.
• It works by using the Bellman–Ford algorithm to compute a transformation
of the input graph that removes all negative weights, allowing Dijkstra's
algorithm to be used on the transformed graph.
20. Algorithm description
Johnson's algorithm consists of the following steps:
• First, a new node s is added to the graph, connected by zero-weight edges to
each of the other nodes.
• Second, the Bellman–Ford algorithm is used, starting from the new vertex s,
to find for each vertex v the minimum weight h(v) of a path from s to v.
• If this step detects a negative cycle, the algorithm is terminated.
• Next the edges of the original graph are reweighted using the values
computed by the Bellman–Ford algorithm: an edge from u to v ,having
length w(u,v) , is given the new length w(u,v) + h(u) − h(v).
• Finally, s is removed, and Dijkstra's algorithm is used to find the shortest
paths from each node s to every other vertex in the reweighted graph.
21. Psuedocode
Input : Graph G
Output : List of all pair shortest paths
• for G Johnson(G){
• G'.V = G.V + {n}
• G'.E = G.E + ((s,u) for u in G.V)
• weight(n,u) = 0 in G.V
• Dist = BellmanFord(G’.V , G’.E)
• for edge(u,v) in G'.E do
• weight(u,v) += h[u] - h[v]
• End
• L = [] /*for storing result*/
• for vertex v in G.V do
• L += Dijkstra(G, G.V)
• End
• return L
• }
23. Step : 1
Add source vertex to the given graph
| V’ | = 6
| E’ | = 14
24. Step : 2
Find shortest path from “ S ” to all
vertices.
h ( a ) = δ ( s , a ) = 0
h ( b ) = δ ( s , b ) = s d c b
= 0 – 5 + 4 = -1
h ( c ) = δ ( s , c ) = s d c
= 0 – 5 = -5
h ( d ) = δ ( s , d ) = s d = 0
h ( e ) = δ ( s , e ) = s a e
= 0 – 4 = -4
h ( a ) 0
h ( b ) -1
h ( c ) -5
h ( d ) 0
h ( e ) -4
25. Step : 3
• Find W’
• Formula for re-weighting edges
• W’ ( u , v ) = W ( u , v ) + h ( u ) – h ( v )
• Re-weight all vertices using this formula.
• After re-weighting we got non-negative values.
26. • W’( a , b )=W( a , b ) + h( a ) – h( b )
= 3 + 0 – (-1)= 4
• W’( a , c )=W( a , c ) + h( a ) – h( c )
= 8 + 0 – (-5)= 13
• W’( a , e )=W( a , e ) + h( a ) – h( e )
= -4 + 0 – (-4)= 0
• W’( b , d )=W( b , d ) + h( b ) – h( d )
= 1 + (-1) – 0= 0
• W’( b , e )=W( b , e ) + h( b ) – h( e )
= 7 + (-1) – (-4)= 10
• W’( c , b )=W( c , b ) + h( c ) – h( b )
= 4 + (-5) – (-1)= 0
• W’( d , c )=W( d , c ) + h( d ) – h( c )
= -5 + 0 – (-5)= 0
h ( a ) 0
h ( b ) -1
h ( c ) -5
h ( d ) 0
h ( e ) -4
27. • W’( d , a )=W( d , a ) + h( d ) – h( a )
= 2 + 0 – 0= 2
• W’( e , d )=W( e , d ) + h( e ) – h( d )
= 6 + (-4) – 0= 2
• W’( s , a )=W( s , a ) + h( s ) – h( a )
= 0 + 0 – 0= 0
• W’( s , b )=W( s , b ) + h( s ) – h( b )
= 0 + 0 – (-1)= 1
• W’( s , c )=W( s , c ) + h( s ) – h( c )
= 0 + 0 – (-5)= 5
• W’( s , d )=W( s , d ) + h( s ) – h( d )
= 0 + 0 – 0= 0
• W’( s , e )=W( s , e ) + h( s ) – h( e )
= 0 + 0 – (-4)= 4
h ( a ) 0
h ( b ) -1
h ( c ) -5
h ( d ) 0
h ( e ) -4
28. Step : 4
• Put new values of edges in the graph.
30. Step : 6
• Now find shortest distance from each vertex to every other vertex in the graph.
Applying Dijkstra Algorithm.
For Vertex A :
δ’( a , a )=0
δ’( a , b
)=0+2+0+0= 2
δ’( a , c )=0+2+0=
2
δ’( a , d )=0+2= 2
δ’( a , e )=0
31. To find “ δ ”
δ( u , v ) = δ’( u, v ) – h( u ) + h( v )
For Vertex A :
δ( a ,a ) = δ’( a , a ) – h( a ) + h( a )
= 0 – 0 + 0 = 0
δ( a ,b ) = δ’( a , b ) – h( a ) + h( b )
= 2 – 0 + (-1) = 1
δ( a ,c ) = δ’( a , c ) – h( a ) + h( c )
= 2 – 0 + (-5) = -3
δ( a ,d ) = δ’( a , d ) – h( a ) + h( d )
= 2 – 0 + 0 = 2
δ( a ,e ) = δ’( a , e ) – h( a ) + h( e )
= 0 – 0 + (-4) = -4
δ’( a , a ) 0 h ( a ) 0
δ’( a , b ) 2 h ( b ) -1
δ’( a , c ) 2 h ( c ) -5
δ’( a , d ) 2 h ( d ) 0
δ’( a , e ) 0 h ( e ) -4
33. For Vertex B :
δ’( b ,
a )= 0+2 = 2
δ’( b
, b )= 0
δ’( b
, c )= 0+0 = 0
δ’( b
, d )= 0
δ’( b
, e )= 0+2+0= 2
34. To find “ δ ”
δ( u , v ) = δ’( u, v ) – h( u ) + h( v )
For Vertex B :
δ( b ,a ) = δ’( b , a ) – h( b ) + h( a )
= 2 – (-1) + 0 = 3
δ( b ,b ) = δ’( b , b ) – h( b ) + h( b )
= 0 – (-1) + (-1) = 0
δ( b ,c ) = δ’( b , c ) – h( b ) + h( c )
= 0 – (-1) + (-5) = -4
δ( b ,d ) = δ’( b , d ) – h( b ) + h( d )
= 0 – (-1) + 0 = 1
δ( b ,e ) = δ’( b , e ) – h( b ) + h( e )
= 2 – (-1) + (-4) = -1
δ’( b , a ) 2 h ( a ) 0
δ’( b , b ) 0 h ( b ) -1
δ’( b , c ) 0 h ( c ) -5
δ’( b , d ) 0 h ( d ) 0
δ’( b , e ) 2 h ( e ) -4
36. For Vertex C :
δ’( c , a
)= 0+0+2 = 2
δ’( c , b
)= 0
δ’( c , c
)= 0
δ’( c , d
)= 0+0= 0
δ’( c , e
)= 0+0+2+0= 2
37. To find “ δ ”
δ( u , v ) = δ’( u, v ) – h( u ) + h( v )
For Vertex C :
δ( c ,a ) = δ’( c , a ) – h( c ) + h( a )
= 2 – (-5) + 0 = 7
δ( c ,b ) = δ’( c , b ) – h( c ) + h( b )
= 0 – (-5) + (-1) = 4
δ( c ,c ) = δ’( c , c ) – h( c ) + h( c )
= 0 – (-5) + (-5) = 0
δ( c ,d ) = δ’( c , d ) – h( c ) + h( d )
= 0 – (-5) + 0 = 5
δ( c ,e ) = δ’( c , e ) – h( c ) + h( e )
= 2 – (-5) + (-4) = 3
δ’( c , a ) 2 h ( a ) 0
δ’( c , b ) 0 h ( b ) -1
δ’( c , c ) 0 h ( c ) -5
δ’( c , d ) 0 h ( d ) 0
δ’( c , e ) 2 h ( e ) -4
39. For Vertex D :
δ’( d , a
)= 2
δ’( d , b
)= 0+0= 0
δ’( d , c
)= 0
δ’( d , d
)= 0
δ’( d , e
)= 2+0= 2
40. To find “ δ ”
δ( u , v ) = δ’( u, v ) – h( u ) + h( v )
For Vertex D :
δ( d ,a ) = δ’( d , a ) – h( d ) + h( a )
= 2 – 0 + 0 = 2
δ( d ,b ) = δ’( d , b ) – h( d ) + h( b )
= 0 – 0 + (-1) = -1
δ( d ,c ) = δ’( d , c ) – h( d ) + h( c )
= 0 – 0 + (-5) = -5
δ( d ,d ) = δ’( d , d ) – h( d ) + h( d )
= 0 – 0 + 0 = 0
δ( d ,e ) = δ’( d , e ) – h( d ) + h( e )
= 2 – 0 + (-4) = -2
δ’( d , a ) 2 h ( a ) 0
δ’( d , b ) 0 h ( b ) -1
δ’( d , c ) 0 h ( c ) -5
δ’( d , d ) 0 h ( d ) 0
δ’( d , e ) 2 h ( e ) -4
42. For Vertex E :
δ’( e , a
)= 2+2= 4
δ’( e , b
)= 2+0+0= 2
δ’( e , c
)= 2+0= 2
δ’( e , d
)= 2
δ’( e , e
)= 0
43. To find “ δ ”
δ( u , v ) = δ’( u, v ) – h( u ) + h( v )
For Vertex E :
δ( e ,a ) = δ’( e , a ) – h( e ) + h( a )
= 2 – 0 + 0 = 2
δ( e ,b ) = δ’( e , b ) – h( e ) + h( b )
= 0 – 0 + (-1) = -1
δ( e ,c ) = δ’( e , c ) – h( e ) + h( c )
= 0 – 0 + (-5) = -5
δ( e ,d ) = δ’( e , d ) – h( e ) + h( d )
= 0 – 0 + 0 = 0
δ( e ,e ) = δ’( e , e ) – h( e ) + h( e )
= 2 – 0 + (-4) = -2
δ’( e , a ) 4 h ( a ) 0
δ’( e , b ) 2 h ( b ) -1
δ’( e , c ) 2 h ( c ) -5
δ’( e , d ) 2 h ( d ) 0
δ’( e , e ) 0 h ( e ) -4
45. Time Complexity:
• The main steps in algorithm are Bellman Ford Algorithm called once and
Dijkstra called V times.
• Time complexity of Bellman Ford is O(VE) and time complexity of Dijkstra is
O(VLogV).
• So overall time complexity is O(V2log V + VE).
• But for sparse graphs, the algorithm performs much better than Floyd Warshell.