This project demonstrates the Handshaking Theorem using randomly generated graphs and adjacency matrices.
- C Programming Language
- Dynamic Memory Allocation
- Adjacency Matrix
- Random Number Generation
stdio.hstdlib.htime.h
- Generate random graphs
- Enter custom vertices
- Calculate degree sums
- Verify Handshaking Theorem
- Measure execution time
| Action | Input |
|---|---|
| Continue Program | y |
| Exit Program | n |
- Took vertex input from user.
- Created adjacency matrix dynamically.
- Generated random edges.
- Calculated vertex degrees.
- Verified:
[ \sum deg(v) = 2|E| ]
- Measured execution time.
- Graph representation
- Dynamic memory allocation
- Graph theory implementation
- Performance analysis
- Graph visualization
- Weighted graph support
- Export graph data
- Better memory optimization
gcc handshaking_theorem.c -o handshaking./handshaking