Zagreb Graph Library

This demo showcases the Zagreb Graph Library running in WebAssembly. Create different types of graphs, visualize them, and analyze their properties using the First Zagreb Index.

Graph Visualization

Low Degree
High Degree
Minimum Degree
Maximum Degree

Create Graph

Add Edges

Analyze Graph

Calculate the Zagreb index and determine Hamiltonian properties.

Create a graph and click "Analyze Graph" to see the results.

About the Zagreb Index

The First Zagreb Index of a graph G is defined as:

Z₁(G) = ∑(d²(u)) for all vertices u in G

Where d(u) is the degree of vertex u (the number of edges connected to it).

This index is used to analyze graph properties, including Hamiltonicity, which is important for network design and optimization.

Graph Types Explanation

Key Properties