This document provides an overview of the topics covered in Unit 5, which include graphs, hashing, and collision resolution techniques. It defines graphs and their components such as vertices, edges, directed and undirected graphs. It also discusses different graph representations like adjacency matrix and adjacency list. Elementary graph operations like breadth-first search and depth-first search are explained along with examples. Hashing functions and collision resolution are also introduced.
The document discusses graphs and graph algorithms. It defines what a graph is - a non-linear data structure consisting of vertices connected by edges. It describes different graph representations like adjacency matrix, incidence matrix and adjacency list. It also explains graph traversal algorithms like depth-first search and breadth-first search. Finally, it covers minimum spanning tree algorithms like Kruskal's and Prim's algorithms for finding minimum cost spanning trees in graphs.
A graph is a data structure consisting of vertices and edges connecting the vertices. Graphs can be directed or undirected. Depth-first search (DFS) and breadth-first search (BFS) are algorithms for traversing graphs by exploring neighboring vertices. DFS uses a stack and explores as far as possible along each branch before backtracking, while BFS uses a queue and explores all neighbors at each depth level first before moving to the next level.
This document discusses graphs and graph data structures. It defines a graph as a pictorial representation of a set of objects connected by links, with the objects represented as vertices and the links as edges. It provides definitions and examples of basic graph terminology like vertices, edges, adjacency, and different types of graphs like directed vs undirected graphs. It also covers graph implementations using adjacency matrices and adjacency lists, as well as common graph algorithms like depth-first search and breadth-first search. Finally, it lists some applications of graphs like social networks, maps, and computer networks.
Graph terminology and algorithm and tree.pptxasimshahzad8611
This document provides an overview of key concepts in graph theory including graph terminology, representations, traversals, spanning trees, minimum spanning trees, and shortest path algorithms. It defines graphs, directed vs undirected graphs, connectedness, degrees, adjacency, paths, cycles, trees, and graph representations using adjacency matrices and lists. It also describes breadth-first and depth-first traversals, spanning trees, minimum spanning trees, and algorithms for finding minimum spanning trees and shortest paths like Kruskal's, Prim's, Dijkstra's, Bellman-Ford and A* algorithms.
The document explains the concept of graphs as a data structure consisting of vertices and edges, detailing both undirected and directed graphs. It provides formal definitions, examples, and various representations of graphs including adjacency matrices and adjacency lists, along with methods for traversing graphs like breadth-first search (BFS) and depth-first search (DFS). The algorithms for these traversal methods are outlined step by step, emphasizing the states of nodes during processing.
The document discusses graphs and graph algorithms. It defines what a graph is and how they can be represented. It also explains graph traversal algorithms like depth-first search (DFS) and breadth-first search (BFS). Additionally, it covers algorithms for finding the shortest path using Dijkstra's algorithm and calculating minimum spanning trees using Kruskal's algorithm.
The document defines and explains basic graph terminology and representations. It begins by defining what a graph is composed of, including vertices and edges. It then discusses directed vs undirected graphs and provides examples. It also covers basic graph terminology such as adjacent nodes, degree, paths, cycles, and more. Finally, it discusses different ways of representing graphs, including adjacency matrices, adjacency lists, and traversing graphs using breadth-first and depth-first search algorithms.
The document discusses graphs and graph algorithms. It begins by defining what a graph is - a collection of vertices connected by edges. It then lists four learning objectives related to representing graphs, traversing graphs, calculating minimum spanning trees, and finding shortest routes. The document goes on to describe different ways of representing graphs through adjacency matrices and lists. It also explains graph traversal algorithms like depth-first search and breadth-first search. Finally, it discusses algorithms for finding minimum spanning trees and shortest paths in weighted graphs.
This document discusses graphs and Eulerian paths and circuits. It begins by defining what a graph is - a set of nodes and edges. It then describes different types of graphs like directed/undirected, cyclic/acyclic, labeled, and weighted graphs. It explains the concepts of adjacency and connectivity in graphs. The document focuses on Eulerian paths and circuits, providing properties for a graph to have an Eulerian path or circuit. It presents pseudocode for an algorithm to check if a graph is Eulerian using depth-first search. Finally, it includes C++ code for a program that tests if input graphs exhibit an Eulerian path or circuit.
Algorithms and data Chapter 3 V Graph.pptxzerihunnana
This document discusses graphs and graph algorithms. It defines graphs as collections of vertices and edges. It describes different types of graphs like directed, undirected, weighted graphs. It explains graph traversal algorithms like breadth-first search and depth-first search. It also discusses minimum spanning trees and algorithms to find them, like Prim's algorithm and Kruskal's algorithm.
This document provides an overview of graphs as a data structure consisting of nodes (vertices) connected by edges, including definitions, types (directed and undirected), and terminology. It discusses graph implementations (adjacency matrix and list), traversals (depth-first search and breadth-first search), and various applications of graphs. Additionally, it covers important concepts such as complete graphs, connected graphs, and the use of different algorithms for pathfinding and traversal.
The document defines and provides examples of different types of graphs, including simple graphs, multigraphs, pseudographs, directed graphs, and directed multigraphs. It also defines key graph theory concepts such as vertices, edges, paths, degrees of vertices, adjacency matrices, subgraphs, unions of graphs, and connectivity. Examples are provided to illustrate these definitions and concepts, such as examples of graphs, paths, and how to construct the adjacency matrix of a graph.
Graphs are non-linear data structures containing vertices (nodes) connected by edges. A graph G is represented as G = (V, E) where V is the set of vertices and E is the set of edges. Edges can be directed, undirected, or weighted. Graphs are used to model real-world networks and relationships. Common graph algorithms include traversal (depth-first search and breadth-first search), topological sorting of directed acyclic graphs, and finding single-source shortest paths (Dijkstra's algorithm).
UNIT III discrete mathematice notes availiableCHHAYANAYAK5
The document provides a comprehensive overview of graph theory, covering key concepts such as graph definitions, types of graphs (directed, undirected, weighted), and various graph terminologies including paths, circuits, Hamiltonian paths, and Euler paths. It also discusses the properties of trees, including spanning trees and minimum spanning trees, as well as algorithms like Kruskal’s and Prim’s for finding minimum spanning trees. Additionally, the document explains mathematical representations of graphs, isomorphism, subgraphs, cycles, and their applications in real-world scenarios like network communication and route optimization.
This document provides an overview of graph theory. It defines various graph types including simple graphs, multigraphs, pseudographs, directed graphs, and labeled graphs. It also defines key graph terminology such as vertices, edges, degree, adjacency, connectivity, and planar graphs. Graph theory has many applications in fields like transportation, computer networks, and chemistry for modeling relationships between objects.
The document discusses depth-first search (DFS) and breadth-first search (BFS) algorithms for graph traversal. It explains that DFS uses a stack to systematically visit all vertices in a graph by exploring neighboring vertices before moving to the next level, while BFS uses a queue to explore neighboring vertices at the same level before moving to the next. Examples are provided to illustrate how DFS can be used to check for graph connectivity and cyclicity.
The document provides an overview of graph structures, including definitions of vertices, edges, directed and undirected graphs, paths, cycles, and connectedness. It also discusses applications of graphs, traversal algorithms (Depth-First Search and Breadth-First Search), and different ways to represent graphs (adjacency matrix and adjacency list). Additionally, examples of graph usage in various contexts, such as computer networks and maze solving, are presented.
The document discusses graphs and graph theory. It defines graphs as non-linear data structures used to model networks and relationships. The key types of graphs are undirected graphs, where edges have no orientation, and directed graphs, where edges have orientation. Graph traversal algorithms like depth-first search and breadth-first search are discussed. Common graph terminology is defined, including vertices, edges, paths, cycles, degrees. Different graph representations like adjacency matrices and adjacency lists are also covered. Applications of graphs include modeling networks, routes, and relationships.
A graph G is composed of a set of vertices V connected by edges E. It can be represented using an adjacency matrix, with a 1 or 0 in position (i,j) indicating whether vertices i and j are connected, or an adjacency list storing the neighbors of each vertex. Graph search algorithms like depth-first search (DFS) and breadth-first search (BFS) are used to traverse the graph and find paths between vertices, with DFS prioritizing depth and BFS prioritizing breadth of exploration. DFS uses recursion to implicitly store paths while BFS uses queues and must store paths separately.
This document provides information about graphs and graph algorithms. It discusses different graph representations including adjacency matrices and adjacency lists. It also describes common graph traversal algorithms like depth-first search and breadth-first search. Finally, it covers minimum spanning trees and algorithms to find them, specifically mentioning Kruskal's algorithm.
This document provides an overview of graph theory concepts. It defines what a graph is consisting of vertices and edges. It describes different types of graphs such as directed vs undirected, simple vs complex graphs. It introduces common graph terminology like degree of a vertex, adjacent/incident vertices, and connectivity. Examples of applications are given such as transportation networks, web graphs, and scheduling problems. Special graph cases like complete graphs and cycles are also defined.
Chapter 3 of the document covers various aspects of graph theory, including definitions, types of graphs, representation, terminology, and the significance of graphs in real-world applications such as transportation and logistics. It discusses different graph structures like directed, undirected, multigraphs, and bipartite graphs, along with their properties and examples. Additionally, it introduces concepts like connectivity, shortest paths, and special graphs like complete and cycle graphs.
Y - Recursion The Hard Way GopherCon EU 2025Eleanor McHugh
In most modern programming languages, including Go, it's possible for a function to call itself recursively. It's such a mainstream technique that we've come to take it for granted.
But what if functions couldn't call themselves?
There's a branch of mathematics called Combinatorics which answers just these kinds of questions, and this presentation takes these ideas and phrases them in Go to teach a deeper view of computation through the medium of code.
Key Challenges in Troubleshooting Customer On-Premise ApplicationsTier1 app
When applications are deployed in customer-managed environments, resolving performance issues becomes a hidden battle. Limited access to logs, delayed responses, and vague problem descriptions make root cause analysis incredibly challenging.
In this presentation, we walk through:
The six most common hurdles faced in on-prem troubleshooting
A practical 360° artifact collection strategy using the open-source yc-360 script
Real-world case studies covering transaction timeouts, CPU spikes, and intermittent HTTP 502 errors
Benefits of structured data capture in reducing investigation time and improving communication with customers
✅ Whether you're supporting enterprise clients or building tools for distributed environments, this deck offers a practical roadmap to make on-prem issue resolution faster and less frustrating.
More Related Content
Similar to 14. GRAPH in data structures and algorithm.ppt (20)
Graph terminology and algorithm and tree.pptxasimshahzad8611
This document provides an overview of key concepts in graph theory including graph terminology, representations, traversals, spanning trees, minimum spanning trees, and shortest path algorithms. It defines graphs, directed vs undirected graphs, connectedness, degrees, adjacency, paths, cycles, trees, and graph representations using adjacency matrices and lists. It also describes breadth-first and depth-first traversals, spanning trees, minimum spanning trees, and algorithms for finding minimum spanning trees and shortest paths like Kruskal's, Prim's, Dijkstra's, Bellman-Ford and A* algorithms.
The document explains the concept of graphs as a data structure consisting of vertices and edges, detailing both undirected and directed graphs. It provides formal definitions, examples, and various representations of graphs including adjacency matrices and adjacency lists, along with methods for traversing graphs like breadth-first search (BFS) and depth-first search (DFS). The algorithms for these traversal methods are outlined step by step, emphasizing the states of nodes during processing.
The document discusses graphs and graph algorithms. It defines what a graph is and how they can be represented. It also explains graph traversal algorithms like depth-first search (DFS) and breadth-first search (BFS). Additionally, it covers algorithms for finding the shortest path using Dijkstra's algorithm and calculating minimum spanning trees using Kruskal's algorithm.
The document defines and explains basic graph terminology and representations. It begins by defining what a graph is composed of, including vertices and edges. It then discusses directed vs undirected graphs and provides examples. It also covers basic graph terminology such as adjacent nodes, degree, paths, cycles, and more. Finally, it discusses different ways of representing graphs, including adjacency matrices, adjacency lists, and traversing graphs using breadth-first and depth-first search algorithms.
The document discusses graphs and graph algorithms. It begins by defining what a graph is - a collection of vertices connected by edges. It then lists four learning objectives related to representing graphs, traversing graphs, calculating minimum spanning trees, and finding shortest routes. The document goes on to describe different ways of representing graphs through adjacency matrices and lists. It also explains graph traversal algorithms like depth-first search and breadth-first search. Finally, it discusses algorithms for finding minimum spanning trees and shortest paths in weighted graphs.
This document discusses graphs and Eulerian paths and circuits. It begins by defining what a graph is - a set of nodes and edges. It then describes different types of graphs like directed/undirected, cyclic/acyclic, labeled, and weighted graphs. It explains the concepts of adjacency and connectivity in graphs. The document focuses on Eulerian paths and circuits, providing properties for a graph to have an Eulerian path or circuit. It presents pseudocode for an algorithm to check if a graph is Eulerian using depth-first search. Finally, it includes C++ code for a program that tests if input graphs exhibit an Eulerian path or circuit.
Algorithms and data Chapter 3 V Graph.pptxzerihunnana
This document discusses graphs and graph algorithms. It defines graphs as collections of vertices and edges. It describes different types of graphs like directed, undirected, weighted graphs. It explains graph traversal algorithms like breadth-first search and depth-first search. It also discusses minimum spanning trees and algorithms to find them, like Prim's algorithm and Kruskal's algorithm.
This document provides an overview of graphs as a data structure consisting of nodes (vertices) connected by edges, including definitions, types (directed and undirected), and terminology. It discusses graph implementations (adjacency matrix and list), traversals (depth-first search and breadth-first search), and various applications of graphs. Additionally, it covers important concepts such as complete graphs, connected graphs, and the use of different algorithms for pathfinding and traversal.
The document defines and provides examples of different types of graphs, including simple graphs, multigraphs, pseudographs, directed graphs, and directed multigraphs. It also defines key graph theory concepts such as vertices, edges, paths, degrees of vertices, adjacency matrices, subgraphs, unions of graphs, and connectivity. Examples are provided to illustrate these definitions and concepts, such as examples of graphs, paths, and how to construct the adjacency matrix of a graph.
Graphs are non-linear data structures containing vertices (nodes) connected by edges. A graph G is represented as G = (V, E) where V is the set of vertices and E is the set of edges. Edges can be directed, undirected, or weighted. Graphs are used to model real-world networks and relationships. Common graph algorithms include traversal (depth-first search and breadth-first search), topological sorting of directed acyclic graphs, and finding single-source shortest paths (Dijkstra's algorithm).
UNIT III discrete mathematice notes availiableCHHAYANAYAK5
The document provides a comprehensive overview of graph theory, covering key concepts such as graph definitions, types of graphs (directed, undirected, weighted), and various graph terminologies including paths, circuits, Hamiltonian paths, and Euler paths. It also discusses the properties of trees, including spanning trees and minimum spanning trees, as well as algorithms like Kruskal’s and Prim’s for finding minimum spanning trees. Additionally, the document explains mathematical representations of graphs, isomorphism, subgraphs, cycles, and their applications in real-world scenarios like network communication and route optimization.
This document provides an overview of graph theory. It defines various graph types including simple graphs, multigraphs, pseudographs, directed graphs, and labeled graphs. It also defines key graph terminology such as vertices, edges, degree, adjacency, connectivity, and planar graphs. Graph theory has many applications in fields like transportation, computer networks, and chemistry for modeling relationships between objects.
The document discusses depth-first search (DFS) and breadth-first search (BFS) algorithms for graph traversal. It explains that DFS uses a stack to systematically visit all vertices in a graph by exploring neighboring vertices before moving to the next level, while BFS uses a queue to explore neighboring vertices at the same level before moving to the next. Examples are provided to illustrate how DFS can be used to check for graph connectivity and cyclicity.
The document provides an overview of graph structures, including definitions of vertices, edges, directed and undirected graphs, paths, cycles, and connectedness. It also discusses applications of graphs, traversal algorithms (Depth-First Search and Breadth-First Search), and different ways to represent graphs (adjacency matrix and adjacency list). Additionally, examples of graph usage in various contexts, such as computer networks and maze solving, are presented.
The document discusses graphs and graph theory. It defines graphs as non-linear data structures used to model networks and relationships. The key types of graphs are undirected graphs, where edges have no orientation, and directed graphs, where edges have orientation. Graph traversal algorithms like depth-first search and breadth-first search are discussed. Common graph terminology is defined, including vertices, edges, paths, cycles, degrees. Different graph representations like adjacency matrices and adjacency lists are also covered. Applications of graphs include modeling networks, routes, and relationships.
A graph G is composed of a set of vertices V connected by edges E. It can be represented using an adjacency matrix, with a 1 or 0 in position (i,j) indicating whether vertices i and j are connected, or an adjacency list storing the neighbors of each vertex. Graph search algorithms like depth-first search (DFS) and breadth-first search (BFS) are used to traverse the graph and find paths between vertices, with DFS prioritizing depth and BFS prioritizing breadth of exploration. DFS uses recursion to implicitly store paths while BFS uses queues and must store paths separately.
This document provides information about graphs and graph algorithms. It discusses different graph representations including adjacency matrices and adjacency lists. It also describes common graph traversal algorithms like depth-first search and breadth-first search. Finally, it covers minimum spanning trees and algorithms to find them, specifically mentioning Kruskal's algorithm.
This document provides an overview of graph theory concepts. It defines what a graph is consisting of vertices and edges. It describes different types of graphs such as directed vs undirected, simple vs complex graphs. It introduces common graph terminology like degree of a vertex, adjacent/incident vertices, and connectivity. Examples of applications are given such as transportation networks, web graphs, and scheduling problems. Special graph cases like complete graphs and cycles are also defined.
Chapter 3 of the document covers various aspects of graph theory, including definitions, types of graphs, representation, terminology, and the significance of graphs in real-world applications such as transportation and logistics. It discusses different graph structures like directed, undirected, multigraphs, and bipartite graphs, along with their properties and examples. Additionally, it introduces concepts like connectivity, shortest paths, and special graphs like complete and cycle graphs.
Y - Recursion The Hard Way GopherCon EU 2025Eleanor McHugh
In most modern programming languages, including Go, it's possible for a function to call itself recursively. It's such a mainstream technique that we've come to take it for granted.
But what if functions couldn't call themselves?
There's a branch of mathematics called Combinatorics which answers just these kinds of questions, and this presentation takes these ideas and phrases them in Go to teach a deeper view of computation through the medium of code.
Key Challenges in Troubleshooting Customer On-Premise ApplicationsTier1 app
When applications are deployed in customer-managed environments, resolving performance issues becomes a hidden battle. Limited access to logs, delayed responses, and vague problem descriptions make root cause analysis incredibly challenging.
In this presentation, we walk through:
The six most common hurdles faced in on-prem troubleshooting
A practical 360° artifact collection strategy using the open-source yc-360 script
Real-world case studies covering transaction timeouts, CPU spikes, and intermittent HTTP 502 errors
Benefits of structured data capture in reducing investigation time and improving communication with customers
✅ Whether you're supporting enterprise clients or building tools for distributed environments, this deck offers a practical roadmap to make on-prem issue resolution faster and less frustrating.
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptxMaharshi Mallela
Movie recommendation system is a software application or algorithm designed to suggest movies to users based on their preferences, viewing history, or other relevant factors. The primary goal of such a system is to enhance user experience by providing personalized and relevant movie suggestions.
Have you upgraded your application from Qt 5 to Qt 6? If so, your QML modules might still be stuck in the old Qt 5 style—technically compatible, but far from optimal. Qt 6 introduces a modernized approach to QML modules that offers better integration with CMake, enhanced maintainability, and significant productivity gains.
In this webinar, we’ll walk you through the benefits of adopting Qt 6 style QML modules and show you how to make the transition. You'll learn how to leverage the new module system to reduce boilerplate, simplify builds, and modernize your application architecture. Whether you're planning a full migration or just exploring what's new, this session will help you get the most out of your move to Qt 6.
Automate your heat treatment processes for superior precision, consistency, and cost savings. Explore solutions for furnaces, quench systems. Heat treatment is a critical manufacturing process that alters the microstructure and properties of materials, typically metals, to achieve desired characteristics such as hardness, strength, ductility, and wear resistance.
Automated Migration of ESRI Geodatabases Using XML Control Files and FMESafe Software
Efficient data migration is a critical challenge in geospatial data management, especially when working with complex data structures. This presentation explores an automated approach to migrating ESRI Geodatabases using FME and XML-based control files. A key advantage of this method is its adaptability: changes to the data model are seamlessly incorporated into the migration process without requiring modifications to the underlying FME workflow. By separating data model definitions from migration logic, this approach ensures flexibility, reduces maintenance effort, and enhances scalability.
Women in Tech: Marketo Engage User Group - June 2025 - AJO with AWSBradBedford3
Creating meaningful, real-time engagement across channels is essential to building lasting business relationships. Discover how AWS, in collaboration with Deloitte, set up one of Adobe's first instances of Journey Optimizer B2B Edition to revolutionize customer journeys for B2B audiences.
This session will share the use cases the AWS team has the implemented leveraging Adobe's Journey Optimizer B2B alongside Marketo Engage and Real-Time CDP B2B to deliver unified, personalized experiences and drive impactful engagement.
They will discuss how they are positioning AJO B2B in their marketing strategy and how AWS is imagining AJO B2B and Marketo will continue to work together in the future.
Whether you’re looking to enhance customer journeys or scale your B2B marketing efforts, you’ll leave with a clear view of what can be achieved to help transform your own approach.
Speakers:
Britney Young Senior Technical Product Manager, AWS
Erine de Leeuw Technical Product Manager, AWS
Sysinfo OST to PST Converter InfographicSysInfo Tools
The SysInfo OST to PST Converter is the most secure software to perform the OST to PST conversion. It converts OST files into various formats, including MBOX, EML, EMLX, HTML, and CSV, with 100% accuracy. Along with that, it imports OST files into different email clients like Office 365 and G Suite.
visit: https://www.sysinfotools.com/ost-to-pst-converter.php
Best Practice for LLM Serving in the CloudAlluxio, Inc.
Alluxio Webinar
June 17, 2025
For more Alluxio Events: https://www.alluxio.io/events/
Speaker:
Nilesh Agarwal (Co-founder & CTO @ Inferless)
Nilesh Agarwal, co-founder & CTO at Inferless, shares insights on accelerating LLM inference in the cloud using Alluxio, tackling key bottlenecks like slow model weight loading from S3 and lengthy container startup time. Inferless uses Alluxio as a three-tier cache system that dramatically cuts model load time by 10x.
Streamlining CI/CD with FME Flow: A Practical GuideSafe Software
Join us as we explore how to deploy a fault-tolerant FME Flow installation using FME Flow’s IaC templates alongside Terraform, AWS, and GitHub in a CI/CD workflow. This session will also cover how to leverage FME’s CI/CD capabilities for FME Flow upgrades and FME object migration between different environments, ensuring seamless automation and scalability.
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...Philip Schwarz
For most up-to-date version see https://fpilluminated.org/deck/264
In this deck we look at the following:
* How unfolding lists is the computational dual of folding lists
* Different variants of the function for unfolding lists
* How they relate to the iterate function
Milwaukee Marketo User Group June 2025 - Optimize and Enhance Efficiency - Sm...BradBedford3
Inspired by the Adobe Summit hands-on lab, Optimize Your Marketo Instance Performance, review the recording from June 5th to learn best practices that can optimize your smart campaign and smart list processing time, inefficient practices to try to avoid, and tips and tricks for keeping your instance running smooth!
You will learn:
How smart campaign queueing works, how flow steps are prioritized, and configurations that slow down smart campaign processing.
Best practices for smart list and smart campaign configurations that yield greater reliability and processing efficiencies.
Generally recommended timelines for reviewing instance performance: walk away from this session with a guideline of what to review in Marketo and how often to review it.
This session will be helpful for any Marketo administrator looking for opportunities to improve and streamline their instance performance. Be sure to watch to learn best practices and connect with your local Marketo peers!
Simplify Task, Team, and Project Management with Orangescrum WorkOrangescrum
Streamline project workflows, team collaboration, and time tracking with orangescrum work, your all-in-one tool for smarter and faster project execution.
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?Hassan Abid
As mobile hardware becomes more powerful, the promise of running advanced AI directly on-device is closer than ever. With Google’s latest on-device model Gemini Nano, accessible through the new ML Kit GenAI APIs and AI Edge SDK, alongside the open-source Gemma-3n models, developers can now integrate lightweight, multimodal intelligence that works even without an internet connection. But does this mean we no longer need cloud-based AI? This session explores the practical trade-offs between on-device and cloud AI for mobile apps.
Canva Pro Crack Free Download 2025-FREE LATESTgrete1122g
🌍📱👉COPY & PASTE LINK >> https://click4pc.com/after-verification-click-go-to-download-page/
Canva Pro PC Crack is a practical design app to create beautiful montages and compositions with a lot of resources on the platform.
A Guide to Telemedicine Software Development.pdfOlivero Bozzelli
Learn how telemedicine software is built from the ground up—starting with idea validation, followed by tech selection, feature integration, and deployment.
Know more about this: https://www.yesitlabs.com/a-guide-to-telemedicine-software-development/
3. Introduction to Graph
• A graph is a non-linear data structure, which
contains a set of vertices (or nodes) and edges
which connect themselves.
• In case of Tree structure, there is a
hierarchical relationship between parent and
child node i.e One parent and many children.
• On the other hand, in case of a graph, the
relationship among the vertices is many
parents to many children.
4. Introduction to Graph
Mathematically, A graph can be defined as : G = { V, E }
Where V = Set of Vertices and E = Set of Edges
E:g: In the above graph:
Here, V = { A,B,C,D,E}
E = { (A,B),(B,C),(A,D),(B,D),(D,E),(C,E) }
6. Undirected Graph
It is a graph such that G = { V,E} where V is set of
vertices and E is the set of unordered pair of vertices.
Here,
V = { A,B,C,D}
E={(A,B),(B,C),(C,D),(A,D),(A,C),(B,D)}
Note: Unordered pair means same edge can be represented
in any combination. For example, the edge (A,B) can be
represented as (B,A).
7. Directed Graph
It is a graph such that G = {V , E} where V is set of
vertices and E is the set of ordered pair of vertices.
Here,
V = { A,B,C,D}
E={(A,B),(B,C),(C,D),(D,A),(C,A),(B,D)}
Note: If an ordered pair (A,B) is in set E, then there is an
edge directed from A to B (indicated by arrow sign)
8. Weighted Graph
A graph is termed as weighted if all the edges are
labeled with some weights. A weighted graph can be
undirected or directed.
9. Adjacent Vertices
In case of directed graph, a vertex X is adjacent to Y, if
there is an edge from X to Y.
Here, Vertex A is adjacent to Vertex B,
Vertex D is adjacent to Vertex A
10. Self Loop
If there is an edge exist, where starting and end
vertex are same i.e (A,A) is an edge, then it is called a
self loop.
Here, there is a self loop at vertex A
11. Parallel Edges
If there are more than one edge exist between the
same pair of vertices, then they are known as parallel
edges.
Here, parallel edge exist between Vertex B and Vertex C.
12. Cyclic & Acyclic Graph
Cycle: If there is path containing edges which start from
vertex A and ends vertex A, then the path is called Cycle.
A graph which has one or more cycles is called Cyclic graph.
Otherwise, it is called Acyclic graph.
Cyclic Graph
Here, three cycles exist.
The path is : (A,B),(B,C),(C,A)
(A,B),(B,D),(D,A)
(B,C),(C,D),(D,A),(A,B)
13. Isolated Vertex
• A Vertex is isolated, if there is no edge connected
from any other vertex to that vertex.
• Here Vertex E is an isolated vertex as there is no
edge connected to any other vertex of the graph.
14. Degree of a Vertex ( Undirected Graph)
For undirected graph, the number of edges
connected with a vertex X is degree of that
vertex X.
Here, Degree(A) = 2, Degree(B) = 3
Degree(C) = 2, Degree(D) = 3
15. Degree of a Vertex ( Directed Graph)
For directed graph, there are two types of
degrees. They are:
1.In-degree : In-degree of a vertex A is the
number of edges incident into A(i.e. the
number of edges ending at A)
2.Out-degree : Out-degree of vertex A is the
number of edges eminating from A (i.e.
number of edges beginning at A )
16. Degree of a Vertex ( Directed Graph)
In the above directed graph,
Indegree(A) = 2 Outdegree(A) = 1
Indegree(B) = 1 Outdegree(B) = 2
Indegree(C) = 1 Outdegree(C) = 2
Indegree(D) = 2 Outdegree(D) = 1
17. Pendant Vertex
A vertex X is called pendant if in-degree(X) is 1
and out-degree(X) is 0.
Here, Vertex C, D, E are pendant vertex
18. Representation of Graph
The graph can be represented using :
1.Sequential representation ( Using Matrix)
Adjacency Matrix
Incidence Matrix
2. Linked representation (Using Linked List)
19. Matrix Representation of Graph
Adjacency Matrix: For representing a graph
“G” with “N” number of vertices, a matrix of
NxN size can be considered.
Assume A[N][N] is matrix representing
Adjacency matrix.
If “i” represents row position and “j”
represents column position, then if there is an
edge from Vi to Vj , Then A[i][j] = 1 else A[i]
[j] = 0 .
20. Adjacency Matrix: An Example
Represent the following graph in Adjacency
Matrix.
A B C D
A 0 1 0 0
B 0 0 1 1
C 1 0 0 1
D 1 0 0 0
21. Disadvantage of Adjacency Matrix
The Adjacency matrix has following
disadvantages:
1.It requires n2
space to represent a graph and
also takes n2
time solve most the graph
related problems.
2.It may be difficult to insert and delete nodes,
because the size of matrix need to be
changed.
22. Matrix Representation of Graph
Incidence Matrix: An Incidence matrix consists
of a row for every vertex and a column for
every edge.
For representing a graph “G” with “N” number
of vertices and “E” number of edges, a matrix
of NxE size can be considered.
Assume A[N][E] is matrix representing
Incidence matrix.
Here, if there is an edge Ek exist from Vi to Vj
then ViEk = 1, VjEk = -1 and other at Ek = 0
23. Incidence Matrix: An Example
Represent the following graph in Incidence
Matrix.
E1 E2 E3 E4 E5
A 1 0 -1 0 0
B -1 -1 0 0 1
C 0 0 0 -1 -1
D 0 1 1 1 0
24. Linked Representation of Graph
In the linked representation, an adjacency list
is used to store the Graph into the computer's
memory.
The structure of node will be as follow:
1.VERTEX : It consists the name of the Vertex
2.NEXT : It is a pointer to next vertex
3.LIST : It points to 1st
node of adjacency list
VERTEX NEXT LIST
25. Linked Representation : An Example
Represent the following graph Using Linked List
VERTEX ADJACENCY LIST
A B
B C,D
C E
D A
E D
27. Graph Traversal
A graph can be traversed in two standard ways. They
are:
1. Depth First Search (DFS)
2. Breadth First Search (BFS)
In DFS, we will take the help of a Stack and in BFS,
we will take the help of a Queue to hold the nodes
for future processing.
During execution of above traversal algorithms, we
consider three states for each vertex :
1. Ready State : It is the initial state of each vertex
2. Waiting State : When the vertex is within Stack or Queue
3. Processed State : When the vertex is visited
28. Depth First Search (DFS)
• Depth first search (DFS) algorithm starts with the
initial node of the graph G, and then goes to deeper
and deeper until we find the node which has no
children.
• The algorithm, then backtracks from the dead end
towards the most recent node that is yet to be
completely unexplored.
• The data structure which is being used in DFS is
stack.
29. Depth First Search (DFS) Algorithm
Step 1: SET STATUS = 1 (ready state) for each node in G
Step 2: Push the starting node A on the stack and set its STATUS = 2
(waiting state)
Step 3: Repeat Steps 4 and 5 until STACK is empty
Step 4: Pop the top node N. Process it and set its STATUS = 3
(processed state)
Step 5: Push on the stack all the neighbours of N that are in the
ready state (whose STATUS = 1) and set their STATUS = 2
(waiting state)
[END OF LOOP – Step 3]
Step 6: EXIT
30. Depth First Search : An Example
Consider the graph G along with its adjacency list, given in the
figure below. Calculate the order to print all the nodes of the
graph starting from node H, by using depth first search (DFS)
algorithm.
31. Depth First Search : An Example
Push H onto the stack
STACK : H
Pop the top element of the stack i.e. H, print it and push all the
neighbours of H onto the stack that are is ready state.
Print H
STACK : A
Pop the top element of the stack i.e. A, print it and push all the
neighbours of A onto the stack that are in ready state.
Print A
STACK: B, D
Pop the top element of the stack i.e. D, print it and push all the
neighbours of D onto the stack that are in ready state.
32. Depth First Search : An Example
Print D
STACK : B, F
Pop the top element of the stack i.e. F, print it and push all
the neighbours of F onto the stack that are in ready state.
Print F
STACK : B
Pop the top of the stack i.e. B and push all the neighbours
Print B
STACK : C
Pop the top of the stack i.e. C and push all the neighbours.
33. Depth First Search : An Example
Print C
STACK : E, G
Pop the top of the stack i.e. G and push all its neighbours.
Print G
STACK : E
Pop the top of the stack i.e. E and push all its neighbours.
Print E
STACK :
Hence, the stack now becomes empty and all the nodes of
the graph have been traversed.
The printing sequence of the graph will be :
H → A → D → F → B → C → G → E
34. Breadth First Search (BFS)
• Breadth first search is a graph traversal algorithm
that starts traversing the graph from root node and
explores all the neighbouring nodes.
• Then, it selects the nearest node and explore all the
unexplored nodes. The algorithm follows the same
process for each of the nearest node until it finds the
goal.
• The data structure which is being used in DFS is
queue.
35. Breadth First Search (BFS) Algorithm
Step 1: SET STATUS = 1 (ready state) for each node in G
Step 2: Insert the starting node A into queue and set its STATUS = 2
(waiting state)
Step 3: Repeat Steps 4 and 5 until QUEUE is empty
Step 4: Delete node N and Process it and set its STATUS = 3
(processed state).
Step 5: Delete all the neighbours of N that are in the ready state
(whose STATUS = 1) and set their STATUS = 2 (waiting state)
[END OF LOOP]
Step 6: EXIT
36. Breadth First Search : An Example
Consider the following graph G shown below , calculate the
minimum path p from node A to node E. Given that each edge
has a length of 1.
37. Breadth First Search : An Example
Minimum Path P can be found by applying breadth first search
algorithm that will begin at node A and will end at E.
The algorithm uses a QUEUE which holds all the nodes that are
to be processed.
Lets start examining the graph from Node A.
1. Add A to QUEUE.
QUEUE = {A}
2. Delete the Node A from QUEUE and insert all its neighbours.
Process the node A.
QUEUE = {B, D}
PRINT = {A}
38. Breadth First Search : An Example
3. Delete the node B from QUEUE and insert all its neighbours.
Process node B.
QUEUE = {D, C, F}
PRINT = {A, B}
4. Delete the node D from QUEUE and insert all its neighbours.
Since F is the only neighbour of it which has been inserted, we
will not insert it again. Process node D.
QUEUE1 = {C, F}
PRINT = { A, B, D}
5. Delete the node C from QUEUE1 and insert all its neighbours.
Process node C.
QUEUE = {F, E, G}
PRINT = {A, B, D, C}
39. Breadth First Search : An Example
6. Remove F from QUEUE and add all its neighbours. Since all of
its neighbours has already been added, we will not add them
again. Process node F.
QUEUE = {E, G}
PRINT = {A, B, D, C, F}
7. Remove E from QUEUE, all of E's neighbours has already been
added to QUEUE, therefore we will not add them again. All the
nodes are visited and the target node i.e. E is encountered.
QUEUE = {G}
PRINT = {A, B, D, C, F, E}
The minimum path will be A → B → C → E.