\section{Introduction}

Let $\cP$ be a set of $v \ge 1$ elements, and let $\cB$ be a set of $k$-subsets of $\cP$, where $k$ is
a positive integer with $1 \leq k \leq v$. Let $t$ be a positive integer with $t \leq k$. The pair
$\bD = (\cP, \cB)$ is called a $t$-$(v, k, \lambda)$ {\em design\index{design}}, or simply {\em $t$-design\index{$t$-design}}, if every $t$-subset of $\cP$ is contained in exactly $\lambda$ elements of
$\cB$. The elements of $\cP$ are called points, and those of $\cB$ are referred to as blocks.
We usually use $b$ to denote the number of blocks in $\cB$.  A $t$-design is called {\em simple\index{simple}} if $\cB$ does not contain repeated blocks. In this paper, we consider only simple
$t$-designs.  A $t$-design is called {\em symmetric\index{symmetric design}} if $v = b$. It is clear that $t$-designs with $k = t$ or $k = v$ always exist. Such $t$-designs are {\em trivial}. In this paper, we consider only $t$-designs with $v > k > t$.
A $t$-$(v,k,\lambda)$ design is referred to as a {\em Steiner system\index{Steiner system}} if $t \geq 2$ and $\lambda=1$, and is denoted by $S(t,k, v)$.

One of the interesting topics in $t$-designs is the study of Steiner systems $S(2, 4, v)$.
It is known that a Steiner system $S(2, 4, v)$ exists if and only if $v \equiv 1 \mbox{ or } 4 \pmod{12}$ \cite{Hanani}. According to the surveys \cite{CMhb,RR10}, the following is a list
of infinite families of Steiner systems $S(2,4, v)$:
\begin{itemize}
\item $S(2, 4, 4^n)$, $n \geq 2$ (affine geometries).
\item $S(2, 4, 3^n+\cdots+3+1)$, $n \geq 2$ (projective geometries).
\item $S(2, 4, 2^{s+2}-2^s+4)$, $s >2$ (Denniston designs).
\end{itemize}
The objective of this paper is to present an infinite family of Steiner systems $S(2, 4, 2^m)$
for all $m \equiv 2 \mod{4} \geq 6$ with extended primitive cyclic codes. This may be the first
coding-theory construction of an infinite family of Steiner systems $S(2, 4, v)$. As a by product,
this paper will also construct a number of infinite families of $2$-designs with these binary codes.

\section{The classical construction of $t$-designs from codes}

We assume that the reader is familiar with the basics of linear codes and cyclic codes, and proceed to
introduce the classical construction of $t$-designs from codes directly.
Let ${\mathsf{C}}$ be a $[v, \kappa, d]$ linear code over ${\mathrm{GF}}(q)$. Let $A_i:=A_i({\mathsf{C}})$, which denotes the
number of codewords with Hamming weight $i$ in ${\mathsf{C}}$, where $0 \leq i \leq v$. The sequence
$(A_0, A_1, \cdots, A_{v})$ is
called the \textit{weight distribution} of ${\mathsf{C}}$, and $\sum_{i=0}^v A_iz^i$ is referred to as
the \textit{weight enumerator} of ${\mathsf{C}}$. For each $k$ with $A_k \neq 0$,  let $\cB_k$ denote
the set of the supports of all codewords with Hamming weight $k$ in ${\mathsf{C}}$, where the coordinates of a codeword
are indexed by $(0,1,2, \cdots, v-1)$. Let $\cP=\{0, 1, 2, \cdots, v-1\}$.  The pair $(\cP, \cB_k)$
may be a $t$-$(v, k, \lambda)$ design for some positive integer $\lambda$, which is called a
\emph{support design} of the code. In such a case, we say that the code ${\mathsf{C}}$ holds a $t$-$(v, k, \lambda)$
design. Throughout this paper, we denote the dual code of ${\mathsf{C}}$ by ${\mathsf{C}}^\perp$, and the extended code of
${\mathsf{C}}$ by $\overline{{\mathsf{C}}}$.

\subsection{Designs from linear codes via the Assmus-Mattson Theorem}

The following theorem, developed by Assumus and Mattson, shows that the pair $(\cP, \cB_k)$ defined by
a linear code is a $t$-design under certain conditions \cite{AM74}, \cite[p. 303]{HP03}.

\begin{theorem}[Assmus-Mattson Theorem]\label{thm-designAMtheorem}
Let ${\mathsf{C}}$ be a $[v,k,d]$ code over ${\mathrm{GF}}(q)$. Let $d^\perp$ denote the minimum distance of ${\mathsf{C}}^\perp$.
Let $w$ be the largest integer satisfying $w \leq v$ and
$$
w-\left\lfloor  \frac{w+q-2}{q-1} \right\rfloor <d.
$$
Define $w^\perp$ analogously using $d^\perp$. Let $(A_i)_{i=0}^v$ and $(A_i^\perp)_{i=0}^v$ denote
the weight distribution of ${\mathsf{C}}$ and ${\mathsf{C}}^\perp$, respectively. Fix a positive integer $t$ with $t<d$, and
let $s$ be the number of $i$ with $A_i^\perp \neq 0$ for $0 \leq i \leq v-t$. Suppose $s \leq d-t$. Then
\begin{itemize}
\item the codewords of weight $i$ in ${\mathsf{C}}$ hold a $t$-design provided $A_i \neq 0$ and $d \leq i \leq w$, and
\item the codewords of weight $i$ in ${\mathsf{C}}^\perp$ hold a $t$-design provided $A_i^\perp \neq 0$ and
         $d^\perp \leq i \leq \min\{v-t, w^\perp\}$.
\end{itemize}
\end{theorem}

The Assmus-Mattson Theorem is a very useful tool in constructing $t$-designs from linear codes,
and has been recently employed to construct infinitely many $2$-designs and $3$-designs in
\cite{DingLi16} and \cite{DingDesign16}.

\subsection{Designs from linear codes via the automorphism group}

In this section, we introduce the automorphism approach to obtaining $t$-designs from linear codes.
To this end, we have to define the automorphism group of linear codes. We will also present some
basic results about this approach.

The set of coordinate permutations that map a code ${\mathsf{C}}$ to itself forms a group, which is referred to as
the \emph{permutation automorphism group\index{permutation automorphism group of codes}} of ${\mathsf{C}}$
and denoted by $\PAut({\mathsf{C}})$. If ${\mathsf{C}}$ is a code of length $n$, then $\PAut({\mathsf{C}})$ is a subgroup of the
\emph{symmetric group\index{symmetric group}} $\Sym_n$.

A \emph{monomial matrix\index{monomial matrix}} over ${\mathrm{GF}}(q)$ is a square matrix having exactly one
nonzero element of ${\mathrm{GF}}(q)$  in each row and column. A monomial matrix $M$ can be written either in
the form $DP$ or the form $PD_1$, where $D$ and $D_1$ are diagonal matrices and $P$ is a permutation
matrix.

The set of monomial matrices that map ${\mathsf{C}}$ to itself forms the group $\MAut({\mathsf{C}})$,  which is called the
\emph{monomial automorphism group\index{monomial automorphism group}} of ${\mathsf{C}}$. Clearly, we have
$$
\PAut({\mathsf{C}}) \subseteq \MAut({\mathsf{C}}).
$$

The \textit{automorphism group}\index{automorphism group} of ${\mathsf{C}}$, denoted by $\GAut({\mathsf{C}})$, is the set
of maps of the form $M\gamma$,
where $M$ is a monomial matrix and $\gamma$ is a field automorphism, that map ${\mathsf{C}}$ to itself. In the binary
case, $\PAut({\mathsf{C}})$,  $\MAut({\mathsf{C}})$ and $\GAut({\mathsf{C}})$ are the same. If $q$ is a prime, $\MAut({\mathsf{C}})$ and
$\GAut({\mathsf{C}})$ are identical. In general, we have
$$
\PAut({\mathsf{C}}) \subseteq \MAut({\mathsf{C}}) \subseteq \GAut({\mathsf{C}}).
$$

By definition, every element in $\GAut({\mathsf{C}})$ is of the form $DP\gamma$, where $D$ is a diagonal matrix,
$P$ is a permutation matrix, and $\gamma$ is an automorphism of ${\mathrm{GF}}(q)$.
The automorphism group $\GAut({\mathsf{C}})$ is said to be $t$-transitive if for every pair of $t$-element ordered
sets of coordinates, there is an element $DP\gamma$ of the automorphism group $\GAut({\mathsf{C}})$ such that its
permutation part $P$ sends the first set to the second set.

A proof of the following theorem can be found in \cite[p. 308]{HP03}.

\begin{theorem}\label{thm-designCodeAutm}
Let ${\mathsf{C}}$ be a linear code of length $n$ over ${\mathrm{GF}}(q)$ where $\GAut({\mathsf{C}})$ is $t$-transitive. Then the codewords of any weight $i \geq t$ of ${\mathsf{C}}$ hold a $t$-design.
\end{theorem}

This theorem gives another sufficient condition for a linear code to hold $t$-designs. To apply Theorem
\ref{thm-designCodeAutm}, we have to determine the automorphism group of ${\mathsf{C}}$ and show that it is $t$-transitive.
It is in general very hard to find out the automorphism group of a linear code. Even if we known that a
linear code holds $t$-$(v, k, \lambda)$ designs, determining the parameters $k$ and $\lambda$ could be
extremely difficult. All the $2$-designs presented in this paper are obtained
from this automorphism group approach.

The next theorem will be employed later and is a very useful and general result  \cite[p. 165]{MS77}.

\begin{theorem}\label{thm-dualdesignbinary}
Let ${\mathsf{C}}$ be an $[n, k, d]$ binary linear code with $k>1$, such that for each weight $w>0$ the supports of the codewords of weight $w$ form a $t$-design, where $t<d$. Then the supports of the codewords of each nonzero weight in ${\mathsf{C}}^\perp$ also form a $t$-design.
\end{theorem}

\section{Affine-invariant linear codes}

In this section, we first give a special representation of primitive cyclic codes and their extended codes,
and then define and characterise affine-invariant codes. We will skip proof details, but
refer the reader to \cite[Section 4.7]{HP03} for a detailed proof of the major results presented in this section.

A cyclic code of length $n=q^m-1$ over ${\mathrm{GF}}(q)$ for some positive integer $m$ is called a \emph{primitive
cyclic code}. Let ${\mathcal{R}}_n$ denote the quotient ring ${\mathrm{GF}}(q)[x]/(x^n-1)$. Any cyclic code ${\mathsf{C}}$ of length
$n=q^m-1$ over ${\mathrm{GF}}(q)$ is an ideal of ${\mathcal{R}}_n$, and is generated by a monic polynomial $g(x)$ of the
least degree over ${\mathrm{GF}}(q)$. This polynomial is called the generator polynomial of the cyclic code ${\mathsf{C}}$, and
can be expressed as
$$
g(x)=\prod_{t \in T} (x-\alpha^t),
$$
where $\alpha$ is a generator of ${\mathrm{GF}}(q^m)^*$, $T$ is a subset of ${\mathcal{N}}=\{0,1, \cdots, n-1\}$ and a union
of some $q$-cyclotomic cosets modulo $n$.
The set $T$ is called a \emph{defining set} of ${\mathsf{C}}$ with respect to $\alpha$.
When ${\mathsf{C}}$ is viewed as a subset of ${\mathcal{R}}_n$,
every codeword of ${\mathsf{C}}$ is a polynomial
$c(x)=\sum_{i=0}^{n-1} c_i x^i$, where all
$c_i \in {\mathrm{GF}}(q)$.
A primitive cyclic code ${\mathsf{C}}$ is called \emph{even-like} if $1$ is a zero of its generator polynomial,
and \emph{odd-like} otherwise.

Let ${\mathtt{J}}$ and ${\mathtt{J}}^*$ denote ${\mathrm{GF}}(q^m)$ and ${\mathrm{GF}}(q^m)^*$, respectively. Let $\alpha$ be a primitive element
of ${\mathrm{GF}}(q^m)$. The set ${\mathtt{J}}$ will be the index set of the extended cyclic codes of length $q^m$, and the set
${\mathtt{J}}^*$ will be the index set of the cyclic codes of length $n$. Let $X$ be an indeterminate. Define
\begin{eqnarray}
{\mathrm{GF}}(q)[{\mathtt{J}}]=\left\{a=\sum_{g \in {\mathtt{J}}} a_g X^g: a_g \in {\mathrm{GF}}(q) \mbox{ for all } g \in {\mathtt{J}} \right\}.
\end{eqnarray}
The set ${\mathrm{GF}}(q)[{\mathtt{J}}]$ is an algebra under the following operations
\begin{eqnarray*}
u \sum_{g \in {\mathtt{J}}} a_g X^g + v \sum_{g \in {\mathtt{J}}} b_g X^g = \sum_{g \in {\mathtt{J}}} (ua_g +v b_g) X^g
\end{eqnarray*}
for all $u, \, v \in {\mathrm{GF}}(q)$, and
\begin{eqnarray}
\left(\sum_{g \in {\mathtt{J}}} a_g X^g \right) \left(\sum_{g \in {\mathtt{J}}} b_g X^g \right)
= \sum_{g \in {\mathtt{J}}} \left(\sum_{h \in {\mathtt{J}}} a_h b_{g-h} \right) X^g.
\end{eqnarray}
The zero and unit of ${\mathrm{GF}}(q)[{\mathtt{J}}]$ are $\sum_{g \in {\mathtt{J}}} 0 X^g$ and $X^0$, respectively.

Similarly, let
\begin{eqnarray}
{\mathrm{GF}}(q)[{\mathtt{J}}^*]=\left\{a=\sum_{g \in {\mathtt{J}}^*} a_g X^g: a_g \in {\mathrm{GF}}(q) \mbox{ for all } g \in {\mathtt{J}}^* \right\}.
\end{eqnarray}
The set ${\mathrm{GF}}(q)[{\mathtt{J}}^*]$ is not a subalgebra, but a subspace of ${\mathrm{GF}}(q)[{\mathtt{J}}]$. Obviously, the elements of
${\mathrm{GF}}(q)[{\mathtt{J}}^*]$ are of the form
$$
\sum_{i=0}^{n-1} a_{\alpha^i} X^{\alpha^i},
$$
and those of
${\mathrm{GF}}(q)[{\mathtt{J}}]$ are of the form
$$
a_0X^0 + \sum_{i=0}^{n-1} a_{\alpha^i} X^{\alpha^i}.
$$
Subsets of the subspace ${\mathrm{GF}}(q)[{\mathtt{J}}^*]$ will be used to characterise primitive cyclic codes over ${\mathrm{GF}}(q)$ and
those of the algebra ${\mathrm{GF}}(q)[{\mathtt{J}}]$ will be employed to characterise extended primitive cyclic codes over ${\mathrm{GF}}(q)$.

We define a one-to-one correspondence between ${\mathcal{R}}_n$ and ${\mathrm{GF}}(q)[{\mathtt{J}}^*]$ by
\begin{eqnarray}\label{eqn-Upsilon}
\Upsilon: c(x)=\sum_{i=0}^{n-1} c_i x^i \to C(X)=\sum_{i=0}^{n-1} C_{\alpha^i} X^{\alpha^i},
\end{eqnarray}
where $C_{\alpha^i}=c_i$ for all $i$.

The following theorem is obviously true.

\begin{theorem}\label{thm-newCharacterisationCyclicCodes}
${\mathsf{C}} \subseteq {\mathcal{R}}_n$ has the circulant cyclic shift property if and only if $\Upsilon({\mathsf{C}}) \subseteq {\mathrm{GF}}(q)[{\mathtt{J}}^*]$ has the property
that
$$
\sum_{i=0}^{n-1} C_{\alpha^i} X^{\alpha^i} = \sum_{g \in {\mathtt{J}}^*} C_g X^g \in \Upsilon({\mathsf{C}})
$$
if and only if
$$
\sum_{i=0}^{n-1} C_{\alpha^i} X^{\alpha \alpha^i} = \sum_{g \in {\mathtt{J}}^*} C_g X^{\alpha g} \in \Upsilon({\mathsf{C}})
$$
\end{theorem}

With Theorem \ref{thm-newCharacterisationCyclicCodes}, every primitive cyclic code over ${\mathrm{GF}}(q)$ can be
viewed as a special
subset of ${\mathrm{GF}}(q)[{\mathtt{J}}^*]$ having the property documented in this theorem. This special representation of
primitive cyclic codes over ${\mathrm{GF}}(q)$ will be very useful for determining a subgroup of the automorphism group
of certain primitive cyclic codes.

It is now time to extend primitive cyclic codes, which are subsets of ${\mathrm{GF}}(q)[{\mathtt{J}}^*]$. We use the element $0
\in {\mathtt{J}}$ to index the extended coordinate.
The extended codeword
$\overline{C}(X)$ of a codeword $C(X)=\sum_{g \in {\mathtt{J}}^*} C_g X^g$ in ${\mathrm{GF}}(q)[{\mathtt{J}}^*]$ is defined by
\begin{eqnarray}
\overline{C}(X)=\sum_{g \in {\mathtt{J}}} C_g X^g
\end{eqnarray}
with $\sum_{g \in {\mathtt{J}}} C_g=0.$

Notice that $X^{\alpha 0}=X^0=1$. The following then follows from Theorem \ref{thm-newCharacterisationCyclicCodes}.

\begin{theorem}\label{thm-newCharacterisationExtendCyclicCodes}
The extended code $\overline{{\mathsf{C}}}$ of a cyclic code ${\mathsf{C}} \subseteq {\mathrm{GF}}(q)[{\mathtt{J}}^*]$ is a subspace of
${\mathrm{GF}}(q)[{\mathtt{J}}]$ such that
\begin{eqnarray*}
 \overline{C}(X)=\sum_{g \in {\mathtt{J}}} C_g X^g \in \overline{{\mathsf{C}}} \mbox{ if and only if }
 \sum_{g \in {\mathtt{J}}} C_g X^{\alpha g} \in \overline{{\mathsf{C}}} \mbox{ and }
\sum_{g \in {\mathtt{J}}} C_g=0.
\end{eqnarray*}
\end{theorem}

If a cyclic code ${\mathsf{C}}$ is viewed as an ideal of ${\mathcal{R}}_n={\mathrm{GF}}(q)[x]/(x^n-1)$, it can be defined by its set of zeros
or its defining set. When ${\mathsf{C}}$ and $\overline{{\mathsf{C}}}$ are put in the
settings ${\mathrm{GF}}(q)[{\mathtt{J}}^*]$ and ${\mathrm{GF}}(q)[{\mathtt{J}}]$, respectively, they can be defined with some counterpart of the defining set.
This can be done with the assistance of the following function $\phi_s$ from ${\mathrm{GF}}(q)[{\mathtt{J}}]$ to ${\mathtt{J}}$:
\begin{eqnarray}
\phi_s\left(\sum_{g \in {\mathtt{J}}} C_g X^g\right)= \sum_{g \in {\mathtt{J}}} C_g g^s,
\end{eqnarray}
where $s \in \overline{{\mathcal{N}}}:=\{i: 0 \leq i \leq n\}$ and by convention $0^0=1$ in ${\mathtt{J}}$.

The following follows from Theorem \ref{thm-newCharacterisationExtendCyclicCodes} and the definition of
$\phi_s$ directly.

\begin{lemma}\label{lem-dec101}
$\overline{C}(X)$ is the extended codeword of $C(X) \in {\mathrm{GF}}(q)[{\mathtt{J}}^*]$ if and only if $\phi_0(\overline{C}(X))=0$.
In particular, if $\overline{{\mathsf{C}}}$ is the extended code of a primitive cyclic code ${\mathsf{C}} \subseteq {\mathrm{GF}}(q)[{\mathtt{J}}^*]$,
then $\phi_0(\overline{C}(X))=0$ for all $\overline{C}(X) \in \overline{{\mathsf{C}}}$.
\end{lemma}

\begin{lemma}\label{lem-dec102}
Let ${\mathsf{C}}$ be a primitive cyclic code of length $n$ over ${\mathrm{GF}}(q)$. Let $T$ be the defining set of ${\mathsf{C}}$ with
respect to $\alpha$, when it is viewed as an ideal of ${\mathcal{R}}_n$. Let $s \in T$ and $1 \leq s \leq n-1$.
We have
then $\phi_s(\overline{C}(X))=0$ for all $\overline{C}(X) \in \overline{{\mathsf{C}}}$.
\end{lemma}

\begin{lemma}\label{lem-dec103}
Let ${\mathsf{C}}$ be a primitive cyclic code of length $n$ over ${\mathrm{GF}}(q)$. Let $T$ be the defining set of ${\mathsf{C}}$ with
respect to $\alpha$, when it is viewed as an ideal of ${\mathcal{R}}_n$. Then $0 \in T$ if and only if
$\phi_n(\overline{C}(X))=0$ for all $\overline{C}(X) \in \overline{{\mathsf{C}}}$.
\end{lemma}

Combining Lemmas \ref{lem-dec101}, \ref{lem-dec102}, \ref{lem-dec103} and the discussions above,
we can define an extended cyclic code in terms of a defining set as follows.

A code $\overline{{\mathsf{C}}}$ of length $q^m$ is an \emph{extended primitive cyclic code}\index{extended primitive cyclic code}
with definition set $\overline{T}$ provided $\overline{T} \setminus \{n\} \subseteq \overline{{\mathcal{N}}}$ is a union of
$q$-cyclotomic cosets modulo $n=q^m-1$ with $0 \in \overline{T}$ and
\begin{eqnarray}\label{eqn-defdefCodes}
\overline{{\mathsf{C}}}= \left\{\overline{C}(X) \in {\mathrm{GF}}(q)[{\mathtt{J}}]: \phi_s(\overline{C}(X))=0 \mbox{ for all } s \in \overline{T} \right\}.
\end{eqnarray}

The following remarks are helpful for fully understanding the characterisation of extended primitive
cyclic codes:
\begin{itemize}
\item The condition that $\overline{T} \setminus \{n\} \subseteq \overline{{\mathcal{N}}}$ is a union of
$q$-cyclotomic cosets modulo $n=q^m-1$ is to ensure that the code ${\mathsf{C}}$ obtained by puncturing the
first coordinate of $\overline{{\mathsf{C}}}$ and ordering the elements of ${\mathtt{J}}$ with $(0, \alpha^n, \alpha^1, \cdots, \alpha^{n-1})$ is a primitive cyclic code.
\item The additional requirement $0 \in \overline{T}$ and (\ref{eqn-defdefCodes}) are to make sure
that $\overline{{\mathsf{C}}}$ is the extended code of ${\mathsf{C}}$.
\item If $n \in \overline{T}$, then ${\mathsf{C}}$ is an even-like code. In this case, the extension is trivial,
i.e., the extended coordinate in every codeword of $\overline{{\mathsf{C}}}$ is always equal to $0$.
If $n \not\in \overline{T}$, then $0 \not\in T$. Thus, the extension is nontrivial.
\item If $\overline{{\mathsf{C}}}$ is the extended code of a primitive cyclic code ${\mathsf{C}}$, then
\begin{eqnarray*}
\overline{T}=\left\{
\begin{array}{ll}
\{0\} \cup T & \mbox{ if } 0 \not\in T, \\
\{0, n\} \cup T & \mbox{ if } 0 \in T.
\end{array}
\right.
\end{eqnarray*}
where $T$ and $\overline{T}$ are the defining sets of ${\mathsf{C}}$ and $\overline{{\mathsf{C}}}$, respectively.
\item The following diagram illustrates the relations among the two codes and their definition sets:
\begin{eqnarray*}
\begin{array}{lcr}
{\mathsf{C}} \subseteq {\mathcal{R}}_n & \Longleftrightarrow {\mathsf{C}} \subseteq {\mathrm{GF}}(q)[{\mathtt{J}}^*]
                      \Longrightarrow & {\mathrm{GF}}(q)[{\mathtt{J}}] \supseteq \overline{{\mathsf{C}}} \\
T \subseteq {\mathcal{N}}     &      &    \overline{T} \subseteq \overline{{\mathcal{N}}}
\end{array}
\end{eqnarray*}
\end{itemize}

Let $\sigma$ be a permutation on ${\mathtt{J}}$. This permutation acts on a code $\overline{{\mathsf{C}}} \subseteq {\mathrm{GF}}(q)[{\mathtt{J}}]$ as follows:
\begin{eqnarray}
\sigma\left( \sum_{g \in {\mathtt{J}}} C_g X^g \right) = \sum_{g \in {\mathtt{J}}} C_g X^{\sigma(g)}.
\end{eqnarray}

The \emph{affine permutation group}\index{affine permutation group}, denoted by ${\mathrm{AGL}}(1, q^m)$, is
defined by
\begin{eqnarray}\label{eqn-AGL(1qm)}
{\mathrm{AGL}}(1, q^m)=\{\sigma_{(a,b)}(y)=ay+b: a \in {\mathtt{J}}^*, \, b \in {\mathtt{J}}\}.
\end{eqnarray}
We have the following conclusions about ${\mathrm{AGL}}(1, q^m)$ whose proofs are straightforward:
\begin{itemize}
\item ${\mathrm{AGL}}(1, q^m)$ is a permutation group on ${\mathtt{J}}$ under the function composition.
\item The group action of ${\mathrm{AGL}}(1, q^m)$ on ${\mathrm{GF}}(q^m)$ is doubly transitive, i.e., $2$-transitive.
\item ${\mathrm{AGL}}(1, q^m)$ has order $(n+1)n=q^m(q^m-1)$.
\item Obviously, the maps $\sigma_{(a,0)}$ are merely the cyclic shifts on the coordinates
$(\alpha^n, \alpha^1, \cdots, \alpha^{n-1})$ each fixing the coordinate $0$.
\end{itemize}

An \emph{affine-invariant code}\index{affine-invariant} is an extended primitive cyclic code
$\overline{{\mathsf{C}}}$ such that ${\mathrm{AGL}}(1, q^m) \subseteq \PAut(\overline{{\mathsf{C}}})$. For certain applications,
it is important to know if a given extended primitive cyclic code $\overline{{\mathsf{C}}}$ is affine-invariant or not.
This question can be answered by examining the defining set of the code. In order to do this, we introduce a partial
ordering $\preceq$ on $\overline{{\mathcal{N}}}$. Suppose that $q=p^t$ for some positive integer $t$. Then by
definition $\overline{{\mathcal{N}}}=\{0,1,2, \cdots, n\}$, where $n=q^m-1=p^{mt}-1$. The $p$-adic expansion of
each $s \in \overline{{\mathcal{N}}}$ is given by
\begin{eqnarray*}
s=\sum_{i=0}^{mt-1} s_i p^i, \, \mbox{ where } 0 \leq s_i <p \mbox{ for all } 0 \leq i \leq mt-1.
\end{eqnarray*}
Let the $p$-adic expansion of $r \in \overline{{\mathcal{N}}}$ be
$$
r=\sum_{i=0}^{mt-1} r_i p^i.
$$
We say that $r \preceq s$ if $r_i \leq s_i$ for all $0 \leq i \leq mt-1$. By definition, we have
$r\leq s$ if $r \preceq s$.

The following is a characterisation of affine-invariant codes due to Kasami, Lin and Peterson \cite{KLP68}.

\begin{theorem}[Kasami-Lin-Peterson]\label{thm-KLPtheorem}
Let $\overline{{\mathsf{C}}}$ be an extended cyclic code of length $q^m$ over ${\mathrm{GF}}(q)$ with defining set $\overline{T}$.
The code $\overline{{\mathsf{C}}}$ is affine-invariant if and only if whenever $s \in \overline{T}$ then $r \in \overline{T}$ for all
$r \in \overline{{\mathcal{N}}}$ with $r \preceq s$.
\end{theorem}

Theorem \ref{thm-KLPtheorem} will be employed in the next section. It is a very useful tool to prove that
an extended primitive cyclic code is affine-invariant.

It is straightforward to prove that ${\mathrm{AGL}}(1, q^m)$ is doubly transitive on ${\mathrm{GF}}(q^m)$.
The following theorem then follows from Theorem \ref{thm-designCodeAutm}.

\begin{theorem}\label{thm-mainthmjan18}
Let ${\mathsf{C}}$ be an extended cyclic code of length $q^m$ over ${\mathrm{GF}}(q)$. If ${\mathsf{C}}$ affine-invariant,
then the supports of the codewords of weight $k$ in ${\mathsf{C}}$ form a $2$-design, provided that
$A_k \neq 0$.
\end{theorem}

The following is a list of known affine-invariant codes.
\begin{itemize}
\item The classical generalised Reed-Muller codes of length $q^n$ \cite{AK92}.
\item A family of newly generalised Reed-Muller codes of length $q^n$ \cite{DLX16}.
\item The narrow-sense primitive BCH codes.
\end{itemize}

If new affine-invariant codes are discovered, new $2$-designs may be obtained. In the next section,
we will present a type of affine-invariant binary codes of length $2^m$, and will investigate their
designs. Our major objective is to construct an infinite family of Steiner systems $S(2,4, 2^m)$.

\section{A type of affine-invariant codes and their designs}

In this section, we first present a class of affine-invariant binary codes of length $2^m$,
and then study their designs. Our main purpose is to present an infinite family of Steiner
systems $S(2,4,2^m)$ for every $m \equiv 2 \pmod{4} \geq 6$.

Let $b$ denote the number of blocks in a $t$-$(v, k, \lambda)$ design. It is easily seen that
\begin{eqnarray}\label{eqn-tdesignblocknum}
b= \lambda \frac{\binom{v}{t}}{\binom{k}{t} }.
\end{eqnarray}

We will need the following lemma
in subsequent sections, which is a variant of the MacWilliam Identity \cite[p. 41]{vanLint}.

\begin{theorem} \label{thm-MI}
Let ${\mathsf{C}}$ be a $[v, \kappa, d]$ code over ${\mathrm{GF}}(q)$ with weight enumerator $A(z)=\sum_{i=0}^v A_iz^i$ and let
$A^\perp(z)$ be the weight enumerator of ${\mathsf{C}}^\perp$. Then
$$A^\perp(z)=q^{-\kappa}\Big(1+(q-1)z\Big)^vA\Big(\frac {1-z} {1+(q-1)z}\Big).$$
\end{theorem}

Shortly, we will need also the following theorem.

\begin{theorem}\label{thm-allcodes}
Let ${\mathsf{C}}$ be an $[n, k, d]$ binary linear code, and let ${\mathsf{C}}^\perp$ denote the dual of ${\mathsf{C}}$. Denote by $\overline{{\mathsf{C}}^\perp}$
the extended code of ${\mathsf{C}}^\perp$, and let  $\overline{{\mathsf{C}}^\perp}^\perp$ denote the dual of  $\overline{{\mathsf{C}}^\perp}$. Then we
have the following.
\begin{enumerate}
\item ${\mathsf{C}}^\perp$ has parameters $[n, n-k, d^\perp]$, where $d^\perp$ denotes the minimum distance of ${\mathsf{C}}^\perp$.
\item $\overline{{\mathsf{C}}^\perp}$ has parameters $[n+1, n-k, \overline{d^\perp}]$, where $\overline{d^\perp}$ denotes the minimum
distance of $\overline{{\mathsf{C}}^\perp}$, and is given by
\begin{eqnarray*}
\overline{d^\perp} = \left\{
\begin{array}{ll}
d^\perp  & \mbox{ if $d^\perp$ is even,}  \\
d^\perp  + 1 & \mbox{ if $d^\perp$ is odd.}
\end{array}
\right.
\end{eqnarray*}
\item $\overline{{\mathsf{C}}^\perp}^\perp$ has parameters $[n+1, k+1, \overline{d^\perp}^\perp]$, where $\overline{d^\perp}^\perp$ denotes the minimum
distance of $\overline{{\mathsf{C}}^\perp}^\perp$.
Furthermore, $\overline{{\mathsf{C}}^\perp}^\perp$ has only even-weight codewords, and all the nonzero weights in $\overline{{\mathsf{C}}^\perp}^\perp$ are
the following:
\begin{eqnarray*}
w_1, \, w_2,\, \cdots,\, w_t;\, n+1-w_1, \, n+1-w_2, \, \cdots, \, n+1-w_t; \, n+1,
\end{eqnarray*}
where $w_1,\,  w_2,\, \cdots,\, w_t$ denote all the nonzero weights of ${\mathsf{C}}$.
\end{enumerate}
\end{theorem}

\begin{proof}
The conclusions of the first two parts are straightforward. We prove only the conclusions of the third part below.

Since $\overline{{\mathsf{C}}^\perp}$ has length $n+1$ and dimension $n-k$,  the dimension of $\overline{{\mathsf{C}}^\perp}^\perp$
is $k+1$. By assumption, all codes under consideration are binary. By definition, $\overline{{\mathsf{C}}^\perp}$ has only
even-weight codewords. Recall that $\overline{{\mathsf{C}}^\perp}$ is the extended code of ${\mathsf{C}}^\perp$. It is known that
the generator matrix of $\overline{{\mathsf{C}}^\perp}^\perp$ is given by  (\cite[p. 15]{HP03})
\begin{eqnarray*}
\left[
\begin{array}{cc}
{\mathbf{\bar{1}}} & 1 \\
G & {\mathbf{\bar{0}}}
\end{array}
\right].
\end{eqnarray*}
where ${\mathbf{\bar{1}}}=(1 1 1 \cdots 1)$ is the all-one vector of length $n$,  ${\mathbf{\bar{0}}}=(000 \cdots 0)^T$, which is a column
vector of length $n$, and $G$ is the generator matrix of ${\mathsf{C}}$. Notice again that  $\overline{{\mathsf{C}}^\perp}^\perp$ is binary, the
desired conclusions on the weights in $\overline{{\mathsf{C}}^\perp}^\perp$ follow from the relation between the two generator
matrices of the two codes  $\overline{{\mathsf{C}}^\perp}^\perp$ and ${\mathsf{C}}$.
\end{proof}

\subsection{The type of affine-invariant codes and their designs}

Starting from now on, we deal with only binary codes and their support designs,
and we define $n=2^m-1$ and $\bar{n}=2^m$.

Let $m \geq 2$ be a positive integer. Define $\overline{m}=\lfloor m/2 \rfloor$ and
$M=\{1,2, \cdots, \overline{m}\}$. Let $E$ be any nonempty subset of $M$. Let
\begin{equation}\label{eqn-generatorpolyCe}
g_E(x)=\mathbb{M}_{\alpha}(x) {\mathrm{lcm}}\{\mathbb{M}_{\alpha^{1+2^e}}(x): e \in E\},
\end{equation}
where $\alpha$ is a generator of ${\mathrm{GF}}(2^m)^*$, $\mathbb{M}_{\alpha^i}(x)$ denotes the minimal polynomial
of $\alpha^i$ over ${\mathrm{GF}}(2)$, and ${\mathrm{lcm}}$ denotes the least common multiple of a set of polynomials.
Note that every $e \in E$ satisfies $e \leq \overline{m}$, and the $2$-cyclotomic cosets $C_1$ and $C_e$
are disjoint. Consequently, the two irreducible polynomials $\mathbb{M}_{\alpha}(x)$ and $\mathbb{M}_{\alpha^{1+2^e}}(x)$
are relatively prime. It then follows that $g_E(x)$ divides $x^n-1$. Let ${\mathsf{C}}_E$ denote the binary
cyclic code of length $n$ with generator polynomial $g_{E}(x)$.

\begin{theorem}
Let $m \geq 3$. Then the generator polynomial of ${\mathsf{C}}_E$ is given by
$$
g_E(x)=\mathbb{M}_{\alpha}(x) \prod_{e \in E} \mathbb{M}_{\alpha^{1+2^e}}(x).
$$
Furthermore, ${\mathsf{C}}_E$ has dimension
\begin{eqnarray}
\dim({\mathsf{C}}_E)=
\left\{
\begin{array}{ll}
2^m-1- (2|E|+1)m/2 & \mbox{ if $m$ is even and $m/2 \in E$.} \\
2^m-1-(|E|+1)m  & \mbox{ otherwise,}
\end{array}
\right.
\end{eqnarray}
\end{theorem}

\begin{proof}
The following list of properties was proved in \cite{YH96}:
\begin{itemize}
\item For each $e \in E$, $1+2^e$ is a coset leader.
\item For each $e \in E$, $|C_{e}|=m$, except that $m$ is even and $e=m/2$, in which case
      $|C_{m/2}|=m/2$.
\end{itemize}
Note that $1$ is the coset leader of the $2$-cyclotomic coset $C_1$ with $|C_1|=m$. Then the
desired conclusions on the generator polynomial and dimension follow.
\end{proof}

\begin{theorem}\label{thm-jan182}
The extended code $\overline{C_E}$ is affine invariant.
\end{theorem}

\begin{proof}
We prove the desired conclusion with the help Theorem \ref{thm-KLPtheorem} and follow the notation and
symbols employed in the proof of Theorem \ref{thm-KLPtheorem}.
Let $\overline{{\mathcal{N}}}=\{0,1,2, \cdots, n\}$, where $n=2^m-1$.
The defining set $T$ of the
cyclic code ${\mathsf{C}}_E$ is $T=C_1 \cup (\cup_{e \in E} C_e)$. Since $0 \not\in T$, the defining
set $\overline{T}$ of $\overline{C_E}$ is given by
$$
\overline{T}=C_1 \cup (\cup_{e \in E} C_e) \cup \{0\}.
$$
Let $s \in \overline{T}$ and $r \in \overline{{\mathcal{N}}}$. Assume
that $r \preceq s$. We need prove that $r \in \overline{T}$ by Theorem \ref{thm-KLPtheorem}.

If $r=0$, then obviously $r \in \overline{T}$. Consider now the case $r >0$. In this case $s \geq r \geq 1$.
If $s \in C_1$, then the Hamming weight $\wt(s)=1.$ As $r \preceq s$, $r=s$. Consequently, $r \in
C_1 \subset \overline{T}$.
If $s \in C_e$, then the Hamming weight $\wt(s)=2.$ As $r \preceq s$, either $\wt(r)=1$ or $r=s$.
In bother cases,  $r \in \overline{T}$. The desired conclusion then follows from Theorem \ref{thm-KLPtheorem}.
\end{proof}

Combining Theorems \ref{thm-jan182}, \ref{thm-mainthmjan18} and \ref{thm-dualdesignbinary}, we
arrive at the following conclusions.

\begin{theorem}\label{thm-mymainjan18}
Let $m \geq 3$ be an integer. The supports of the codewords of every weight $k$ in $\overline{{\mathsf{C}}_{E}}$
(respectively, $\overline{{\mathsf{C}}_{E}}^\perp$) form a $2$-design, provided that $\overline{A}_k \neq 0$
(respectively, $\overline{A}_k^\perp \neq 0$).
\end{theorem}

Theorem \ref{thm-mymainjan18} includes a class of $2^{\lfloor m/2 \rfloor}-1$ affine invariant
binary codes $\overline{{\mathsf{C}}_E}$ and their duals. They give exponentially many infinite families
of $2$-$(2^m, k, \lambda)$ designs. To determine the parameters $(2^m, k, \lambda)$ of the $2$-designs,
we need to settle the weight distributions of these codes. The weight distributions of these codes
are related to quadratic form, bilinear forms, and alternating bilinear forms, and are open in
general. Note that the code ${\mathsf{C}}_{E}$ may be a BCH code in some cases, but is not a BCH code in most cases.

\subsection{Designs from the codes ${\mathsf{C}}_{\{1+2^e\}}$ and their relatives}\label{sec-mainsect}

As made clear earlier, our main objective is to construct an infinite family of Steiner systems
$S(2, 4, 2^m)$. To this end, we consider the code ${\mathsf{C}}_E$ and its extended code $\overline{{\mathsf{C}}_E}$ in this
section for the special case $E=\{1+2^e\}$, where $1 \leq e \leq \overline{m}=\lfloor m/2 \rfloor$.
For simplicity, we denote this code by ${\mathsf{C}}_e$ in this section.

\begin{table}[ht]
\center
\caption{Weight distribution I}\label{tab-aaCG1}
{
\begin{tabular}{ll}
\hline
Weight $w$    & No. of codewords $A_w$  \\ \hline
$0$                                                        & $1$ \\
$2^{m-1}-2^{m-1-h}$           & $(2^m-1)(2^h+1)2^{h-1}$ \\
$2^{m-1}$                             & $(2^m-1)(2^m-2^{2h}+1)$ \\
$2^{m-1}+2^{m-1-h}$           & $(2^m-1)(2^h-1)2^{h-1}$ \\ \hline
\end{tabular}
}
\end{table}

\begin{table}[ht]
\center
\caption{Weight distribution II}\label{tab-aaCG2}
{
\begin{tabular}{ll}
\hline
Weight $w$    & No. of codewords $A_w$  \\ \hline
$0$                                                        & $1$ \\
$2^{m-1}-2^{(m-2)/2}$          & $(2^{m/2}-1)(2^{m-1}+2^{(m-2)/2})$ \\
$2^{m-1}$                               & $2^m-1$ \\
$2^{m-1}+2^{(m-2)/2}$          & $(2^{m/2}-1)(2^{m-1}-2^{(m-2)/2})$ \\ \hline
\end{tabular}
}
\end{table}

\begin{table}[ht]
\center
\caption{Weight distribution III}\label{tab-aaMine}
{
\begin{tabular}{ll}
\hline
Weight $w$    & No. of codewords $A_w$  \\ \hline
$0$                                                        & $1$ \\
$2^{m-1}-2^{(m+\ell-2)/2}$          & $2^{(m-\ell-2)/2}(2^{(m-\ell)/2}+1)(2^m-1)/(2^{\ell/2}+1)$ \\
$2^{m-1}-2^{(m-2)/2}$          & $2^{(m+\ell-2)/2}(2^{m/2}+1)(2^m-1)/(2^{\ell/2}+1)$ \\
$2^{m-1}$                               & $( (2^{\ell/2} -1)2^{m-\ell} +1 )(2^m - 1)$ \\
$2^{m-1}+2^{(m-2)/2}$          & $2^{(m+\ell-2)/2}(2^{m/2}-1)(2^m-1)/(2^{\ell/2}+1)$ \\
$2^{m-1}+2^{(m+\ell-2)/2}$          & $2^{(m-\ell-2)/2}(2^{(m-\ell)/2}-1)(2^m-1)/(2^{\ell/2}+1)$ \\ \hline
\end{tabular}
}
\end{table}

The following theorem provides information on the parameters of ${\mathsf{C}}_e$ and its dual
${\mathsf{C}}_{e}^\perp$ \cite{Kasa69}.

\begin{theorem}\label{thm-calder}
Let $m \ge 4$ and $1 \leq e \le m/2$. Then ${\mathsf{C}}_{e}^\perp$ is a three-weight
code if and only if either $m/\gcd(m,e)$ is odd or $m$ is even and $e=m/2$, where
$n=2^m-1$.

When $m/\gcd(m,e)$ is odd, define $h=(m-\gcd(m,e))/2$. Then the dimension of
${\mathsf{C}}_{e}^\perp$ is $2m$, and the weight
distribution of ${\mathsf{C}}_{e}^\perp$ is given in Table \ref{tab-aaCG1}. The code ${\mathsf{C}}_{e}$ has
parameters $[n, n-2m, d]$, where
$$
d = \left\{ \begin{array}{ll}
                             3 & \mbox{ if } \gcd(e,m)>1; \\
                             5 & \mbox{ if } \gcd(e,m)=1.
\end{array}
\right.
$$

When $m$ is even and $e=m/2$, the dimension of  ${\mathsf{C}}_{e}^\perp$ is $3m/2$ and the weight
distribution of ${\mathsf{C}}_{e}^\perp$ is given in Table \ref{tab-aaCG2}. The code ${\mathsf{C}}_{e}$ has
parameters $[n, n-3m/2, 3]$.

When $m/\gcd(m,e)$ is even and $1 \leq e < m/2$, ${\mathsf{C}}_{e}^\perp$ has dimension $2m$ and the weight
distribution in Table \ref{tab-aaMine}, where $\ell=2\gcd(m, e)$, and ${\mathsf{C}}_{e}$ has parameters $[n, n-2m, d]$, where
$$
d = \left\{ \begin{array}{ll}
                             3 & \mbox{ if } \gcd(e,m)>1; \\
                             5 & \mbox{ if } \gcd(e,m)=1.
\end{array}
\right.
$$
\end{theorem}

The weight distributions of the code ${\mathsf{C}}_{e}^\perp$ documented in Theorem \ref{thm-calder} were
indeed proved by Kasami in \cite{Kasa69}. However, the conclusions on the minimum distance $d$
of ${\mathsf{C}}_{e}$ were stated in \cite{Kasa69} without being proved. We inform the reader that they can
be proved with the proved weight distribution of ${\mathsf{C}}_{e}^\perp$ and Theorem \ref{thm-MI}, though
the details of proof are tedious in some cases.

We would find the parameters of the $2$-designs held in the codes $\overline{C_e}$ and
$\overline{C_e}^\perp$, and need to know the weight distributions of these two codes,
which can be derived from those of the code ${\mathsf{C}}_{e}^\perp$ described in Theorem \ref{thm-calder}.
We first determine the weight distribution of $\overline{C_e}^\perp$.

\begin{table}[ht]
\center
\caption{Weight distribution IV}\label{tab-aaCG1jan18}
{
\begin{tabular}{ll}
\hline
Weight $w$    & No. of codewords $A_w$  \\ \hline
$0$                                                        & $1$ \\
$2^{m-1}-2^{m-1-h}$           & $(2^m-1)2^{2h}$ \\
$2^{m-1}$                             & $(2^m-1)(2^{m+1}-2^{2h+1}+2)$ \\
$2^{m-1}+2^{m-1-h}$           & $(2^m-1)2^{2h}$ \\
$2^m$                           &  $1$ \\ \hline
\end{tabular}
}
\end{table}

\begin{table}[ht]
\center
\caption{Weight distribution V}\label{tab-aaCG2jan18}
{
\begin{tabular}{ll}
\hline
Weight $w$    & No. of codewords $A_w$  \\ \hline
$0$                                                        & $1$ \\
$2^{m-1}-2^{(m-2)/2}$          & $(2^{m/2}-1)2^{m}$ \\
$2^{m-1}$                               & $2^{m+1}-2$ \\
$2^{m-1}+2^{(m-2)/2}$          & $(2^{m/2}-1)2^{m}$ \\
$2^m$                          & $1$ \\ \hline
\end{tabular}
}
\end{table}

\begin{table}[ht]
\center
\caption{Weight distribution VI}\label{tab-aaMinejan18}
{
\begin{tabular}{ll}
\hline
Weight $w$    & No. of codewords $A_w$  \\ \hline
$0$                                                        & $1$ \\
$2^{m-1}-2^{(m+\ell-2)/2}$          & $2^{m-\ell} (2^m-1)/(2^{\ell/2}+1)$ \\
$2^{m-1}-2^{(m-2)/2}$          & $2^{(2m+\ell)/2} (2^m-1)/(2^{\ell/2}+1)$ \\
$2^{m-1}$                               & $2( (2^{\ell/2} -1)2^{m-\ell} +1 )(2^m - 1)$ \\
$2^{m-1}+2^{(m-2)/2}$          & $2^{(2m+\ell)/2} (2^m-1)/(2^{\ell/2}+1)$ \\
$2^{m-1}+2^{(m+\ell-2)/2}$          & $2^{m-\ell} (2^m-1)/(2^{\ell/2}+1)$ \\
$2^m$                               & $1$ \\ \hline
\end{tabular}
}
\end{table}

The following theorem provides information on the parameters of $\overline{{\mathsf{C}}_e}$ and its dual
$\overline{{\mathsf{C}}_{e}}^\perp$.

\begin{theorem}\label{thm-calderjan18}
Let $m \ge 4$ and $1 \leq e \le m/2$.
When $m/\gcd(m,e)$ is odd, define $h=(m-\gcd(m,e))/2$. Then $\overline{{\mathsf{C}}_{e}}^\perp$
has parameters $[2^m, 2m+1, 2^{m-1}-2^{m-1-h}]$, and the weight
distribution in Table \ref{tab-aaCG1jan18}.
The parameters of $\overline{{\mathsf{C}}_{e}}$ are $[2^m, 2^m-1-2m, \overline{d}]$,
where
$$
\overline{d} = \left\{ \begin{array}{ll}
                             4 & \mbox{ if } \gcd(e,m)>1; \\
                             6 & \mbox{ if } \gcd(e,m)=1.
\end{array}
\right.
$$

When $m$ is even and $e=m/2$, $\overline{{\mathsf{C}}_{e}}^\perp$ has parameters $[2^m, 1+3m/2, 2^{m-1}-2^{(m-2)/2}]$ and the weight
distribution in Table \ref{tab-aaCG2jan18}.
The code $\overline{{\mathsf{C}}_{e}}$ has parameters $[2^m, 2^m-1-3m/2, 4]$.

When $m/\gcd(m,e)$ is even and $1 \leq e < m/2$, $\overline{{\mathsf{C}}_{e}}^\perp$ has parameters
$$[2^m, \, 2m+1,\, 2^{m-1}-2^{(m+\ell-2)/2}]$$ and the weight
distribution in Table \ref{tab-aaMinejan18}, where $\ell=2\gcd(m, e)$, and $\overline{{\mathsf{C}}_{e}}$ has parameters $[2^m, 2^m-1-2m, \overline{d}]$, where
$$
\overline{d} = \left\{ \begin{array}{ll}
                             4 & \mbox{ if } \gcd(e,m)>1; \\
                             6 & \mbox{ if } \gcd(e,m)=1.
\end{array}
\right.
$$
\end{theorem}

\begin{proof}
We prove only the conclusions of the first part. The conclusions of the other parts can be proved
similarly.

Consider now the case that $m/\gcd(m,e)$ is odd. Since the minimum weight of ${\mathsf{C}}_e$ is odd,
the minimum distance of $\overline{{\mathsf{C}}_e}$ is one more than that of ${\mathsf{C}}_e$. This proves the
conclusion on the minimum distance of $\overline{{\mathsf{C}}_e}$. By definition, $\dim({\mathsf{C}}_e)=\dim(\overline{{\mathsf{C}}_e})$, and the length of $\overline{{\mathsf{C}}_e}$ is $\bar{n}=n+1=2^m$.

The dimension of $\overline{{\mathsf{C}}_e}^\perp$ follows from that of $\overline{{\mathsf{C}}_e}$. It remains
to prove the weight distribution of $\overline{{\mathsf{C}}_e}^\perp$. By definition, $\overline{{\mathsf{C}}_e}$
has only even weights. It then follows that the all-one vector is a codeword of
$\overline{{\mathsf{C}}_e}^\perp$. Then by Theorems \ref{thm-allcodes}
and \ref{thm-calder}, $\overline{{\mathsf{C}}_e}^\perp$ has all the following weights
$$
2^{m-1} \pm 2^{m-1-h}, \ 2^{m-1} \pm 2^{(m-2)/2}, \ 2^{m-1}, \ 2^m.
$$
Due to symmetry of weights and the existence of the all-one vector in $\overline{{\mathsf{C}}_e}^\perp$,
$$
A_{2^{m-1} + 2^{m-1-h}}=A_{2^{m-1} - 2^{m-1-h}}, \
A_{2^{m-1} + 2^{(m-2)/2}}=A_{2^{m-1} - 2^{(m-2)/2}}.
$$
Note that the minimum distance of $\overline{{\mathsf{C}}_e}$ is $4$ or $6$. Solving the first four
Pless power moments yields the frequencies of all the weights.

\end{proof}

Combining Theorem \ref{thm-mymainjan18} and (\ref{eqn-tdesignblocknum}), we deduce the
following.

\begin{theorem}\label{thm-designsdualjan18}
Let $m \ge 4$ and $1 \leq e \le m/2$.
When $m/\gcd(m,e)$ is odd, define $h=(m-\gcd(m,e))/2$. Then $\overline{{\mathsf{C}}_{e}}^\perp$
holds a $2$-$(2^m, k, \lambda)$ design for the following pairs $(k, \lambda)$:
\begin{itemize}
\item $(k, \lambda)=\left(2^{m-1} \pm 2^{m-1-h},\  (2^{2h-1}\pm 2^{h-1})(2^{m-1} \pm 2^{m-1-h}-1)\right)$.
\item $(k, \lambda)=\left(2^{m-1}, \  (2^{m-1}-1)(2^{m}-2^{2h}+1) \right).$
\end{itemize}

When $m$ is even and $e=m/2$, $\overline{{\mathsf{C}}_{e}}^\perp$
holds a $2$-$(2^m, k, \lambda)$ design for the following pairs $(k, \lambda)$:
\begin{itemize}
\item $(k, \lambda)=\left(2^{m-1} \pm 2^{(m-2)/2}, \
       2^{(m-2)/2}(2^{m/2} - 1)(2^{(m-2)/2} \pm 1) \right).$
\item $(k, \lambda)=\left(2^{m-1}, \ 2^{m-1}-1\right).$
\end{itemize}

When $m/\gcd(m,e)$ is even and $1 \leq e < m/2$, $\overline{{\mathsf{C}}_{e}}^\perp$
holds a $2$-$(2^m, k, \lambda)$ design for the following pairs $(k, \lambda)$:
\begin{itemize}
\item $(k, \lambda)=\left(2^{m-1} \pm 2^{(m+\ell-2)/2}, \
            \frac{(2^{m-1} \pm 2^{(m+\ell-2)/2})(2^{m-1} \pm 2^{(m+\ell-2)/2}-1)}{2^\ell(2^{\ell/2}+1)} \right),$
\item $(k, \lambda)=\left(2^{m-1} \pm 2^{(m-2)/2}, \
       \frac{2^{(m+\ell-2)/2}(2^{m/2} \pm 1)(2^{m-1} \pm 2^{(m-2)/2}-1)}{2^{\ell/1}-1} \right),$
\item $(k, \lambda)=\left(2^{m-1}, \ ( (2^{\ell/2} -1)2^{m-\ell} +1 )(2^{m-1} - 1) \right),$
\end{itemize}
where $\ell=2\gcd(m, e)$.
\end{theorem}

To determine the parameters of the $2$-designs held in the extended code $\overline{{\mathsf{C}}_{e}}$, we need to
find out the weight distribution of $\overline{{\mathsf{C}}_{e}}$. In theory, the weight distribution of
$\overline{{\mathsf{C}}_{e}}$ can be settled using the weight enumerator of $\overline{{\mathsf{C}}_{e}}^\perp$
given in Tables \ref{tab-aaCG1jan18}, \ref{tab-aaCG2jan18}, and \ref{tab-aaMinejan18}. However,
it is practically hard to find a simple expression of the weight distribution of $\overline{{\mathsf{C}}_{e}}$.

In the rest of this section, we consider only the weight distribution of $\overline{{\mathsf{C}}_{e}}$
in a special case, in order to construct an infinite family of Steiner systems $S(2, 4, 2^m)$
for all $m \equiv 2 \pmod{4}$.

As a special case of Theorem \ref{thm-calderjan18}, we have the following.

\begin{corollary}
Let $m \equiv 2 \pmod{4}$ and $2 \leq e \leq \lfloor m/2 \rfloor$. If $\gcd(m, e)=2$, then
$\overline{{\mathsf{C}}_e}^\perp$ has parameters $[2^m, 2m+1, 2^{m-1}-2^{m/2}]$ and weight enumerator
\begin{equation}\label{eqn-wtenumeratord}
\overline{A}^\perp(z)=1 + uz^{2^{m-1}-2^{m/2}} + vz^{2^{m-1}} + uz^{2^{m-1}+2^{m/2}} + z^{2^m},
\end{equation}
where
\begin{eqnarray}\label{eqn-myuv}
u=(2^m-1)2^{m-2}, \ v=(2^m-1)(2^{m+1}-2^{m-1}+2).
\end{eqnarray}
\end{corollary}

\begin{theorem}\label{thm-desiredwtdist}
Let $m \equiv 2 \pmod{4}$ and $2 \leq e \leq \lfloor m/2 \rfloor$. If $\gcd(m, e)=2$, then
$\overline{{\mathsf{C}}_e}$ has parameters $[2^m, 2^m-1-2m, 4]$ and weight distribution
\begin{eqnarray*}
2^{2m+1}\overline{A}_k
& = &  (1+(-1)^k) \binom{2^m}{k} +
\frac{1+(-1)^k}{2} (-1)^{\lfloor k/2 \rfloor} \binom{2^{m-1}}{\lfloor k/2 \rfloor} v  + \\
& & u \sum_{\substack{0 \le i \le 2^{m-1}-2^{m/2} \\
0\le j \le 2^{m-1}+2^{m/2} \\i+j=k}}[(-1)^i +(-1)^j] \binom{2^{m-1}-2^{m/2}} {i} \binom{2^{m-1}+2^{m/2}}{j},
\end{eqnarray*}
for $0 \le k \le 2^m$, where $u$ and $v$ are given in (\ref{eqn-myuv}).
\end{theorem}

\begin{proof}
The parameters of $\overline{{\mathsf{C}}_e}$ were proved in Theorem \ref{thm-calderjan18}.
The weight distribution formula for $\overline{{\mathsf{C}}_e}$ follows from
the weight enumerator $\overline{A}^\perp(z)$ of $\overline{{\mathsf{C}}_e}^\perp$ in (\ref{eqn-wtenumeratord})
and Theorem \ref{thm-MI}.
\end{proof}

We are now ready to prove the main result of this paper.

\begin{theorem}\label{thm-mmmainresult}
Let $m \equiv 2 \pmod{4}$, $2 \leq e \leq \lfloor m/2 \rfloor$, and $\gcd(m, e)=2$. Then
the supports of the codewords of weight $4$ in $\overline{{\mathsf{C}}_e}$ form a $2$-$(2^m, 4, 1)$
design, i.e., a Steiner system $S(2, 4, 2^m)$.
\end{theorem}

\begin{proof}
Using the weight distribution formula $\overline{A}_k$ given in Theorem \ref{thm-desiredwtdist},
we obtain
$$
\overline{A}_4= \frac{2^{m-1}(2^m-1)}{6}.
$$
It then follows that
$$
\lambda=\overline{A}_4 \frac{\binom{4}{2}}{\binom{2^m}{2}}=1.
$$
This completes the proof.
\end{proof}

For every $m \equiv 2 \pmod{4}$ and $m \geq 6$, we can choose $e=2e_1$ with $\gcd(m/2, e_1)=1$
and $e_1 \leq \lfloor m \rfloor/2$. Such $e$ will satisfy the conditions in Theorem \ref{thm-mmmainresult}. At least we can choose $e=2$. This means that for every $m \equiv 2 \pmod{4}$
with $m \geq 6$, Theorem \ref{thm-mmmainresult} gives at least one Steiner system $S(2, 4, 2^m)$.
In fact, it constructs more than one Steiner system $S(2, 4, 2^m)$. For example, when $m=14$, we
can choose $e$ to be any element of $\{2, 4, 6\}$.
Therefore, Theorem \ref{thm-mmmainresult} gives an infinite family of Steiner system $S(2, 4, 2^m)$.

In addition to the infinite family of Steiner systems $S(2, 4, 2^m)$, Theorem \ref{thm-mmmainresult}
gives many other $2$-designs. Below we present two more examples.

\begin{theorem}\label{thm-wt6design}
Let $m \equiv 2 \pmod{4}$, $2 \leq e \leq \lfloor m/2 \rfloor$, and $\gcd(m, e)=2$. Then
the supports of the codewords of weight $6$ in $\overline{{\mathsf{C}}_e}$ form a $2$-$(2^m, 6, \lambda)$
design, where
$$
\lambda=\frac{(2^m-4)(2^m-24)}{24}.
$$
\end{theorem}

\begin{proof}
Using the weight distribution formula $\overline{A}_k$ given in Theorem \ref{thm-desiredwtdist},
we obtain
$$
\overline{A}_6= \frac{2^{m}(2^m-1)(2^m-4)(2^m-24)}{720}.
$$
It then follows that
$$
\lambda=\overline{A}_6 \frac{\binom{6}{2}}{\binom{2^m}{2}}=\frac{(2^m-4)(2^m-24)}{24}.
$$
This completes the proof.
\end{proof}

\begin{theorem}\label{thm-wt8design}
Let $m \equiv 2 \pmod{4}$, $2 \leq e \leq \lfloor m/2 \rfloor$, and $\gcd(m, e)=2$. Then
the supports of the codewords of weight $8$ in $\overline{{\mathsf{C}}_e}$ form a $2$-$(2^m, 8, \lambda)$
design, where
$$
\lambda=\frac{(2^m-4)(2^{3m}-23\times 2^{2m}+344 \times 2^m -1612)}{720}.
$$
\end{theorem}

\begin{proof}
Using the weight distribution formula $\overline{A}_k$ given in Theorem \ref{thm-desiredwtdist},
we obtain
$$
\overline{A}_8= \frac{2^{m}(2^m-1)(2^m-4)(2^{3m}-23\times 2^{2m}+344 \times 2^m -1612)}{2 \times 20160}.
$$
It then follows that
$$
\lambda=\overline{A}_8 \frac{\binom{8}{2}}{\binom{2^m}{2}}=
\frac{(2^m-4)(2^{3m}-23\times 2^{2m}+344 \times 2^m -1612)}{720}.
$$
This completes the proof.
\end{proof}

We point out that the main result in Theorem \ref{thm-mmmainresult} of this paper and
Theorems \ref{thm-wt6design} and \ref{thm-wt8design} cannot be proved with the Assmus-Mattson
Theorem due to the weight distribution of $\overline{{\mathsf{C}}_e}^\perp$ and the low minimum distance
of $\overline{{\mathsf{C}}_e}$.

When $m$ is odd and $\gcd(m, e)=1$, the code ${\mathsf{C}}_e$ and their relatives are also very interesting
due to the following:
\begin{itemize}
\item The code ${\mathsf{C}}_e$ and its dual ${\mathsf{C}}_e^\perp$ hold many infinite families of
      $2$-designs.
\item The extended code $\overline{{\mathsf{C}}_e}$ and its dual $\overline{{\mathsf{C}}_e}^\perp$ hold
      many infinite families of $3$-designs.
\end{itemize}
These results were proved by the Assmus-Mattson Theorem, and the designs of those codes were
covered in \cite{DingLi16}.

When $m/\gcd(m,e)$ is even and $1 \leq e \leq \overline{m}$, one can find an algebraic
expression of the weight distribution of the code $\overline{{\mathsf{C}}_e}$ with the weight distribution
of $\overline{{\mathsf{C}}_e}^\perp$ depicted in Table \ref{tab-aaMinejan18} and Theorem \ref{thm-MI},
and then determine the parameters of some of the two designs held in $\overline{{\mathsf{C}}_e}$.

\subsection{Designs from some other codes ${\mathsf{C}}_E$ and their relatives}

In Section \ref{sec-mainsect}, we treated the designs from the code ${\mathsf{C}}_{\{1+2^e\}}$ and its relatives.
In this section, we provide information on designs from other codes ${\mathsf{C}}_E$ and their relatives.

When $m \geq 5$ is odd and $E=\{(m-3)/2, (m-1)/2\}$ or $E=\{1, 2\}$, ${\mathsf{C}}_E$ has parameters
$[2^m-1, 2^m-1-3m, 7]$ and $\overline{{\mathsf{C}}_E}$ has parameters $[2^m, 2^m-1-3m, 8]$.
$\overline{{\mathsf{C}}_E}^\perp$ has dimension $3m+1$ and has six weights. In this case, ${\mathsf{C}}_E$ and
${\mathsf{C}}_E^\perp$ hold many infinite families of $2$-designs, while the codes $\overline{{\mathsf{C}}_E}$ and $\overline{{\mathsf{C}}_E}^\perp$ hold many infinite families of $3$-designs. These designed were treated in
\cite{DingDesign16}.

When $m \geq 4$ is even and $E=\{1, 2\}$, ${\mathsf{C}}_E$ does not hold $2$-designs. But $\overline{{\mathsf{C}}_E}$
and $\overline{{\mathsf{C}}_E}^\perp$ hold $2$-designs. The parameters of these $2$-designs were studied in
\cite{DingZhouConf17}.

When $m \geq 4$ is even and $E=\{(m-2)/2, m/2\}$, ${\mathsf{C}}_E$ has parameters $[2^m-1, 2^m-1-3m/2, 5]$,
$\overline{{\mathsf{C}}_E}$ has parameters $[2^m, 2^m-1-3m/2, 6]$, and the weight distribution of
$\overline{{\mathsf{C}}_E}^\perp$ is known \cite{Kasa69}. The parameters of the $2$-designs held in
$\overline{{\mathsf{C}}_E}$ and $\overline{{\mathsf{C}}_E}^\perp$ are the same as those of the $2$-designs held
in some codes in \cite{DingZhouConf17}.

When $m \geq 7$ is odd and $E=\{(m-5)/2, (m-3)/2, (m-1)/2\}$, ${\mathsf{C}}_E^\perp$ has dimension $4m$
and has $7$ weights \cite{Kasa69}. It can be prove that ${\mathsf{C}}_E$ has parameters $[2^m-1, 2^m-1-4m, 7]$.
The weight distribution of $\overline{{\mathsf{C}}_E}^\perp$ can be determined. Hence, the parameters of
the $2$-designs held in $\overline{{\mathsf{C}}_E}^\perp$ and some of the $2$-designs held in
$\overline{{\mathsf{C}}_E}$ can be worked out.

\section{Concluding remarks}

While a lot of $t$-designs from codes have been constructed
(see \cite{AK92, AM74, BJL, DingDesign16, DingLi16, KP95, Tonc93, Tonchev, Tonchevhb}, and the references therein), only a few constructions of infinite families of Steiner systems from codes are known in the literature. One of
them is the Steiner quadruple systems $S(3, 4, 2^m)$ from the minimum codewords in the binary
Reed-Muller codes ${\mathcal{R}}_2(m-2, m)$. Another one is the Steiner triple systems $S(2, 3, 2^m-1)$
from the minimum codewords in the binary Hamming codes. This paper has now filled the gap of
constructing an infinite family of Steiner systems $S(2, 4, v)$ from codes. We inform the reader that an infinite family of
conjectured Steiner systems $S(2, 4, (3^m-1)/2)$ was presented in \cite{DingLi16}. It would be good if more infinite families of Steiner systems from error correcting codes could be discovered.


\section{Introduction\label{sec:Introduction}}

In cognitive radio (CR) networks, secondary users (SUs) access spectrum
allocated to primary users (PUs) in such a way that given quality-of-service
(QoS) requirement of PUs is satisfied. Users store packets arriving
from higher layers in queues before transmission over wireless link.
Various works have studied SU packet throughput for non-cooperation
scenarios where SU's access probability is optimized under queue stability
constraint of PU \cite{Simeone_stable_throughput,Jeon,fanous}. Cooperation
between SU and PU improves throughput of both users as shown in \cite{Kompella}
and \cite{Ashour}. These works consider queues of infinite storing
capacity. In practice, queues are of finite size. If a queue is full,
new packets cannot be admitted to the queue and are lost. Queueing
performance of finite sized SU queue was studied in \cite{Chu}. In
\cite{Krikidis_buffer,Schober_buffer2,Schober_buffer,Teh_buffer,Krikidis_buffer_survey},
authors studied relay selection problem for finite buffer-aided relaying
systems. These works considered dedicated relay nodes that do not
have their own data to transmit. In \cite{Shafie} and \cite{Elmahdy},
authors considered cooperative CR networks with finite sized relay
queue and proposed packet admission control assuming that relay queue
information is available at SU. However, underlying assumption in
these works is that PU queue has infinite buffer length. Also, whole
slot is used by the relay either for transmission or for reception.
A relaying protocol where packet reception and transmission takes
place in the same slot using time sharing, may enable the relay to
improve its throughput by transmitting own packets more frequently.

In this paper, we investigate SU throughput in a cooperative CR system
where SU relays failed packets of PU using two-phase relaying. SU
transmits its own packets in the relaying phase using time sharing,
with some access probability. Furthermore, we consider that both PU
and SU have finite capacity queues. SU's finite queue size affects
cooperation offered to PU. Thus, queue sizes at both PU and SU impact
PU's packet loss. Our aim is to find optimal access policy of SU that
maximizes SU packet throughput while satisfying PU's packet loss constraint.
Specifically, our contribution is as follows.
\begin{itemize}
\item We model PU and relay queues as discrete time Markov chains (DTMC).
Using DTMC analysis, we characterize packet loss probability of PU
and SU packet throughput.
\item We formulate the problem of maximizing SU throughput under PU packet
loss constraint, which is non-convex. By exploiting structure of the
problem, we transform it into a linear programming (LP) problem over
the feasible range of PU packet throughput. We also propose two low-complexity
suboptimal access methods that transform original multi-dimensional
problem into one dimensional problem.
\item Finally, we present numerical results to study effect of queue sizes,
path loss and time sharing on SU packet throughput. We also compare
the performance with infinite capacity queue system under queue stability
constraint.
\end{itemize}

\section{System Model\label{sec:System-Model}}

As shown in Fig. \ref{fig:SysMod}, a PU source $\mathcal{P}$ transmits
packets to PU destination $\mathcal{D}$ with assistance of a SU node
$\mathcal{S}$ using two-phase relaying as done in \cite{Schober_buffer2}.
Nodes $\mathcal{P}$ and $\mathcal{S}$ are equipped with packet queue
$Q_{\mathcal{P}}$ of capacity $N_{P}$ and relay queue $Q_{\mathcal{S}}$
of capacity $N_{S}$ respectively. In a slot of duration $T$, $\mathcal{P}$
transmits its packet with power $P_{\mathcal{P}}$ for time $\beta T,\,\beta\in\left[0,\,1\right]$.
If $\mathcal{D}$ fails to receive the packet, it is admitted to the
relay queue at $\mathcal{S}$, provided that the packet is correctly
received at $\mathcal{S}$ and the relay queue is not full. In relaying
phase of duration $\left(1-\beta\right)T$, $\mathcal{S}$ relays
the PU packet to $\mathcal{D}$ with power $P_{\mathcal{S}}$. With
some access probability, SU also transmits its own packets to SU destination
$\mathcal{R}$ using time sharing, that is, SU relays PU packet for
duration $\alpha\left(1-\beta\right)T$ and transmits its own packet
for duration $\left(1-\alpha\right)\left(1-\beta\right)T$, $\alpha\in\left[0,\,1\right]$.
The access probability is $p_{n}$ when there are $n,\,0\leq n\leq N_{S}$
packets in $Q_{\mathcal{S}}$. If $Q_{\mathcal{S}}$ is empty, whole
relaying duration $\left(1-\beta\right)T$ is used to transmit SU
packet, with probability $p_{0}=1$.

We assume that all channels are independent block-fading in nature,
that is, channel gains remain constant during a slot and vary independently
from slot to slot. Channel power gain between source $s$ and destination
$d$ is denoted as $g_{sd}$ and is exponentially distributed with
mean $\sigma_{sd}^{2},\,s,d\in\left\{ \mathcal{P},\,\mathcal{S},\,\mathcal{D},\,\mathcal{R}\right\} $.
The distance between $s$ and $d$ is denoted by $r_{sd}$ and path-loss
exponent is denoted by $\kappa$. Additive white Gaussian noise (AWGN)
at receivers has power $\sigma_{\mathcal{N}}^{2}$. PU and SU packets
have fixed length of $\mathcal{B}$ bits. A packet is assumed to be
delivered successfully to intended receiver if instantaneous channel
capacity is greater than required transmission rate. Then probability
of successful packet transmission is given by \cite{fanous} \vspace{-0.2cm}

\begin{equation}
\theta_{sd}\!=\!\Pr\!\left[\!\log_{2}\left(1+\frac{g_{sd}P_{s}r_{sd}^{-\kappa}}{\sigma_{\mathcal{N}}^{2}}\right)\!\geq\!\frac{\mathcal{B}}{WT_{s}}\!\right]\!\!=\!\exp\!\left(\!\!\frac{\!-\sigma_{\mathcal{N}}^{2}\!\left(\!2^{\frac{\mathcal{B}}{WT_{s}}}\!-\!1\!\right)}{P_{s}r_{sd}^{-\kappa}\sigma_{sd}^{2}}\!\!\right)\!\!,
\end{equation}
where $P_{s}$ is transmit power, $T_{s}$ is transmission duration
and $W$ is channel bandwidth. We denote probability of successful
packet transmission on $s-d$ link without time sharing by $\theta_{sd},\,s,d\in\left\{ \mathcal{P},\,\mathcal{S},\,\mathcal{D},\,\mathcal{R}\right\} $.
In case of time sharing, time available for relaying/transmission
of PU and SU packets is less than $\left(1-\beta\right)T$. We use
$\overline{\theta_{\mathcal{SD}}}$ and $\overline{\theta_{\mathcal{SR}}}$
to denote successful transmission probabilities in case of time sharing\footnote{Note that notation $\overline{\theta_{sd}}$ only signifies success
probability with time sharing and $\overline{\theta_{sd}}\neq1-\theta_{sd}$.}. As required transmission rate is higher, probabilities of successful
packet transmission decrease. Thus, we have $\overline{\theta_{\mathcal{SD}}}<\theta_{\mathcal{SD}}$
and $\overline{\theta_{\mathcal{SR}}}<\theta_{\mathcal{SR}}$. Successful
transmission probabilities on all links are known to the SU \cite{Jeon,fanous,Kompella}.
\vspace{-0.1cm}

\begin{figure}
\centering

\includegraphics[scale=0.15]{SysMod2}

\protect\protect\protect\protect\protect\protect\caption{System model of SU relaying PU packets and transmitting own packets
using two-phase relaying and time sharing\label{fig:SysMod}}
\vspace{-0.3cm}
\end{figure}

\subsection{Queue blocking and packet loss}

Packet arrival process at PU queue $Q_{\mathcal{P}}$ is Bernoulli
with average rate $\lambda_{P}\in\left[0,\,1\right]$ packets/slot.
A packet is removed from $Q_{\mathcal{P}}$ only when it is received
at $\mathcal{D}$ or $\mathcal{S}$. A PU packet is admitted to the
relay queue $Q_{\mathcal{S}}$ when all of the following events are
true-- 1) Packet transmission on $\mathcal{P}-\mathcal{D}$ link fails,
2) PU packet is successfully received at $\mathcal{S}$, and 3) $Q_{\mathcal{S}}$
is not full. Thus, packet departure rate at $Q_{\mathcal{P}}$, denoted
as $\mu_{P}$, depends on channel between $\mathcal{P}-\mathcal{S}$
and state of $Q_{\mathcal{S}}$. When $Q_{\mathcal{P}}$ is full,
new packets cannot be admitted to the queue and are dropped.

PU queue can be modeled as a discrete time Markov chain (DTMC) as
shown in Fig \ref{fig:DTMC}(a) where states denote number of packets
in PU queue. Let $w_{n},\,n=0,\,1,\dots,\,N_{P}$ be steady state
probability of PU queue being in state $n$. Also let $\gamma=\frac{\lambda_{P}\left(1-\mu_{P}\right)}{\left(1-\lambda_{P}\right)\mu_{P}}$.
Then we can write local balance equations for DTMC of $Q_{\mathcal{P}}$
as
\begin{align}
w_{1} & =\frac{\gamma}{\left(1-\mu_{P}\right)}w_{0},\\
w_{n+1} & =\gamma\,w_{n},\,n=1,\,2,\dots,\,N_{P}-1.
\end{align}
Noting that $w_{n}=\gamma^{n-1}w_{1},\,n>1$ and $\sum_{n=0}^{N_{P}}w_{n}=1$,
we get probability of $Q_{\mathcal{P}}$ being empty as
\[
w_{0}=\begin{cases}
\frac{\left(1-\mu_{P}\right)\left(1-\gamma\right)}{1-\mu_{P}\left(1-\gamma\right)-\gamma^{N_{P}+1}} & \,\,\mbox{for}\,\,\gamma\neq1\\
\frac{1-\mu_{P}}{N_{P}+1-\mu_{P}} & \,\,\mbox{for}\,\,\gamma=1.
\end{cases}
\]

Then probabilities of $Q_{\mathcal{P}}$ being non-empty and $Q_{\mathcal{P}}$
being full are given by $\nu_{1}=1-w_{0}$ and $\nu_{N_{P}}=w_{N_{P}}=\frac{1}{\left(1-\mu_{P}\right)}\gamma^{N_{P}}w_{0}$
respectively. To keep PU packet loss below a limit, probability of
$Q_{\mathcal{P}}$ being full should remain below a threshold $\epsilon$,
i.e. $\nu_{N_{P}}\leq\epsilon$. From Fig. \ref{fig:DTMC}(a), we
observe that, any increase in $\mu_{P}$ would decrease probability
of $Q_{\mathcal{P}}$ being full, that is, $\nu_{N_{P}}$ monotonically
decreases in $\mu_{P}$. Thus, for given value of $\lambda_{P}$,
we can find $\overline{\mu_{P}}\in\left[0,\,1\right]$ such that $\nu_{N_{P}}\left(\overline{\mu_{P}}\right)=\epsilon$,
using Bisection method. Packet loss constraint $\nu_{N_{P}}\leq\epsilon$
can now be written as $\mu_{P}\geq\overline{\mu_{P}}$. SU should
choose its access probability in such a way that packet loss constraint
of PU is satisfied.

\begin{figure}
\centering

\includegraphics[width=8.2cm,height=5.4cm]{Relay_markov3_2}

\caption{Discrete time Markov chain (DTMC) model of (a) PU queue $Q_{\mathcal{P}}$
and (b) relay queue $Q_{\mathcal{S}}$\label{fig:DTMC}}

\vspace{-0.3cm}
\end{figure}

\section{Optimal spectrum access}

DTMC of the relay queue $Q_{\mathcal{S}}$ is as shown in Fig. \ref{fig:DTMC}(b)
where state $n$ denotes number of packets in relay queue at the end
of receiving phase. Probability of a PU packet arriving at $Q_{\mathcal{S}}$
is $q$. When $Q_{\mathcal{S}}$ is in state $n$, SU transmits its
own packets with probability $p_{n}$ using time sharing. Thus, with
probability $\left(1-p_{n}\right)$, PU packet is relayed for duration
$\left(1-\beta\right)T$ and with probability $p_{n}$, PU packet
is relayed for duration $\alpha\left(1-\beta\right)T$. Then probability
of a PU packet departing $Q_{\mathcal{S}}$ in state $n>0$ is
\begin{equation}
r_{n}=\left(1-p_{n}\right)\theta_{\mathcal{SD}}+p_{n}\overline{\theta_{\mathcal{SD}}}=\theta_{\mathcal{SD}}-p_{n}\left(\theta_{\mathcal{SD}}-\overline{\theta_{\mathcal{SD}}}\right).\label{eq:mu_relay}
\end{equation}

When PU is present, a packet is received at $\mathcal{S}$ with probability
$\left(1-\theta_{\mathcal{PD}}\right)\theta_{\mathcal{PS}}$. Thus,
we have $q=\nu_{1}\theta_{\mathcal{PS}}\left(1-\theta_{\mathcal{PD}}\right)$.
For $1\leq n<N_{S}$, state transition from $n$ to $\left(n+1\right)$
occurs when packet transmission of a packet in $Q_{\mathcal{S}}$
fails and a new PU packet is received, which happens with probability
$q\left(1-r_{n}\right)$. State transition from $n$ to $\left(n-1\right)$
occurs when a packet is successfully relayed and no new packet arrives,
which happens with probability $\left(1-q\right)r_{n}$. Let $\pi_{n},\,n=0,\,1,\dots,\,N_{S}$
be steady state probability of $Q_{\mathcal{S}}$ being in state $n$.
Then we write local balance equations as
\begin{align}
\pi_{1} & =\frac{q}{\left(1-q\right)r_{1}}\pi_{0},\label{eq:balance1}\\
\pi_{n+1} & =\frac{q\left(1-r_{n}\right)}{\left(1-q\right)r_{n+1}}\pi_{n},\,\,n=1,\,2,\dots,\,N_{S}-1.\label{eq:balance2}
\end{align}
For given values of $\lambda_{P}$ and $\mu_{P}$, steady state probabilities
of relay queue can be calculated from (\ref{eq:balance1}), (\ref{eq:balance2})
using
\begin{equation}
\sum_{n=0}^{N_{S}}\pi_{n}=1.\label{eq:normalize}
\end{equation}

At the start of receiving phase, $Q_{\mathcal{S}}$ is full with probability
$\pi_{N_{S}}\left(1-r_{N_{S}}\right)$. As a PU packet is admitted
to $Q_{\mathcal{S}}$ only when $Q_{\mathcal{S}}$ is not full, we
obtain packet departure rate of PU queue as
\begin{equation}
\mu_{P}=\theta_{\mathcal{PD}}+\theta_{\mathcal{PS}}\left(1-\theta_{\mathcal{PD}}\right)\left[1-\pi_{N_{S}}\left(1-r_{N_{S}}\right)\right].\label{eq:mup_relay}
\end{equation}

\subsection{SU throughput maximization}

When there are $n>0$ packets in $Q_{\mathcal{S}}$, SU transmits
its own packet for duration $\left(1-\alpha\right)\left(1-\beta\right)T$
with probability $p_{n}$. If $Q_{\mathcal{S}}$ is empty, whole duration
$\left(1-\beta\right)T$ is used to transmit SU packet with probability
$p_{0}=1$. Given PU packet arrival rate $\lambda_{P}$, our objective
is to maximize SU packet throughput while ensuring that packet loss
probability of PU is kept below specified threshold. Thus, the optimization
problem is written as
\begin{align}
\max_{\boldsymbol{p},\,\boldsymbol{\pi},\,\mu_{P}} & \quad\mu_{S}=\theta_{\mathcal{SR}}\pi_{0}+\overline{\theta_{\mathcal{SR}}}\sum_{n=1}^{N_{S}}\pi_{n}p_{n}\label{eq:Opt_problem}\\
\mbox{s. t.} & \quad\mu_{P}\geq\overline{\mu_{P}},\label{eq:blocking_constraint}\\
 & \quad0\leq p_{n},\pi_{n}\leq1,\,\,n=0,\,1,\dots,\,N_{S},\nonumber \\
 & \quad p_{0}=1\nonumber \\
 & \quad\mu_{P}=\theta_{\mathcal{PD}}+\theta_{\mathcal{PS}}\left(1-\theta_{\mathcal{PD}}\right)\left[1-\pi_{N_{S}}\left(1-r_{N_{S}}\right)\right],\nonumber \\
 & \quad(\ref{eq:balance1}),\,(\ref{eq:balance2}),\,(\ref{eq:normalize}),\nonumber
\end{align}
where $\boldsymbol{p}=\left[p_{0},\dots,\,p_{N_{S}}\right]^{T}$ and
$\boldsymbol{\pi}=\left[\pi_{0},\dots,\,\pi_{N_{S}}\right]^{T}$.
Optimization problem in (\ref{eq:Opt_problem}) is non-convex due
to product terms of optimization variables $\pi_{n}$ and $p_{n}$.
We transform it into a linear programming (LP) problem by exploiting
structure of the problem.

Let $a_{n}=\pi_{n}p_{n}$. Then we have $a_{0}=\pi_{0}$ and $0\leq a_{n}\leq\pi_{n},\,\,n=1,\,2,\dots,\,N_{S}$.
From (\ref{eq:normalize}), we have
\begin{equation}
0\leq\sum_{n=0}^{N_{S}}a_{n}\leq1.\label{eq:normalize_new}
\end{equation}
Using (\ref{eq:mu_relay}), we can transform balance equations (\ref{eq:balance1})
and (\ref{eq:balance2}) as given in (\ref{eq:balance_new_1}) and
(\ref{eq:balance_new_2}) on next page.

\begin{figure*}
\begin{equation}
\theta_{\mathcal{SD}}\left(1-q\right)\pi_{1}-q\pi_{0}=\left(\theta_{\mathcal{SD}}-\overline{\theta_{\mathcal{SD}}}\right)\left(1-q\right)a_{1},\label{eq:balance_new_1}
\end{equation}
\begin{equation}
\theta_{\mathcal{SD}}\left(1-q\right)\pi_{n+1}-q\left(1-\theta_{\mathcal{SD}}\right)\pi_{n}=\left(\theta_{\mathcal{SD}}-\overline{\theta_{\mathcal{SD}}}\right)\left(1-q\right)a_{n+1}+q\left(\theta_{\mathcal{SD}}-\overline{\theta_{\mathcal{SD}}}\right)a_{n},\,\,n=1,\dots,\,N_{S}-1.\label{eq:balance_new_2}
\end{equation}

\vspace{-0.2cm}

\rule[0.5ex]{2\columnwidth}{0.5pt}\vspace{-0.6cm}
\end{figure*}

Similarly, constraint in (\ref{eq:mup_relay}) can be written as
\begin{equation}
\left(1-\theta_{\mathcal{SD}}\right)\pi_{N_{S}}+\left(\theta_{\mathcal{SD}}-\overline{\theta_{\mathcal{SD}}}\right)a_{N_{S}}=1-\frac{\mu_{P}-\theta_{\mathcal{PD}}}{\theta_{\mathcal{PS}}\left(1-\theta_{\mathcal{PD}}\right)}.\label{eq:mup_relay_new}
\end{equation}
Thus, constraints (\ref{eq:balance1}), (\ref{eq:balance2}), (\ref{eq:mup_relay})
are transformed into constraints (\ref{eq:normalize_new}), (\ref{eq:balance_new_1}),
(\ref{eq:balance_new_2}) and (\ref{eq:mup_relay_new}) which are
affine in $\pi_{n}$ and $a_{n}$. The optimization problem in (\ref{eq:Opt_problem})
is still non-convex in $\mu_{P}$. However, for a given value of $\mu_{P}$,
the problem becomes a LP problem in variables $\boldsymbol{\pi}$
and $\boldsymbol{a}=\left[a_{0},\,a_{1},\dots,\,a_{N_{S}}\right]^{T}$
and is written as
\begin{align}
\max_{\boldsymbol{\pi},\,\boldsymbol{a}} & \quad\theta_{\mathcal{SR}}a_{0}+\overline{\theta_{\mathcal{SR}}}\sum_{n=1}^{N_{S}}a_{n}\label{eq:opt_prob_new}\\
\mbox{s. t.} & \quad0\leq\pi_{n}\leq1,\,\,n=0,\thinspace1,\dots,\,N_{S},\nonumber \\
 & \quad a_{0}=\pi_{0},\,\,0\leq a_{n}\leq\pi_{n},\,\,n=1,\,2,\dots,\,N_{S},\nonumber \\
 & \quad(\ref{eq:normalize}),\,(\ref{eq:normalize_new}),\,(\ref{eq:balance_new_1}),\,(\ref{eq:balance_new_2}),\,(\ref{eq:mup_relay_new}).\nonumber
\end{align}
From (\ref{eq:mup_relay}) and (\ref{eq:blocking_constraint}), we
see that the feasible values of $\mu_{P}$ are
\begin{align}
\max\left\{ \overline{\mu_{P}},\,\theta_{\mathcal{PD}}+\theta_{\mathcal{PS}}\overline{\theta_{\mathcal{SD}}}\left(1-\theta_{\mathcal{PD}}\right)\right\} \nonumber \\
 & \hspace{-3cm}\leq\mu_{P}\leq\theta_{\mathcal{PD}}+\theta_{\mathcal{PS}}\left(1-\theta_{\mathcal{PD}}\right).\label{eq:feasible}
\end{align}
 The linear program in (\ref{eq:opt_prob_new}) is solved over feasible
values of $\mu_{P}$. Value of $\mu_{P}$ that corresponds to the
maximum SU packet throughput is chosen. From optimal $a_{n}$ and
$\pi_{n}$, optimal SU access probabilities are found as $p_{n}=\frac{a_{n}}{\pi_{n}},\,\,n=0,\,1,\dots,\,N_{S}$.
We have used CVX package for MATLAB \cite{cvx} to solve (\ref{eq:opt_prob_new})
in polynomial complexity.

\subsection{Suboptimal methods}

From (\ref{eq:mu_relay}), (\ref{eq:balance1}), (\ref{eq:balance2})
and (\ref{eq:normalize}), we get steady state probabilities for $Q_{\mathcal{S}}$
as
\begin{align}
\pi_{0} & =\left[1+\frac{1}{r_{1}}\sum_{n=1}^{N_{S}}\left(\frac{q}{1-q}\right)^{n}\prod_{m=1}^{n-1}\left(\frac{1-r_{m}}{r_{m+1}}\right)\right]^{-1},\label{eq:relay_empty}\\
\pi_{n} & =\left[\left(\frac{q}{1-q}\right)^{n}\frac{1}{r_{1}}\prod_{m=1}^{n-1}\left(\frac{1-r_{m}}{r_{m+1}}\right)\right]\pi_{0},\,\,n>0.
\end{align}
It can be proven that $\pi_{0}$ is monotonically decreasing function
of access probability $p_{n},\,n=1,\,2,\dots,\,N_{S}$. Also we can
prove that $\pi_{n},\,0<n\leq N_{S}$ is a monotonically increasing
function of $p_{m},\,m\leq n$ and a monotonically decreasing function
of $p_{m},\,m>n$. Intuitively, this can be explained from Fig. \ref{fig:DTMC}(b)
as follows. As access probability $p_{m}$ increases, packet departure
rate of $Q_{\mathcal{S}}$ decreases. Thus, more packets get queued
up in $Q_{\mathcal{S}}$. Hence, the probability of $Q_{\mathcal{S}}$
having more than $m$ packets increases, while probability of $Q_{\mathcal{S}}$
having packets less than or equal to $m$ decreases. Using this nature,
we propose low complexity suboptimal methods that simplify $\left(N_{S}+1\right)$
dimensional problem in (\ref{eq:Opt_problem}) to a one-dimensional
problem.

\subsubsection{Constant probability transmission (CPT)}

In this method, SU transmits its own packets with a fixed probability
$p$ when there are $n>0$ packets in relay queue. Thus, we have
\begin{equation}
p_{n}=\begin{cases}
1 & \,\mbox{for}\,n=0\\
p & \,\mbox{otherwise}.
\end{cases}\label{eq:prob_const_trans}
\end{equation}
In this case, SU packet throughput is $\mu_{S}=\theta_{\mathcal{SR}}\pi_{0}+\overline{\theta_{\mathcal{SR}}}p\sum_{n=1}^{N_{S}}\pi_{n}$.
Using $\sum_{n=1}^{N_{S}}\pi_{n}=1-\pi_{0}$, we can write the problem
of maximizing $\mu_{S}$ for fixed $\mu_{P}$ as
\begin{align*}
\max_{p\in\left[0,\,1\right]} & \quad\overline{\theta_{\mathcal{SR}}}p+\pi_{0}\left(\theta_{\mathcal{SR}}-\overline{\theta_{\mathcal{SR}}}p\right)\\
\mbox{s. t.} & \quad(\ref{eq:mup_relay}),\,(\ref{eq:balance1}),\,(\ref{eq:balance2}),\,(\ref{eq:normalize}),\,(\ref{eq:prob_const_trans}).
\end{align*}
The term $\pi_{0}\left(\theta_{\mathcal{SR}}-\overline{\theta_{\mathcal{SR}}}p\right)$
is monotonically decreasing in $p$ while term $\overline{\theta_{\mathcal{SR}}}p$
is increasing in $p$. Thus, there exists a unique $p$ that maximizes
$\mu_{S}$. Optimal solution can be found using Interval halving method
with complexity $\mathcal{O}\left(1\right)$.

\subsubsection{Step transmission (ST)}

In this method, SU transmits its own packets using time sharing with
probability $1$ until length of $Q_{\mathcal{S}}$ reaches a threshold
$N_{th}$. Once it crosses $N_{th}$, the relaying phase duration
of $\left(1-\beta\right)T$ is used only to relay PU packets. Thus,
we have
\begin{equation}
p_{n}=\begin{cases}
1 & \,\mbox{for}\,n\leq N_{th}\\
0 & \,\mbox{otherwise}.
\end{cases}\label{eq:prob_step_trans}
\end{equation}
In this case, the objective is
\begin{align*}
\max_{N_{th}\in\left\{ 0,\,1,\dots,\,N_{S}\right\} } & \quad\theta_{\mathcal{SR}}\pi_{0}+\overline{\theta_{\mathcal{SR}}}\sum_{n=1}^{N_{th}}\pi_{n}\\
\mbox{s. t.} & \quad(\ref{eq:balance1}),\,(\ref{eq:balance2}),\,(\ref{eq:normalize}),\,(\ref{eq:mup_relay}),\,(\ref{eq:prob_step_trans}).
\end{align*}
With increasing $N_{th}$, $\pi_{0}$ decreases while number of terms
in summation increase. If value of $\overline{\theta_{\mathcal{SR}}}$
is very low compared to $\theta_{\mathcal{SR}}$, decrease in $\pi_{0}$
is significant and $\mu_{S}$ initially decreases. But as $\pi_{0}$
approaches zero, $\mu_{S}$ increases due to increasing value of $\overline{\theta_{\mathcal{SR}}}\sum_{n=1}^{N_{th}}\pi_{n}$.
For high value of $\overline{\theta_{\mathcal{SR}}}$, $\mu_{S}$
increases with increasing $N_{th}$. Throughput drops to zero when
$\pi_{N_{S}}$ increases to such a value that constraint (\ref{eq:mu_relay})
cannot be satisfied. Value of $N_{th}$ that maximizes $\mu_{S}$
can be found by linear search with complexity $\mathcal{O}\left(N_{S}\right)$.

Suboptimal methods run over all feasible values of $\mu_{P}$ given
in (\ref{eq:feasible}) and the value that corresponds to maximum
SU packet throughput is chosen.

\section{Numerical results and discussion}

Parameter values used to plot results are as follows. Transmit power
is $P_{\mathcal{P}}=P_{\mathcal{S}}=0.1\,\mbox{W}.$ Frame duration
is $T=100\,\mbox{ms}$. Time sharing factors are $\beta=\alpha=0.5$
unless stated otherwise. All channels have average channel gain $\sigma_{sd}^{2}=-10\,\mbox{dB},\,s,d\in\left\{ \mathcal{P},\,\mathcal{S},\,\mathcal{D},\,\mathcal{R}\right\} $.
Noise power is $\sigma_{\mathcal{N}}^{2}=10^{-5}\,\mbox{W}$. We take
$\mathcal{B}/W=3\times10^{-3}\,\mbox{bits/Hz}$. We consider $r_{\mathcal{PS}}=r_{\mathcal{SD}}=r_{\mathcal{SR}}=100\,\mbox{m}$.
Path loss exponent is $\kappa=2$. Packet loss probability threshold
is $\epsilon=0.01$.

\subsubsection{Throughput region}

\begin{figure}
\centering

\includegraphics[scale=0.44]{MuVsLemp} \vspace{-0.2cm}
 \protect\protect\protect\caption{SU packet throughput $\mu_{S}$ versus PU packet arrival rate $\lambda_{P}$
for $N_{S}=10$ and $N_{P}\rightarrow\infty$. \label{fig:SUvsLem_eps}}

\vspace{-0.4cm}

\end{figure}

Fig. \ref{fig:SUvsLem_eps} plots throughput region of proposed cooperation
model. As $\lambda_{P}$ increases, higher $\mu_{P}$ is required
to satisfy PU packet loss constraint. To support high $\mu_{P}$,
SU lowers its access probability. Thus, $\mu_{S}$ decreases with
increase in $\lambda_{P}$. As $\lambda_{P}$ increases further, constraint
(\ref{eq:blocking_constraint}) becomes infeasible, at which point
$\mu_{S}$ drops to zero. We also see that performance of constant
probability transmission (CPT) method and step transmission (ST) method
is close to that of optimal method. Hence, the suboptimal methods
are good low-complexity alternatives to the optimal method.

As a baseline for comparison, we also plot throughput region of cooperative
relaying method (CRM) in \cite{Elmahdy}. In CRM, PU utilizes whole
undivided frame duration $T$ for transmission/reception and optimizes
SU access probability under PU queue stability constraint. In contrast,
two-phase relaying model dedicates $\beta T$ duration for reception
in each slot. Thus, in CRM, probabilities of successful transmission
on $\mathcal{P}-\mathcal{D}$ and $\mathcal{S}-\mathcal{R}$ links
are higher, resulting in better performance of CRM at low and high
values of $\lambda_{P}$. But in mid-range of $\lambda_{P}$, two-phase
relaying benefits by gaining time to transmit own packets as SU relays
PU packets in the same slot.

\subsubsection{Effect of queue sizes}

\begin{figure}
\centering

\includegraphics[scale=0.50]{MuVsN} \vspace{-0.2cm}
 \protect\protect\protect\caption{Effect of queue sizes on SU packet throughput $\mu_{S}$ for (a) $N_{S}=10$
(b) $N_{P}=100$ and $\lambda_{P}=0.5$ \label{fig:SUvsLem_NP}}

\vspace{-0.4cm}

\end{figure}

Fig. \ref{fig:SUvsLem_NP}(a) plots SU packet throughput $\mu_{S}$
against PU queue capacity $N_{P}$ for different values of $\mathcal{P}-\mathcal{D}$
channel gains. Low values of $N_{P}$ cannot satisfy packet loss constraint
in (\ref{eq:blocking_constraint}). Packet throughput achieved in
such infeasible cases in zero. Increasing $N_{P}$ decreases $\overline{\mu_{P}}$
which is the minimum PU departure rate required to satisfy packet
loss constraint. This allows SU to transmit its own packets with higher
access probabilities. Thus, $\mu_{S}$ increases with increase in
$N_{P}$. As $N_{P}$ increases further, decrease in $\overline{\mu_{P}}$
is insignificant. Access probabilities of SU become constant and in
turn $\mu_{S}$ becomes constant. For high value of $\sigma_{\mathcal{PD}}^{2}$,
PU packet arrival rate at $Q_{\mathcal{S}}$ is less which allows
higher SU access probabilities. Thus, $\mu_{S}$ increases as $\sigma_{\mathcal{PD}}^{2}$
increases.

Fig. \ref{fig:SUvsLem_NP}(b) shows an interesting tradeoff involving
relay queue capacity $N_{S}$. Increase in $N_{S}$ allows SU to transmit
its own packets with higher probability. Also, from (\ref{eq:relay_empty}),
we observe that increase in $N_{S}$ decreases probability of relay
queue being empty $\pi_{0}$. For high values of $\sigma_{\mathcal{PD}}^{2}$,
PU packet arrival rate at $Q_{\mathcal{S}}$ is less. In this case,
decrease in $\pi_{0}$ (and subsequent decrease in $\theta_{\mathcal{SR}}\pi_{0}$)
is significant compared to increase in $\mu_{S}$ due to higher access
probability. Thus, $\mu_{S}$ decreases with increase in $N_{S}$.
For low values of $\sigma_{\mathcal{PD}}^{2}$, PU packet arrival
rate at $Q_{\mathcal{S}}$ is more. In this case, increase in SU throughput
due to higher access probability is significant. But as $N_{S}$ increases
further, $\pi_{0}$ approaches zero and $\sum_{n=1}^{N_{S}}\pi_{n}p_{n}$
decreases. Thus, with increasing $N_{S}$, $\mu_{S}$ initially increases
and then gradually decreases.

\subsubsection{Effect of distance}

\begin{figure}
\centering

\includegraphics[scale=0.42]{MuVsDistance} \vspace{-0.2cm}
 \protect\protect\protect\caption{Effect of distance between PU source and relay $r_{\mathcal{PS}}$
on SU packet throughput $\mu_{S}$ for $N_{P}=100$, $N_{S}=10$,
$\lambda_{P}=0.5$ and $r_{\mathcal{PD}}=200\,\mbox{m}$.\label{fig:SUvsDist}}

\vspace{-0.2cm}

\end{figure}

Fig. \ref{fig:SUvsDist} plots SU throughput against distance between
PU source and SU source $r_{\mathcal{PS}}$. Here, we assume that
$\mathcal{D}$ and $\mathcal{R}$ are in close vicinity and lie on
the line connecting $\mathcal{P}$ and $\mathcal{S}$. Then for given
$r_{\mathcal{PD}}$, we have $r_{\mathcal{SD}}=r_{\mathcal{SR}}=r_{\mathcal{PD}}-r_{\mathcal{PS}}$.
When $\mathcal{P}-\mathcal{D}$ channel is weak, PU packet arrival
rate at SU is high. Thus, probability of $Q_{\mathcal{S}}$ being
full is high. As SU moves away from PU source, $\theta_{\mathcal{PS}}$
decreases, while $\theta_{\mathcal{SD}}$, $\theta_{\mathcal{SR}}$,
$\overline{\theta_{\mathcal{SD}}}$ and $\overline{\theta_{\mathcal{SR}}}$
increase. This increases SU throughput. As $r_{\mathcal{PS}}$ increases
further, $\mu_{P}$ decreases to such a point that queue blocking
constraint cannot be satisfied for given $\lambda_{P}$. In this infeasible
region, $\mu_{S}$ is zero. When $\mathcal{P}-\mathcal{D}$ channel
is strong, decrease in $\mu_{P}$ due to increasing $r_{\mathcal{PS}}$
is insignificant. Thus, SU throughput $\mu_{S}$ keeps increasing
as $\mathcal{S}$ moves closer to $\mathcal{R}$.

\subsubsection{Effect of time sharing}

\begin{figure}
\centering

\includegraphics[scale=0.48]{MuVsAlpBet} \vspace{-0.2cm}
 \protect\protect\protect\caption{Effect of time sharing factors $\beta$ and $\alpha$ on SU packet
throughput $\mu_{S}$ for $\lambda_{P}=0.5$, $N_{S}=10$, $N_{P}=50$
and $\sigma_{\mathcal{PD}}^{2}=-20\,\mbox{dB}$.\label{fig:SUvsLem_alph}}

\vspace{-0.4cm}

\end{figure}

Fig. \ref{fig:SUvsLem_alph} plots $\mu_{S}$ against time sharing
factors $\beta$ and $\alpha$. When $\beta$ is low, values of $\theta_{\mathcal{PD}}$
and $\theta_{\mathcal{PS}}$ are low. This results in lower value
of $\mu_{P}$ that cannot support given $\lambda_{P}$. As $\beta$
increases, PU packet departure rate increases. This allows SU to transmit
its own packets with non-zero probability. Thus, $\mu_{S}$ increases.
As $\beta$ increases further, less time is available for SU to transmit
its own packets which decreases $\theta_{\mathcal{SR}}$. Thus, $\mu_{S}$
decreases at high value of $\beta$. As $\alpha$ increases, $\overline{\theta_{\mathcal{SD}}}$
increases while $\overline{\theta_{\mathcal{SR}}}$ decreases. Increase
in departure rate of PU packets from $Q_{\mathcal{S}}$ allows SU
to transmit its own packet with higher access probability. Thus, $\mu_{S}$
increases with increasing $\alpha$. But as $\alpha$ increases further,
decrease in $\overline{\theta_{\mathcal{SR}}}$ becomes dominant,
in turn decreasing $\mu_{S}$. This indicates that there is scope
to improve $\mu_{S}$ by optimizing $\beta$ and $\alpha$. However,
the problem is difficult to solve as objective in (\ref{eq:Opt_problem})
is non-convex in $\beta$ and $\alpha$.

\section{Conclusion}

We studied a CR system where SU employs two-phase relaying to relay
failed PU packets. Both users have packet queues of finite capacity
which results in packet loss. We proposed optimal as well as suboptimal
access methods for SU to maximize its packet throughput under packet
loss constraint of PU. We observed that two-phase relaying model performs
better than cooperation model without time sharing for mid-range values
of PU packet arrival rate. Suboptimal methods have negligible loss
in the performance and are good low complexity alternatives to the
optimal method. Furthermore, results revealed that as relay queue
size increases, SU throughput improves initially but then decreases.
PU queue size limits maximum supported PU packet arrival rate.

 \bibliographystyle{IEEEtran}