Skip to content

NabilArefin/cse106

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Handshaking Theorem Verification System

README

i. Short Intro

This project demonstrates the Handshaking Theorem using randomly generated graphs and adjacency matrices.


ii. Used Technologies

  • C Programming Language
  • Dynamic Memory Allocation
  • Adjacency Matrix
  • Random Number Generation

Libraries Used

  • stdio.h
  • stdlib.h
  • time.h

iii. Features

User Can:

  • Generate random graphs
  • Enter custom vertices
  • Calculate degree sums
  • Verify Handshaking Theorem
  • Measure execution time

Keyboard Inputs

Action Input
Continue Program y
Exit Program n

iv. The Process

  1. Took vertex input from user.
  2. Created adjacency matrix dynamically.
  3. Generated random edges.
  4. Calculated vertex degrees.
  5. Verified:

[ \sum deg(v) = 2|E| ]

  1. Measured execution time.

v. What I Learned

  • Graph representation
  • Dynamic memory allocation
  • Graph theory implementation
  • Performance analysis

vi. Future Improvements

  • Graph visualization
  • Weighted graph support
  • Export graph data
  • Better memory optimization

vii. How to Run

Compile

gcc handshaking_theorem.c -o handshaking

Run

./handshaking

About

A graph theory simulation program written in C that generates random undirected graphs and verifies the Handshaking Theorem.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages