Using a randomized reduction, it is straightforward to show that
the distributional halting problem (version 2) is complete for
DistNP although it cannot be complete under a one-one and length
preserving p-time reduction.
Denote by
the set of positive instances
of
the distributional halting problem (version 2).
The probability distribution
of instance
(positive or negative) is proportional to
,
where
,
, and
.
Recall that the size of
is
while the
size of instance
of distributional halting problem
(version 1) is
.
Clearly,
is NP-complete and
is flat.

Proof.reduce
to
by a p-time randomized reduction
as follows.
On instance
of
, the reduction flips a
coin
times to produce a random string
, and then outputs
. More precisely,
we define a good-input domain
by
.
Clearly, the rarity function
and
is p-time computable and so is certifiable.
Let
for
.
For all
, let
.
Then
is one-one and p-time computable. Clearly,
for all
:
iff
.
To check the domination property, we note that
.
Thus,
is the desired p-time randomized reduction.