The document defines and explains several key graph concepts and algorithms, including:
- Graph representations like adjacency matrix and adjacency list.
- Graph traversal algorithms like breadth-first search (BFS) and depth-first search (DFS).
- Minimum spanning tree algorithms like Prim's algorithm.
- Single-source shortest path algorithms like Dijkstra's algorithm and Floyd's algorithm.
Pseudocode and examples are provided to illustrate how BFS, DFS, Prim's, Dijkstra's and Floyd's algorithms work on graphs. Key properties of minimum spanning trees and shortest path problems are also defined.
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.
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
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.
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.
•Common Problems Needs Computers
•The Search Problem
•Basic Search Algorithms
–Algorithms used for searching the contents of an array
•Linear or Sequential Search
•Binary Search
•Comparison Between Linear and Binary Search
•Algorithms for solving shortest path problems
–Sequential Search Algorithms
•Depth-First Search
•Breadth First Search
–Parallel or distributed Search Algorithms
•Parallel Depth-First Search
•Parallel Breadth First Search
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.
•Common Problems Needs Computers
•The Search Problem
•Basic Search Algorithms
–Algorithms used for searching the contents of an array
•Linear or Sequential Search
•Binary Search
•Comparison Between Linear and Binary Search
•Algorithms for solving shortest path problems
–Sequential Search Algorithms
•Depth-First Search
•Breadth First Search
–Parallel or distributed Search Algorithms
•Parallel Depth-First Search
•Parallel Breadth First Search
Linear and Binary Search Algorithms.(Discrete Mathematics)Shanawaz Ahamed
This Power point slides were prepared for small project named "Linear and Binary Search Algorithms.".
Its totally based on the project report.
Q1. Why i am sharing this here???
Ans. a) This is Simple but perfect slide in my view.
b) One can take inspiration to make slides based on this
topic.
c) I wanna Help Jr, Students of EWU. I am putting this
here so that they can see this and be benefited from this.
d) Course Code: CSE 205. Instructor: Md. Wasilul Sadid..
Thank You :)
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
Our Vision & Mission – Simplifying Students Life
Our Belief – “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom
Trees. Defining, Creating and Traversing Trees. Traversing the File System
Binary Search Trees. Balanced Trees
Graphs and Graphs Traversal Algorithms
Exercises: Working with Trees and Graphs
Graph in data structure it gives you the information of the graph application. How to represent the Graph and also Graph Travesal is also there many terms are there related to garph
In graph theory, the shortest path problem is the problem of finding a path between two vertices in a graph such that the sum of the weights of its constituent edges is minimized
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
2. Some related terms:
• Graph: A graph G is a pair (V,E), where V is a finite
set of points called vertices and E is a finite set of
edges.
• Path: A path from a vertex v to a vertex u is a
sequence <v0,v1,v2,…,vk> of vertices where v0 ,v1,
v2… are the set of vertices followed to move from a
source to destination.
• Pathlength:The length of a path is defined as the
number of edges in the path.
3. Related terms: Degree of vertex
• Degree of vertex: It represents
the total number of edges linked
to a particular vertex.
• Indegree: It is the number of
incomming edges to a vertex.
•Outdegree: It is the number of
outgoing edges from a vertex.
•Source: A vertex having indegree
zero is a source.
•Sink: A vertex having outdegree
zero is a sink.
4. Some related terms:
• Undirected Graph: An
undirected graph is the
graph consisting of
unordered pair of vertices .
For eg :figure (a)
• Directed Graph : In a
directed graph, the edge e is
an ordered pair (u,v) which
is incident from vertex u and
is incident to vertex v. For
eg : fig(b)
5. Some related terms: Weighted graph
• A weighted graph is a graph
where each edge is assigned
a particular value.
• This may be the distance or
the cost.
• Here, the graph G(V,E) may
be directed or undirected
graph.
• Also the weight may be
represented by ‘W’.
6. Graph Representation:
Adjacency Matrix:
• Here, a two dimensional
square matrix can be used
to store a graph.
• Adjacency matrix for
undirected graph is always
symmetric .
Adjacency List
• Adjacency List creates a
seperste linked list for each
adjacent vertex.
• Adjacency graph for n nodes
is represented by an Array
of Pointers.
a
dc
b a
b
c
d
b
a
d
d c
c
a b
a c
a
dc
b
1 2
3 4
1 2 3 4
1 0 1 1 1
2 1 0 1 0
3 1 1 0 1
4 1 0 1 0
7. Graph Traversal:
• Most of the applications of graphs require the
traversal of graphs.
• Traversal means visiting each node in a graph
exactly once.
• It also stands for that there must be no cycles in
the traversal.
• The two commonly used techniques are:
(1) Depth First Search(DFS)
(2) Breadth First Search(BFS)
8. Breadth First Search:
• Strategy
choose a starting vertex,
distance d = 0
vertices are visited in order
of increasing distance from
the starting vertex,
examine all edges leading
from vertices (at distance
d) to adjacent vertices (at
distance d+1)
then, examine all edges
leading from vertices at
distance d+1 to distance
d+2, and so on,
until no new vertex is
discovered
9. Algorithm for BFS:
1. for each vertex u in V[G] – {s}
2 do color[u] white
3 d[u]
4 [u] nil
5 color[s] gray
6 d[s] 0
7 [s] nil
8 Q
9 enqueue(Q,s)
10 while Q
11 do u dequeue(Q)
12 for each v in Adj[u]
13 do if color[v] = white
14 then color[v] gray
15 d[v] d[u] + 1
16 [v] u
17 enqueue(Q,v)
18 color[u] black
10. Example (BFS)
0
r s t u
v w x y
Q: s
0
(Courtesy of Prof. Jim Anderson)
19. Use of a queue in BFS Graph:
• It is very common to use a queue to keep
track of:
– nodes to be visited next, or
– nodes that we have already visited.
• Typically, use of a queue leads to a breadth-
first visit order.
• Breadth-first visit order is “cautious” in the
sense that it examines every path of length i
before going on to paths of length i+1.
20. Depth First Search:
• Strategy
– choose a starting vertex,
distance d = 0
– examine One edges leading
from vertices (at distance d)
to adjacent vertices (at
distance d+1)
– then, examine One edges
leading from vertices at
distance d+1 to distance d+2,
and so on,
– until no new vertex is
discovered, or dead end
– then, backtrack one distance
back up, and try other edges,
and so on.
38. Use of a stack in DFS Graph
• It is very common to use a stack to keep track
of:
– nodes to be visited next, or
– nodes that we have already visited.
• Typically, use of a stack leads to a depth-first
visit order.
• Depth-first visit order is “aggressive” in the
sense that it examines complete paths.
39. Minimum Spanning Tree (MST)
• it is a tree (i.e., it is acyclic)
• it covers all the vertices V
– contains |V| - 1 edges
• the total cost associated with tree edges is the
minimum among all possible spanning trees
A minimum spanning tree is a subgraph of an
undirected weighted graph G as shown, such that
40. Minimum Spanning Tree: Prim's
Algorithm
• Prim's algorithm for finding an MST is a greedy
algorithm.
• Start by selecting an arbitrary vertex, include
it into the current MST.
• Grow the current MST by inserting into it the
vertex closest to one of the vertices already in
current MST.
43. Dijkstra's algorithm
• For a weighted graph G = (V,E,w), the single-
source shortest paths problem is to find the
shortest paths from a vertex v ∈ V to all other
vertices in V.
• Dijkstra's algorithm is similar to Prim's algorithm.
– maintains a set of nodes for which the shortest paths
are known.
– grow this set based on the node closest to source
using one of the nodes in the current shortest path
set.
45. Floyd's Algorithm
• For any pair of vertices vi, vj ∈ V, consider all paths
from vi to vj whose intermediate vertices belong to
the set {v1,v2,…,vk}.
• Let pi
(
,
k
j
) (of weight di
(
,
k
j
)) be the minimum-weight
path among them.
• If vertex vk is not in the shortest path from vi to vj,
then pi
(
,
k
j
) is the same as pi
(
,
k
j
-1).
• If f vk is in pi
(
,
k
j
), then we can break pi
(
,
k
j
) into two
paths - one from vi to vk and one from vk to vj . Each
of these paths uses vertices from {v1,v2,…,vk-1}.
46. Floyd's Algorithm
From our observations, the following recurrence
relation follows:
This equation must be computed for each pair of nodes and
for k = 1, n. The serial complexity is O(n3).
47. Floyd's Algorithm
Floyd's all-pairs shortest paths algorithm.
This program computes the all-pairs shortest paths
of the graph G = (V,E) with adjacency matrix A.