Given integer D≥2, n≥1 and K=K(n), a (K,n) D-ary fixed-length (or block) code C for a DMS {Xi}i=1∞ with alphabet X consists of all the following pair (f,g) of encoding and decoding functions: ### Encoder: f:Xn→{0,1,⋯,D−1}K ### Decoder: g:{0,1,⋯,D−1}K→Xn The codebook is written as C=f(Xn)={f(an):an∈Xn}=\mbox"setofcodewords" where f(an) is the codeword for source n-tuple an.