arc_cut_sets#
- arc_cut_sets(k: PlanarDiagram, order: int, ignore_isolated_vertices=False, max_cut_sets=None) list #
Find all arc cut sets of size k in a planar diagram.
A k-cut-set is a subset of k arcs that, when removed, disconnects the diagram into two or more components. This function identifies all such subsets of arcs that meet the criteria, ensuring all resulting components have more than one node unless include_singletons=True is set in the helper function.
- Args:
k (PlanarDiagram): The planar diagram representing the knot or graph. order (int): The size of the arc cut sets to be identified. ignore_isolated_vertices: max_cut_sets (int, optional): The maximum number of cut sets to return. If None, all possible cut sets are found.
- Returns:
list: A list of tuples, where each tuple represents a cut set containing order arcs.
- Args:
k (PlanarDiagram): The planar diagram representing the knot or graph. order (int): The number of arcs in the cut-set (k). max_cut_sets (int, optional): The maximum number of k-cut-sets to find. If None, all possible cut-sets are found.
- Returns:
list: A list of cut-sets, where each cut-set is a tuple of arcs.
- Raises:
Warning: If a cut-set results in three disconnected components, such as in knotoids.
- Example:
>>> import knotpy as kp >>> k = kp.from_pd_notation("X[0,1,2,3],X[1,0,3,4],X[5,2,6,7],X[4,5,7,6]") >>> arc_cut_sets(k, order=2, max_cut_sets=1) [(arc1, arc2)]