Element distinctness is in P, through the word RAM #
The instances are lists of naturals whose entries are below their length, encoded as framed lists
of binary naturals. Membership in P follows from the linear-time word-RAM decider
Cslib.Algorithms.WordRAM.ElementDistinctness.decider
(Cslib.Algorithms.WordRAM.ElementDistinctness.uniformLinearTime_nodup) through the simulation of
the word RAM by multi-tape Turing machines (Cslib.WordRAM.UniformPolynomialTime.mem_P). No
Turing machine specific to this problem is constructed: the instance's word list is its own
underlying list, and its size is its length.
The decider uses a table of flags indexed by the entries, which is why the entries are bounded by the length Cormen et al., Section 11.1.
Main definitions #
Cslib.Algorithms.WordRAM.ElementDistinctness.inputEncoding: framed lists of binary naturals.
Main results #
Cslib.Algorithms.WordRAM.ElementDistinctness.nodup_mem_P: element distinctness is inP.
References #
Element distinctness is in P, for lists of naturals whose entries are below their
length. The decider is the word-RAM program decider, simulated by a multi-tape machine.