Cartesian Product Graph Calculator

G □ H grid product

CalculatorsFreeNo Signup
4.6(355 reviews)
All Tools

Loading tool...

About Cartesian Product Graph Calculator

A Cartesian product graph calculator computing G□H: vertex set V(G)×V(H), (u₁,v₁)(u₂,v₂) adjacent iff u₁u₂∈E(G) and v₁=v₂, or v₁v₂∈E(H) and u₁=u₂. |V|=|V₁|·|V₂|, |E|=|V₁|·|E₂|+|V₂|·|E₁|. Grid=P_m□P_n. Client-side.

Cartesian Product Graph Calculator Features

  • G□H parameters
  • Grid graphs
  • Hypercubes
  • Edge formula
  • Connectivity
Cartesian product G□H: (u₁,v₁)~(u₂,v₂) iff (u₁=u₂ and v₁v₂∈E(H)) or (v₁=v₂ and u₁u₂∈E(G)). P_m□P_n = grid. K₂□K₂□...□K₂ = hypercube Q_n. C_m□C_n = torus. Commutative, associative.

How to Use

Select G and H:

  • |V|: |V₁|·|V₂|
  • |E|: Formula
  • Type: Grid/torus/cube

Famous Products

P_m□P_n = m×n grid graph. C_m□C_n = torus graph. K₂□K₂ = C₄ (4-cycle). Q_n = K₂^□n = n-dimensional hypercube. The Petersen graph is the Kneser graph K(5,2), not a Cartesian product.

Properties

Commutative and associative. χ(G□H) = max(χ(G),χ(H)). κ(G□H) = κ(G)+κ(H) (connectivity adds). Hamiltonian if one factor is Hamiltonian and the other is connected.

Step-by-Step Instructions

  1. 1Select G, H.
  2. 2Compute G□H.
  3. 3Count vertices/edges.
  4. 4Identify structure.
  5. 5Check properties.

Cartesian Product Graph Calculator — Frequently Asked Questions

What's a hypercube Q_n?+

Q_n = K₂□K₂□...□K₂ (n times). Vertices are n-bit binary strings, adjacent iff differing in exactly one bit. Q_n has 2^n vertices, n·2^{n-1} edges. Q_1=K₂, Q_2=C₄, Q_3=cube. Fundamental in parallel computing.

How does it differ from tensor product?+

Cartesian: exactly one coordinate changes. Tensor: both coordinates change simultaneously. Cartesian gives 'grid-like' structure. Tensor gives 'diagonal-like' connections. Different products for different applications.

Why is this useful for networks?+

Network topologies: mesh = grid = P□P, torus = C□C, hypercube = K₂^□n. Cartesian products give regular, well-connected networks with simple routing algorithms based on coordinate-by-coordinate movement.

Share this tool: