colored_yamada_polynomial#
- colored_yamada_polynomial(k: PlanarDiagram, variable='A', normalize=True)#
Computes the Yamada polynomial of a given planar diagram using the skein relation and the contraction-deletion operation as defined in [Yamada, S. (1989). An invariant of spatial graphs. Journal of Graph Theory, 13(5), 537-551].
- Args:
k (PlanarDiagram): The input planar diagram representation variable (str | Symbol, optional): The variable used to construct the polynomial.
Defaults to “A”. Can be a string or a SymPy symbol representing the variable.
- normalize (bool, optional): Indicates whether to normalize the computed polynomial
by shifting the lowest degree term to ensure consistent representation. Defaults to True.
- Returns:
sympy.Expr: The expanded polynomial expression representing the Yamada polynomial of the input diagram.
- Raises:
- ValueError: If the deletion-contraction process results in mismatched loop
and arc counts, which violates the consistency of the diagram’s graphical properties.