Two new families of two-weight codes$^*$
Minjia~Shi
%~Liangliang~Xu
%~Gang~Yang
Minjia~Shi
Yue~Guan
and~Patrick~Sol\'e \thanks{MinJia Shi is with Key Laboratory of Intelligent Computing \& Signal Processing
Ministry of Education
Anhui University No. 3 Feixi Road
Hefei Anhui Province 230039
P. R. China
National Mobile Communications Research Laboratory
Southeast University
210096
Nanjing
P. R. China and School of Mathematical Sciences of Anhui University
Anhui
230601
P. R. China (E-mail:smjwcl.good@163.com).
Michael~Shell
~\IEEEmembership{Member
~IEEE
....lastname \thanks{...
We construct two new infinite families of trace codes of dimension $2m$, over the ring $\mathbb{F_p+u\mathbb{F_p,$ with $u^2=u,$ when $p$ is an odd prime. They have the algebraic structure of abelian codes. Their Lee weight distribution is computed by using Gauss sums. By Gray mapping, we obtain two infinite families of linear $p$-ary codes of respective lengths $(p^m-1)^2$ and $2(p^m-1)^2.$ When $m$ is singly-even, the first family gives five-weight codes. When $m$ is odd, and $p\equiv 3 \pmod{4,$ the first family yields $p$-ary two-weight codes, which are shown to be optimal by application of the Griesmer bound. The second family consists of two-weight codes that are shown to be optimal, by the Griesmer bound, whenever $p=3$ and $m \ge 3,$ or $p\ge 5$ and $m\ge 4.$ Applications to secret sharing schemes are given.\\
1612.00967.tex

%% bare_jrnl.tex
%% V1.4b
%% 2015/08/26
%% by Michael Shell
%% see http://www.michaelshell.org/
%% for current contact information.
%%
%% This is a skeleton file demonstrating the use of IEEEtran.cls
%% (requires IEEEtran.cls version 1.8b or later) with an IEEE
%% journal paper.
%%
%% Support sites:
%% http://www.michaelshell.org/tex/ieeetran/
%% http://www.ctan.org/pkg/ieeetran
%% and
%% http://www.ieee.org/

%%*************************************************************************
%% Legal Notice:
%% This code is offered as-is without any warranty either expressed or
%% implied; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE!
%% User assumes all risk.
%% In no event shall the IEEE or any contributor to this code be liable for
%% any damages or losses, including, but not limited to, incidental,
%% consequential, or any other damages, resulting from the use or misuse
%% of any information contained here.
%%
%% All comments are the opinions of their respective authors and are not
%% necessarily endorsed by the IEEE.
%%
%% This work is distributed under the LaTeX Project Public License (LPPL)
%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
%% distributed and modified. A copy of the LPPL, version 1.3, is included
%% in the base LaTeX documentation of all distributions of LaTeX released
%% 2003/12/01 or later.
%% Retain all contribution notices and credits.
%% ** Modified files should be clearly indicated as such, including  **
%% ** renaming them and changing author support contact information. **
%%*************************************************************************


% *** Authors should verify (and, if needed, correct) their LaTeX system  ***
% *** with the testflow diagnostic prior to trusting their LaTeX platform ***
% *** with production work. The IEEE's font choices and paper sizes can   ***
% *** trigger bugs that do not appear when using other class files.       ***                          ***
% The testflow support page is at:
% http://www.michaelshell.org/tex/testflow/



\documentclass[journal]{IEEEtran}
%\hyphenation{op-tical net-works semi-conduc-tor}
\usepackage{bbm}
%\usepackage{amsfonts,ctex}
\usepackage{mathrsfs}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{latexsym}
\usepackage{indentfirst}
\usepackage{enumitem}
\usepackage{anysize}
%\usepackage{chngpage}
\usepackage{array}
\arraycolsep=2pt

\usepackage{amssymb,amsmath,amsthm,amscd,latexsym}
\usepackage{mathrsfs}
\usepackage{mathrsfs}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amscd}
\usepackage[all]{xy}
\usepackage{CJK}
%\usepackage{diagrams}
\usepackage{xypic}
\usepackage{graphicx}
\usepackage{epstopdf}

% If IEEEtran.cls has not been installed into the LaTeX system files,
% manually specify the path to it like:
% \documentclass[journal]{../sty/IEEEtran}
%
%\newenvironment{sequation}{\begin{equation}\small}{\end{equation}}
%\renewcommand{\paragraph}{\roman{paragraph}}
%%\setlength{\oddsidemargin}{0.25in}
%%\setlength{\evensidemargin}{-0.25in}
% \setlength{\topmargin}{0in}
%\setlength{\textheight}{9.0in} \setlength{\textwidth}{6.0in}
%\oddsidemargin=0.1in \evensidemargin=-0.1in
%\input cyracc.def
%\font\tencyr=wncyr10
%\def\cyr{\cyracc\tencyr}
%\parskip 3pt
%\def \Hom{{\rm Hom}}
%\def \Ext{{\rm Ext}}
%\def \lmod {{\rm mod}}
%\newcommand{\Z}{\mathbb{Z}}
%\newcommand{\F}{\mathbb{F}}
%\newcommand {\R}{\ms{R}}
%\newcommand {\B}{\ms{B}}
%\newcommand{\lr}[1]{\langle\, #1 \,\rangle}
%\newcommand{\uo}[1]{\underset{#1}\otimes}
%\newcommand{\uoplus}[1]{\underset{#1}{\oplus}}
%%\newtheorem{thm}{\scshape \mdseries  Theorem}[section]
%\newtheorem{thm}{Theorem}[section]
%%\newtheorem{lem}[thm]{\scshape \mdseries  Lemma}
%\newtheorem{lem}[thm]{Lemma}
%\newtheorem{coro}[thm]{\scshape \mdseries  Corollary}
%%\newtheorem{prop}[thm]{\scshape \mdseries  Proposition}
%\newtheorem{prop}[thm]{Proposition}
%%\newtheorem{Def}{\scshape  Definition}
%\newtheorem{Def}[thm]{Definition}
%%\newtheorem{ex}[thm]{\scshape   Example}
%\newtheorem{ex}[thm]{Example}
%\renewcommand\baselinestretch{1.2}
\newcommand{\bbF}{\mathbb{F}}
\newcommand{\bbZ}{\mathbb{Z}}
\newcommand{\F}{\mathbb{F}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\overline{Q}}
\newcommand{\N}{\overline{N}}



% Some very useful LaTeX packages include:
% (uncomment the ones you want to load)


% *** MISC UTILITY PACKAGES ***
%
%\usepackage{ifpdf}
% Heiko Oberdiek's ifpdf.sty is very useful if you need conditional
% compilation based on whether the output is pdf or dvi.
% usage:
% \ifpdf
%   % pdf code
% \else
%   % dvi code
% \fi
% The latest version of ifpdf.sty can be obtained from:
% http://www.ctan.org/pkg/ifpdf
% Also, note that IEEEtran.cls V1.7 and later provides a builtin
% \ifCLASSINFOpdf conditional that works the same way.
% When switching from latex to pdflatex and vice-versa, the compiler may
% have to be run twice to clear warning/error messages.






% *** CITATION PACKAGES ***
%
%\usepackage{cite}
% cite.sty was written by Donald Arseneau
% V1.6 and later of IEEEtran pre-defines the format of the cite.sty package
% \cite{} output to follow that of the IEEE. Loading the cite package will
% result in citation numbers being automatically sorted and properly
% "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using
% cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's
% \cite will automatically add leading space, if needed. Use cite.sty's
% noadjust option (cite.sty V3.8 and later) if you want to turn this off
% such as if a citation ever needs to be enclosed in parenthesis.
% cite.sty is already installed on most LaTeX systems. Be sure and use
% version 5.0 (2009-03-20) and later if using hyperref.sty.
% The latest version can be obtained at:
% http://www.ctan.org/pkg/cite
% The documentation is contained in the cite.sty file itself.






% *** GRAPHICS RELATED PACKAGES ***
%
\ifCLASSINFOpdf
  % \usepackage[pdftex]{graphicx}
  % declare the path(s) where your graphic files are
  % \graphicspath{{../pdf/}{../jpeg/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
  % or other class option (dvipsone, dvipdf, if not using dvips). graphicx
  % will default to the driver specified in the system graphics.cfg if no
  % driver is specified.
  % \usepackage[dvips]{graphicx}
  % declare the path(s) where your graphic files are
  % \graphicspath{{../eps/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.eps}
\fi
% graphicx was written by David Carlisle and Sebastian Rahtz. It is
% required if you want graphics, photos, etc. graphicx.sty is already
% installed on most LaTeX systems. The latest version and documentation
% can be obtained at:
% http://www.ctan.org/pkg/graphicx
% Another good source of documentation is "Using Imported Graphics in
% LaTeX2e" by Keith Reckdahl which can be found at:
% http://www.ctan.org/pkg/epslatex
%
% latex, and pdflatex in dvi mode, support graphics in encapsulated
% postscript (.eps) format. pdflatex in pdf mode supports graphics
% in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure
% that all non-photo figures use a vector format (.eps, .pdf, .mps) and
% not a bitmapped formats (.jpeg, .png). The IEEE frowns on bitmapped formats
% which can result in "jaggedy"/blurry rendering of lines and letters as
% well as large increases in file sizes.
%
% You can find documentation about the pdfTeX application at:
% http://www.tug.org/applications/pdftex





% *** MATH PACKAGES ***
%
%\usepackage{amsmath}
% A popular package from the American Mathematical Society that provides
% many useful and powerful commands for dealing with mathematics.
%
% Note that the amsmath package sets \interdisplaylinepenalty to 10000
% thus preventing page breaks from occurring within multiline equations. Use:
%\interdisplaylinepenalty=2500
% after loading amsmath to restore such page breaks as IEEEtran.cls normally
% does. amsmath.sty is already installed on most LaTeX systems. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/pkg/amsmath





% *** SPECIALIZED LIST PACKAGES ***
%
%\usepackage{algorithmic}
% algorithmic.sty was written by Peter Williams and Rogerio Brito.
% This package provides an algorithmic environment fo describing algorithms.
% You can use the algorithmic environment in-text or within a figure
% environment to provide for a floating algorithm. Do NOT use the algorithm
% floating environment provided by algorithm.sty (by the same authors) or
% algorithm2e.sty (by Christophe Fiorio) as the IEEE does not use dedicated
% algorithm float types and packages that provide these will not provide
% correct IEEE style captions. The latest version and documentation of
% algorithmic.sty can be obtained at:
% http://www.ctan.org/pkg/algorithms
% Also of interest may be the (relatively newer and more customizable)
% algorithmicx.sty package by Szasz Janos:
% http://www.ctan.org/pkg/algorithmicx




% *** ALIGNMENT PACKAGES ***
%
%\usepackage{array}
% Frank Mittelbach's and David Carlisle's array.sty patches and improves
% the standard LaTeX2e array and tabular environments to provide better
% appearance and additional user controls. As the default LaTeX2e table
% generation code is lacking to the point of almost being broken with
% respect to the quality of the end results, all users are strongly
% advised to use an enhanced (at the very least that provided by array.sty)
% set of table tools. array.sty is already installed on most systems. The
% latest version and documentation can be obtained at:
% http://www.ctan.org/pkg/array


% IEEEtran contains the IEEEeqnarray family of commands that can be used to
% generate multiline equations as well as matrices, tables, etc., of high
% quality.




% *** SUBFIGURE PACKAGES ***
%\ifCLASSOPTIONcompsoc
%  \usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
%\else
%  \usepackage[caption=false,font=footnotesize]{subfig}
%\fi
% subfig.sty, written by Steven Douglas Cochran, is the modern replacement
% for subfigure.sty, the latter of which is no longer maintained and is
% incompatible with some LaTeX packages including fixltx2e. However,
% subfig.sty requires and automatically loads Axel Sommerfeldt's caption.sty
% which will override IEEEtran.cls' handling of captions and this will result
% in non-IEEE style figure/table captions. To prevent this problem, be sure
% and invoke subfig.sty's "caption=false" package option (available since
% subfig.sty version 1.3, 2005/06/28) as this is will preserve IEEEtran.cls
% handling of captions.
% Note that the Computer Society format requires a larger sans serif font
% than the serif footnote size font used in traditional IEEE formatting
% and thus the need to invoke different subfig.sty package options depending
% on whether compsoc mode has been enabled.
%
% The latest version and documentation of subfig.sty can be obtained at:
% http://www.ctan.org/pkg/subfig




% *** FLOAT PACKAGES ***
%
%\usepackage{fixltx2e}
% fixltx2e, the successor to the earlier fix2col.sty, was written by
% Frank Mittelbach and David Carlisle. This package corrects a few problems
% in the LaTeX2e kernel, the most notable of which is that in current
% LaTeX2e releases, the ordering of single and double column floats is not
% guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a
% single column figure to be placed prior to an earlier double column
% figure.
% Be aware that LaTeX2e kernels dated 2015 and later have fixltx2e.sty's
% corrections already built into the system in which case a warning will
% be issued if an attempt is made to load fixltx2e.sty as it is no longer
% needed.
% The latest version and documentation can be found at:
% http://www.ctan.org/pkg/fixltx2e


%\usepackage{stfloats}
% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e
% the ability to do double column floats at the bottom of the page as well
% as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in
% LaTeX2e). It also provides a command:
%\fnbelowfloat
% to enable the placement of footnotes below bottom floats (the standard
% LaTeX2e kernel puts them above bottom floats). This is an invasive package
% which rewrites many portions of the LaTeX2e float routines. It may not work
% with other packages that modify the LaTeX2e float routines. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/pkg/stfloats
% Do not use the stfloats baselinefloat ability as the IEEE does not allow
% \baselineskip to stretch. Authors submitting work to the IEEE should note
% that the IEEE rarely uses double column equations and that authors should try
% to avoid such use. Do not be tempted to use the cuted.sty or midfloat.sty
% packages (also by Sigitas Tolusis) as the IEEE does not format its papers in
% such ways.
% Do not attempt to use stfloats with fixltx2e as they are incompatible.
% Instead, use Morten Hogholm'a dblfloatfix which combines the features
% of both fixltx2e and stfloats:
%
% \usepackage{dblfloatfix}
% The latest version can be found at:
% http://www.ctan.org/pkg/dblfloatfix




%\ifCLASSOPTIONcaptionsoff
%  \usepackage[nomarkers]{endfloat}
% \let\MYoriglatexcaption\caption
% \renewcommand{\caption}[2][\relax]{\MYoriglatexcaption[#2]{#2}}
%\fi
% endfloat.sty was written by James Darrell McCauley, Jeff Goldberg and
% Axel Sommerfeldt. This package may be useful when used in conjunction with
% IEEEtran.cls'  captionsoff option. Some IEEE journals/societies require that
% submissions have lists of figures/tables at the end of the paper and that
% figures/tables without any captions are placed on a page by themselves at
% the end of the document. If needed, the draftcls IEEEtran class option or
% \CLASSINPUTbaselinestretch interface can be used to increase the line
% spacing as well. Be sure and use the nomarkers option of endfloat to
% prevent endfloat from "marking" where the figures would have been placed
% in the text. The two hack lines of code above are a slight modification of
% that suggested by in the endfloat docs (section 8.4.1) to ensure that
% the full captions always appear in the list of figures/tables - even if
% the user used the short optional argument of \caption[]{}.
% IEEE papers do not typically make use of \caption[]'s optional argument,
% so this should not be an issue. A similar trick can be used to disable
% captions of packages such as subfig.sty that lack options to turn off
% the subcaptions:
% For subfig.sty:
% \let\MYorigsubfloat\subfloat
% \renewcommand{\subfloat}[2][\relax]{\MYorigsubfloat[]{#2}}
% However, the above trick will not work if both optional arguments of
% the \subfloat command are used. Furthermore, there needs to be a
% description of each subfigure *somewhere* and endfloat does not add
% subfigure captions to its list of figures. Thus, the best approach is to
% avoid the use of subfigure captions (many IEEE journals avoid them anyway)
% and instead reference/explain all the subfigures within the main caption.
% The latest version of endfloat.sty and its documentation can obtained at:
% http://www.ctan.org/pkg/endfloat
%
% The IEEEtran \ifCLASSOPTIONcaptionsoff conditional can also be used
% later in the document, say, to conditionally put the References on a
% page by themselves.




% *** PDF, URL AND HYPERLINK PACKAGES ***
%
%\usepackage{url}
% url.sty was written by Donald Arseneau. It provides better support for
% handling and breaking URLs. url.sty is already installed on most LaTeX
% systems. The latest version and documentation can be obtained at:
% http://www.ctan.org/pkg/url
% Basically, \url{my_url_here}.




% *** Do not adjust lengths that control margins, column widths, etc. ***
% *** Do not use packages that alter fonts (such as pslatex).         ***
% There should be no need to do such things with IEEEtran.cls V1.6 and later.
% (Unless specifically asked to do so by the journal or conference you plan
% to submit to, of course. )


% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}


\begin{document}
%
% paper title
% Titles are generally capitalized except for words such as a, an, and, as,
% at, but, by, for, in, nor, of, on, or, the, to and up, which are usually
% not capitalized unless they are the first or last word of the title.
% Linebreaks \\ can be used within to get better formatting as desired.
% Do not put math or special symbols in the title.
\title{Two new families of two-weight codes$^*$}
%
%
% author names and IEEE memberships
% note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break
% a structure at a ~ so this keeps an author's name from being broken across
% two lines.
% use \thanks{} to gain access to the first footnote area
% a separate \thanks must be used for each paragraph as LaTeX2e's \thanks
% was not built to handle multiple paragraphs
%

%\author{Minjia~Shi,
%~Liangliang~Xu,
%~Gang~Yang}% <-this % stops a space

\author{Minjia~Shi,
        Yue~Guan,
        and~Patrick~Sol\'e
\thanks{MinJia Shi is with Key Laboratory of Intelligent Computing \& Signal Processing, Ministry of Education, Anhui University No. 3 Feixi Road, Hefei Anhui Province 230039, P. R. China, National Mobile Communications Research Laboratory, Southeast University, 210096, Nanjing, P. R. China and School of Mathematical Sciences of Anhui University, Anhui, 230601, P. R. China (E-mail:smjwcl.good@163.com).}% <-this % stops a space
\thanks{Yue~Guan is with School of Mathematical Sciences of Anhui University, Anhui, 230601, P. R. China.}% <-this % stops a space
\thanks{Patrick~Sol\'e is with CNRS/ LAGA, University Paris 8, 93 526 Saint-Denis, France}
\thanks{Manuscript received November 11, 2016; revised May 14, 2017. M. Shi was supported in part by the National Natural Science Foundation of China
under Grant 61672036, in part by the Technology Foundation
for Selected Overseas Chinese Scholar, Ministry of Personnel, China, under
Grant 05015133, in part by the Open Research Fund of National Mobile
Communications Research Laboratory, Southeast University, under Grant
2015D11, and in part by the Key Projects of Support Program for Outstanding
Young Talents in Colleges and Universities under Grant gxyqZD2016008.}}


%\author{Michael~Shell,~\IEEEmembership{Member,~IEEE,}
%        John~Doe,~\IEEEmembership{Fellow,~OSA,}
%        and~Jane~Doe,~\IEEEmembership{Life~Fellow,~IEEE}% <-this % stops a space
%\thanks{M. Shell was with the Department
%of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta,
%GA, 30332 USA e-mail: (see http://www.michaelshell.org/contact.html).}% <-this % stops a space
%\thanks{J. Doe and J. Doe are with Anonymous University.}% <-this % stops a space
%\thanks{Manuscript received April 19, 2005; revised August 26, 2015.}}



% note the % following the last \IEEEmembership and also \thanks -
% these prevent an unwanted space from occurring between the last author name
% and the end of the author line. i.e., if you had this:
%
% \author{....lastname \thanks{...} \thanks{...} }
%                     ^------------^------------^----Do not want these spaces!
%
% a space would be appended to the last name and could cause every name on that
% line to be shifted left slightly. This is one of those "LaTeX things". For
% instance, "\textbf{A} \textbf{B}" will typeset as "A B" not "AB". To get
% "AB" then you have to do: "\textbf{A}\textbf{B}"
% \thanks is no different in this regard, so shield the last } of each \thanks
% that ends a line with a % and do not let a space in before the next \thanks.
% Spaces after \IEEEmembership other than the last one are OK (and needed) as
% you are supposed to have spaces between the names. For what it is worth,
% this is a minor point as most people would not even notice if the said evil
% space somehow managed to creep in.



% The paper headers
%\markboth{Journal of \LaTeX\ Class Files,~Vol.~14, No.~8, August~2015}%
%{Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for IEEE Journals}
% The only time the second header will appear is for the odd numbered pages
% after the title page when using the twoside option.
%
% *** Note that you probably will NOT want to include the author's ***
% *** name in the headers of peer review papers.                   ***
% You can use \ifCLASSOPTIONpeerreview for conditional compilation here if
% you desire.

\markboth{Journal of \LaTeX\ Class Files,~Vol.~, No.~, ~2017}%
{Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for IEEE Journals}


% If you want to put a publisher's ID mark on the page you can do it like
% this:
%\IEEEpubid{0000--0000/00\$00.00~\copyright~2015 IEEE}
% Remember, if you use this you must call \IEEEpubidadjcol in the second
% column for its text to clear the IEEEpubid mark.



% use for special paper notices
%\IEEEspecialpapernotice{(Invited Paper)}




% make the title area
\maketitle

% As a general rule, do not put math, special symbols or citations
% in the abstract or keywords.
\begin{abstract}
We construct two new infinite families of trace codes of dimension $2m$, over the ring $\mathbb{F}_p+u\mathbb{F}_p,$ with $u^2=u,$ when $p$ is an odd prime.
They have the algebraic structure of abelian codes. Their Lee weight distribution is computed by using Gauss sums.
 By Gray mapping, we obtain two infinite families of linear $p$-ary codes of respective lengths $(p^m-1)^2$ and $2(p^m-1)^2.$ When $m$ is singly-even, the first family gives five-weight codes.
 When $m$ is odd, and $p\equiv 3 \pmod{4},$ the first family yields
$p$-ary two-weight codes, which are shown to be optimal by application of the Griesmer
bound. The second family consists of two-weight codes that are shown to be optimal, by the Griesmer bound, whenever $p=3$ and $m \ge 3,$ or $p\ge 5$ and $m\ge 4.$ Applications to secret sharing schemes are given.\\
\end{abstract}

% Note that keywords are not normally used for peerreview papers.
\begin{IEEEkeywords}
Two-weight codes; Gauss sums; Griesmer bound; Secret sharing schemes.
\end{IEEEkeywords}






% For peer review papers, you can put extra information on the cover
% page as needed:
% \ifCLASSOPTIONpeerreview
% \begin{center} \bfseries EDICS Category: 3-BBND \end{center}
% \fi
%
% For peerreview papers, this IEEEtran command inserts a page break and
% creates the second title. It will be ignored for other modes.
\IEEEpeerreviewmaketitle



\section{Introduction}

\IEEEPARstart{T}wo-weight codes over fields have been studied since the 1970s due to their connections to strongly regular graphs, finite geometries  and difference sets \cite{D}.
However, most constructions, have used cyclic codes over finite fields \cite{AE,RWM}. In the present paper, we use trace codes over a semi-local ring which is a quadratic extension of
a finite field, and obtain codes over a finite field by Gray mapping. Trace codes are naturally low-rate codes, and not necessarily cyclic. This is part of a general research program where a variety of few weight codes are
obtained by varying the alphabet ring and the defining set \cite{SLS1,SLS2,SLS3}. Here we consider an alphabet ring of odd characteristic, in contrast with \cite{SLS1, SLS2}, and over a non local ring, in contrast with \cite{SLS3}.
We consider two families depending on two different defining sets. These codes are visibly abelian, but possibly not cyclic. The field image of the first family
has two or five weights, depending on the choice of parameters. The second family only contains two-weight codes. Note that abelian codes over rings have been studied
already in \cite{LS}. The alphabet ring we consider here is $\F_p+u\F_p,$ with $u^2=u.$ It is a semi-local ring, which is ring isomorphic to $\F_p\times \F_p$ (Cf. \S 2.1 for a proof).
It is an odd characteristic analogue of
$\F_{2^r}+v\F_{2^r},$ with $v^2=v.$ The latter ring has been employed recently to construct convolutional codes over fields \cite{LSi}.
Some bounds on codes over  $\F_p+u\F_p,$ with $u^2=u$ can be found in \cite{LSi2}.
%The latter ring is itself a polynomial analogue of $\Z_4$ \cite{BU,CG,LS,WZ}.
%Trace codes over $\F_2+u\F_2,$ have been considered in \cite{WZ}.

The defining set of our abelian code is not a cyclic group, but it is an abelian group. The defining set of the first family is related to quadratic
residues in an extension of degree $m$ of $\F_p$, which makes  quadratic Gauss sums appear naturally in the weight distribution analysis, and requires $p$ to be an odd prime.
When $m$ is odd, and $p\equiv 3 \pmod{4},$ we obtain an infinite
family of linear $p$-ary two-weight codes, which are shown to be optimal by application of the Griesmer
bound.  The codes in the second family are also  shown to be optimal by the same technique up to finitely many exceptions.
We show that, both in the five-weight and in the two-weight cases, the first family has a very nice support inclusion structure
which makes it suitable for use in a Massey secret sharing scheme \cite{DY2, KD, YD}. Indeed, we can show that all nonzero codewords are minimal
for the poset of codewords ordered by support inclusion. A similar result holds for the second family. To the best of our knowledge, the weight distributions of the codes obtained here are different from the classical families
of \cite{RWM} and from the those of the codes in \cite{SLS1,SLS2,SLS3}. Our codes are therefore new.% This is also the motivation of investigating trace codes over $\F_p+u\F_p$ with $u^2=u$ in this paper.

The paper is organized as follows. Section II collects the notions and notations needed in the rest of the article. Section III shows that the trace codes are abelian.
Section IV recalls and reproves some results on Gaussian periods. Section V computes the weight distribution of our codes,
building on the character sum evaluation of the preceding section. Section VI discusses the optimality of the $p$-image from trace codes over $R$. Section VII determines the minimum distance of the dual codes. Section VIII determines the support
structure of the $p$-ary image and describes an application to secret sharing schemes.

\section{Definitions and notations}\subsection{Rings}
Consider the ring $R=\F_p+u\F_p$ where $u^2=u$ and $p$ is a odd prime. It is semi-local with  maximal ideals $(u)$ and $(u-1).$ For any integer $m \ge 1,$ we construct an extension of degree $m$ as ${\mathcal{R}}=\F_{p^m}+u\F_{p^m}$ with again $u^2=u.$
There is a Frobenius operator $F$ which maps $a+ub$ onto $a^p+ub^p.$ The \emph{Trace function,} denoted by $Tr$, is defined as
$Tr=\sum\limits_{j=0}^{m-1}F^j.$
It follows from these definitions that $Tr(a+ub)=tr(a)+utr(b),$ for $a,b \in \F_{p^m}.$
Here $tr()$ denotes the absolute trace of $\F_{p^m},$ given by $$tr(z)=z+z^p+\cdots+z^{p^{m-1}}, z\in\F_{p^m}.$$

The ring ${\mathcal{R} }$ is semi-local with  maximal ideals $(u)$ and $(u-1),$ and respective quotients ${\mathcal{R}}/(u)$ and ${\mathcal{R}}/(u-1)$ are both isomorphic to $\F_{p^m}.$
The Chinese Remainder Theorem shows that $u\F_{p^m}+(1-u)\F_{p^m}$ is isomorphic to the product ring $\F_{p^m}\times\F_{p^m}.$
Similarly, the group of units ${\mathcal{R}}^*$ is  $u\F_{p^m}^*+(1-u)\F_{p^m}^*$ which is isomorphic to $\F_{p^m}^*\times\F_{p^m}^*.$ Here $\F_{p^m}^*$ denotes the multiplicative group of $\F_{p^m}.$
Denote the \emph{squares} and the \emph{non-squares} of $\F_{p^m}$ by ${\mathcal{Q}}$ and ${\mathcal{N}},$ respectively. Thus

$${\mathcal{Q}}=\{ x^2 \mid x \in \F_{p^m}^*\},\, {\mathcal{N}}=\F_{p^m}^*\setminus {\mathcal{Q}}.$$

We write $L=u{\mathcal{Q}}+(1-u)\F_{p^m}^*$ and let $L'={\mathcal{R}}^*$ for simplicity.
Thus $L$ is a subgroup of ${\mathcal{R}}^*$ of index $2.$
\subsection{Gray map}
As a preparation for the image code from trace codes over $R$, we shall take a closer look at the \emph{Gray} map $\phi$ from $R$ to $\F_p^2$, which is defined by $\phi(a+ub)=(-b,2a+b)$ for  $a,b \in \F_p.$ It is a one to one map from $R$ to $\F_p^2,$ which extends naturally into a map from $R^n$ to $\F^{2n}_p.$ Denote the Hamming weight on $\F^{n}_p$ by $w_H(.),$ and the Hamming distance on $\F^{2n}_p$ by $d_H(.,.).$
The \emph{Lee weight} is defined as the Hamming weight of the Gray image $w_L(a+ub)=w_H(-b)+w_H(2a+b)$ for  $a,b \in \F_p^n.$
The \emph{Lee distance} of $x,y\in R^n$ is defined as $d_L(x,y)=w_L(x-y).$
Thus the Gray map is a linear isometry from $(R^n,d_L)$ to $({\F^{2n}_p},d_H).$
For convenience, we write $N=2n$ in the rest of the paper.
\subsection{Codes}
 A {\bf linear code} $C$ over $R$ of length $n$ is an $R$-submodule of $R^n$. If $x=(x_1,x_2,\cdots,x_n)$
 and $y=(y_1,y_2,\cdots,y_n)$ are two elements of  $R^n$, their standard inner product
  is defined by $\langle x,y\rangle=\sum\limits_{i=1}^nx_iy_i$, where the operation is performed in $R$. The {\bf dual code} of $C$ is denoted by $C^\perp$ and
  defined as $C^\perp=\{y\in R^n|\langle x,y\rangle =0, \forall x\in C\}.$ By definition, $C^\perp$ is also a linear code over $R$.
  Given a finite abelian group $G,$ a code over $R$ is said to be {\bf abelian} \cite{B}, if it is an ideal of the group ring $R[G].$
  Recall that the ring $R[G]$ is defined on functions from $G$ to $R$ with pointwise addition as addition, and convolution product as multiplication.
  Concretely, it is the set of all formal sums $f=\sum_{h \in G} f_h X^h,$ with addition and multiplication defined as follows.
  If $f,g\in R[G],$  we write
  $$f+g=\sum_{g \in G} (f_h+g_h) X^h,$$ and

  $$ fg =\sum_{h \in G} (\sum_{r+s=h} f_r g_s)X^h.$$
  In other words, the coordinates of $C$ are indexed by elements of $G$ and $G$ acts regularly on this set. For more details on abelian codes see \cite{W}.
  In the special case when $G$ is cyclic, the code is a cyclic code in the usual sense \cite{MS}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Symmetry}
For $a\in \mathcal{R}$, define the vector $ev(a)$ by the following evaluation map
$ev(a)=(Tr(ax))_{x\in L}.$ Define the code $C(m,p)$ by the formula $C(m,p)=\{ev(a)|a\in \mathcal{R}\}$. Thus $C(m,p)$ is a code of length $|L|=\frac{(p^{m}-1)^2}{2}$ and size $\vert R\vert ^m$ over $R.$
Similarly, define the vector $ev'(a)$ by the following evaluation map
$ev'(a)=(Tr(ax))_{x\in L'},$ and  the code $C'(m,p)$ by the formula $C'(m,p)=\{ev'(a)|a\in \mathcal{R}\}.$
Thus $C'(m,p)$ is a code of length $|L'|=(p^{m}-1)^2$ and size $\vert R\vert ^m$ over $R.$

%{\prop The group of units $R^*$ acts regularly on the coordinates of $C(m,p).$ }
\textbf{Proposition 3.1} The group $L$ $($resp. $L'$ $)$ acts regularly on the coordinates of $C(m,p)$ $($resp. $C'(m,p)$ $)$.

\textbf{Proof} For any $w,v \in L$ the change of variables $ x\mapsto (v/w)x$ maps $w$ to $v.$ This transformation defines thus a transitive action of $L$ on itself. Given an ordered pair $(w,v)$ this transformation is unique,
hence the action is regular. A similar argument holds for $C'(m,p)$ and $L'.$

%\pf
%For any $u \in R^*$ the change of variables $ x\mapsto ux$ permutes the coordinates of $C(m,p).$ Such a permutation is attached to a unique $u.$
%\qed

The code $C(m,p)$ is thus an {\em abelian code} with respect to the group $\mathcal{R}^*.$
In other words, it is an ideal of the group ring $R[\mathcal{R}^*].$ As observed in the previous section $\mathcal{R}^*$ is not a cyclic group, hence $C(m,p)$ may be not cyclic.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Character sums}
In this section we give some background material on character sums.
Let $\chi$ denote an arbitrary multiplicative character of $\F_q.$ Assume $q$ is odd.
Denoted by $\eta$ the quadratic multiplicative character is defined by $\eta(x)=1,$ if $x$ is a square and $\eta(x)=-1,$ if not.
Let $\psi$ denote the standard canonical additive character of $\F_q.$ The \emph{squares} and the \emph{non-squares} of $\F_{q}$ are denoted, extending the notation of \S 2.1,
by ${\mathcal{Q}}$ and ${\mathcal{N}},$ respectively. Thus,

$${\mathcal{Q}}=\{ x^2 \mid x \in \F_{q}^*\},\, {\mathcal{N}}=\F_{q}^*\setminus {\mathcal{Q}}.$$
The classical {\bf Gauss sum} can be defined as $G(\chi)=\sum\limits_{x\in \F_q^*}\psi(x)\chi(x).$

We define the following character sums
\begin{eqnarray*}
\Q=\sum_{x\in {\mathcal{Q}}}\psi(x), \ \N=\sum_{x\in {\mathcal{N}}}\psi(x).
\end{eqnarray*}
On the basis of orthogonality of characters \cite[Lemma 9, p. 143]{MS} it is evident that $\Q+\N=-1.$
Noting that the characteristic function of ${\mathcal{Q}}$ is $\frac{1+\eta}{2},$ we get then
\begin{eqnarray*}
\Q=\frac{G(\eta)-1}{2}, \ \N=\frac{-G(\eta)-1}{2}.
\end{eqnarray*}

It is well known \cite{DY} that if $q=p^m,$ the quadratic Gauss sums can be evaluated as
\begin{eqnarray}
G(\eta)&=&(-1)^{m-1}\sqrt{q}\,,\ p\equiv 1 \pmod{4},\\
G(\eta)&=&(-1)^{m-1}i^m\sqrt{q}, \,p\equiv 3 \pmod{4}. \label{im}
\end{eqnarray}

Particularly, if $m$ is singly-even, these formulas can be simplified to
$G(\eta)=\epsilon(p)\sqrt{q},$ with $\epsilon(p)=(-1)^{\frac{(p+1)}{2}},$
yielding
\begin{eqnarray*}
\Q=\frac{\epsilon(p)\sqrt{q}-1}{2}, \N=-\frac{\epsilon(p)\sqrt{q}+1}{2}.
\end{eqnarray*}
In fact $\Q$ and $\N$ are examples of \emph{Gaussian periods}, and these relations could have been deduced from \cite[Lemma 11]{DY}.

\section{Weight distributions of trace codes}

Let $\omega=\exp(\frac{2\pi i}{p})$ be a complex root of unity of order $p.$ If $y=(y_1,y_2,\cdots,y_N)\in \mathbb{F}_p^N,$ let $\Theta(y)=\sum\limits_{j=1}^N\omega^{y_j}.$
For simplicity, we let $\theta(a)=\Theta(\phi(ev(a))).$ By linearity of the Gray map, and of the evaluation map, we see that $\theta(sa)=\Theta(\phi(ev(sa))),$ for any $s\in \F_p^*.$ For our purpose, let us begin with the following correlation lemma.

\textbf{Lemma 5.1}\label{3.1} \cite{SLS2} For all $y=(y_1,y_2,\cdots,y_N)\in \mathbb{F}_p^N,$ we have
$\sum\limits_{s=1}^{p-1}\Theta(sy)=(p-1)N-pw_H(y).$

In connection with the proceding discussion, we now distinguish two cases of weight distributions depending on the defining set.
\subsection{The case of $L={\mathcal{Q}}\times \F_{p^m}^*$}
\subsubsection{$m$ is singly-even}

\textbf{Theorem 5.2}\label{enum1} Assume $m$ is singly-even. For $a\in \mathcal{R}$, the Lee weight of codewords of $C(m,p)$ is given below.

\begin{enumerate}
\item[(a)] If $a=0$, then $w_L(ev(a))=0$;
\item[(b)] If $a=u\alpha$, $\alpha\in\mathbb{F}_{p^m}^*,$ then if \begin{enumerate}
\item[$\alpha \in {\mathcal{Q}}$] then $w_L(ev(a))=(p-1)\big(p^{2m-1}-p^{m-1}-\epsilon(p)p^{{3m}/2-1}+\epsilon(p)p^{m/2-1}\big)$,
\item[$\alpha \in {\mathcal{N}}$] then $w_L(ev(a))=(p-1)\big(p^{2m-1}-p^{m-1}+\epsilon(p)p^{{3m}/2-1}-\epsilon(p)p^{m/2-1}\big);$
\end{enumerate}
\item[(c)] If $a=(1-u)\beta$, $\beta\in\mathbb{F}_{p^m}^*,$ then $w_L(ev(a))=(p-1)(p^{2m-1}-p^{m-1})$;
\item[(d)] If $a=u\alpha+(1-u)\beta\in \mathcal{R}^*$, then if \begin{enumerate}
\item[$\alpha \in {\mathcal{Q}}$] then $w_L(ev(a))=(p-1)\big(p^{2m-1}-2p^{m-1}+\epsilon(p)p^{m/2-1}\big)$,
\item[$\alpha \in {\mathcal{N}}$] then  $w_L(ev(a))=(p-1)\big(p^{2m-1}-2p^{m-1}-\epsilon(p)p^{m/2-1}\big).$
\end{enumerate}
 \end{enumerate}

\textbf{Proof}
\begin{enumerate}
\item[(a)] If $a=0$, then $Tr(ax)=0$. So $w_L(ev(a))=0$.
\item[(b)] If $a=u\alpha,\,x=ut+(1-u)t'$ with $\alpha \in \F_{p^m}^*,$ then $ax= u\alpha t,$ and $Tr(ax)=Tr(u\alpha t)=utr(\alpha t).$
Taking Gray map yields
$\phi(ev(a))=(-tr(\alpha t),tr(\alpha t))_{t,t'}.$
Taking character sums
\begin{eqnarray*}
\theta(a)&=&\sum_{t\in {\mathcal{Q}}}\sum_{t'\in \F_{p^m}^*}\omega^{-tr(\alpha t)}+\sum_{t\in {\mathcal{Q}}}\sum_{t'\in \F_{p^m}^*}\omega^{tr(\alpha t)}\\ &=&2\sum_{t\in {\mathcal{Q}}}\sum_{t'\in \F_{p^m}^*}\omega^{-tr(\alpha t)}\\
&=&2(p^m-1)\sum_{t\in {\mathcal{Q}}}\omega^{tr(\alpha t)}.
\end{eqnarray*}
Replaced $\alpha t$ by $t$, it is easy to check that the last character sum is $\Q$ or $\N$ depending on $\alpha \in {\mathcal{Q}}$ or $\alpha \in {\mathcal{N}}.$
Since $m$ is even, $s\in \F_p^*$ is a square in $\F_{p^m}.$ Thus $\theta(sa)=\theta(a),$ for any $s\in \F_p^*.$ The statement follows from Lemma 5.1.
Thus $w_L(ev(a))=\frac{p-1}{p}(N-2(p^m-1)\Q),$ or $w_L(ev(a))=\frac{p-1}{p}(N-2(p^m-1)\N),$ according to the value of $\eta(\alpha).$
\item[(c)] If $a=(1-u)\beta,\,x=ut+(1-u)t'$ with $\beta \in \F_{p^m}^*,$ then $ax=\beta t'-u\beta t',$ and $Tr(ax)=tr(\beta t')-utr(\beta t').$
Taking Gray map yields
$\phi(ev(a))=(tr(\beta t'),tr(\beta t'))_{t,t'}.$
Taking character sums
$\theta(a)=2\sum\limits_{t\in {\mathcal{Q}}}\sum\limits_{t'\in \F_{p^m}^*}\omega^{tr(\beta t')}=1-p^m.$ Thus $w_L(ev(a))=(p-1)(p^{2m-1}-p^{m-1}).$
\item[(d)] Let $a=u\alpha+(1-u)\beta\in R^*,\,x=ut+(1-u)t'.$ So $Tr(ax)=tr(\beta t')+utr(\alpha t-\beta t').$ Thus
$\phi(ev(a))=(-tr(\alpha t-\beta t'),tr(\alpha t+\beta t'))_{t,t'}$ by the Gray map.
Taking character sums
$\theta(a)=\sum\limits_{t\in \mathcal{Q}}\omega^{-tr(\alpha t)} \sum\limits_{t'\in \F_{p^m}^*}\omega^{tr(\beta t')}+\sum\limits_{t\in \mathcal{Q}}\omega^{tr(\alpha t)} \sum\limits_{t'\in \F_{p^m}^*}\omega^{tr(\beta t')}=-2\sum\limits_{t\in \mathcal{Q}}\omega^{tr(\alpha t)}.$
By a change of variable $t=\alpha t,$ we see that the last character sum is $\Q$ or $\N$ depending on $\alpha \in {\mathcal{Q}}$ or $\alpha \in {\mathcal{N}}.$
 Thus $w_L(ev(a))=\frac{p-1}{p}(N+2\Q),$ or $w_L(ev(a))=\frac{p-1}{p}(N+2\N),$ considering the value of $\eta(\alpha).$
\end{enumerate}

Therefore, we have constructed a $p$-ary code of length $N=(p^m-1)^2,$ dimension $2m,$ with five weights. The weight distribution is given in Table I.
\begin{center}$\mathrm{Table~ I. }~~~\mathrm{weight~ distribution~ of}~ C(m,p) $ in Theorem 5.2\vspace{0.2cm}

\begin{tabular}{cc||cc}
\hline
  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
  Weight && Frequency  \\
  \hline

  0         && 1\\
  $(p-1)(p^{m-1}-p^{m/2-1})(p^m-1)$          &&              $\frac{p^m-1}{2}$\\
  $(p-1)(p^{2m-1}-2p^{m-1}-p^{{m/2}-1})$    && $\frac{(p^m-1)^2}{2}$\\
  $(p-1)(p^{2m-1}-2p^{m-1}+p^{{m/2}-1})$  &&   $\frac{(p^m-1)^2}{2}$ \\
  $(p-1)(p^{2m-1}-p^{m-1})$   && $p^m-1$ \\
  $(p-1)(p^{m-1}+p^{m/2-1})(p^m-1)$    &&  $\frac{p^m-1}{2}$\\
  \hline
\end{tabular}
\end{center}
(Note that taking $\epsilon(p)=1,$ or $-1,$ leads to the same values.)

\subsubsection{$m$ is odd and $p\equiv 3 \pmod{4}$}
Note that in that case by (\ref{im}) in Section IV we see that $G(\eta)$ is imaginary. This implies that $\Re(\Q)=\Re(\N)=-\frac{1}{2},$ where $\Re(z)$ denotes the real part of the complex number $z.$ We need first to refine the following correlation lemma.

\textbf{Lemma 5.3} \label{trick} {\cite{SLS2} If $p\equiv 3 \pmod{4},$ then we have $\sum\limits_{s=1}^{p-1}\theta(sa)=(p-1)\Re(\theta(a)).$}

\textbf{Theorem 5.4}\label{enum2} Assume $m$ is odd and $p\equiv 3 \pmod{4}.$ For $a\in \mathcal{R}$, the Lee weight of codewords of $C(m,p)$ is given below.
\begin{enumerate}
\item[(a)] If $a=0$, then $w_L(ev(a))=0$;
\item[(b)] If $a=u\beta$ with $\beta\in \F_{p^m}^*,$ then $w_L(ev(a))=(p-1)(p^{2m-1}-p^{m-1})$;
\item[(c)] If $a=(1-u)\beta$ with $\beta\in \F_{p^m}^*,$ then $w_L(ev(a))=(p-1)(p^{2m-1}-p^{m-1})$;
\item[(d)] If $a\in \mathcal{R}^*$, then $w_L(ev(a))=(p-1)(p^{2m-1}-2p^{m-1})$.
 \end{enumerate}

\textbf{Proof}
 The proof of the case (a) is like that of Theorem 5.2. The case (b) follows from Lemma 5.3 applied to the correlation lemma.
Thus  $\Re(\theta(a))=1-p^m,$ and $pw_L(ev(a))=(p-1)(N-\Re(\theta(a))),$ yielding $w_L(ev(a))=(p-1)(p^{2m-1}-p^{m-1}).$
The result follows.
The proof of case (c) is the same as that of case (b).
In the case (d), $\Re(\theta(a))=1$, then $w_L(ev(a))=(p-1)(p^{2m-1}-2p^{m-1}).$

Thus we obtain a family of $p$-ary two-weight codes of parameters $[p^{2m}-2p^{m}+1,2m],$ with weight distribution as given in Table II. The parameters are different from
those in \cite{RWM}, \cite{SLS1}, \cite{SLS2} and \cite{SLS3}.
\begin{center}$\mathrm{Table~ II. }~~~\mathrm{weight~ distribution~ of}~ C(m,p)$ in Theorem 5.4\vspace{0.2cm}
\begin{tabular}{ccc||cc}
\hline
  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
  Weight  \  \  & &&& \  \ Frequency  \\
  \hline

  0  \  \      &&&  & \  \ 1\\
  $(p-1)(p^{2m-1}-2p^{m-1})\  \ $                       &&&  & \  \ $(p^{m}-1)^2$\\
  $(p-1)(p^{2m-1}-p^{m-1})\  \ $                     &&&  & \  \ $2(p^m-1)$\\
  \hline
\end{tabular}
\end{center}
\subsection{The case of $L'={\F_{p^m}^* \times \F_{p^m}^*}$}

\textbf{Theorem 5.5}\label{enum} For $a\in \mathcal{R}$, the Lee weight of codewords of $C'(m,p)$ is
\begin{enumerate}
\item[(a)] If $a=0$, then $w_L(ev'(a))=0;$
\item[(b)] If $a=u\alpha$, $\alpha\in\mathbb{F}_{p^m}^*,$ then $w_L(ev'(a))=2(p-1)(p^{2m-1}-p^{m-1});$
\item[(c)] If $a=(1-u)\beta$, $\beta\in\mathbb{F}_{p^m}^*,$ then $w_L(ev'(a))=2(p-1)(p^{2m-1}-p^{m-1});$
\item[(d)] If $a\in \mathcal{R}^*$, then $w_L(ev'(a))=2(p-1)(p^{2m-1}-2p^{m-1}).$
 \end{enumerate}

\textbf{Proof}
\begin{enumerate}
\item[(a)] If $a=0$, then $Tr(ax)=0$. So $w_L(ev'(a))=0$.
\item[(b)] If $a=u\alpha,\,x=ut+(1-u)t'$ with $\alpha \in \F_{p^m}^*,$ then $ax= u\alpha t,$ and $Tr(ax)=Tr(u\alpha t)=utr(\alpha t).$
Taking Gray map yields
$\phi(ev'(a))=(-tr(\alpha t),tr(\alpha t))_{t,t'}.$
Taking character sums
$\theta(a)=\sum\limits_{t \in \F_{p^m}^*}\sum\limits_{t'\in \F_{p^m}^*}\omega^{-tr(\alpha t)}+\sum\limits_{t\in \F_{p^m}^*}\sum\limits_{t'\in \F_{p^m}^*}\omega^{tr(\alpha t)}=2\sum\limits_{t\in \F_{p^m}^*}\sum\limits_{t'\in \F_{p^m}^*}\omega^{-tr(\alpha t)}=-2(p^m-1).$
Thus $w_L(ev'(a))=2(p-1)(p^{2m-1}-p^{m-1}).$
\item[(c)] If $a=(1-u)\beta,\,x=ut+(1-u)t'$ with $\beta \in \F_{p^m}^*,$ then $ax=\beta t'-u\beta t',$ and $Tr(ax)=tr(\beta t')-utr(\beta t').$
Taking Gray map yields
$\phi(ev'(a))=(tr(\beta t'),tr(\beta t'))_{t,t'}.$
Taking character sums
$\theta(a)=2\sum\limits_{t\in  \F_{p^m}^*}\sum\limits_{t'\in \F_{p^m}^*}\omega^{tr(\beta t')}=2-2p^m.$ Thus $w_L(ev'(a))=2(p-1)(p^{2m-1}-p^{m-1}).$
\item[(d)] Let $a=u\alpha+(1-u)\beta),\,x=ut+(1-u)t'.$ So $ax=\beta t'+u(\alpha t-\beta t'),$ and $Tr(ax)=tr(\beta t')+utr(\alpha t-\beta t').$ Taking Gray map yields
$\phi(ev'(a))=\big(-tr(\alpha t-\beta t'),tr(\alpha t+\beta t')\big)_{t,t'}.$
Taking character sums
$\theta(a)=\sum\limits_{t\in  \F_{p^m}^*}\omega^{-tr(\alpha t)} \sum\limits_{t'\in \F_{p^m}^*}\omega^{tr(\beta t')}+\sum\limits_{t\in \F_{p^m}^*}\omega^{tr(\alpha t)} \sum\limits_{t'\in \F_{p^m}^*}\omega^{tr(\beta t')}=2.$
 Thus $w_L(ev'(a))=\frac{p-1}{p}(N'-2),$ or $w_L(ev'(a))=2(p-1)(p^{2m-1}-2p^{m-1}).$
\end{enumerate}

Thus we have constructed a $p$-ary code of length $N'=2(p^m-1)^2,$ dimension $2m,$ with two weights. The weight distribution is given in Table III. Note that the parameters are different from those in
[4], [14], [15] and [16].
\begin{center}$\mathrm{Table~ III. }~~~\mathrm{weight~ distribution~ of}~ C'(m,p) $ in Theorem 5.5\vspace{0.2cm}
\begin{tabular}{ccc||c}
\hline
  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
  Weight  && &   Frequency  \\
  \hline

  0     & &  &    1 \\
  $2(p-1)(p^{2m-1}-2p^{m-1})$         &         &        &  $p^{2m}-2p^{m}+1$\\
  $2(p-1)(p^{2m-1}-p^{m-1})$    &            &         & $2p^m-2$\\
  \hline
\end{tabular}
\end{center}

\section{Optimality of the $p$-ary image}
A central question of coding theory is to decide whether the constructed codes are optimal or not. In this section, we will investigate the optimality of the $p$-ary image of the trace codes we constructed in Section V.
Recall the $p$-ary version of the Griesmer bound. If $[N,K,d]$ are the parameters of a linear $p$-ary code, then
$$\sum_{j=0}^{K-1}\bigg\lceil \frac{d}{p^j} \bigg\rceil \le N.$$
\subsection{$L=u{\mathcal{Q}}+(1-u)\F_{p^m}^*,$ $m$ is odd and $p\equiv 3 \pmod{4}$}

\textbf{Theorem 6.1}
Assume $m$ is odd and $m\geq 3$, and $p\equiv 3 \pmod{4}.$ The code $\phi(C(m,p))$ is optimal.

\textbf{Proof}
Firstly, $N=p^{2m}-2p^{m}+1,\, K=2m,\,d=(p-1)(p^{2m-1}-2p^{m-1})$ on account of Theorem 5.4. We claim that $\sum\limits_{j=0}^{K-1}\big\lceil \frac{d+1}{p^j}\big\rceil >N,$ contradicting the Griesmer bound. The ceiling function takes three values depending on $j$.
\begin{itemize}
 \item $0\leq j\leq m-1 \Rightarrow \lceil \frac{d+1}{p^j} \rceil =p^{2m-j}-2p^{m-j}-p^{2m-j-1}+2p^{m-j-1}+1$;
 \item $j= m \Rightarrow \lceil \frac{d+1}{p^j} \rceil =p^m-p^{m-1}-1$;
 \item $m<j\leq2m-1 \Rightarrow \lceil \frac{d+1}{p^j} \rceil =p^{2m-j}-p^{2m-j-1}$.
\end{itemize}
Thus $\sum\limits_{j=0}^{K-1}\big\lceil \frac{d+1}{p^j} \big\rceil=p^{2m}-2p^m+m.$
Note that $\sum\limits_{j=0}^{K-1}\lceil \frac{d+1}{p^j} \rceil-N=m-1>0.$

\textbf{Example 6.2}
Let $p=3$ and $m=3$, we obtain a ternary code of parameters $[676, 6, 450].$ The weights of this code are 450 and 468 with frequencies 676 and 52, respectively.

\subsection{$L'={\mathcal{R}}^*,$ $m$ is an arbitrary integer and $p$ is odd prime}

\textbf{Theorem 6.3}
Assume $m\geq 3$ and $p=3$ or $m\geq 4$ and the odd prime $p\geq 5$. The code $\phi(C'(m,p))$ is optimal.

\textbf{Proof}
It follows from Theorem 5.5 that $N'=2(p^{2m}-2p^{m}+1),\, K=2m,\,d=2(p-1)(p^{2m-1}-2p^{m-1}).$ We claim that $\sum\limits_{j=0}^{K-1}\big\lceil \frac{d+1}{p^j} \big\rceil >N',$ violating the Griesmer bound. The ceiling function takes the following values depending on the position of $j$.
\begin{enumerate}
\item[(a)] when $p=3$, the ceiling function takes three
values depending on $j$.
\begin{itemize}
 \item $0\leq j\le m-1 \Rightarrow \lceil \frac{d+1}{p^j} \rceil =2p^{2m-j}-4p^{m-j}-2p^{2m-j-1}+4p^{m-j-1}+1$;
 \item $j= m \Rightarrow \lceil \frac{d+1}{p^j} \rceil =2p^m-2p^{m-1}-2$;
 \item $m<j\leq 2m-1 \Rightarrow \lceil \frac{d+1}{p^j} \rceil =2p^{2m-j}-2p^{2m-j-1}$.
\end{itemize}
Thus $\sum\limits_{j=0}^{K-1} \big\lceil \frac{d+1}{p^j} \big\rceil=2p^{2m}-4p^m+m.$
Note that $\sum\limits_{j=0}^{K-1}\big\lceil \frac{d+1}{p^j} \big\rceil-N'=m-2>0.$
\item[(b)] when $p\geq 5$ and $p$ is odd prime, the ceiling function takes three
values depending on $j$.
\begin{itemize}
 \item $0\leq j\le m-1 \Rightarrow \lceil \frac{d+1}{p^j} \rceil =2p^{2m-j}-4p^{m-j}-2p^{2m-j-1}+4p^{m-j-1}+1$;
 \item $j= m \Rightarrow \lceil \frac{d+1}{p^j} \rceil =2p^m-2p^{m-1}-3$;
 \item $m<j\leq 2m-1 \Rightarrow \lceil \frac{d+1}{p^j} \rceil =2p^{2m-j}-2p^{2m-j-1}$.
\end{itemize}
Thus $\sum\limits_{j=0}^{K-1}\big\lceil \frac{d+1}{p^j} \big\rceil=2p^{2m}-4p^m+m-1.$
Note that $\sum\limits_{j=0}^{K-1}\big\lceil \frac{d+1}{p^j} \big\rceil-N'=m-3>0.$
\end{enumerate}
Hence the theorem is proved.

\textbf{Example 6.4}
Let $p=3$ and $m=3$, we obtain a ternary code of parameters $[1352, 6, 900].$ The weights of this code are 900 and 936 with frequencies 676 and 52, respectively.

\section{The minimum distance of the dual code}
We compute the dual distance of $\phi(C(m,p))({\rm resp}. \ \phi(C'(m,p))).$ In connection with the discussion in \cite{SLS1}, we mention without proof the following lemma.

\textbf{Lemma 7.1}\label{nonde}
 If for all $a \in \mathcal{R},$ we have that $Tr(ax)=0,$ then $x=0.$

\textbf{Theorem 7.2} \label{d'}
 For all odd primes $p$ and all $m\ge 2,$ the dual Lee distance $d'$ of $C(m,p)$ is $2.$

\textbf{Proof}
 First, we check that $d'\ge 2$ by showing that $C(m,p)^\bot$ does not contain a word of Lee weight one.
 If it does, let us assume first that it has value $\gamma \neq 0$ at some $x \in L.$ This implies that $\forall a \in \mathcal{R},\gamma
 Tr(ax)=0$ or $Tr(a \gamma x)=0,$ and by Lemma 7.1 $\gamma x=0.$ Contradiction with $\gamma \neq 0.$
 If that word takes the value $\gamma (1-2u)$ at some $x \in L,$ then writing $x=ut+(1-u)t'$ and $a=u\alpha+(1-u)\beta,$ with $\alpha,\beta$ in $\F_{p^m},$ with $t\in \mathcal{Q},t'\in \F_{p^m}^*$ yields,
 after reduction modulo $M$ the equation  valid $\forall \alpha, \beta \in \F_{p^m},$
 $\gamma tr(\beta t')=0$ and $tr(\gamma\alpha t)=0,$ and we conclude, by the nondegenerate character of $tr(),$ that $\gamma t=\gamma t'=0.$ Contradiction with $x\neq 0$.

 Next, we shall show that $d'<3.$ If not, we can apply the sphere-packing bound to $\phi(C(m,p))^\bot,$ to obtain
 $p^{2m}\ge 1+N(p-1)=1+(p^{2m}-2p^{m}+1)(p-1),$ or, after expansion
 $2p^{2m}+2p^{m+1}\ge p+p^{m}(p^{m+1}+2).  $
 Dropping the $p$ in the RHS, and dividing both sides by $p^m,$ we find that this inequality would imply $p^{m}< f(p),$ with $f(x)=\frac{2x-2}{x-2}=2+\frac{2}{x-2}.$
 But the function $f$ is decreasing for $x\geq3,$ and $f(3)=4,$ while $p^m\ge p^2\ge 9.$ Contradiction.

We now consider codes from the second family.

\textbf{Theorem 7.3} \label{d}
 For all odd prime $p$ and all $m\ge 2,$ the dual Lee distance $d'$ of $C'(m,p)$ is $2.$

\textbf{Proof}
 First, we check that $d'\ge 2.$ The proof of $d'\ge 2$ is like that in Theorem 7.2.
 Next, we show that $d'<3.$ Otherwise, we can apply the sphere-packing bound to $\phi (C'(m,p)^\bot),$ to obtain
 $$p^{2m}\ge 1+N'(p-1)=1+2(p^{2m}-2p^{m}+1)(p-1).$$ It is shown by a straightforward argument that $1+N'(p-1)>1+N'$ where $p$ is an odd prime. Then we check $p^{2m}>1+N'.$ We obtain the inequality $(p^m-3)(p^m-1)<0$ after calculation which is contradict $p^m\geq3.$ Hence $p^{2m}\leq 1+N'(p-1)=1+2(p^{2m}-2p^{m}+1)(p-1).$

\section{Applications to secret sharing schemes}
To illustrate an application of our constructed codes in secret sharing, we review the fundamentals of this cryptographic protocol.
The concept of secret sharing schemes was first proposed by Blakley and Shamir in 1979. We present some basic definitions concerning secret sharing schemes and refer the interested reader to the survey \cite{DR} for details.

The sets of participants which are capable of recovering the secret $S$ are called \emph{access sets}. The set of all access sets is called the \emph{access structure} of the scheme. An access set is called \emph{minimal} if its members can recover the secret $S$ but the members of any of its proper subsets cannot recover $S$. Furthermore, if a participant is contained in every minimal access set in the scheme, then it is a  dictatorial participant.

The support $s(x)$ of a vector $x$ in $\F_p^N$ is defined as the set of indices where it is nonzero. We say that a vector $x$ covers a vector $y$ if $s(x)$ contains $s(y).$
A \emph{minimal codeword} of a linear code $C$ is a nonzero codeword that does not cover any other nonzero codeword.

Next, we recall the secret sharing scheme based on linear codes which is constructed by Massey. Let $C$ be an $[n,k]$ linear code over the given finite field $\F_p$ and $G=[g_0,g_1,\cdots,g_{n-1}]$ be a generator matrix of $C$ where the column vectors are nonzero. The dealer chooses a random vector $u=(u_0,u_1,\cdots,u_{k-1})\in\F_p^k$ and encodes the chosen vector as $c=uG=(c_0,c_1,\cdots,c_{n-1}).$ Then the dealer keeps the value of $u$ at the first coordinate $S=c_0=ug_0$ as a \emph{secret}, and distributes the values at the remaining coordinates of $c$ to the participants as \emph{shares}. Note that $S=c_0=ug_0,$ the set of shares $\{v_{i_1}=c_{i_1},\cdots,v_{i_t}=c_{i_t}\}$ can recover the secret $S$ if and only if the vectors $g_0, g_{i_1},\cdots,g_{i_t}$ are linearly independent. Hence, we can write the secret as a linear combination $$S=ug_0=\sum_{j=1}^tx_jc_{i_j}.$$ From this equation, it is clear that if we have shares $c_{i_j}, 1\leq j\leq t$ and find $x_j$ by $g_0=\sum_{j=1}^tx_jg_{i_j}$, we can recover the secret $S.$ In fact, we can use the participants that correspond to the nonzero coordinates of the minimal codewords $v\in C^\bot$, because $cv=c_0+c_{i_1}v_{i_1}+\cdots+c_{i_t}v_{i_t}$ which implies that $S=c_0=-(c_{i_1}v_{i_1}+\cdots+c_{i_t}v_{i_t})$.

In general, it is a tough task to determine the minimal codewords of a given linear code. However, there is a numerical condition, derived in \cite{AB}, bearing on the weights of the code, that is easy to check.

\textbf{Lemma 8.1} (Ashikmin-Barg) Let $w_0$ and $w_{\infty}$ denote the minimum and maximum nonzero weights, respectively. If
$\frac{w_0}{w_{\infty}}>\frac{p-1}{p},$ then every nonzero codeword of $C$ is minimal.

In the special case when all nonzero codewords are minimal, it was shown in \cite{DY2} that there is the following alternative, depending on $d'$.

\textbf{Lemma 8.2} (\cite{DY2})\label{abcd}
Let $C$ be an $[n,k]$ code over $\F_p$ and $G=[g_0,g_1,\cdots,g_{n-1}]$ be a generator matrix of $C$. If every codeword of $C$ is minimal vector, then there are $p^{k-1}$ minimal access sets and the total number of participants is $n-1$ in the secret sharing scheme based on $C^\bot.$ Let $d'$ denote the minimal distance of $C^\bot$. We have the following results:
\begin{itemize}
 \item If $d'\ge 3,$ then for any fixed $1\leq t'\leq min\{k-1,d'-2\},$ every group of $t'$ participants is involved in $(p-1)^{t'}p^{k-(t'+1)}$ out of $p^{k-1}$ minimal access sets. We call such participants dictators.
 \item When $d'=2$, if $g_i$ is a multiple of $g_0$, $1\leq i\leq n-1$, then the participant $P_i$ must be in every minimal access set and such a participant is called a dictatorial participant. If $g_i$ is not a multiple of $g_0$, then the participant $P_i$ must be in $(p-1)p^{k-2}$ out of $p^{k-1}$ minimal access sets.
\end{itemize}

%We can infer from there the support structure for the codes of this paper. For the first family, in the five-weight case, we obtain the result below.
%\begin{proposition}\label{support}
% All the nonzero codewords of $\phi(C(m,p))$ are minimal when $m(\geq 6)$ is singly-even.
%\end{proposition}
%
%\begin{proof}
% By the preceding lemma with $w_0=(p-1)(p^{m-1}-p^{m/2-1})(p^m-1)$ and $w_{\infty}=(p-1)(p^{m-1}+p^{m/2-1})(p^m-1)$ in Table I. We end up with the condition
% $p^{m/2}+1>2p$, which is true for $m\geq 6$ and $p$ is an odd prime.
%\end{proof}
%
%The analogue for the two-weight code family is as follows.
%
%\begin{proposition}\label{support1}
% All the nonzero codewords of $\phi(C(m,p)),$ for $m$ odd $\ge 3,$ and $p\equiv 3 \pmod{4},$ are minimal.
%\end{proposition}
%
%\begin{proof}
% By the preceding lemma with $w_0=(p-1)(p^{2m-1}-2p^{m-1})$ and $w_{\infty}=(p-1)(p^{2m-1}-p^{m-1})$ in Table II. Rewriting the inequality of the lemma as $pw_0>(p-1)w_{\infty},$ and dividing both sides by $\frac {p^m}{p-1},$ we obtain $ p(p^{m}-2)>(p-1)(p^{m}-1),$ or $p^m-p-1>0,$ which is true for $m\ge 3.$
% \end{proof}
% \begin{proposition}\label{support2}
% All the nonzero codewords of $\phi(C'(m,p)),$ for all $m$ $\ge 2,$ and odd prime $p$ are minimal.
%\end{proposition}
%
%\begin{proof}
% By the preceding lemma with $w_0=2(p-1)(p^{2m-1}-2p^{m-1})$ and $w_{\infty}=2(p-1)(p^{2m-1}-p^{m-1})$ in Table III. Simplify the inequality $pw_0>(p-1)w_{\infty}$ as $p^m-p-1>0,$ which is true for $m\ge 2.$
%\end{proof}

%%Depending on the application, one or the other situation might be more suitable.
%By Propositions \ref{support}, \ref{support1}, \ref{support2}, and Theorems \ref{d'}, \ref{d}, we see that three Secret Sharing Schemes built on $\phi(C(m,p))$ or $\phi(C'(m,p))$ are dictatorial.
\textbf{Theorem 8.3}
Let $G=[g_0,g_1,...,g_{(p^m-1)^2-1}]$ be a generator matrix of $\phi (C(m,p))$ where $m(\geq 3)$ is odd and $p\equiv 3 \pmod{4}$, then there are $p^{2m-1}$ minimal access sets and the total number of participants is $(p^m-1)^2-1$ in the secret sharing scheme based on $\phi (C(m,p)^\bot).$ We have the following results:
\begin{itemize}
 \item if $g_i$ is a multiple of $g_0$, $1\leq i\leq (p^m-1)^2-1$, then the participant $P_i$ must be in every minimal access set and such a participant is called a dictatorial participant.
 \item If $g_i$ is not a multiple of $g_0$, then the participant $P_i$ must be in $(p-1)p^{2m-2}$ out of $p^{2m-1}$ minimal access sets.
\end{itemize}

\textbf{Proof}
By the preceding lemma with $w_0=(p-1)(p^{2m-1}-2p^{m-1})$ and $w_{\infty}=(p-1)(p^{2m-1}-p^{m-1})$ in Table II. Rewriting the inequality of the lemma as $pw_0>(p-1)w_{\infty},$ and dividing both sides by $\frac {p^m}{p-1},$ we obtain $ p(p^{m}-2)>(p-1)(p^{m}-1),$ or $p^m-p-1>0,$ which is true for $m\ge 3.$
Substitute $n=(p^m-1)^2$ into Lemma 8.2, and then the conclusion is obtained.

\textbf{Remark 8.4}
By the similar method in the proof of Theorem 8.3, we find that all the nonzero codewords of $\phi(C(m,p))$ ($m(\geq 6)$ is singly-even) and $\phi(C'(m,p))$ ($m \ge 2, p$ is odd prime) are minimal. Thus, when $m(\geq 6)$ is singly-even, the secret sharing scheme based on $\phi(C(m,p)^\bot)$ has a similar structure as that in the case when $m\geq 3$ is odd and $p\equiv 3 \pmod{4}.$ Let $G'=[g_0,g_1,...,g_{2(p^m-1)^2-1}]$ be a generator matrix of $\phi (C'(m,p))$, then there are $p^{2m-1}$ minimal access sets and the total number of participants is $2(p^m-1)^2-1$ in the secret sharing scheme based on $\phi (C'(m,p)^\bot).$ If $g_j$ is a multiple of $g_0$, $1\leq j\leq 2(p^m-1)^2-1$, then the participant $P_j$ must be in every minimal access set and such a participant is called a dictatorial participant. If $g_j$ is not a multiple of $g_0$, then the participant $P_j$ must be in $(p-1)p^{2m-2}$ out of $p^{2m-1}$ minimal access sets.

\section{Conclusion}
In the present paper, we have studied two infinite families of trace codes defined over a finite ring. Because the defining sets of these codes have the structure of abelian
multiplicative groups, they inherit the structure of abelian codes. It is an open problem to determine if they are cyclic codes or not. More importantly,
it is worthwhile to study other defining sets that are subgroups of the group of units
of $\mathcal{R}.$ In particular, it would be interesting to replace our Gaussian periods $\Q,\N$  by other character sums that are amenable to exact evaluation, in the vein of the sums which appear in the study of irreducible
cyclic codes \cite{DY,MR}. This would lead to other enumerative results of codes with a few weights.

Compared to the codes we constructed by similar techniques in \cite{SLS1}, \cite{SLS2} and \cite{SLS3}, the obtained codes in
this paper have different weight distributions.  They are also different from the weight distributions in the classical families in \cite{RWM}. Hence,
the $p$-ary linear codes constructed from trace codes over rings in this paper are new.

\textbf{Biographies of all authors}

Minjia Shi, he received the B.S. degree in Mathematics from Anqing Normal College of China in 2004; the M.S. degree in Mathematics from Hefei University of Technology of China in 2007, and the Ph.D degree in the Institute of Computer Network Systems from Hefei University of Technology of China in 2010. He has been teaching at the School of Mathematical Sciences of Anhui University since 2007. Since April 2012, he has been the Associate Professor with the School of Mathematical Sciences, Anhui University of China.

His research interests include algebraic coding theory and cryptography. He is the author of more than 60 journal articles and of one book. He has been the Area Editor of Journal of Algebra Combinatorics Discrete Structure and Application since 2014.

He has held visiting positions in School of Physical \& Mathematical Sciences, Nanyang Technological University, Singapore, from August 2012 to August 2013, Telecom ParisTech, Paris, from July 2016 to August 2016, Chern Institute of Mathematics in Nankai University since 2013. \\

Yue Guan, she has been an undergraduate student at the School of Mathematical Sciences of Anhui University since 2013. She won Honorable Mention of Mathematical Contest in Modeling Certificate of Achievement in 2016 and gained scholarships several times during school years. She will become a graduate student at School of Mathematical Sciences of Anhui University in 2017. Her research direction includes coding theory and cryptography. \\

Patrick Sol\'{e}  received the Ing\'{e}nieur and Docteur-Ing\'{e}nieur degrees both from Ecole Nationale Sup\'{e}rieure des T\'{e}l\'{e}communications, Paris, France, in 1984 and 1987, respectively, and the habilitation �� diriger des recherches from Universit\'{e} de Nice-Sophia Antipolis, Sophia Antipolis, France, in 1993.

He has held visiting positions in Syracuse University, Syracuse, NY, from 1987 to 1989, Macquarie University, Sydney, Australia, from 1994 to 1996, and Lille University, Lille, France, from 1999 to 2000.

Since 1989, he has been a permanent member of the CNRS and became Directeur de Recherche in 1996. He is currently member of the CNRS lab LAGA, from University of Paris 13.

His research interests include coding theory (codes over rings, quasi-cyclic codes), interconnection networks (graph spectra, expanders), vector quantization (lattices), and cryptography (boolean functions, pseudo random sequences).

He is the author of more than 150 journal articles and of three books.

He was the associate editor of the IEEE Information Theory Transactions from 1996 till 1999. He has been associate editor of Advances in Mathematics of Communication since 2007.



\section*{Acknowledgment}

It is the authors' pleasure to thank the anonymous referees for their helpful comments which led to improvements of the paper.


% Can use something like this to put references on a page
% by themselves when using endfloat and the captionsoff option.
\ifCLASSOPTIONcaptionsoff
  \newpage
\fi



% trigger a \newpage just before the given reference
% number - used to balance the columns on the last page
% adjust value as needed - may need to be readjusted if
% the document is modified later
%\IEEEtriggeratref{8}
% The "triggered" command can be changed if desired:
%\IEEEtriggercmd{\enlargethispage{-5in}}

% references section

% can use a bibliography generated by BibTeX as a .bbl file
% BibTeX documentation can be easily obtained at:
% http://mirror.ctan.org/biblio/bibtex/contrib/doc/
% The IEEEtran BibTeX style support page is at:
% http://www.michaelshell.org/tex/ieeetran/bibtex/
%\bibliographystyle{IEEEtran}
% argument is your BibTeX string definitions and bibliography database(s)
%\bibliography{IEEEabrv,../bib/paper}
%
% <OR> manually copy in the resultant .bbl file
% set second argument of \begin to the number of references
% (used to reserve space for the reference number labels box)
\begin{thebibliography}{1}

\bibitem{AB} A. Ashikmin, A. Barg, ``Minimal vectors in linear codes", {\it IEEE Trans. Inform. Theory}, vol. 44, no. 5, pp. 2010--2017, Sep. 1998.

\bibitem{B} D. Berman, ``Semisimple cyclic and Abelian codes. II", {\it Cybernetics \& Systems Analysis}, vol. 3, no. 3, pp. 17--23, 1967.

\bibitem{AE} A.E. Brouwer, W.H. Haemers, {\it Spectra of Graphs}, {\it Springer}, 2012.

\bibitem{RWM} R. Calderbank, W.M. Kantor, ``The geometry of two-weight codes", {\it Bull. London Math. Soc.}, vol. 18, no. 2, pp. 97-122, 1986.

\bibitem{D} P. Delsarte, ``Weights of linear codes and strongly regular normed spaces", {\it Disc. Math.}, vol. 3, no. 1-3, pp. 47--64, 1972.

\bibitem{DY} C. Ding, J. Yang, ``Hamming weights in irreducible cyclic codes", {\it Disc. Math.},  vol. 313, issue 4, pp. 434--446, Feb. 2013.

\bibitem{DY2} C. Ding, J. Yuan, ``Covering and secret sharing with linear codes", {\it Springer LNCS}, vol. 2731, pp. 11-25, Jun. 2003.

\bibitem{KD} K.L. Ding, and C. Ding, ``A Class of Two-Weight and Three-Weight Codes and Their Applications in Secret Sharing", {\it IEEE Trans. Inform. Theory}, vol. 61, issue 11, pp. 5835--5842, Nov. 2015.

\bibitem{LSi} J.M. Lampos, V. Sison, ``Systematic Unit-Memory Binary Convolutional Codes from Linear Block Codes over $\mathbb{F}_{2^r}+v\mathbb{F}_{2^r}$", {\it WASET}, issue 71, pp. 384-387, Nov. 2012.

\bibitem{LSi2} J.M. Lampos, V. Sison, ``Bounds on (..) linear block codes over finite semi-local Frobenius ring $\mathbb{F}_{p^r}+v\mathbb{F}_{p^r}$",
Southeast-Asian J. of Sc., Vol. 1, No 1 (2012), pp.76--98.
\bibitem{LS} S. Ling, P. Sol\'e, ``Duadic codes over $\mathbb{F}_2+u\mathbb{F}_2$", {\it AAECC}, vol. 12, no. 5, pp. 365-379, Oct. 2001.

\bibitem{MS} F.J. MacWilliams,  N.J.A. Sloane, {\it The theory of error-correcting codes}, {\it North-Holland Math. Library}, vol. 16, 1977.

\bibitem{MR} R.J. McEliece, H.Jr. Rumsey, ``Euler products, cyclotomy, and coding", {\it J. Number Theory}, vol. 4, no. 3, pp. 302--311, Jun. 1972.

\bibitem{SLS1} M.J. Shi, Y. Liu, P. Sol\'e, ``Optimal two weight codes from trace codes over $\F_2+u\F_2$", {\it IEEE Commun. Letters}, 20 ( 2016), 2346--2349.

\bibitem{SLS2}M.J. Shi, Y. Liu, P. Sol\'e, `` Optimal two weight codes from trace codes over a non-chain ring", {\it Discrete Applied Mathematics}, 219 (2017) 171--181.

\bibitem{SLS3} M.J. Shi, R.S. Wu, Y. Liu, P. Sol\'e, ``Two and three weight codes over $\F_p+u\F_p$", {\it Cryptogr. Commun.}, 9 (2017) 637--646.

\bibitem{DR} D.R. Stinson, ``An explication of secret sharing schemes", {\it Designs, Codes and Cryptography}, vol. 2, no. 4, pp. 357-390, Dec. 1992.

\bibitem{W} H.N. Ward, ``Quadratic residue codes an divisibility", in {\it Handbook of Coding Theory}, W.C. Hufman and V. Pless eds, {\it North Holland}, 827--870, 1998.

\bibitem{YD} J. Yuan, C. Ding, ``Secret sharing schemes from three classes of linear codes", {\it IEEE Trans. Inform. Theory}, vol. 52, no.1, pp. 206-212, Jan. 2006.

\end{thebibliography}

% biography section
%
% If you have an EPS/PDF photo (graphicx package needed) extra braces are
% needed around the contents of the optional argument to biography to prevent
% the LaTeX parser from getting confused when it sees the complicated
% \includegraphics command within an optional argument. (You could create
% your own custom macro containing the \includegraphics command to make things
% simpler here.)
%\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{mshell}}]{Michael Shell}
% or if you just want to reserve a space for a photo:

%\begin{IEEEbiography}{Michael Shell}
%Biography text here.
%\end{IEEEbiography}
%
%% if you will not have a photo at all:
%\begin{IEEEbiographynophoto}{John Doe}
%Biography text here.
%\end{IEEEbiographynophoto}
%
%% insert where needed to balance the two columns on the last page with
%% biographies
%%\newpage
%
%\begin{IEEEbiographynophoto}{Jane Doe}
%Biography text here.
%\end{IEEEbiographynophoto}

% You can push biographies down or up by placing
% a \vfill before or after them. The appropriate
% use of \vfill depends on what kind of text is
% on the last page and whether or not the columns
% are being equalized.

%\vfill

% Can be used to pull up biographies so that the bottom of the last one
% is flush with the other column.
%\enlargethispage{-5in}



% that's all folks
\end{document}



1612.00967.extracted_bib
{AB A. Ashikmin, A. Barg, ``Minimal vectors in linear codes", {IEEE Trans. Inform. Theory, vol. 44, no. 5, pp. 2010--2017, Sep. 1998.
1612.00967.extracted_bib
{B D. Berman, ``Semisimple cyclic and Abelian codes. II", {Cybernetics \& Systems Analysis, vol. 3, no. 3, pp. 17--23, 1967.
1612.00967.extracted_bib
{AE A.E. Brouwer, W.H. Haemers, {Spectra of Graphs, {Springer, 2012.
1612.00967.extracted_bib
{RWM R. Calderbank, W.M. Kantor, ``The geometry of two-weight codes", {Bull. London Math. Soc., vol. 18, no. 2, pp. 97-122, 1986.
1612.00967.extracted_bib
{D P. Delsarte, ``Weights of linear codes and strongly regular normed spaces", {Disc. Math., vol. 3, no. 1-3, pp. 47--64, 1972.
1612.00967.extracted_bib
{DY C. Ding, J. Yang, ``Hamming weights in irreducible cyclic codes", {Disc. Math., vol. 313, issue 4, pp. 434--446, Feb. 2013.
1612.00967.extracted_bib
{DY2 C. Ding, J. Yuan, ``Covering and secret sharing with linear codes", {Springer LNCS, vol. 2731, pp. 11-25, Jun. 2003.
1612.00967.extracted_bib
{KD K.L. Ding, and C. Ding, ``A Class of Two-Weight and Three-Weight Codes and Their Applications in Secret Sharing", {IEEE Trans. Inform. Theory, vol. 61, issue 11, pp. 5835--5842, Nov. 2015.
1612.00967.extracted_bib
{LSi J.M. Lampos, V. Sison, ``Systematic Unit-Memory Binary Convolutional Codes from Linear Block Codes over $\mathbb{F_{2^r+v\mathbb{F_{2^r$", {WASET, issue 71, pp. 384-387, Nov. 2012.
1612.00967.extracted_bib
{LSi2 J.M. Lampos, V. Sison, ``Bounds on (..) linear block codes over finite semi-local Frobenius ring $\mathbb{F_{p^r+v\mathbb{F_{p^r$", Southeast-Asian J. of Sc., Vol. 1, No 1 (2012), pp.76--98.
1612.00967.extracted_bib
{LS S. Ling, P. Sol\'e, ``Duadic codes over $\mathbb{F_2+u\mathbb{F_2$", {AAECC, vol. 12, no. 5, pp. 365-379, Oct. 2001.
1612.00967.extracted_bib
{MS F.J. MacWilliams, N.J.A. Sloane, {The theory of error-correcting codes, {North-Holland Math. Library, vol. 16, 1977.
1612.00967.extracted_bib
{MR R.J. McEliece, H.Jr. Rumsey, ``Euler products, cyclotomy, and coding", {J. Number Theory, vol. 4, no. 3, pp. 302--311, Jun. 1972.
1612.00967.extracted_bib
{SLS1 M.J. Shi, Y. Liu, P. Sol\'e, ``Optimal two weight codes from trace codes over $\F_2+u\F_2$", {IEEE Commun. Letters, 20 ( 2016), 2346--2349.
1612.00967.extracted_bib
{SLS2M.J. Shi, Y. Liu, P. Sol\'e, `` Optimal two weight codes from trace codes over a non-chain ring", {Discrete Applied Mathematics, 219 (2017) 171--181.
1612.00967.extracted_bib
{SLS3 M.J. Shi, R.S. Wu, Y. Liu, P. Sol\'e, ``Two and three weight codes over $\F_p+u\F_p$", {Cryptogr. Commun., 9 (2017) 637--646.
1612.00967.extracted_bib
{DR D.R. Stinson, ``An explication of secret sharing schemes", {Designs, Codes and Cryptography, vol. 2, no. 4, pp. 357-390, Dec. 1992.
1612.00967.extracted_bib
{W H.N. Ward, ``Quadratic residue codes an divisibility", in {Handbook of Coding Theory, W.C. Hufman and V. Pless eds, {North Holland, 827--870, 1998.
1612.00967.extracted_bib
{YD J. Yuan, C. Ding, ``Secret sharing schemes from three classes of linear codes", {IEEE Trans. Inform. Theory, vol. 52, no.1, pp. 206-212, Jan. 2006.