This assignment solution addresses the construction and application of Hamming codes. It begins by constructing a 3-ary Hamming code, identifying distinct vectors, and forming a parity-check matrix (H). The solution then calculates the dimension of the code, determines the minimum distance, and derives a generator matrix. The assignment proceeds to encode a given message word and decode a received word, demonstrating the practical application of the code. Further, the solution explores concepts such as the Fq-linear span and orthogonal complements for different sets S and finite fields Fq. The document also examines the properties of codewords with even weight and their implications on code dimensions. Finally, it involves constructing generator matrices in echelon canonical form, writing standard arrays, and identifying row leaders, along with constructing parity-check matrices for two specific codes. The assignment concludes by analyzing syndrome tables for error detection and correction within these codes.