D
Step-by-Step Solution
Insight: A TM decides a language if it acts as a total function for that language, meaning it halts on all inputs, accepting exactly those in the language and rejecting those not in it.
Exam route: "Decides" implies both acceptance of and rejection of the complement, which guarantees halting on all inputs. Option D captures this exact definition.
Learning route:
- Option A: Halting on all inputs means it's a decider, but doesn't specify it decides (it could decide a different language).
- Option B: Accepting doesn't mean it rejects the complement or halts on the complement (it might loop on strings not in ).
- Option C: Rejecting the complement doesn't mean it accepts or halts on .
- Option D: Accepting and rejecting the complement means it correctly classifies all strings and halts on all of them, which is the exact definition of deciding .