The difference class DP #
DP is the class of intersections of an NP language and a coNP language, equivalently differences
of two NP languages Papadimitriou. The definition takes intersections of
languages; it does not require a language to belong to both NP and coNP. Completeness uses
polynomial-time many-one reductions and arbitrary
injective instance encodings.
The complement class coDP consists of unions of an NP and a coNP language; its
union and reduction closure are immediate duals of the DP results.
Main definitions #
Cslib.Complexity.DP.Cslib.Complexity.DPHard,Cslib.Complexity.DPComplete: the instances ofCslib.Complexity.PolyTimeHardandCslib.Complexity.PolyTimeCompleteforDP.
Main results #
Cslib.Complexity.mem_DP_iff_diff: differences of NP languages.Cslib.Complexity.mem_coDP_iff_union: coDP consists of unions of an NP and a coNP language.Cslib.Complexity.inter_mem_DP,Cslib.Complexity.PolyTimeReducible.mem_DP.Cslib.Complexity.NPComplete.dpComplete_prod: the product of any NP-complete language and any coNP-complete language is DP-complete.
References #
The class of languages expressible as the intersection of an NP and a coNP language Papadimitriou.
Completeness for the class DP is DPComplete.
An NP-complete problem paired with a coNP-complete problem is DP-complete. The two reductions are computed independently and their outputs are paired.