Shortest Path in Weighted Graph in Hindi – Definition, Algorithms, and Examples
Shortest Path in Weighted Graph क्या है?
Graph Theory में Shortest Path वह Path होता है, जो Graph में एक Vertex से दूसरे Vertex तक पहुंचने के लिए कम से कम Weight (Cost, Distance, या Time) लेता है। Weighted Graph में प्रत्येक Edge का एक Weight (मूल्य) होता है, जो Cost या Distance को दर्शाता है।
Shortest Path की परिभाषा (Definition of Shortest Path)
Shortest Path दो Vertices के बीच का वह Path है, जिसमें Edges का कुल Weight सबसे कम होता है। इसे विभिन्न प्रकार के Weighted Graphs में खोजने के लिए कई Algorithms का उपयोग किया जाता है।
Applications of Shortest Path
Shortest Path का उपयोग कई वास्तविक जीवन की समस्याओं को हल करने में किया जाता है:
- Google Maps में Shortest Route खोजना
- Network Routing
- Project Scheduling
- Flight Reservation Systems
- Transportation Networks
Algorithms to Find Shortest Path (Shortest Path खोजने के लिए एल्गोरिदम)
Shortest Path को खोजने के लिए विभिन्न Algorithms का उपयोग किया जाता है। निम्नलिखित मुख्य Algorithms हैं:
1. Dijkstra's Algorithm
Dijkstra's Algorithm एक Greedy Algorithm है, जो Non-Negative Weights वाले Graphs में Shortest Path खोजने के लिए उपयोग किया जाता है।
Steps of Dijkstra's Algorithm:
- Initial Vertex से सभी अन्य Vertices की Distance को Infinity के रूप में Set करें। Initial Vertex की Distance को 0 करें।
- हर Iteration में, उस Vertex को Select करें जिसकी Distance सबसे कम हो।
- उसके Neighbors की Distance को Update करें।
- प्रक्रिया तब तक दोहराएं जब तक सभी Vertices की Distance मिल न जाए।
Example of Dijkstra's Algorithm:
मान लीजिए कि एक Weighted Graph में Vertices A, B, C, D, और E हैं। A से E तक का Shortest Path Dijkstra's Algorithm का उपयोग करके खोजा जा सकता है।
2. Bellman-Ford Algorithm
Bellman-Ford Algorithm Negative Weights वाले Graphs में भी Shortest Path खोजने में सक्षम है। हालांकि, यह Dijkstra's Algorithm की तुलना में धीमा होता है।
Steps of Bellman-Ford Algorithm:
- सभी Edges को |V|-1 बार Relax करें (जहाँ V = Vertices की संख्या)।
- Check करें कि कहीं Negative Cycle तो नहीं है।
- यदि Negative Cycle नहीं है, तो Shortest Path Return करें।
Example of Bellman-Ford Algorithm:
यह Algorithm Financial Networks और Currency Arbitrage में उपयोगी होती है, जहाँ Negative Weights की आवश्यकता होती है।
Comparison of Dijkstra's and Bellman-Ford Algorithms
Algorithm | Time Complexity | Handles Negative Weights |
---|---|---|
Dijkstra's Algorithm | O(V + E log V) | नहीं |
Bellman-Ford Algorithm | O(VE) | हाँ |
Applications of Dijkstra's and Bellman-Ford Algorithms
इन Algorithms का उपयोग विभिन्न क्षेत्रों में किया जाता है:
- Dijkstra's Algorithm: Navigation Systems, Network Routing
- Bellman-Ford Algorithm: Financial Systems, Currency Arbitrage, Network Analysis
Conclusion
Shortest Path Algorithms Weighted Graphs में एक Vertex से दूसरे Vertex तक कम से कम Weight के साथ Path खोजने में सहायक होते हैं। Dijkstra's Algorithm Non-Negative Weights के लिए सबसे उपयुक्त है, जबकि Bellman-Ford Algorithm Negative Weights के साथ उपयोग किया जाता है। इन Algorithms का उपयोग कई क्षेत्रों में किया जाता है, जिससे वे Graph Theory में अत्यधिक महत्वपूर्ण बन जाते हैं।
Related Post
- Set Theory in Hindi – सेट थ्योरी की परिभाषा, प्रकार और उदाहरण
- Relation in Discrete Structure – परिभाषा, प्रकार और उदाहरण
- Function in Discrete Structure – परिभाषा, प्रकार और उदाहरण
- Theorem Proving Techniques, Set Theory: Definition of Sets, Countable and Uncountable Sets in Hindi
- Venn Diagrams in Discrete Structure – परिभाषा, प्रकार और उदाहरण
- Proofs of Some General Identities on Sets and Relations in Discrete Structure
- Relation in Discrete Structure – Definition, Types, Composition, Pictorial Representation, Equivalence Relation, Partial Ordering Relation
- Equivalence Relation in Discrete Structure – परिभाषा, प्रकार और उदाहरण
- Partial Ordering Relation in Discrete Structure – परिभाषा, गुण और उदाहरण
- Job-Scheduling Problem and Functions in Discrete Structure – Definition, Types, Examples
- Pigeonhole Principle in Discrete Mathematics – परिभाषा, उदाहरण और उपयोग
- Principle of Mathematical Induction in Hindi
- Algebraic Structures in Discrete Mathematics – परिभाषा, प्रकार और उदाहरण
- Algebraic Structures in Discrete Mathematics – Semi Groups, Monoid, Groups, Abelian Group
- Properties of Groups in Algebraic Structures – परिभाषा, गुण और उदाहरण
- Subgroup in Algebraic Structures – परिभाषा, गुण और उदाहरण
- Cyclic Group in Group Theory in Hindi – साइकलिक ग्रुप क्या है?
- What is Coset in Hindi – कोसेट क्या है?
- Factor Group in Discrete Mathematics in Hindi – फैक्टर ग्रुप क्या है?
- Permutation Group in Group Theory in Hindi – पर्मुटेशन ग्रुप क्या है?
- Normal Subgroup in Hindi – नॉर्मल सबग्रुप क्या है?
- Homomorphism and Isomorphism of Groups in Hindi – होमोमॉर्फिज्म और आइसोमॉर्फिज्म क्या है?
- Rings and Fields in Hindi – Definition and Standard Results
- Propositional Logic in Hindi – Types of Propositions and Truth Table
- First Order Logic in Discrete Mathematics in Hindi – Definition, Components, and Examples
- Basic Logical Operations and Truth Tables in Hindi – Definition and Examples
- Tautologies and Contradictions in Discrete Mathematics in Hindi – Definition, Examples, and Truth Tables
- Algebra of Proposition in Discrete Mathematics in Hindi – Definition, Laws, and Truth Tables
- Logical Implications in Discrete Mathematics in Hindi – Definition, Rules, and Truth Tables
- Logical Equivalence in Discrete Mathematics in Hindi – Definition, Laws, and Truth Tables
- Predicates and Normal Forms in Discrete Mathematics in Hindi – Definition, Types, and Examples
- Universal and Existential Quantifiers in Discrete Mathematics in Hindi – Definition, Examples, and Uses
- Introduction to Finite State Machine (FSM) in Hindi – Models of Physical Systems and Equivalence of Machines
- Finite State Machines as Language Recognizers in Hindi – Definition, Types, and Examples
- Introduction and Basic Terminology of Graphs in Hindi – Definition, Examples, and Applications
- Planar Graphs, Multigraphs, and Weighted Graphs in Hindi – Definition, Examples, and Applications
- Isomorphic Graphs in Graph Theory in Hindi – Definition, Conditions, and Examples
- Paths, Cycles, and Connectivity in Graph Theory in Hindi – Definition, Types, and Examples
- Shortest Path in Weighted Graph in Hindi – Definition, Algorithms, and Examples
- Euler Path and Euler Circuit in Discrete Mathematics in Hindi – Definition, Conditions, and Examples
- Hamiltonian Path and Hamiltonian Circuit in Discrete Mathematics in Hindi – Definition, Conditions, and Examples
- Graph Coloring and Chromatic Number in Discrete Mathematics in Hindi – Definition, Types, and Examples
- Isomorphism and Homomorphism in Graph Theory in Hindi – Definition, Differences, and Examples
- Poset in Discrete Mathematics in Hindi – Definition, Properties, and Examples
- Hasse Diagram and Lattices in Discrete Mathematics in Hindi – Definition, Properties, and Examples
- Introduction to Ordered Set in Discrete Mathematics in Hindi – Definition, Types, and Examples
- Hasse Diagram of Partially Ordered Set in Discrete Mathematics in Hindi – Definition, Steps, and Examples
- Isomorphic Ordered Set in Discrete Mathematics in Hindi – Definition, Properties, and Examples
- Well Ordered Set in Discrete Mathematics in Hindi – Definition, Properties, and Examples
- Properties of Lattices in Discrete Mathematics in Hindi – Definition, Types, and Examples
- Bounded and Complemented Lattice in Discrete Mathematics in Hindi – Definition, Properties, and Examples
- Combinatorics Introduction in Discrete Mathematics in Hindi – Definition, Types, and Examples
- Permutation and Combination in Discrete Mathematics in Hindi – Definition, Differences, and Examples
- Binomial Theorem in Discrete Mathematics in Hindi – Definition, Expansion, and Examples
- Multinomial Coefficients, Recurrence Relation, and Generating Function in Hindi – Definition, Properties, and Examples
- Introduction to Recurrence Relation and Recursive Algorithms in Discrete Mathematics in Hindi – Definition, Types, and Examples
- Linear Recurrence Relations with Constant Coefficients in Discrete Mathematics in Hindi – Definition and Examples
- Homogeneous Solution in Discrete Mathematics in Hindi – Definition and Examples
- Particular Solution in Discrete Mathematics in Hindi – Definition and Examples
- Generating Functions in Discrete Mathematics in Hindi – Definition, Types, and Examples
- Solution by Method of Generating Functions in Discrete Mathematics in Hindi – Steps and Examples