How to Use
- Add Node: Enter a label and click "Add Node"
- Add Edge: Enter source and destination, click "Add Edge"
- Random Undirected Graph: Click to instantly generate an undirected graph
- Remove Node/Edge: Enter node or edge and click remove
- Edge Count: Click to count the number of edges
- Reset: Click to clear the graph
Undirected Graph Concept
Undirected Graph is a graph where edges have no direction. Each edge simply connects two nodes, and the connection is bidirectional.
Key Characteristics:
- Edges have no direction
- Connection is bidirectional
- Common in real-world networks
Undirected Graph Setup
Undirected Graph Operations
Graph Visualization
Operation Steps
Purpose & Applications
- Social networks
- Road networks
- Communication networks
- Modeling relationships
Time & Space Complexity
Operation | Time Complexity | Space Complexity |
---|---|---|
Add Node | O(1) | O(V+E) |
Add Edge | O(1) | O(1) |
Remove Node | O(E) | O(V+E) |
Remove Edge | O(E) | O(1) |
Edge Count | O(1) | O(1) |
Strengths & Limitations
Strengths:
- Simple to understand and visualize
- Models many real-world systems
Limitations:
- Cannot represent direction
- Not suitable for directed relationships