Decoders, Detectors and Demodulators In digital communication systems, we use forward error correction codes such as LDPC, turbo, convolutional codes (to decrease the bit error), then we have to use an appropriate decoder at the receiver side. 

For example if using convolutional codes, one should use Viterbi decoder. My questions are next:


What is the optimal decoders for LDPC, and turbo codes?
What is the role of a detector then? Is a detector a demodulator or something else (I have read that they could be MMSE, ZF, etc) ?


I think I am confused with what is the function of each of the detector, demodulator, decoder?
Your question 1) is too broad to answer. In general, the optimum decoder finds the code word that is closest to the received word. In most cases, the computational complexity of such a decoder is too large, and suboptimum decoders are needed.

As for question 2), a "detector", in the original sense, is an analog circuit that "detects" the message from the received signal. For example, in AM, an envelope detector recovers the modulating signal. In digital communications, it is commonly used to denote a system that recovers the symbols from the received signal. A "demodulator" would recover bits from the symbols. Finally, a (hard decision) decoder performs error control on the received bits.