Petri Nets Model | पेट्री नेट्स मॉडल का परिचय


Petri Nets Model | पेट्री नेट्स मॉडल का परिचय

Petri Net एक mathematical modeling tool है जिसका उपयोग concurrent systems को represent और analyze करने के लिए किया जाता है। यह Pushdown Automata और अन्य computation models के समान है, लेकिन यह concurrency, synchronization और resource sharing जैसी प्रक्रियाओं को और स्पष्ट रूप से दर्शाता है।

परिचय / Introduction

Petri Nets एक ग्राफिकल और गणितीय representation है जो किसी system की state transitions को दर्शाता है। इसे 1962 में Carl Adam Petri ने प्रस्तुत किया था। यह model distributed systems, parallel processing, workflow modeling और automation में उपयोग होता है।

1️⃣ Petri Net की औपचारिक परिभाषा / Formal Definition

Petri Net को एक 5-tuple के रूप में परिभाषित किया जाता है:


PN = (P, T, F, W, M₀)
जहाँ:
  • P → Places का finite set (स्थिति)
  • T → Transitions का finite set (घटनाएँ)
  • F → Directed arcs (Flow relation)
  • W → Weight function (हर arc का weight)
  • M₀ → Initial marking (Initial state)

Notation:

  • Place → Circle (○)
  • Transition → Rectangle (▭)
  • Tokens → Dots in Places

2️⃣ Petri Net की संरचना / Structure of a Petri Net

Petri Net दो मुख्य components पर आधारित है:

  • Places (P): जो system की स्थिति दर्शाते हैं।
  • Transitions (T): जो एक state से दूसरी state में परिवर्तन दिखाते हैं।

Example Structure:


P = {p1, p2, p3}
T = {t1, t2}
F = {(p1, t1), (t1, p2), (p2, t2), (t2, p3)}
M₀ = {p1}

यह मॉडल system के workflow को graphically दर्शाता है जहाँ transitions तभी fire होते हैं जब उनके input places में token मौजूद हों।

3️⃣ Tokens और Markings / Tokens and Markings

Tokens किसी system की वर्तमान स्थिति (state) को प्रदर्शित करते हैं। एक Place में कई tokens हो सकते हैं। Marking M एक function है जो हर Place में tokens की संख्या बताता है।

Example:


M = {p1: 1, p2: 0, p3: 0}

इसका अर्थ है कि वर्तमान में केवल place p1 में एक token है।

4️⃣ Transition Firing Rule / Transition का फायर होना

Transition तब फायर (execute) होता है जब:

  • सभी input places में required tokens मौजूद हों।
  • Transition फायर होने के बाद input places से tokens हटा दिए जाते हैं।
  • Output places में नए tokens जोड़ दिए जाते हैं।

Example:

यदि transition t1 का input place p1 और output place p2 है, तो t1 के फायर होने पर:

  • p1 से एक token हटाया जाएगा।
  • p2 में एक token जोड़ दिया जाएगा।

5️⃣ Reachability / पहुँचने की क्षमता

Petri Net में किसी marking M से marking M' तक पहुँचना संभव है यदि transitions की एक sequence को fire करके M से M' प्राप्त किया जा सके। यह property किसी system की state-space को दर्शाती है।

6️⃣ Petri Nets के प्रकार / Types of Petri Nets

  • Ordinary Petri Net: जिसमें सभी arc weights 1 होते हैं।
  • Colored Petri Net: जहाँ tokens के अलग-अलग attributes हो सकते हैं।
  • Timed Petri Net: जिसमें transitions समय पर निर्भर करते हैं।
  • Hierarchical Petri Net: जो nested subsystems को दर्शाता है।

7️⃣ Petri Net के उपयोग / Applications

  • Workflow Automation
  • Distributed System Modeling
  • Process Synchronization Analysis
  • Parallel Computing Representation
  • Software Testing and Verification

8️⃣ Petri Net का उदाहरण / Example of Petri Net

मान लीजिए हमारे पास एक simple producer-consumer system है:


Places: P1 = Empty Buffer, P2 = Full Buffer
Transitions: T1 = Produce, T2 = Consume
Initial State: Token in P1

जब Producer data produce करता है, token P1 से हटकर P2 में चला जाता है। जब Consumer data consume करता है, token वापस P1 में आ जाता है।

9️⃣ Petri Nets की विशेषताएँ / Properties

  • Boundedness: किसी place में अधिकतम tokens की सीमा।
  • Safeness: यदि किसी place में कभी भी 1 से अधिक tokens नहीं होते।
  • Liveness: कोई transition deadlock में नहीं फँसता।
  • Reversibility: System अपनी initial state में वापस आ सकता है।

🔟 निष्कर्ष / Conclusion

Petri Nets एक शक्तिशाली mathematical और graphical मॉडल हैं जो concurrent systems की गतिविधियों का विश्लेषण करने में मदद करते हैं। यह Workflow, Scheduling, Resource Management और Compiler Optimization जैसे क्षेत्रों में महत्वपूर्ण भूमिका निभाते हैं। इस प्रकार, Petri Nets Automata Theory का एक उन्नत विस्तार माने जाते हैं।

Related Post