▁edges ▁must ▁be ▁assigned ▁different ▁colors ▁to ▁each ▁other ). ▁In ▁a ▁result ▁that ▁inspired ▁V izing , ▁ ▁showed ▁that ▁this ▁is ▁the ▁worst ▁case : ▁ ▁for ▁any ▁mult ig raph ▁. ▁Additionally , ▁for ▁any ▁mult ig raph ▁, ▁, ▁an ▁inequality ▁that ▁reduces ▁to ▁V izing ' s ▁theorem ▁in ▁the ▁case ▁of ▁simple ▁graphs ▁( for ▁which ▁). ▁ ▁Alg orithms ▁Because ▁the ▁problem ▁of ▁testing ▁whether ▁a ▁graph ▁is ▁class ▁ 1 ▁is ▁N P - complete , ▁there ▁is ▁no ▁known ▁polynomial ▁time ▁algorithm ▁for ▁edge - color ing ▁every ▁graph ▁with ▁an ▁optimal ▁number ▁of ▁colors . ▁Nevertheless , ▁a ▁number ▁of ▁algorithms ▁have ▁been ▁developed ▁that ▁relax ▁one ▁or ▁more ▁of ▁these ▁criteria : ▁they ▁only ▁work ▁on ▁a ▁subset ▁of ▁graphs , ▁or ▁they ▁do ▁not ▁always ▁use ▁an ▁optimal ▁number ▁of ▁colors , ▁or ▁they ▁do ▁not ▁always ▁run ▁in ▁polynomial ▁time . ▁ ▁Opt im ally ▁color ing ▁special ▁classes ▁of ▁graphs ▁In ▁the ▁case ▁of ▁b ipart ite ▁graphs ▁or ▁mult ig raph s ▁with ▁maximum ▁degree ▁, ▁the ▁optimal ▁number ▁of ▁colors ▁is ▁exactly ▁. ▁ ▁showed ▁that ▁an ▁optimal ▁edge ▁color ing ▁of ▁these ▁graphs ▁can ▁be ▁found ▁in ▁the ▁near - linear ▁time ▁bound ▁, ▁where ▁ ▁is ▁the ▁number ▁of ▁edges ▁in ▁the ▁graph ; ▁simpler , ▁but ▁somewhat ▁slower , ▁algorithms ▁are ▁described ▁by ▁ ▁and ▁. ▁The ▁algorithm ▁of ▁ ▁begins ▁by ▁making ▁the ▁input ▁graph ▁regular , ▁without ▁increasing ▁its ▁degree ▁or ▁significantly