Amity Institute of Information Technology
CSIT743: GRAPH THEORY AND COMBINATORICS TOPIC –Directed Graph
Submitted to: Dr. Deepak Kumar
Submitted by: Sakshi Dadheech (223), Aaradhya Dixit (224)
Introduction
A directed graph (or digraph) is a set of nodes connected by edges, where the edges have a direction associated with
them. Unlike undirected graphs, where the connection between nodes is bidirectional, directed graphs show relationships
that have a specific direction. This feature makes digraphs suitable for modeling various real-world scenarios such as traffic
flow, web page linking, and scheduling tasks.
Types of Directed Graph:
– Simple Directed Graph: A directed graph with no multiple edges or loops (i.e., edges that start and end at the same vertex).
– Directed Multigraph: A graph that allows multiple directed edges between the same set of vertices.
– Directed Acyclic Graph (DAG): A directed graph with no cycles. DAGs are essential in applications like task scheduling, dependency management, and data
processing pipelines.
– Strongly Connected Graph: A directed graph in which there is a directed path from any vertex to every other vertex.
– Weakly Connected Graph: A graph where, if the direction of edges is ignored, the underlying undirected graph is connected, but there might not be a directed
path between every pair of vertices.
– Regular Directed Graph: A directed graph where each vertex has the same in-degree and out-degree.
Applications:
– Web Page Ranking: The structure of the World Wide Web is best represented as a directed graph, where pages are nodes and hyperlinks are directed edges.
– Directed graphs have significant applications across various domains in graph theory and real-world scenarios:
– Social Networks: Relationships such as follower-following dynamics on platforms like Twitter can be modeled using directed graphs.
– Task Scheduling: Dependencies in tasks (e.g., prerequisites in courses or project tasks) are represented using Directed Acyclic Graphs (DAGs) to ensure proper
sequencing.
– Network Flows: Directed graphs are essential in studying network flow problems such as transportation and traffic analysis.
Principles
Directionality
• Each edge in a directed graph has an inherent direction, indicating the relationship from one vertex to
another.
Asymmetry
• The presence of an edge from too does not imply an edge from to. Directed graphs capture non-
symmetric relationships.
Path Representation
• Paths in a directed graph follow the direction of edges. A valid path from too requires traversing edges
in their designated direction.
Vertex Degree
• Each vertex in a directed graph has an in-degree (number of incoming edges) and an out-degree
(number of outgoing edges), which can be different.
Connectivity
• Directed graphs can be classified as strongly connected if there exists a path between any pair of
vertices following the direction of edges, and weakly connected if connectivity is only ensured when
edge directions are ignored.
Real Life Problem/Case Study
Case Study: Task Scheduling in Project Management
Problem Overview
In large projects, various tasks are dependent on the completion of others. Representing these tasks as nodes and dependencies as directed edges helps visualize and manage complex projects efficiently.
Objective
Consider a software development project where tasks such as Design, Development, Testing, and Deployment are involved. If task Design must be completed before Development can start, and Development
must be completed before Testing, a directed graph can illustrate these dependencies. The directed edges ensure that tasks are completed in the correct order, preventing scheduling conflicts and optimizing
workflow. Using topological sorting on the directed graph helps determine a valid sequence of tasks, ensuring that each dependency is respected.
Approach Using Subgraphs
1. Modeling the Problem: Identify entities as vertices and the relationships or dependencies as directed edges. For example, in a task scheduling problem, tasks can be
represented as vertices, and an edge indicates that task must be completed before task.
Graph Construction: Construct the directed graph by defining vertices and edges based on the problem's constraints and relationships.
Implementation and Analysis: Execute the chosen algorithms and analyze the results for insights or solutions. Ensure that edge cases, such as isolated nodes or
cycles, are considered.
Key - Algorithms
– Depth-First Search (DFS) and Breadth-First Search (BFS): Both algorithms can be adapted for directed graphs to explore nodes and detect cycles.
– Topological Sorting: This algorithm is used for ordering vertices in a directed acyclic graph, ensuring that for any directed edge, vertex comes before in the ordering.
– Shortest Path Algorithms: Algorithms like Dijkstra’s and Bellman-Ford can be applied to directed graphs to find the shortest path between nodes.
– Strongly Connected Components (SCC): Tarjan’s algorithm and Kosaraju’s algorithm are popular methods for identifying SCCs in directed graphs.
Example Results
Consider the problem of representing a course prerequisite structure in a university curriculum. Each course can be modeled as a vertex, and a directed edge from course to course indicates that must be
completed before. This structure forms a directed acyclic graph (DAG) where topological sorting can be applied to determine the order in which courses should be taken.
Conclusion
Directed graphs are a powerful structure in graph theory, with a wide range of applications across computer science, operations research, and network analysis. Understanding their properties, algorithms, and
applications enables better problem-solving and modeling of complex, real-world systems.
Numerical Experiment
Experiment: Shortest Path Between Two Nodes.
Objective
Shortest path analysis and demonstrate how to calculate the shortest path between two nodes in a directed graph using Dijkstra’s
Algorithm.
Graph Representation
We will represent a directed graph using an adjacency matrix, where the entry at row and column represents the weight (or cost) of
𝑖 𝑗
the edge from vertex to vertex . If there is no edge, the matrix will have a value of infinity.
𝑖 𝑗
Dijkstra’s Algorithm for Shortest Path
We will use Dijkstra's Algorithm to find the shortest path from vertex 0 to vertex 4 in the directed graph.
Step-by-Step Execution:
1. Initialization:
Distance array dist [] dist[] where each element represents the shortest known distance from the source vertex to the corresponding
vertex.
Set all distances to infinity, except the source vertex (vertex 0), which is set to 0.
A set of unvisited vertices. dist[]=[0,∞,∞,∞,∞].
2. Iteration:
Select the unvisited vertex with the smallest known distance.
For the selected vertex, update the distances of its neighbors. If the distance through the selected vertex is shorter, update the
distance.
3. Termination:
The algorithm terminates when the destination vertex is reached or when all vertices have been visited.
Conclusion
Directed graphs (or digraphs) are fundamental structures in graph theory that represent relationships with a specific direction, meaning
edges have both a source and a destination. This directed nature allows directed graphs to model a wide range of real-world systems, from
traffic networks and web page link structures to dependencies in software systems and social networks.
Throughout this experiment, we explored the basic principles of directed graphs, including how to represent them using adjacency matrices
and how to apply algorithms such as Dijkstra’s Algorithm to solve shortest path problems. Directed graphs provide a powerful tool for
analyzing networks, where the direction of the relationships matters—such as in routing, flow analysis, or dependency resolution.
Graph Representation:
• The adjacency matrix is a convenient representation for directed graphs, allowing efficient access to edge weights. It
can be used to quickly check if a connection exists between two nodes, and it is particularly useful for dense graphs
where the number of edges is relatively high compared to the number of vertices.
Algorithms and Efficiency:
• The performance of algorithms like Dijkstra's for finding the shortest path can be influenced by the graph’s structure.
Directed graphs can be efficiently processed using algorithms tailored for directed edges. Dijkstra's Algorithm, in
particular, is efficient for graphs with non-negative weights and has applications in various fields, including network
routing and supply chain logistics
Limitations:
• While directed graphs are versatile, they also have limitations. For example, they are not suitable for modeling systems
where the relationships are inherently bidirectional unless explicitly represented by two directed edges. Additionally,
algorithms like Dijkstra's Algorithm require non-negative edge weights, and the efficiency of certain algorithms can
degrade if the graph contains negative-weight edges (requiring other techniques like the Bellman-Ford algorithm).
Reference
– What is Directed Graph? | Directed Graph meanin
g - GeeksforGeeks
Graph Theory with Applications:
by J.A. Bondy and U.S.R. Murty.
– The Shortest Path Problem: A Survey:
by David S. Johnson.

More Related Content

PDF
DFS-model Graph Modeling (CES 417) Lecture 6
PPTX
ppt 1.pptx
PPT
Graphs
PPTX
UNIT IV NON LINEAR DATA STRUCTURES - GRAPH.pptx
PPTX
UNIT IV NON LINEAR DATA STRUCTURES - GRAPH
PPTX
logic.pptx
PPT
Graph theory
DFS-model Graph Modeling (CES 417) Lecture 6
ppt 1.pptx
Graphs
UNIT IV NON LINEAR DATA STRUCTURES - GRAPH.pptx
UNIT IV NON LINEAR DATA STRUCTURES - GRAPH
logic.pptx
Graph theory

Similar to Directed Graph in Graph Theory and Combinatorics.pptx (20)

PPTX
Slides Chapter10.1 10.2
PDF
FADML 06 PPC Graphs and Traversals.pdf
PDF
Graph Analyses with Python and NetworkX
PPTX
TREE ADT, TREE TRAVERSALS, BINARY TREE ADT
PPT
Graphs in data structures
PPT
Lecture 5b graphs and hashing
PPTX
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPTX
UNIT III.pptx
PPTX
Graphs in data structure
PPTX
Chapter 1
PDF
Problem Solving with Algorithms and Data Structure - Graphs
DOC
Graph theory02
PDF
LEC 12-DSALGO-GRAPHS(final12).pdf
PDF
Graphs
PPTX
Data Structures and Agorithm: DS 21 Graph Theory.pptx
PPTX
graph.pptx
PPTX
Introduction to graphs
PDF
Graphhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pdf
Slides Chapter10.1 10.2
FADML 06 PPC Graphs and Traversals.pdf
Graph Analyses with Python and NetworkX
TREE ADT, TREE TRAVERSALS, BINARY TREE ADT
Graphs in data structures
Lecture 5b graphs and hashing
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
UNIT III.pptx
Graphs in data structure
Chapter 1
Problem Solving with Algorithms and Data Structure - Graphs
Graph theory02
LEC 12-DSALGO-GRAPHS(final12).pdf
Graphs
Data Structures and Agorithm: DS 21 Graph Theory.pptx
graph.pptx
Introduction to graphs
Graphhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pdf
Ad

Recently uploaded (20)

PDF
Laparoscopic Dissection Techniques at WLH
PDF
The TKT Course. Modules 1, 2, 3.for self study
PDF
Everyday Spelling and Grammar by Kathi Wyldeck
PDF
CAT 2024 VARC One - Shot Revision Marathon by Shabana.pptx.pdf
PPTX
Theoretical for class.pptxgshdhddhdhdhgd
PPTX
Key-Features-of-the-SHS-Program-v4-Slides (3) PPT2.pptx
DOCX
EDUCATIONAL ASSESSMENT ASSIGNMENT SEMESTER MAY 2025.docx
PPTX
ACFE CERTIFICATION TRAINING ON LAW.pptx
PPTX
Designing Adaptive Learning Paths in Virtual Learning Environments
PDF
Chevening Scholarship Application and Interview Preparation Guide
PPTX
Why I Am A Baptist, History of the Baptist, The Baptist Distinctives, 1st Bap...
PPTX
2025 High Blood Pressure Guideline Slide Set.pptx
PPTX
Power Point PR B.Inggris 12 Ed. 2019.pptx
PDF
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
PPTX
BSCE 2 NIGHT (CHAPTER 2) just cases.pptx
PPT
hemostasis and its significance, physiology
PDF
Health aspects of bilberry: A review on its general benefits
PPTX
Climate Change and Its Global Impact.pptx
PPTX
Macbeth play - analysis .pptx english lit
PDF
faiz-khans about Radiotherapy Physics-02.pdf
Laparoscopic Dissection Techniques at WLH
The TKT Course. Modules 1, 2, 3.for self study
Everyday Spelling and Grammar by Kathi Wyldeck
CAT 2024 VARC One - Shot Revision Marathon by Shabana.pptx.pdf
Theoretical for class.pptxgshdhddhdhdhgd
Key-Features-of-the-SHS-Program-v4-Slides (3) PPT2.pptx
EDUCATIONAL ASSESSMENT ASSIGNMENT SEMESTER MAY 2025.docx
ACFE CERTIFICATION TRAINING ON LAW.pptx
Designing Adaptive Learning Paths in Virtual Learning Environments
Chevening Scholarship Application and Interview Preparation Guide
Why I Am A Baptist, History of the Baptist, The Baptist Distinctives, 1st Bap...
2025 High Blood Pressure Guideline Slide Set.pptx
Power Point PR B.Inggris 12 Ed. 2019.pptx
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
BSCE 2 NIGHT (CHAPTER 2) just cases.pptx
hemostasis and its significance, physiology
Health aspects of bilberry: A review on its general benefits
Climate Change and Its Global Impact.pptx
Macbeth play - analysis .pptx english lit
faiz-khans about Radiotherapy Physics-02.pdf
Ad

Directed Graph in Graph Theory and Combinatorics.pptx

  • 1. Amity Institute of Information Technology CSIT743: GRAPH THEORY AND COMBINATORICS TOPIC –Directed Graph Submitted to: Dr. Deepak Kumar Submitted by: Sakshi Dadheech (223), Aaradhya Dixit (224)
  • 2. Introduction A directed graph (or digraph) is a set of nodes connected by edges, where the edges have a direction associated with them. Unlike undirected graphs, where the connection between nodes is bidirectional, directed graphs show relationships that have a specific direction. This feature makes digraphs suitable for modeling various real-world scenarios such as traffic flow, web page linking, and scheduling tasks. Types of Directed Graph: – Simple Directed Graph: A directed graph with no multiple edges or loops (i.e., edges that start and end at the same vertex). – Directed Multigraph: A graph that allows multiple directed edges between the same set of vertices. – Directed Acyclic Graph (DAG): A directed graph with no cycles. DAGs are essential in applications like task scheduling, dependency management, and data processing pipelines. – Strongly Connected Graph: A directed graph in which there is a directed path from any vertex to every other vertex. – Weakly Connected Graph: A graph where, if the direction of edges is ignored, the underlying undirected graph is connected, but there might not be a directed path between every pair of vertices. – Regular Directed Graph: A directed graph where each vertex has the same in-degree and out-degree. Applications: – Web Page Ranking: The structure of the World Wide Web is best represented as a directed graph, where pages are nodes and hyperlinks are directed edges. – Directed graphs have significant applications across various domains in graph theory and real-world scenarios: – Social Networks: Relationships such as follower-following dynamics on platforms like Twitter can be modeled using directed graphs. – Task Scheduling: Dependencies in tasks (e.g., prerequisites in courses or project tasks) are represented using Directed Acyclic Graphs (DAGs) to ensure proper sequencing. – Network Flows: Directed graphs are essential in studying network flow problems such as transportation and traffic analysis.
  • 3. Principles Directionality • Each edge in a directed graph has an inherent direction, indicating the relationship from one vertex to another. Asymmetry • The presence of an edge from too does not imply an edge from to. Directed graphs capture non- symmetric relationships. Path Representation • Paths in a directed graph follow the direction of edges. A valid path from too requires traversing edges in their designated direction. Vertex Degree • Each vertex in a directed graph has an in-degree (number of incoming edges) and an out-degree (number of outgoing edges), which can be different. Connectivity • Directed graphs can be classified as strongly connected if there exists a path between any pair of vertices following the direction of edges, and weakly connected if connectivity is only ensured when edge directions are ignored.
  • 4. Real Life Problem/Case Study Case Study: Task Scheduling in Project Management Problem Overview In large projects, various tasks are dependent on the completion of others. Representing these tasks as nodes and dependencies as directed edges helps visualize and manage complex projects efficiently. Objective Consider a software development project where tasks such as Design, Development, Testing, and Deployment are involved. If task Design must be completed before Development can start, and Development must be completed before Testing, a directed graph can illustrate these dependencies. The directed edges ensure that tasks are completed in the correct order, preventing scheduling conflicts and optimizing workflow. Using topological sorting on the directed graph helps determine a valid sequence of tasks, ensuring that each dependency is respected. Approach Using Subgraphs 1. Modeling the Problem: Identify entities as vertices and the relationships or dependencies as directed edges. For example, in a task scheduling problem, tasks can be represented as vertices, and an edge indicates that task must be completed before task. Graph Construction: Construct the directed graph by defining vertices and edges based on the problem's constraints and relationships. Implementation and Analysis: Execute the chosen algorithms and analyze the results for insights or solutions. Ensure that edge cases, such as isolated nodes or cycles, are considered. Key - Algorithms – Depth-First Search (DFS) and Breadth-First Search (BFS): Both algorithms can be adapted for directed graphs to explore nodes and detect cycles. – Topological Sorting: This algorithm is used for ordering vertices in a directed acyclic graph, ensuring that for any directed edge, vertex comes before in the ordering. – Shortest Path Algorithms: Algorithms like Dijkstra’s and Bellman-Ford can be applied to directed graphs to find the shortest path between nodes. – Strongly Connected Components (SCC): Tarjan’s algorithm and Kosaraju’s algorithm are popular methods for identifying SCCs in directed graphs. Example Results Consider the problem of representing a course prerequisite structure in a university curriculum. Each course can be modeled as a vertex, and a directed edge from course to course indicates that must be completed before. This structure forms a directed acyclic graph (DAG) where topological sorting can be applied to determine the order in which courses should be taken. Conclusion Directed graphs are a powerful structure in graph theory, with a wide range of applications across computer science, operations research, and network analysis. Understanding their properties, algorithms, and applications enables better problem-solving and modeling of complex, real-world systems.
  • 5. Numerical Experiment Experiment: Shortest Path Between Two Nodes. Objective Shortest path analysis and demonstrate how to calculate the shortest path between two nodes in a directed graph using Dijkstra’s Algorithm. Graph Representation We will represent a directed graph using an adjacency matrix, where the entry at row and column represents the weight (or cost) of 𝑖 𝑗 the edge from vertex to vertex . If there is no edge, the matrix will have a value of infinity. 𝑖 𝑗 Dijkstra’s Algorithm for Shortest Path We will use Dijkstra's Algorithm to find the shortest path from vertex 0 to vertex 4 in the directed graph. Step-by-Step Execution: 1. Initialization: Distance array dist [] dist[] where each element represents the shortest known distance from the source vertex to the corresponding vertex. Set all distances to infinity, except the source vertex (vertex 0), which is set to 0. A set of unvisited vertices. dist[]=[0,∞,∞,∞,∞]. 2. Iteration: Select the unvisited vertex with the smallest known distance. For the selected vertex, update the distances of its neighbors. If the distance through the selected vertex is shorter, update the distance. 3. Termination: The algorithm terminates when the destination vertex is reached or when all vertices have been visited.
  • 6. Conclusion Directed graphs (or digraphs) are fundamental structures in graph theory that represent relationships with a specific direction, meaning edges have both a source and a destination. This directed nature allows directed graphs to model a wide range of real-world systems, from traffic networks and web page link structures to dependencies in software systems and social networks. Throughout this experiment, we explored the basic principles of directed graphs, including how to represent them using adjacency matrices and how to apply algorithms such as Dijkstra’s Algorithm to solve shortest path problems. Directed graphs provide a powerful tool for analyzing networks, where the direction of the relationships matters—such as in routing, flow analysis, or dependency resolution. Graph Representation: • The adjacency matrix is a convenient representation for directed graphs, allowing efficient access to edge weights. It can be used to quickly check if a connection exists between two nodes, and it is particularly useful for dense graphs where the number of edges is relatively high compared to the number of vertices. Algorithms and Efficiency: • The performance of algorithms like Dijkstra's for finding the shortest path can be influenced by the graph’s structure. Directed graphs can be efficiently processed using algorithms tailored for directed edges. Dijkstra's Algorithm, in particular, is efficient for graphs with non-negative weights and has applications in various fields, including network routing and supply chain logistics Limitations: • While directed graphs are versatile, they also have limitations. For example, they are not suitable for modeling systems where the relationships are inherently bidirectional unless explicitly represented by two directed edges. Additionally, algorithms like Dijkstra's Algorithm require non-negative edge weights, and the efficiency of certain algorithms can degrade if the graph contains negative-weight edges (requiring other techniques like the Bellman-Ford algorithm).
  • 7. Reference – What is Directed Graph? | Directed Graph meanin g - GeeksforGeeks Graph Theory with Applications: by J.A. Bondy and U.S.R. Murty. – The Shortest Path Problem: A Survey: by David S. Johnson.