### 数学代写|matlab代写|BCH Codes

MATLAB是一个编程和数值计算平台，被数百万工程师和科学家用来分析数据、开发算法和创建模型。

statistics-lab™ 为您的留学生涯保驾护航 在代写matlab方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写matlab代写方面经验极为丰富，各种代写matlab相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|matlab代写|Construction

The most useful codes we presented in Chapter 3 were Hamming codes because they are linear and perfect. However, Hamming codes are not ideal if the occurrence of more than one bit error in a single codeword is likely. Since Hamming codes are only one-error correcting, if more than one bit error occurs during transmission of a Hamming codeword, the received vector will not be correctable to the codeword that was sent. Moreover, since Hamming codes are perfect, if more than one bit error occurs, the received vector will be uniquely correctable, but to the wrong codeword. In this chapter, we will present a type of code called a $B C H$ code that is linear and can be constructed to be multiple-error correcting. BCH codes are named for their creators, Bose, Chaudhuri, and Hocquenghem.

One way BCH codes differ from the codes we presented in Chapter 3 is that BCH codewords are polynomials rather than vectors. To construct a $\mathrm{BCH}$ code, we begin with the polynomial $f(x)=x^{m}-1 \in \mathbb{Z}{2}[x]$ for some positive integer $m$. Then $R=\mathbb{Z}{2}[x] /(f(x))$ is a ring that can be represented by all polynomials in $\mathbb{Z}{2}[x]$ of degree less than $m$. Suppose $g(x) \in \mathbb{Z}{2}[x]$ divides $f(x)$. Then the set $C$ of all multiples of $g(x)$ in $\mathbb{Z}{2}[x]$ of degree less than $m$ is a vector space in $R$ with dimension $m-\operatorname{deg}(g(x))$. Thus, the polynomials in $C$ are the codewords in an $[m, m-\operatorname{deg}(g(x))]$ linear code in $R$ with $2^{m-\operatorname{deg}(g(x))}$ codewords. The polynomial $g(x)$ is called a generator polynomial for the code, and we consider the codewords in the code to have length $m$ positions because we view each term in a polynomial codeword as a codeword position. A codeword $c(x) \in \mathbb{Z}{2}[x]$ with $m$ terms can then naturally be expressed as a unique vector in $\mathbb{Z}_{2}^{m}$ by listing the coefficients of $c(x)$ in order (including coefficients of zero) for increasing powers of $x$. In this chapter, we will assume $\mathrm{BCH}$ codewords are transmitted in this form.

## 数学代写|matlab代写|Error Correction

As we mentioned in Section 4.1, the generator polynomial for a BCH code is chosen in a special way because of how it allows errors to be corrected in the resulting code. In this section, we will present the BCH code error correction method. Before doing so, we first note the following theorem.
Theorem 4.1 Suppose $p(x) \in \mathbb{Z}{2}[x]$ is a primitive polynomial of degree $n$, and let $C$ be the $B C H$ code that results from the first $s$ powers of $a=x$ in the finite field $\mathbb{Z}{2}[x] /(p(x))$. Then $c(x) \in \mathbb{Z}_{2}[x]$ of degree less than $2^{\mathrm{n}}-1$ is in $C$ if and only if $c\left(a^{i}\right)=0$ for $i=1,2, \ldots, s$.

Proof. Let $m_{i}(x)$ be the minimum polynomial of $a^{i}$ in $\mathbb{Z}{2}[x]$ for every $i=1,2, \ldots, s$, and let $g(x)$ be the least common multiple in $\mathbb{Z}{2}[x]$ of the $m_{i}(x)$ for $i=1,2, \ldots, s$. If $c(x) \in C$, then $c(x)=g(x) \cdot h(x)$ for some $h(x) \in \mathbb{Z}{2}[x]$. Thus, $c\left(a^{i}\right)=g\left(a^{i}\right) \cdot h\left(a^{i}\right)=0 \cdot h\left(a^{i}\right)=0$ for $i=1,2, \ldots, s$. Conversely, if $c\left(a^{i}\right)=0$ for $i=1,2, \ldots, s$, then $m{i}(x)$ divides $c(x)$ for $i=1,2, \ldots, s$. Thus, $g(x)$ divides $c(x)$, and $c(x) \in C$.

We will now outline the $\mathrm{BCH}$ error correction method. Let $p(x) \in \mathbb{Z}_{2}[x]$ be a primitive polynomial of degree $n$, and let $C$ be the $\mathrm{BCH}$ code that

results from the first $2 t$ powers of $a=x$ in the finite field $\mathbb{Z}{2}[x] /(p(x))$. We will show in Theorem $4.2$ that $C$ is then $t$-error correcting. Suppose $c(x) \in C$ is transmitted, and we receive the polynomial $r(x) \in \mathbb{Z}{2}[x]$ of degree less than $2^{n}-1$. Then $r(x)=c(x)+e(x)$ for some error polynomial $e(x)$ in $\mathbb{Z}_{2}[x]$ of degree less than $2^{\mathrm{n}}-1$ that contains exactly and only the terms in which $r(x)$ and $c(x)$ differ. To correct $r(x)$, we must only determine $e(x)$, for we could then compute $c(x)=r(x)+e(x)$. However, Theorem $4.1$ implies $r\left(a^{i}\right)=e\left(a^{i}\right)$ for $i=1,2, \ldots, 2 t$. Thus, by knowing $r(x)$, we also know some information about $e(x)$. We will call the values of $r\left(a^{i}\right)$ for $i=1,2, \ldots, 2 t$ the syndromes of $r(x)$.

Suppose $e(x)=x^{m_{1}}+x^{m_{2}}+\cdots+x^{m_{p}}$ for some integer error positions $m_{1}<m_{2}<\cdots<m_{p}$ with $p \leq t$ and $m_{p}<2^{n}-1$. To correct $r(x)$, we must only find the error positions $m_{1}, m_{2}, \ldots, m_{p}$. To do this, we begin by computing the syndromes of $r(x)$, which we will denote by $s_{1}=r(a)$, $s_{2}=r\left(a^{2}\right), \ldots, s_{2 t}=r\left(a^{2 t}\right)$. Next, we introduce the following error locator polynomial $E(z)$, called so because its roots (unknown at this point) reveal the error positions in $r(x)$.

## 数学代写|matlab代写|Construction

Because some of the functions that we will use are in the Maple LinearAlgebra package, we will begin by including this package. In addition, we will enter the following interface command to cause Maple to display all matrices of size $200 \times 200$ and smaller throughout the remainder of this Maple session.

with(LinearAlgebra):
interface $($ rtablesize $=200)$ :
We will now define the primitive polynomial $p(x)=x^{4}+x+1 \in \mathbb{Z}_{2}[x]$ used to construct the code.
$>\mathrm{p}:=\mathrm{x}->\mathrm{x}^{\sim} 4+\mathrm{x}+1:$ $>\operatorname{Primitive}(\mathrm{p}(\mathrm{x})) \bmod 2 ;$
Next, we will use the Maple degree function to assign the number of elements in the underlying finite field as the variable $f s$, and use the Maple Vector function to create a vector in which to store the field elements.
We can then use the following commands to generate and store the field elements in the vector field. Since for BCH codes we denote the field element $x$ by $a$, we use the parameters $a$ and $p(a)$ in the following Powmod command.
$>$ for i from 1 to fs-1 do
$>\quad f i e l d[i]:=\operatorname{Powmod}(a, i, p(a), a)$ mod 2 :
$>$ od:

$$\text { field[fs] :=0: }$$
We can view the entries in the vector field by entering the following command.

## 数学代写|matlab代写|Construction

BCH 码与我们在第 3 章中介绍的码的一个不同之处在于 BCH 码字是多项式而不是向量。构建一个乙CH代码，我们从多项式开始F(X)=X米−1∈从2[X]对于一些正整数米. 然后R=从2[X]/(F(X))是一个可以用所有多项式表示的环从2[X]学位小于米. 认为G(X)∈从2[X]划分F(X). 然后是集C的所有倍数G(X)在从2[X]学位小于米是向量空间R有尺寸米−你⁡(G(X)). 因此，多项式在C是[米,米−你⁡(G(X))]线性码R和2米−你⁡(G(X))码字。多项式G(X)被称为代码的生成多项式，我们认为代码中的代码字具有长度米位置，因为我们将多项式码字中的每个项视为码字位置。一个码字C(X)∈从2[X]和米然后可以自然地将术语表示为唯一的向量从2米通过列出的系数C(X)为了（包括零系数）增加幂X. 在本章中，我们将假设乙CH码字以这种形式传输。

## 数学代写|matlab代写|Construction

with(LinearAlgebra):

>p:=X−>X∼4+X+1: >原始⁡(p(X))反对2;

>对于 i 从 1 到 fs-1 做
>F一世和ld[一世]:=战俘⁡(一个,一世,p(一个),一个)模式 2：
>从：

$$\text { field[fs] :=0: }$$

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。