diff --git "a/data_all_eng_slimpj/shuffled/split2/finalzzpgfk" "b/data_all_eng_slimpj/shuffled/split2/finalzzpgfk" new file mode 100644--- /dev/null +++ "b/data_all_eng_slimpj/shuffled/split2/finalzzpgfk" @@ -0,0 +1,5 @@ +{"text":"\\section{Georgi-Glashow-Chern-Simons model}\n\nThe Georgi-Glashow model is a $SO(3)$ gauge theory with a triplet Higgs\nscalar field $\\vec h$ in which the gauge symmetry is\nspontaneously broken to $U(1)$ by the Higgs mechanism. The vacuum\nis ordered with nonvanishing $\\raise.16ex\\hbox{$\\langle$} \\, \\vec h \\, \\raise.16ex\\hbox{$\\rangle$} \\not= 0$.\n\nIn three dimensions instantons, or monopoles, disorder the Higgs vacuum;\n$\\raise.16ex\\hbox{$\\langle$} \\, \\vec h \\, \\raise.16ex\\hbox{$\\rangle$} =0$. Electric charges are linearly confined, forming an\nelectric flux string.\\cite{Polyakov} The model is dual to the Josephson\njunction system in the superconductivity.\\cite{Hosotani}\n\nFurther the Chern-Simons term can be added \nto the Lagrangian. This defines the Georgi-Glashow-Chern-Simons model.\nThe $U(1)$ gauge boson acquires\na topological mass, and electric charges are screened. \n\nHow about the Higgs vacuum? Is the vacuum still disordered\nsuch that $\\raise.16ex\\hbox{$\\langle$} \\, \\vec h \\, \\raise.16ex\\hbox{$\\rangle$} =0$? In disordering the vacuum, monopole\nconfigurations play an important role. It has been argued in\nthe literature,\\cite{D'Hoker} however, that\nmonopole configurations would become irrelevant once the Chern-Simons\nterm is added; monopole solutions would have infinite action, and for\nconfigurations of finite action their Gribov copies would lead to\ncancellation. \nWe are going to show that this is not the case. There are complex\nmonopole solutions of finite action, and Gribov copies do not lead to\ncancellation.\\cite{Tekin}\n\n\n\n\\section{Monopole ansatz}\n\nThe most general form of the spherically symmetric\nmonopole ansatz is \n\\bea\n&&h^a(\\vec{x})=\\hat x^a h(r) \\cr\n&&A^a_\\mu(\\vec{x})= {1\\over r} \\left[ \\epsilon_{a\\mu\n\\nu}\\hat{x}^\\nu(1-\\phi_1) \n+ ( \\delta_{a\\mu} - \\hat{x}_a \\hat{x}_\\mu) \\phi_2 \n + rS \\hat{x}_a \\hat{x}_\\mu\\right] \n\\label{configuration1} \n\\eea \nwhere $\\hat x^a = x^a\/r$. \nThe regularity of configurations at the origin and the finiteness of the \naction impose boundary conditions $(h,\\phi_1,\\phi_2)=(0,1,0)$ at $r=0$\nand $(h,\\phi_1,\\phi_2,S)=(v,0,0,0)$ at $r=\\infty$.\n\n\nUnder a gauge transformation $A \\rightarrow \\Omega A \\Omega^{-1} + \\Omega d\n\\Omega^{-1}$ where\n$\\Omega=\\exp \\big\\{ {i\\over 2} f(r) \\hat x^a \\sigma^a \\big\\} $ and \n $f(0)=0$,\n\\be\n\\pmatrix{\\phi_1\\cr \\phi_2\\cr} \\rightarrow \n\\pmatrix{\\cos f & \\sin f \\cr -\\sin f & \\cos f \\cr} \n \\pmatrix{\\phi_1\\cr \\phi_2\\cr} ~~,~~\nS ~~ \\rightarrow ~~ S - f' ~~.\n\\label{transformation1}\n\\ee\nThe Chern-Simons term, $I_{CS} = -(i\\kappa\/g^2)\\int \n~ \\hbox{tr}\\left( A \\wedge d A +{1\\over 3} A \\wedge A \\wedge A \\right)$,\n is not gauge invariant;\n$\\delta I_{CS} = (4\\pi i\\kappa\/g^2) f(\\infty)$.\nOn $S^3$ $f(\\infty)$ is a multiple of $2\\pi$ so that the\nquantized Chern-Simons coefficient guarantees the gauge invariance.\nOn $R^3$, however, there is a priori no reason to demand that $f(\\infty)$\nbe quantized.\n\n\n\\section{Path integral and complex monopoles}\n\nIn the path integral the gauge fixing condition is inserted;\n\\be\nZ = \\int {\\cal D}A^a_\\mu {\\cal D}\\vec h \n~ \\Delta_{FP}[A] ~\\delta[F(A)] ~ e^{-I} ~.\n\\label{PI}\n\\ee\nWe look for configurations which extremize the action $I$ within\nthe subspace specified with $F(A)=0$. \n\nIn the radial gauge $S=0$ the\nextremization of the action leads to\n\\bea\n&&\\phi_1'' + {1\\over r^2} (1-\\phi_1^2 -\\phi_2^2) \\phi_1\n + i\\kappa \\phi_2' - h^2 \\phi_1 = 0 \\label{EqMotion6} \\cr\n&&\\phi_2'' + {1\\over r^2} (1-\\phi_1^2 -\\phi_2^2) \\phi_2\n - i\\kappa \\phi_1' - h^2 \\phi_2 = 0 \\cr\n&&{1\\over r^2} {d\\over dr} \\Big( r^2 {dh\\over dr} \\Big) \n- \\lambda (h^2 - v^2) h -\n{2\\over r^2} (\\phi_1^2 + \\phi_2^2) h = 0 ~~.\n\\label{EqMotion1}\n\\eea\nSince eq.\\ (\\ref{EqMotion1}) contains complex terms,\nsolutions necessarily become complex. \n\n\\begin{figure}[t]\\centering\n\\mbox{\n\\epsfysize=5cm \\epsfbox{solution.eps}}\n\\vskip -.3cm\n\\caption{Complex monopole solution in the radial gauge for $v=1$, $\\kappa=.5$, \nand $\\lambda=.5$. $\\phi_2(r)$ is pure imaginary.} \n\\end{figure}\n\n\n\nEq.\\ (\\ref{EqMotion1}) is solved by an ansatz\n$\\phi_1 = \\zeta(r) \\cosh {1\\over 2} \\kappa r$ and $\\phi_2 = i \\zeta(r)\n\\sinh {1\\over 2} \\kappa r$. The solution is depicted in fig.\\ 1.\n$\\phi_2(r)$ is pure imaginary. The action is real and finite. The\n$U(1)$ field strengths are given exactly by those of a real magnetic\nmonopole. Non-Abelian field strengths are complex. There is no Gribov\ncopy in this gauge.\n\nIn the original form \nof the path integral, field configurations are integrated along real\naxes. We have found that the saddle \npoints of $I[A,h]$ are located off the real axes. In the \nsaddle point method for the integration, the integration path is\ndeformed such that a new path pass the saddle points. The complex\nmonopole configurations approximate the integral, and dominate the path\nintegral. They are relevant in disordering the Higgs vacuum. Without\nmonopole-type configurations the perturbative Higgs vacuum cannot\nbe disordered and $\\raise.16ex\\hbox{$\\langle$} \\, \\vec h \\, \\raise.16ex\\hbox{$\\rangle$} $ remains nonvanishing. With\ncomplex monopoles taken into account $\\raise.16ex\\hbox{$\\langle$} \\, \\vec h \\, \\raise.16ex\\hbox{$\\rangle$} =0$ but $\\raise.16ex\\hbox{$\\langle$} \\, \n\\vec h^2 \\, \\raise.16ex\\hbox{$\\rangle$} \\sim v^2$.\n\nWe remark that if the gauge is not fixed and the action is varied with\nrespect to arbitrary gauge field configurations, then one would obtain one\nmore equation to be solved. This equation is not satisfied by our\nsolution. But in the path integral the configuration space is restricted\nby the gauge condition as in (\\ref{PI}). This subtlety arises due to the \ngauge non-invariance of the Chern-Simons term.\n\n\\section{Gribov copies}\n\nThe radiation gauge does not uniquely fix gauge field\nconfigurations.\\cite{Gribov} In the monopole ansatz\nthe radiation gauge\ncondition $\\partial_\\mu A^a_\\mu =0$ is maintained if $f(r)$ in\n(\\ref{transformation1}) obeys\n$f'' + (2\/ r) f' - (2\/ r^2) \\big\\{ \\phi_1 \\sin f\n+ \\phi_2 (1-\\cos f) \\big\\} = 0$.\n Solutions to this equation define Gribov copies. \n\nThese copies have a significant effect in the Chern-Simons theory.\nThe Chern-Simons term is not gauge invariant. Gribov copies carry\nan extra phase factor, $\\exp \\big\\{ (4\\pi i\\kappa\/g^2) f(\\infty) \\big\\}$,\nwhich could lead to cancellation in the path integral.\n\n\n\\begin{figure}[t]\\centering\n\\mbox{\n\\epsfysize=5cm \\epsfbox{final.eps}}\n\\vskip -.3cm\n\\caption{$f'(0)$ vs $f(\\infty)$ for Gribov copies of the BPS monopole.} \n\\end{figure}\n\n\nSolutions $f(r)$ are uniquely determined by $f(0)=0$ and\n$f'(0)$. In fig.\\ 2 we have plotted $f(\\infty)$ as a function of $f'(0)$\nfor the BPS monopole solution. The \nrange of the asymptotic value is $-3.98 < f(\\infty) < + 3.98$. It is\nquite unlikely that these\nGribov copies of the BPS monopole lead to the cancellation $\\sum\ne^{-4\\pi i\\kappa f(\\infty)\/g^2} =0$ in the presence of the Chern-Simons\nterm. Monopole configurations remain important in the path integral.\n\n\n\n\\section*{Acknowledgments}\nWe would like to thank R.\\ Jackiw for his enlightening comments \nin the conference. This work was\nsupported in part by the U.S.\\ Department of Energy under contracts\nDE-FG02-94ER-40823.\n\n\n\\def{\\em Ann.\\ Phys.\\ (N.Y.)} {{\\em Ann.\\ Phys.\\ (N.Y.)} }\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\nThe operations of insertion and deletion were first considered with a\nlinguistic motivation~\\cite{Marcus,Galiuk,Kluwer}. Another inspiration for\nthese operations comes from the fact that the insertion operation and its\niterated variants are generalized versions of Kleene's operations of\nconcatenation and closure~\\cite{Kleene56}, while the deletion operation\ngeneralizes the quotient operation. A study of properties of the corresponding\noperations may be found in~\\cite{Haussler82,Haussler83,Kari}. Insertion and\ndeletion also have interesting biological motivations, e.g., they correspond to\na mismatched annealing of DNA sequences; these operations are also present in\nthe evolution processes in the form of point mutations as well as in RNA\nediting, see the discussions in~\\cite{Beene,BBD07,Smith} and~\\cite{dna}. These\nbiological motivations of insertion-deletion operations led to their study in\nthe framework of molecular computing, see, for example,\n\\cite{Daley,cross,dna,TY}.\n\nIn general, an insertion operation means adding a substring to a given string\nin a specified (left and right) context, while a deletion operation means\nremoving a substring of a given string from a specified (left and right)\ncontext. A finite set of insertion-deletion rules, together with a set of\naxioms provide a language generating device: starting from the set of initial\nstrings and iterating insertion-deletion operations as defined by the given\nrules, one obtains a language.\n\nEven in their basic variants, insertion-deletion systems are able to\ncharacterize the recursively enumerable languages. Moreover, as it was shown in\n\\cite{cfinsdel}, the context dependency may be replaced by insertion and\ndeletion of strings of sufficient length, in a context-free manner. If the\nlength is not sufficient (less or equal to two) then such systems are not able\nto generate more than the recursive languages and a characterization of them\nwas shown in~\\cite{SV2-2}.\n\nSimilar investigations were continued in \\cite{MRV07,KRV08,KRV08c} on\ninsertion-deletion systems with one-sided contexts, i.e., where the context\ndependency is present only from the left or only from the right side of all\ninsertion and deletion rules. The papers cited above give several computational\ncompleteness results depending on the size of insertion and deletion rules. We\nrecall the interesting fact that some combinations are not leading to\ncomputational completeness, i.e., there are recursively enumerable languages\nthat cannot be generated by such devices.\n\nLike in the case of context-free rewriting, it is possible to consider a\ngraph-controlled variant of insertion-deletion systems. Thus the rules cannot\nbe applied at any time, as their applicability depends on the current\n``state'', changed by a rule application. Such a formalization is rather\nsimilar to the definition of insertion-deletion P systems~\\cite{membr}, however\nit is even simpler and more natural. The article~\\cite{FKRV10} focuses on\none-sided graph-controlled insertion-deletion systems where at most two symbols\nmay be present in the description of insertion and deletion rules. This\ncorrespond to systems of size $(1,1,0;1,1,0)$, $(1,1,0;1,0,1)$,\n$(1,1,0;2,0,0)$, and $(2,0,0;1,1,0)$, where the first three numbers represent\nthe maximal size of the inserted string and the maximal size of the left and\nright contexts, while the last three numbers represent the same information,\nbut for deletion rules. It is known that such systems are not computationally\ncomplete~\\cite{KRV11}, while the corresponding P systems variants and\ngraph-controlled variants are computationally complete.\n\n\nIn this article we introduce a new type of control, similar to the one used in\nmatrix grammars. More precisely, insertion and deletion rules are grouped in\nsequences, called matrices, and either the whole sequence is applied\nconsecutively, or no rule is applied. We show that in the case of such control\nthe computational power of systems of size $(1,1,0;2,0,0)$ and $(2,0,0;1,1,0$\nis strictly increasing. Moreover, we show that binary matrices suffice to\nachieve this result, hence we obtain a similar characterization like in the\ncase of the binary normal form for matrix grammars.\n\n\n\\section{Definitions}\\label{sec:def}\n\nWe do not present the usual definitions concerning standard concepts of the\ntheory of formal languages and we only refer to textbooks such as\n\\cite{handbook} for more details.\n\nThe empty string is denoted by $\\lambda $.\n\nIn the following, we will use special variants of the \\emph{Geffert} normal\nform for type-0 grammars (see~\\cite{Geffert91} for more details).\n\nA grammar $G=\\left( N,T,P,S\\right) $ is said to be in \\emph{Geffert normal\nform}~\\cite{Geffert91} if $N=\\{S,A,B,C,D\\}$ and $P$ only contains context-free\nrules of the forms $S\\to uSv$ with $u\\in \\{A,C\\}^*$ and $v\\in \\{B,D\\}^*$ as\nwell as $S\\to x$ with $x\\in (T\\cup \\{A,B,C,D\\})^*$ and two (non-context-free)\nerasing rules $AB\\to \\lambda $ and $CD\\to \\lambda $.\n\nWe remark that we can easily transform the linear rules from the Geffert normal\nform into a set of left-linear and right-linear rules (by increasing the number\nof non-terminal symbols, e.g., see \\cite{membr}). More precisely, we say that a\ngrammar $G=\\left( N,T,P,S\\right) $ with $N=N'\\cup N''$, $S,S'\\in N'$, and\n$N''=\\{A,B,C,D\\}$, is in the \\emph{special Geffert normal form} if, besides the\ntwo erasing rules $AB\\to \\lambda $ and $CD\\to \\lambda $, it only has\ncontext-free rules of the following forms:\n\n\\begin{align*}\n& X\\to bY,\\quad X,Y\\in N',b\\in T\\cup N'', \\\\\n& X\\to Yb,\\quad X,Y\\in N',b\\in T\\cup N'', \\\\\n& S'\\to \\lambda .\n\\end{align*}\n\nMoreover, we may even assume that, except for the rules of the forms \nX\\to Sb$ and $X\\to S'b$, for the first two types of\nrules it holds that the right-hand side is unique, i.e., for any two rules \nX\\to w$ and $U\\to w$ in $P$ we have $U=X$.\n\nThe computation in a grammar in the special Geffert normal form is done in two\nstages. During the first stage, only context-free rules are applied. During the\nsecond stage, only the erasing rules $AB\\to \\lambda $ and $CD\\to \\lambda $ are\napplied. These two erasing rules are not applicable during the first stage as\nlong as the left and the right part of the current string are still separated\nby $S$ (or $S'$) as all the symbols $A$ and $C$ are generated on the left side\nof these middle symbols and the corresponding symbols $B$ and $D$ are generated\non the right side. The transition between stages is done by the rule $S'\\to\n\\lambda $. We remark that all these features of a grammar in the special\nGeffert normal form are immediate consequences of the proofs given\nin~\\cite{Geffert91}.\n\n\\subsection{Insertion-deletion systems}\n\nAn \\textit{insertion-deletion system} is a construct $ID=(V,T,A,I,D)$, where\n$V$ is an alphabet; $T\\subseteq V$ is the set of \\textit{terminal} symbols (in\ncontrast, those of $V-T$ are called \\textit{non-terminal} symbols); $A$\nis a finite language over $V$, the strings in $A$ are the \\textit{axioms}; \nI,D$ are finite sets of triples of the form $(u,\\alpha ,v)$, where $u$, \n\\alpha $ ($\\alpha \\neq \\lambda $), and $v$ are strings over $V$. The triples in\n$I$ are \\textit{insertion rules}, and those in $D$ are \\textit{deletion\nrules}. An insertion rule $(u,\\alpha ,v)\\in I$ indicates that the string \n\\alpha $ can be inserted between $u$ and $v$, while a deletion rule \n(u,\\alpha ,v)\\in D$ indicates that $\\alpha $ can be removed from between the\ncontext $u$ and $v$. Stated in another way, $(u,\\alpha ,v)\\in I$ corresponds to\nthe rewriting rule $uv\\to u\\alpha v$, and $(u,\\alpha ,v)\\in D$ corresponds to\nthe rewriting rule $u\\alpha v\\to uv$. By $\\To _{ins}$ we denote the relation\ndefined by the insertion\nrules (formally, $x\\To_{ins}y$ if and only if \nx=x_{1}uvx_{2},y=x_{1}u\\alpha vx_{2}$, for some $(u,\\alpha ,v)\\in I$ and\n$x_{1},x_{2}\\in V^*$), and by $\\To_{del}$ the relation defined by the deletion\nrules (formally, $x\\To_{del}y$ if and only if $x=x_{1}u\\alpha\nvx_{2},y=x_{1}uvx_{2}$, for some $(u,\\alpha ,v)\\in D$ and $x_{1},x_{2}\\in\nV^*$). By $\\To $ we refer to any of the relations $\\To_{ins},\\To_{del}$, and by\n$\\To^*$ we denote the reflexive and transitive closure of $\\To$.\n\nThe language generated by $ID$ is defined by\n\\begin{equation*}\nL(ID)=\\{w\\in T^*\\mid x\\To ^*w\\mathrm{\\ for\\ some\\ }\nx\\in A\\}.\n\\end{equation*}\n\nThe complexity of an insertion-deletion system $ID=(V,T,A,I,D)$ is described by\nthe vector $(n,m,m';p,q,q')$ called \\emph{size}, where \\vspace{-2mm}\n\\begin{eqnarray*}\nn=\\max\\{|\\alpha|\\mid (u,\\alpha,v)\\in I\\}, & & p=\\max\\{|\\alpha|\\mid\n(u,\\alpha,v)\\in D\\}, \\\\\nm=\\max\\{|u|\\mid (u,\\alpha,v)\\in I\\}, & & q=\\max\\{|u|\\mid (u,\\alpha,v)\\in D\\},\n\\\\\nm'=\\max\\{|v|\\mid (u,\\alpha,v)\\in I\\}, & & q'=\\max\\{|v|\\mid\n(u,\\alpha,v)\\in D\\}.\n\\end{eqnarray*}\n\nBy $INS_{n}^{m,m'}DEL_{p}^{q,q'}$ we denote the families of insertion-deletion\nsystems having the size $(n,m,m';p,q,q')$.\n\nIf one of the parameters $n,m,m',p,q,q'$ is not specified, then instead we\nwrite the symbol~$\\ast $. In particular, $INS_*^{0,0}DEL_*^{0,0}$ denotes the\nfamily of languages generated by \\emph{context-free insertion-deletion\nsystems}. If one of numbers from the pairs $m $, $m'$ and\/or $q$, $q'$ is equal\nto zero (while the other one is not), then we say that the corresponding\nfamilies have a one-sided context. Finally we remark that the rules from $I$\nand $D$ can be put together into one set of rules $R$ by writing $\\left(\nu,\\alpha ,v\\right) _{ins}$ for $\\left( u,\\alpha ,v\\right) \\in I$ and $\\left(\nu,\\alpha ,v\\right) _{del}$ for $\\left( u,\\alpha ,v\\right) \\in D$.\n\n\\subsection{Matrix insertion-deletion systems}\n\nLike context-free grammars, insertion-deletion systems may be extended by\nadding some additional controls. We discuss here the adaptation of the idea of\nmatrix grammars for insertion-deletion systems.\n\nA \\emph{matrix insertion-deletion system} is a construc\n\\begin{equation*}\n\\gamma =(V,T,A,M)\\mathrm{\\ where}\n\\end{equation*}\n\n\\begin{itemize}\n\\item $V$ is a finite alphabet,\n\n\\item $T\\subseteq V$ is the \\emph{terminal alphabet},\n\n\\item $A\\subseteq V^*$ is a finite set of \\emph{axioms},\n\n\\item $M=r_1,\\dots, r_n$ is a finite set of sequences of rules, called\n \\emph{matrices}, of the form $r_i:[r_{i1},\\dots{}r_{ik}]$ where\n $r_{ij}$, $1\\le i\\le n$, $1\\le j\\le k$ is an insertion or deletion rule\n over $V$.\n\\end{itemize}\n\nThe sentential form (also called configuration) of $\\gamma$ is a string $w\\in\nV^*$. A transition $w\\TTo_{r_i}w'$, for $1\\le i\\le n$, is performed if there\nexist $w_1,\\dots,w_k\\in V^*$ such that\n$w\\To_{r_{i1}}w_1\\To_{r_{i2}}\\dots{}\\To_{r_{ik}}w_k$ and $w_k=w'$.\n\nThe language generated by $\\gamma$ is defined by\n\\begin{equation*}\nL(\\gamma)=\\{w\\in T^*\\mid x\\TTo ^*w\\mathrm{\\ for\\ some\\ }\nx\\in A\\}.\n\\end{equation*}\n\nBy $Mat_kINS_{n}^{m,m'}DEL_{p}^{q,q'}$, $k>1$, we denote the families of matrix\ninsertion-deletion systems having matrices with at most $k$ rules and insertion\nand deletion rules of size $(n,m,m';p,q,q')$.\n\n\\section{Computational completeness}\n\nFor all the variants of insertion and deletion rules considered in this\nsection, we know that the basic variants without using matrix control cannot\nachieve computational completeness (see \\cite{KRV11}, \\cite{MRV07}). The\ncomputational completeness results from this section are based on simulations\nof derivations of a grammar in the special Geffert normal form. These\nsimulations associate a group of insertion and deletion rules to each of the\nright- or left-linear rules $X\\to bY$ and $X\\to Yb$. The same holds for\n(non-context-free) erasing rules $AB\\to \\lambda $ and $CD\\to \\lambda $. We\nremark that during the derivation of a grammar in the special Geffert normal\nform, any sentential form contains at most one non-terminal symbol from $N'$.\n\n\n\nWe start with the following affirmation: if the size of the matrices is\nsufficiently large, then corresponding systems are computationally complete.\nThis is quite obvious for matrices of size 3.\n\n\n\\begin{thm}\n$Mat_3INS_1^{1,0}DEL_2^{0,0} = RE.$\n\\end{thm}\n\n\\begin{proof}\nThe proof is based on a simulation of a type-0 grammar in the Geffert normal\nform (as presented in Section~\\ref{sec:def}). Let $G=(V,T,S,P)$ be such a\ngrammar. We construct the system $\\gamma=(V,T,\\{S\\},M)$ as follows.\n\n\nFor every rule $r:A\\to xy\\in P$, $x,y\\in V$ we add to $M$ the matrix\\\\\n$r:[\\cins{A}{y},\\cins{A}{x},\\fdel{A}]$.\n\n\nFor rules $AB\\to\\lambda\\in P$, $CD\\to\\lambda\\in P$ and $S'\\to\\lambda$ we add to\n$M$ following matrices:\\\\\n$AB: [\\fdel{AB},\\fins{\\lambda},\\fins{\\lambda}]$,\\\\\n$CD:[\\fdel{CD},\\fins{\\lambda},\\fins{\\lambda}]$ and\\\\\n$S':[\\fdel{S'},\\fins{\\lambda},\\fins{\\lambda}]$.\n\nIt is clear that $L(\\gamma)=L(G)$. Indeed, rules of type $A\\to xy$ are\nsimulated by consecutively inserting $y$ and $x$ after $A$ and finally deleting\n$A$. The rules $AB\\to\\lambda$ and $CD\\to\\lambda$ are simulated by directly\nerasing 2 symbols and the rule $S'\\to\\lambda$ by directly erasing $S'$.\n\\end{proof}\n\nA similar result can be obtained in the case of systems having rules of size\n$(1,1,0;1,1,0)$.\n\n\n\\begin{thm}\n$Mat_3INS_1^{1,0}DEL_1^{1,0} = RE.$\n\\end{thm}\n\n\\begin{proof}\nThe proof is done like in the previous theorem. Right- and left-linear rules\nare simulated exactly in the same manner. The rule $AB\\to\\lambda$ can be\nsimulated by three matrices (providing that the axiom is $\\{\\$S\\}$):\\\\\n$AB.1:[\\fins{K_{AB}},\\fdel{\\$},\\fins{\\lambda}]$,\\\\\n$AB.2:[\\cdel{K_{AB}}{A},\\cdel{K_{AB}}{B},\\fins{\\lambda}]$ and\\\\\n$AB.3:[\\fdel{K_{AB}},\\fins{\\$},\\fins{\\lambda}]$.\\\\\n\n\nThey simulate $AB\\to\\lambda$ by introducing in the string a symbol $K_{AB}$ in\na context-free manner and after that by deleting one copy of adjacent $A$ and\n$B$. The validity follows from the observation that there can be at most only\none copy of $K_{AB}$ in the string (because it's insertion and deletion is\nsynchronized with the deletion and insertion of a special symbol $\\$$ initially\npresent in only one copy). In order to delete this symbol at the end of the\ncomputation the matrix $[\\fdel{\\$},\\fins{\\lambda},\\fins{\\lambda}]$ shall be\nused.\n\nThe rule $CD\\to\\lambda$ is simulated similarly and the rule $S'\\to\\lambda$ by\ndirectly erasing $S'$.\n\\end{proof}\n\nBy taking deletion rules with a right context in the previous theorem we\nobtain.\n\n\\begin{thm}\n$Mat_3INS_1^{1,0}DEL_1^{0,1} = RE.$\n\\end{thm}\n\n\n\nWe give below the proof for the case of systems of size $(2,0,0;1,1,0)$.\n\n\n\n\\begin{thm}\n$Mat_3INS_2^{0,0}DEL_1^{1,0} = RE.$\n\\end{thm}\n\n\\begin{proof}\nThe proof is based on a simulation of a type-0 grammar in the Geffert normal\nform (as presented in Section~\\ref{sec:def}). Let $G=(V,T,S,P)$ be such a\ngrammar. We construct the system $\\gamma=(V\\cup V',T,\\{S\\},M)$ as follows\n($V'=\\{X_A,Y_A\\mid A\\in V\\}\\cup \\{K_{AB},K_{CD}\\})$.\n\nFor every rule $r:A\\to bC\\in P$ we add to $M$ the matrix\\\\\n$r:[\\fins{bC},\\cdel{C}{A}]$.\n\nFor every rule $r:A\\to Cb\\in P$ we add to $M$ the matrices\\\\\n$r.1:[\\fins{X_AY_A},\\cdel{Y_A}{A}]$,\\\\\n$r.2:[\\fins{Cb},\\cdel{b}{Y_A},\\fdel{\\lambda}]$ and\\\\\n$r.3:[\\fdel{\\$},\\fdel{X_A},\\fins{\\$}]$.\n\nFor rules $AB\\to\\lambda\\in P$ and $CD\\to\\lambda\\in P$ we add to $M$ following\nsix matrices:\n {\\small\n\\begin{align*}\nAB.1&:[\\fins{K_{AB}},\\fdel{\\$},\\fins{\\lambda}], &CD.1&:[\\fins{K_{CD}},\\fdel{\\$},\\fins{\\lambda}],\\\\\nAB.2&:[\\cdel{K_{AB}}{A},\\cdel{K_{AB}}{B},\\fins{\\lambda}],& CD.2&:[\\cdel{K_{CD}}{C},\\cdel{K_{CD}}{D},\\fins{\\lambda}],\\\\\nAB.3&:[\\fdel{K_{AB}},\\fins{\\$},\\fins{\\lambda}], &CD.3&:[\\fdel{K_{CD}},\\fins{\\$},\\fins{\\lambda}].\n\\end{align*}\n}\n\nThe rule $S'\\to\\lambda$ is simulated by the matrix that introduces symbol $\\$$\n$S':[\\fdel{S'},\\fins{\\$},\\fins{\\lambda}]$.\n\n\nIt is clear that $L(\\gamma)=L(G)$. Indeed, any rule $A\\to bC$ is simulated\ndirectly by inserting $bC$ and deleting $A$ in the context of $C$. The right\nposition for the insertion is insured by the uniqueness of $A$. Rules $r:A\\to\nCb$ are simulated in a different way. First $A$ is replaced by $X_AY_A$ and\nafter that $Y_A$ is rewritten by $Cb$ as in the previous case. We remark that\nby inserting $X_AY_A$ we insure that there is no symbol $b$ before $Y_A$. This\npermits to correctly place $Cb$. The additional symbol $X_A$ remaining in the\nstring is deleted during the second stage (when symbol $\\$$ is introduced). As\nbefore, in order to delete $\\$$ at the end of the computation the matrix\n$[\\fdel{\\$},\\fins{\\lambda},\\fins{\\lambda}]$ shall be used.\n\\end{proof}\n\n\nSince the matrix control is a particular case of the graph control we obtain\n\\begin{thm}\\cite{KRV11}\nFor any $k>0$, $REG\\setminus Mat_kINS_2^{0,0}DEL_2^{2,0} \\ne \\emptyset.$\n\\end{thm}\n\n\n\n\\section{Computational completeness for binary matrices}\n\nIn this section we show that binary matrices suffice for computational\ncompleteness.\n\n\n\\begin{thm}\n$Mat_2INS_2^{0,0}DEL_1^{1,0} = RE.$\n\\end{thm}\n\n\\begin{proof}\n\nThe proof is based on a simulation if type-0 grammar in the Geffert normal form\n(as presented in Section~\\ref{sec:def}). Let $G=(V,T,S,P)$ be such a grammar.\nWe construct the system $\\gamma=(V\\cup V',T,w,M)$ as follows.\n\n$V'=\\{\\#_k^r, K^r\\mid r\\in P, 1\\le k\\le 5\\}\\cup\\{K_{AB},K_{CD},\\$\\}$, and\n$w=\\{\\$S\\}$.\n\n\nFor every rule $r:A\\to bC\\in P$ we add to $M$ the matrix\n$$r.1:\\mruleI{bC}{C}{A}.$$\n\nFor every rule $r:A\\to Cb\\in P$ we add to $M$ following matrices:\n\n\\begin{align*}\n&r.1: \\mruleI{\\#_1^r\\#_2^r}{\\#_2^r}{A}\\\\\n&r.2: \\mruleI{C}{C}{\\#_1^r}\\\\\n&r.3: \\mruleI{\\#_3^r\\#_4^r}{\\#_4^r}{\\#_2^r}\\\\\n&r.4: \\mruleI{\\#_5^rb}{b}{\\#_4^r}\\\\\n&r.5: \\mrule{\\fdel{\\$}}{\\fins{K^r}}\\\\\n&r.6: \\mrule{\\fdel{K^r}}{\\fins{\\$}}\\\\\n&r.7: \\mrule{\\cdel{K^r}{\\#_3^r}}{\\cdel{K^r}{\\#_5^r}}\\\\\n\\end{align*}\n\nFor rules $AB\\to\\lambda\\in P$ and $CD\\to\\lambda\\in P$ we add to $M$ following\nmatrices:\n\\begin{align*}\n&AB.1: \\mrule{\\fdel{\\$}}{\\fins{K_{AB}}} && AB.1: \\mrule{\\fdel{\\$}}{\\fins{K_{CD}}}\\\\\n&AB.2: \\mrule{\\fdel{K_{AB}}}{\\fins{\\$}} && AB.2: \\mrule{\\fdel{K_{CD}}}{\\fins{\\$}}\\\\\n&AB.3: \\mrule{\\cdel{K_{AB}}{A}}{\\cdel{K_{AB}}{B}} && AB.3: \\mrule{\\cdel{K_{CD}}{C}}{\\cdel{K_{CD}}{D}}\\\\\n\\end{align*}\n\nThe rule $S'\\to\\lambda$ can be simulated by the following matrix:\n$$\nS':\\mrule{\\fdel{S'}}{\\fins{\\lambda}}.\n$$\n\n\nWe claim that $L(\\gamma)=L(G)$. First we show that $L(\\gamma)\\supseteq L(G)$.\nLet $w_1Aw_2$ be a sequential form in $G$ (initially $S$) and let $w_1Aw_2\\To_r\nw_1bCw_2$ be a derivation in $G$. We show that in $\\gamma$ we obtain the same\nresult:\n\\begin{equation*}\nw_1Aw_2\\TTo_{r.1} w_1bCw_2.\n\\end{equation*}\n\nWe remark that if the sequence $bC$ is not inserted before $A$, then the second\nrule from the matrix will not be applicable (we recall that $w_1w_2$ does not\ncontain non-terminals from $V\\setminus T$ and that $b\\ne\\lambda$.\n\nConsider now the following derivation in $G$: $w_1Aw_2\\To_r w_1Cbw_2$. This\nderivation is simulated in $\\gamma$ as follows.\n\n\\begin{multline*}\n\\$w_1Aw_2\\TTo_{r.1} \\$w_1\\#_1^r\\#_2^rw_2\\TTo_{r.2} \\$w_1C\\#_2^rw_2\\TTo_{r.3}\\\\\n \\TTo_{r.3}\\$w_1C\\#_3^r\\#_4^rw_2\\TTo_{r.4}\\$w_1C\\#_3^r\\#_5^rbw_2\\TTo_{r.5}\\\\\n \\TTo_{r.5}w_1CK^r\\#_3^r\\#_5^rbw_2\n \\TTo_{r.6}\n w_1CK^rbw_2\\TTo^{r.7}\\$w_1Cbw_2.\n\\end{multline*}\n\nSo the grammar $G$ is simulated as follows. Firstly the first stage of the\ngeneration is simulated by simulating left-linear and after that right-linear\nproductions. After changing to the second stage, rules $AB.i$ and $CD.i$ ($1\\le\ni\\le 3$) can be applied, removing symbols $A,B,C,D$.\n\nNow in order to prove the converse inclusion $L(\\gamma)\\subseteq L(G)$ we show\nthat no other words can be obtained in $\\gamma$.\n\nWe start by observing that matrices $r.1-r.4$ for a rule $r:A\\to Cb$ as well\nas $r.1$ for a rule $r:A\\to bC$ have the form \\mruleI{x}{x}{y}, $x\\in V\\cup\nV^2,y\\in V$. It is not difficult to see that if $x$ was not already present in\nthe string then such a matrix correspond to the rewriting rule $y\\to x$.\nIndeed, since $x$ is not present in the string, it should have been inserted\nbefore the symbol $y$, which is deleted afterwards.\n\nThe matrices $r.5-r.7$ insure that a sequence of symbols $\\#_3^r\\#_5^r$ is\ndeleted. This is performed by introducing into the string a new special symbol\n$K^r$. If it is not introduced before $\\#_3^r$, then nothing happens and $K^r$\ncan be replaced by \\$. Otherwise, it can delete the two symbols in the\nsequence. The validity of the simulation is ensured by the fact that the symbol\n\\$ is always present in at most one copy.\n\nIn a similar way rules $AB.1-AB.3$ and $CD.1-CD.3$ act.\n\n\nIn order to conclude that the simulation of the rule $A\\to Cb$ does not yield\nother words we give the following remarks:\n\\begin{itemize}\n\\item Symbol $A$ is replaced by a pair of symbols $\\#_1^r\\#_2^r$, where\n $\\#_1^r$ evolves to $C$ and $\\#_2^r$ evolves to $b$.\n\\item Symbol $b$ is inserted if and only if $\\#_3^r$ (and $\\#_4^r$) is\n present in the string. This insures that this symbol is separated from\n any non-terminal that can be derived from $C$ and hence the insertion\n of this symbol cannot interfere with some other insertion that could be\n operated.\n\\end{itemize}\n\nSince no other words can be generated we can reconstruct a derivation in $G$\nstarting from a derivation in $\\gamma$. For this it is enough to follow\nconfigurations where there is a non-terminal from $V\\setminus \\{A,B,C,D\\}$ in\norder to reconstruct the first stage of the derivation from $G$. The deletion\nof $AB$ and $CD$ has a direct correspondence to the second stage of $G$. So,\n$L(\\gamma)=L(G)$.\n\\end{proof}\n\n\n\\begin{thm}\n$Mat_2INS_1^{1,0}DEL_2^{0,0} = RE.$\n\\end{thm}\n\n\\begin{proof}\n\nThe proof is based on a simulation if type-0 grammar in the Geffert normal form\n(as presented in Section~\\ref{sec:def}). Let $G=(V,T,S,P)$ be such a grammar.\nWe construct the system $\\gamma=(V\\cup V',T,w,M)$ as follows.\n\n$V'=\\{p,p'\\mid p: A\\to Cb\\in P\\}\\cup\\{p,p_2,p_3,\\#_p,\\#_p',C_1^p,C_2^p\\mid\np:A\\to bC\\in P\\}\\cup\\{X,Y\\}$, and $w=\\{XSY\\}$.\n\n\n\nFor every rule $p:A\\to Cb\\in P$ we add to $M$ following matrices:\n\\begin{align*}\n& p.1: \\mrule{\\fdel{A}}{\\cins{Y}{p}}\\\\\n& p.2: \\mrule{\\cins{X}{b}}{\\cins{Y}{p'}}\\\\\n& p.3: \\mrule{\\cins{X}{C}}{\\fdel{p'p}}\\\\\n\\end{align*}\n\nFor every rule $p:A\\to bC\\in P$ we add to $M$ following matrices:\n\\begin{align*}\n&p.1: \\mrule{\\fdel{A}}{\\cins{Y}{p}}\\\\\n&p.2: \\mrule{\\cins{X}{C_1^p}}{\\cins{Y}{\\#_p}}\\\\\n&p.3: \\mrule{\\cins{Y}{\\#_p'}}{\\cins{Y}{p_2}}\\\\\n&p.4: \\mrule{\\cins{Y}{p_3}}{\\fdel{\\#_p'\\#_p}}\\\\\n&p.5: \\mrule{\\cins{X}{b}}{\\fdel{p_2}}\\\\\n&p.6: \\mrule{\\fdel{X}}{\\cins{C_1^p}{C_2^p}}\\\\\n&p.7: \\mrule{\\cins{C_2^p}{X}}{\\fdel{p_3p}}\\\\\n&p.8: \\mrule{\\cins{X}{C}}{\\fdel{C_1^pC_2^p}}\\\\\n\\end{align*}\n\nFor rules $AB\\to\\lambda\\in P$ and $CD\\to\\lambda\\in P$ we add to $M$ following\nmatrices:\n\\begin{align*}\n&AB: \\mrule{\\fdel{AB}}{\\fins{\\lambda}} && CD: \\mrule{\\fdel{CD}}{\\fins{\\lambda}}\n\\end{align*}\n\nWe also add to $M$ the matrices $XY: \\mrule{\\fdel{X}}{\\fdel{Y}}$ and\n$S':\\mrule{\\fdel{S'}}{\\fins{\\lambda}}$.\n\n\nWe claim that $L(\\gamma)=L(G)$. First we show that $L(\\gamma)\\supseteq L(G)$.\nThe simulation uses the following idea. Symbol $X$ marks the site where the\nnon-terminal is situated, while symbol $Y$ marks a position in the string (for\ncommodity we mark the end of the string). The sequence of insertions and\ndeletions is synchronized between these two positions: inserting something at\nposition $X$ also inserts or deletes symbols at position $Y$. Finally, symbols\nat position $Y$ are checked to form some particular order. So in some sense $Y$\ncorresponds to a ``stack'' where some information is stored and after that the\n``stack'' is checked to be in some specific form.\n\nMore precisely, let $w_1Aw_2$ be a sequential form in $G$ (initially $S$) and\nlet $w_1Aw_2\\To_r w_1Cbw_2$ be a derivation in $G$. We show that in $\\gamma$ we\nobtain the same result:\n\n\\begin{multline*}\nw_1XAw_2Y\\TTo_{p.1} w_1Xw_2Yp\\TTo_{p.2} w_1Xbw_2Yp'p\\TTo_{p.2}^{k-1}\\\\\n \\TTo_{p.2}^{k-1}w_1Xb^kw_2Yp'p^k\\TTo_{p.3}w_1XCb^kw_2Yp'^{k-1}.\n\\end{multline*}\n\nSince there are no rules eliminating $p'$ by itself (it can be eliminated only\nif $p$ is following it, which is no more possible), the above string can become\nterminal if and only if one insertion is done at the second step (i.e. $k=1$).\nHence we obtain the string $w_1XCbw_2Y$, \\ie{} we correctly simulated the\ncorresponding production of the grammar.\n\nWe remark that the rule $p.2$ can be used at any time, but this yields again a\nsymbol $p'$ after $Y$ which cannot be removed.\n\n\nNow consider the following derivation in $G$: $w_1Aw_2\\To_r w_1bCw_2$. This\nderivation is simulated in $\\gamma$ as follows.\n\n\n\\begin{multline*}\nw_1XAw_2Y\\TTo_{p.1} w_1Xw_2Yp\\TTo_{p.2} w_1XC_1^pw_2Y\\#_pp\\TTo_{p.3}\\\\\n \\TTo_{p.3} w_1XC_1^{p}w_2Yp_2\\#_p'\\#_pp\n \\TTo_{p.4} w_1XC_1^{p}w_2Yp_3p_2p \\TTo_{p.5}\\\\\n \\TTo_{p.5} w_1XbC_1^{p}w_2Yp_3p\\TTo_{p.6} w_1bC_1^{p}C_2^pw_2Yp_3p\\TTo_{p.7}\\\\\n\\TTo_{p.7} w_1bC_1^pC_2^pXw_2Y\\TTo_{p.8} w_1b^sXCw_2Y\n\\end{multline*}\n\n\nThe deletion rules $AB\\to\\lambda$, $CD\\to\\lambda$ and $S'\\to\\lambda$ are\nsimulated directly by rules $AB$ and $CD$ and symbols $X$ and $Y$ are\neliminated by the rule $XY$. Hence $L(G)\\subseteq L(\\gamma)$.\n\n\nNow in order to prove the inclusion $L(\\gamma)\\subseteq L(G)$ we\n we show that only specific sequences of rule application\n\ncan lead to a terminal string. The case of the simulation of rules of type\n$A\\to Cb$ is discussed above. We shall concentrate now on the simulation of\nrules of type $A\\to bC$. We give below the rules' dependency graph, where by\n$x\\leftarrow y$ we indicate that in order to apply $y$, we should apply at\nleast one time $x$.\n\n$$\\xymatrix{\n & &\\ar[dl] p_4 & & \\\\\np.1 &\\ar[l] p.2 &\\ar[l] p_5 &\\ar[l]\\ar[ul]\\ar[dl] p_7 &\\ar[l] p_8\\\\\n & &\\ar[ul] p_6 & & \\\\\n}\n$$\n\n\nIndeed, if rule $p.1$ is not applied first, then additional symbols are added\nafter $Y$ and it is clear that they cannot be eliminated. If $p.3$ is applied\nbefore $p_2$, then the introduced symbol $\\#_p'$ can never be deleted (as there\nis no symbol $\\#_p$ afterwards). Rule $p.4$ involves symbols introduced by\n$p.2$ and $p.3$, so it cannot be used before. Rule $p.5$ cannot be applied\nbefore $p.3$, however its application can be interchanged with the application\nof $p.4$. Rule $p.6$ can be applied once after $p.2$, while in order to apply\n$p.7$ we need to apply before rules $p.6$, $p.5$ and $p.4$. The rule $p.8$ is\napplicable only after rule $r.7$.\n\nIt is still possible to apply some rules several times. Now we show that each\nrule must be applied exactly once. Since there is only one copy of $A$, only\none copy of $p$ will be available. Hence rule $p.7$ will be applied only one\ntime. We can also deduce that only one copy of $p_3$ shall be produced, hence\nrule $p.4$ should be applied only one time. But this implies the uniqueness of\nsymbols $\\#_p$ and $\\#_p'$, hence a single application of rules $p.2$ and\n$p.3$. The last affirmation implies that $p_2$ is generated only once, hence\n$p.5$ can be applied only once. From $p.6$ we can deduce that $C_2^p$ is\ninserted once, hence $p.8$ is executed only one time. Finally, from the $p.2$\nwe can deduce that $C_1^r$ is inserted only once, so after its deletion in\n$p.8$ no more copies will remain.\n\nSo, we obtain that any terminal derivation in $\\gamma$ needs an application of\na specific sequence of rules. Hence, it is enough to look at strings from\n$\\gamma$ containing a non-terminal from $V\\setminus \\{A,B,C,D\\}$ in order to\nreconstruct the first stage of the derivation from $G$. The deletion of $AB$\nand $CD$ has a direct correspondence to the second stage of $G$. This implies\nthat $L(\\gamma)\\subseteq L(G)$.\n\\end{proof}\n\n\n\n\n\n\n\n\n\n\\section{Conclusions}\nIn this article we have introduced the mechanism of a matrix control to the\noperations of insertion and deletion. We investigated the case of systems with\ninsertion and deletion rules of size $(1,1,0;1,1,0)$, $(1,1,0;1,0,1)$,\n$(1,1,0;2,0,0)$ and $(2,0,0;1,1,0)$ and we have shown that the corresponding\nmatrix insertion-deletion systems are computationally complete. In the case of\nfirst two systems matrices of size 3 are used, while in the case of the last\ntwo systems binary matrices are sufficient. Since a matrix control is a\nparticular case of a graph control (having an input\/output node and series of\nlinear paths starting and ending in this node), we obtain~\\cite{KRV11} that\nmatrix insertion-deletion systems having rules of size $(2,0,0;2,0,0)$ are not\ncomputationally complete.\n\nWe remark that our results for matrix insertion-deletion systems are different\nfrom the results on graph-controlled systems obtained in~\\cite{FKRV10} and\nprevious works. In the graph-controlled case, the total number of nodes in the\ngraph is minimized, while in the matrix case the depth of the graph\n(corresponding to the size of matrices) is minimized.\n\nWe did not succeed to show the computational completeness of systems of size\n$(1,1,0;1,1,0)$ and $(1,1,0;1,0,1)$ having binary matrices. This gives an\ninteresting topic for the further research.\n\n\\bibliographystyle{abbrv}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section*{Model equations}\n\nFor convenience, we reintroduce our model equations. Consider a two-dimensional domain $\\Omega$ with spatial coordinate $\\vec{x}=(x,y)$. Define $\\rho(\\vec{x},t)=s(\\vec{x},t)+g(\\vec{x},t)$ as the locust population density field, with $s(\\vec x,t)$ and $g(\\vec x, t)$ the solitary and gregarious components, respectively. The locust populations move with velocities $\\vec{v}_{s,g}(\\vec x, t)$ and obey the equations\n\\begin{subequations}\n\\label{eq:ge}\n\\begin{alignat}{4}\n\\dot{s} &+ \\nabla \\cdot (\\vec{v}_s s) &= -f_2(\\rho)s &+ f_1(\\rho)g, \\quad\n\\vec{v}_s = -\\nabla(Q_s * \\rho), \\\\\n\\label{eq:ge2}\n\\dot{g} &+ \\nabla \\cdot (\\vec{v}_g g) &= \\phantom{-}f_2(\\rho)s &-\nf_1(\\rho)g, \\quad \\vec{v}_g = -\\nabla(Q_g * \\rho),\n\\end{alignat}\n\\end{subequations}\nThese equations generalize the classic swarming model\n\\begin{eqnarray}\n\\label{eq:social}\n\\rho_t + \\nabla \\cdot (\\rho \\vec{v}) = 0, \\quad \\vec{v} = -\n\\int_\\Omega {\\nabla Q}(\\vec{x}- \\vec{x}') \\rho (\\vec{x}',t)\nd\\vec{x}',\n\\end{eqnarray}\nwhich describes a single population density field advected by a velocity field arising from social interactions. Eq.\\,\\eqref{eq:social} has been studied extensively in one and two spatial dimensions for various social interaction functions represented by $Q$, whose negative gradient is the effective social force \\cite{TopBer2004,BerLau2007,BodVel2005,BodVel2006}. Depending on $Q$, solutions include steady swarms, spreading populations, and contracting groups (\\emph{i.e.}, blow-up) \\cite{BerLau2007, LevTopBer2009, BerTop2011}.\n \nIn our two-phase model Eqs.\\,\\eqref{eq:ge}, the velocities are\n\\begin{equation}\n\\label{eq:v}\n \\vec{v}_{s,g} (\\vec x, t)= -\\nabla Q_{s,g} * \\rho \\equiv -\n\\int_\\Omega {\\nabla Q_{s,g}}(\\vec{x} - \\vec{x}') \\rho (\\vec{x}',t) \\,\nd\\vec{x}' ,\n\\end{equation}\nand the social interaction potentials $Q_{s,g}$ are\n\\begin{equation}\n\\label{eq:Q}\nQ_s(\\vec{x}-\\vec{x}') = R_s \\exp{-|\\vec{x}-\\vec{x}'|\/r_s}, \\quad Q_g(\\vec{x}-\\vec{x}') = R_g\n\\exp{-|\\vec{x}-\\vec{x}'|\/r_g} - A_g \\exp{-|\\vec{x}-\\vec{x}'|\/a_g}.\n\\end{equation}\nHere, $R_s, R_g, A_g$ are interaction magnitudes and $r_s, r_g$ and $a_g$ are interaction length scales. We require $R_g a_g - A_g r_g > 0$ and $A_g a_g^2 - R_g r_g^2>0$ so that $Q_g$ includes short range repulsion and long range attraction, as in \\cite{LevTopBer2009,BerTop2011, ChuDOrMar2007}, as this is the clumping regime, appropriate to capture the tendency of gregarious locusts to aggregate. We model the density-dependent rates of interconversion of the solitary and gregarious forms as\n\\begin{equation}\n\\label{eq:rates}\nf_1(\\rho) = \\frac{\\delta_1}{1+ \\left( \\rho\/k_1 \\right)^2}, \\quad\nf_2(\\rho) = \\frac{\\delta_2 \\left( \\rho\/k_2 \\right)^2}{1+ \\left(\n \\rho\/k_2 \\right)^2}.\n\\end{equation}\nThe parameters $\\delta_{1,2}$ are maximal rates and $k_{1,2}$ are characteristic locust densities at which the transitions occur at half\nof their maximal values. To the best of our knowledge, our work is the first to consider locust phase changes via continuum modeling of locust density \\cite{BerLau2007, BodVel2005, BodVel2006, TopBer2004}.\n\n\\section*{Parameter selection and estimation}\n\nAs discussed in the main text, for our numerical results, we use two different sets of phase change parameters. For both sets, we use the same social interactions parameters, and we now describe our choices for these.\n\nTo estimate $R_s$, $R_g$, and $A_g$, we use explicit velocity computations. The speed of a locust when it is alone varies between $72\\ \\mbox{-}\\ 216\\ m\/hr$, while the speed of a locust in a group varies in a tighter range of $144\\ \\mbox{-}\\ 216\\ m\/hr$ \\cite{BazRomTho2011}. To make a rough estimate of $R_s$, we imagine a hypothetical semi-infinite density field $\\rho(x,y) = \\rho_{group} \\mathrm{H}(x)$ where $\\mathrm{H}(x)$ is\nthe Heaviside function and, as mentioned in the main text, $\\rho_{group} = 65\\ locusts\/m^2$ is the approximate critical density of a gregarious group~\\cite{SimDesHag2001}. A solitary locust placed at the swarm's edge (at the origin) should move to the left with maximal velocity $v_s^{\\rm max} = -216\\ m\/hr$. From Eqn.\\,\\eqref{eq:v},\n\\begin{equation}\nv_s(0,0) = \\left\\{-\\nabla Q_s * \\rho_{group}\n\\mathrm{H}(x)\\right\\}\\big|_{(0,0)} = v_s^{\\rm max},\n\\end{equation}\nwhich we solve to find $R_s = 11.87\\ m^3\/(hr \\cdot locust)$. Similarly, a gregarious locust at the origin should move to the right with maximal velocity $v_g^{\\rm max} = 216\\ m\/hr$, so\n\\begin{equation}\nv_g(0,0) = \\left\\{-\\nabla Q_g * \\rho_{group}\n\\mathrm{H}(x)\\right\\}\\big|_{(0,0)} = v_g^{\\rm max}.\n\\end{equation}\nA gregarious locust placed to the left of the swarm at a distance equal to the attraction length scale $a_g = 0.14\\ m$ should also move to the right, but with a slower velocity which we take to be the minimal velocity in a crowd, $v_g^{\\rm min}=144\\ m\/hr$. Thus\n\\begin{equation}\nv_g(-0.14,0) = \\left\\{-\\nabla Q_g * \\rho_{group}\n\\mathrm{H}(x)\\right\\}\\big|_{(-0.14,0)} = v_g^{\\rm min}.\n\\end{equation}\nThese two conditions determine $R_g = 5.13\\ m^3\/(hr \\cdot locust)$ and $A_g = 13.33\\ m^3\/(hr \\cdot locust)$ In the main text, we present numerical simulations of Eqs.\\,\\eqref{eq:ge} in one spatial dimension. For these simulations, we take $\\delta_{1,2}$, $r_s$, $r_g$, and $a_g$ as above, since these parameters do not depend on spatial dimension. For the remaining parameters, we follow a process\nsimilar to that described above, and choose $k_{1,2} = k = 8\\ locusts\/m$, $R_s = 6.83\\ m^2\/(hr \\cdot locust)$, $R_g = 6.04\\ m^2\/(hr \\cdot locust)$, and $A_g = 12.9\\ m^2\/(hr \\cdot locust)$.\n\n\\section*{Homogeneous steady states}\n\nFor any set of initial conditions, the mean locust density $\\rho_0$ is known, and corresponds to the total density at the homogeneous steady state (HSS). Accordingly, there is a family of homogeneous steady states parameterized by $\\rho_0$. The corresponding solitary and gregarious HSS components, obtained by setting time and space derivatives to zero in Eqs.\\,\\eqref{eq:ge} are\n\\begin{subequations}\n\\label{eq:steadystate}\n\\begin{eqnarray}\ns_0 & = & \\frac{\\rho_0 \\delta_1 k_1^2 (k_2^2+\\rho_0^2)}{\\delta_1 k_1^2\nk_2^2 + \\delta_1 k_1^2 \\rho_0^2 + \\delta_2 k_1^2 \\rho_0^2 +\\delta_2\n\\rho_0^4} \\label{eq:s0}, \n\\\\ g_0 & = & \\frac{\\delta_2 \\rho_0^3\n(k_1^2+\\rho_0^2)}{\\delta_1 k_1^2 k_2^2 + \\delta_1 k_1^2 \\rho_0^2 +\n\\delta_2 k_1^2 \\rho_0^2 +\\delta_2 \\rho_0^4} \\label{eq:g0}.\n\\end{eqnarray}\n\\end{subequations}\nWhen we later consider stability of homogeneous steady states, it will be convenient to discuss the fractions $\\phi_{s,g}$ of solitarious and gregarious locusts, where $\\phi_s + \\phi_g = 1$. Using Eqn.\\,\\eqref{eq:steadystate}, we know that for homogeneous steady states,\n\\begin{subequations}\n\\label{eq:phigrho}\n\\begin{eqnarray}\n\\phi_g & = & \\frac{g_0}{s_0+g_0},\\\\\n& = & \\frac{1}{s_0\/g_0+1},\\\\\n& = & \\biggl\\{1 + \\gamma K^2 \\frac{1+\\psi^2}{\\psi^2(\\psi^2+K^2)}\\biggr\\}^{-1}.\n\\end{eqnarray}\n\\end{subequations}\nHere, $\\gamma = \\delta_1\/\\delta_2$ is the ratio of maximal solitarization rate to maximal gregarization rate, $K = k_1\/k_2$ is the ratio of the characteristic solitarization and gregarization densities for individuals, and $\\psi = \\rho_0\/k_2$ is a rescaled density. Note that $\\phi_g$ is monotonically increasing in $\\psi$, and hence in $\\rho_0$; that is to say, as total density increases, the gregarious fraction increases.\n\n\\section*{Linear stability analysis}\n\nTo study the stability of the HSS in Eqs.\\,\\eqref{eq:steadystate}, we consider small perturbations $s_1, g_1$ about $s_0, g_0$\n\\begin{equation}\n\\label{eq:pert1}\ns(\\vec{x},t) = s_0+s_1(\\vec{x},t), \\quad g(\\vec{x},t) = g_0+g_1(\\vec{x},t),\n\\end{equation}\n\\noindent\nso that $\\rho(\\vec{x},t) =s_0+g_0+ s_1(\\vec{x},t)+g_1(\\vec{x},t)$. Substituting Eqn.\\,\\eqref{eq:pert1} into Eqn.\\,\\eqref{eq:ge} and expanding to first order in the perturbations, we find the linearized equations\n\\begin{subequations}\n\\label{eq:linearized}\n\\begin{eqnarray}\n\\dot{s}_1 & = & s_0 Q_s * \\nabla^2 (s_1+g_1) - A s_1 + B g_1, \\\\\n\\dot{g}_1 & = & g_0 Q_g * \\nabla^2 (s_1+g_1) + A s_1 - B g_1,\n\\label{eq:fourier}\n\\end{eqnarray}\n\\end{subequations}\nwhere\n\\begin{subequations}\n\\begin{eqnarray}\nA & = & f_2(\\rho_0)+f_2^\\prime(\\rho_0)s_0-f_1^\\prime(\\rho_0)g_0,\\\\\nB & = & f_1(\\rho_0)+f_1^\\prime(\\rho_0)g_0-f_2^\\prime(\\rho_0)s_0.\n\\end{eqnarray}\n\\end{subequations}\nHere, $A,B > 0$ for all $\\rho_0 > 0$ since $f_1$ is a monotonically increasing function of $\\rho_0$ and $f_2$ is a monotonically decreasing one. To further analyze the linearized equations, we Fourier expand the perturbations as\n\\begin{equation}\n\\label{eq:perturb}\ns_1(\\vec{x},t) = \\sum_\\vec{q} \\mathcal{S}_\\vec{q}(t) \\exp{i \\vec{q}\n \\cdot \\vec{x}}, \n\\quad s_2(\\vec{x},t) = \\sum_\\vec{q} \\mathcal{G}_\\vec{q} (t) \\exp{i\n \\vec{q} \\cdot\n\\vec{x}}.\n\\end{equation}\nWe allow for an infinitely large domain so that there are no restrictions on $\\vec q$; in other situations, $\\vec{q}$ must be suitably restricted in order to satisfy boundary conditions. Substituting Eqn.\\,\\eqref{eq:perturb} into Eqn.\\,\\eqref{eq:linearized} yields ordinary differential equations for each Fourier mode amplitude. We write these in matrix form,\n\\begin{subequations}\n\\begin{gather}\n\\frac{d}{dt}\n\\begin{pmatrix}\n\\mathcal{S}_q \\\\\\mathcal{G}_q\n\\end{pmatrix}\n=\n\\mat{L}(q)\n\\begin{pmatrix}\n\\mathcal{S}_q \\\\ \\mathcal{G}_q\n\\end{pmatrix}, \\\\\n\\mat{L}(q) \\equiv \\begin{pmatrix} -s_0 q^2 \\widehat{Q}_s(q) - A & -s_0 q^2\n \\widehat{Q}_s(q)+B \\\\ -g_0 q^2 \\widehat{Q}_g(q) + A & -g_0 q^2 \\widehat{Q}_g(q) - B\n\\end{pmatrix}.\n\\end{gather}\n\\end{subequations}\nHere, $q = |\\vec{q}|$ is the perturbation wavenumber, and $\\widehat{Q}_{s,g}(q)$ are the Fourier transforms of the two dimensional social interaction potentials,\n\\begin{eqnarray}\n\\label{eq:qhats}\n\\widehat{Q}_s(q)& =& \\frac{2 \\pi R_s r_s^2}{(1+r_s^2 q^2)^{3\/2}}, \\\\\n\\widehat{Q}_g(q) & = & \\frac{2 \\pi R_g r_g^2}{(1+r_g^2q^2)^{3\/2}}-\n\\frac{2 \\pi A_g a_g^2}{(1+a_g^2 q^2)^{3\/2}}.\n\\end{eqnarray}\n\nThe eigenvalues $\\lambda_{1,2}(q)$ of $\\mat{L}(q)$ are\n\\begin{equation}\n\\lambda_1(q) = -q^2 \\left[s_0 \\widehat{Q}_s(q) + \ng_0 \\widehat{Q}_g(q)\\right], \\quad \\lambda_2 = -(A+B).\n\\end{equation}\nSince $\\lambda_2 < 0$, instability occurs only when $\\lambda_1 > 0$. For convenience, we rewrite $\\lambda_1$ in terms of the gregarious mass fraction $\\phi_g$,\n\\begin{equation}\n\\label{eq:eigrewrite}\n\\lambda_1(q) = - \\rho_0 q^2 \\left[(1-\\phi_g) \\widehat{Q}_s(q) + \n\\phi_g \\widehat{Q}_g(q)\\right].\n\\end{equation}\nNow we factor out the attractive part of the gregarious term, namely\n\\begin{equation}\n\\phi_g\\frac{2\\pi A_g a_g^2}{(1+a_g^2 q^2)^{3\/2}}.\n\\end{equation}\nThis yields\n\\begin{equation}\n\\label{eq:eigrewrite2}\n\\lambda_1(q) = - \\rho_0 q^2 \\phi_g\\frac{2\\pi A_g a_g^2}{(1+a_g^2 q^2)^{3\/2}} \\biggl[ \\frac{1 - \\phi_g}{\\phi_g} \\frac{R_s r_s^2}{A_g a_g^2}\\frac{(1+a_g^2 q^2)^{3\/2}}{(1+r_s^2 q^2)^{3\/2}} + \\frac{R_g r_g^2}{A_g a_g^2}\\frac{(1+a_g^2 q^2)^{3\/2}}{(1+r_g^2 q^2)^{3\/2}} - 1 \\biggr].\n\\end{equation}\nSince the prefactor is negative, and we seek conditions for a positive eigenvalue (signifying growth of perturbations, and hence instability), we focus on when the term in square brackets becomes negative. The dependence on $\\phi_g$ occurs via the prefactor $(1 - \\phi_g)\/\\phi_g$ in front of a positive term. For possible instability, this term should be small, meaning that $\\phi_g$ should be sufficiently large (since this prefactor is monotonically decreasing with $\\phi_g$). Since $\\phi_g$ increases monotonically with $\\rho_0$ (as discussed above), instability may occur as $\\rho_0$ is increased.\n\nWe now show that instability first occurs at the wavenumber $q=0$ (meaning that perturbations that first lead to instability are long wavelength). We again focus on the bracketed quantity in Eq.\\,\\eqref{eq:eigrewrite2}. If this term becomes negative, it must do so for the value of $q$ at which the first two terms are (together) minimized, since these are positive terms and the negative term, $-1$, is a constant. It is biologically reasonable to assume that $a_g \\geq r_s$ (with equality achieved for our chosen social interaction parameters). Therefore, the first term is either constant or monotonically increasing in $q$. It is also biologically reasonable to assume that $a_g > r_g$, in which case the second term is monotonically increasing in $q$. Thus, the first two terms together are monotonically increasing in $q$, so their minimum occurs at $q=0$, and this will be the first wavenumber to trigger instability. Thus, if we are looking for the instability that occurs as $\\phi_g$ increases, it is sufficient to consider what happens at $q=0$.\n\nWe substitute $q=0$ into the bracketed term in Eqn.\\,\\eqref{eq:eigrewrite2} and ask for what value of $\\phi_g$ the resultant expression changes sign (to find the threshold level of gregarious locust fraction needed for instability). Setting that bracketed term to zero we obtain\n\\begin{equation}\n\\phi_g^* = \\frac{R_s r_s^2}{R_s r_s^2 - R_g r_g^2 + A_g a_g^2}.\n\\end{equation}\nInstability is achieved for values of $\\phi_g$ greater than this threshold value.\n\nTo obtain a more explicit condition for instability in terms of the density $\\rho_0$, we substitute $\\phi_g^*$ into Eq.\\,\\eqref{eq:phigrho}, which relates gregarious fraction to total (scaled) density. Rearranging, we obtain the biquadratic equation\n\\begin{equation}\nA \\psi^4 + B \\psi^2 + C = 0,\n\\end{equation}\nwhere\n\\begin{subequations}\n\\begin{eqnarray}\nA & = & \\frac{1}{\\phi_g^*} - 1,\\\\\nB & = & K^2 \\biggl(\\frac{1}{\\phi_g^*} - 1 - \\gamma\\biggr),\\\\\nC & = & -\\gamma K^2.\n\\end{eqnarray}\n\\end{subequations}\nFor any biologically meaningful solutions, the solution for $\\psi^2$ must be positive. From the quadratic formula, we have\n\\begin{equation}\n\\psi^2 = \\frac{-B \\pm \\sqrt{B^2 - 4AC}}{2A}.\n\\end{equation}\nSince $A>0$ and $C<0$, the discriminant is positive. Hence, for the plus sign choice, $\\psi^2 > 0$. For the minus sign choice, $\\psi^2 < 0$ and hence we eliminate this possibility. The final result for the critical scaled density is\n\\begin{equation}\n\\psi^* = \\sqrt{\\frac{-B + \\sqrt{B^2 - 4AC}}{2A}}.\n\\end{equation}\nThis is the result that we use to produce instability contours in the $K$-$\\gamma$ plane (Fig. 2 in the main paper).\n\n\\section*{Numerical simulation method}\n\nWe simulate Eqs.\\,\\eqref{eq:ge}-\\eqref{eq:rates} in one spatial dimension. We use periodic boundary conditions on a domain of length $L$ with a fine grid consisting of $N=1024$ points (necessary to resolve the steep edges of clusters that form). To approximate an unbounded domain, one may take the limit of large $L$. The social interactions $Q_{s,g}$ in \\eqref{eq:Q} must be adapted to be commensurate with a periodic domain. We begin with the function $Q(x) = \\exp{-|x|\/r}$, which is the building block of $Q_{s,g}$. We\ncalculate the discrete Fourier transform $\\mathcal{F}$ of $-\\partial_x Q$ on our domain as\n\\begin{equation}\n\\label{eq:dft}\n\\mathcal{F} \\{-\\partial_x Q(x)\\} = -\\frac{i}{r} \\frac{\\Delta\n\\sin(\\Delta q)}{\\cosh(\\Delta\/r)-\\cos(\\Delta q)},\n\\end{equation}\nwhere $r$ is the decay length scale in $Q$ and $\\Delta = L\/N$ is the grid spacing. From Eqn.\\,\\eqref{eq:dft} it is straightforward to\ncompute the Fourier transforms of $Q_{s,g}$. Convolutions are equivalent to products in Fourier space, providing excellent computational savings (and thus justifying the choice of a periodic domain). We compute velocities by convoluting the density with $-\\partial_x Q_{s,g}$ pseudospectrally. The flux term in Eqs.\\,\\eqref{eq:ge} is instead evaluated via a fourth-order accurate central finite difference.\n\nThe emergence of discontinuities in $s$ and $g$ causes ringing in the pseudospectral evaluation of the velocity term. In order to smooth this effect, we incorporate small amounts of numerical diffusion. Another standard approach would be to incorporate high wave\nnumber filtering in the simulation. We choose numerical diffusion because it also serves as the macroscopic description of random motion, which locusts certainly display. We implement diffusion in a split-step manner, alternating with the dynamics of Eqs.~\\eqref{eq:ge}-\\eqref{eq:rates}. Time-stepping is performed with the fourth-order Runge-Kutta method. We also threshold our velocity\nfield at every time step so that it does not exceed $v_g^{\\rm max}$. Without this thresholding, individual locusts achieve velocities of up to approximately 1.5 times $v_g^{\\rm max}$ at an intermediate stage of our simulation. It is crucial to point out that this thresholding only affects the speed of the transient clumps; it does not affect the initial instability (which is small amplitude, and thus has a small velocity) and similarly, it does not affect the late-stage bulk dynamics (which are nearly spatially stationary).\n\n\n\\section*{Abstract}\n\nLocusts exhibit two interconvertible behavioral phases, solitarious and gregarious. While solitarious individuals are repelled from other locusts, gregarious insects are attracted to conspecifics and can form large aggregations such as marching hopper bands. Numerous biological experiments at the individual level have shown how crowding biases conversion towards the gregarious form. To understand the formation of marching locust hopper bands, we study phase change at the collective level, and in a quantitative framework. Specifically, we construct a partial integrodifferential equation model incorporating the interplay between phase change and spatial movement at the individual level in order to predict the dynamics of hopper band formation at the population level. Stability analysis of our model reveals conditions for an outbreak, characterized by a large scale transition to the gregarious phase. A model reduction enables quantification of the temporal dynamics of each phase, of the proportion of the population that will eventually gregarize, and of the time scale for this to occur. Numerical simulations provide descriptions of the aggregation's structure and reveal transiently traveling clumps of gregarious insects. Our predictions of aggregation and mass gregarization suggest several possible future biological experiments.\n\n\\section*{Author Summary}\n\nLocusts such as \\emph{Schistocerca gregaria}, \\emph{Locusta migratoria}, and \\emph{Chortoceites terminifera} periodically form highly destructive plagues responsible for billions of dollars in crop losses in Africa, the Middle East, Asia, and Australia. These locusts usually exist in the so-called solitarious behavioral phase and seek isolation; gregarious individuals, however, are attracted to conspecifics. Previous experimental work has uncovered the causes of phase change in individual insects: principally, sustained exposure to sparse or crowded conditions. An open problem is to understand the intrinsic roles that phase change and social interaction play in the transition from an initially disperse, solitarious population to an aggregated, destructive marching hopper band of gregarious individuals. To this end, we construct a mathematical model that describes the interplay of phase change and spatial dynamics. Through analysis and numerical simulations, we determine a critical density threshold for gregarious band formation and quantify the collective phase change over time. We also discuss implications of our work for preventative management strategies and for possible future biological experiments.\n\n\\section*{Introduction}\n\nOutbreaks of locusts such as \\emph{Schistocerca gregaria}, \\emph{Locusta migratoria}, and \\emph{Chortoceites terminifera} regularly afflict vast areas of Northern Africa, the Middle East, Asia, and Australia. Depending on climate and vegetation conditions, billions of voracious locusts aggregate into destructive swarms that span areas up to a thousand square kilometers. A flying locust swarm can travel a few hundred kilometers per day, stripping most of the vegetation in its path \\cite{Ken1951,Alb1967,Uva1977,Rai1989}. A recent locust plague in West Africa (2003--2005) severely disrupted agriculture, destroying \\$2.5 billion in crops destined for both subsistence and export. Despite control efforts totalling \\$400 million, loss rates exceeded 50\\% in certain regions \\cite{Bel2005,BraDjiFay2006}. These numbers alone attest to the urgency of finding better ways to predict, manage, and control locust outbreaks.\n\nBetween outbreaks, locusts are mainly antisocial creatures who live in arid regions, laying eggs in breeding grounds lush with vegetation. Resource abundance may, on occasion, support numerous hatchings, leading to a high population density. Overcrowding at resource sites promotes transition to a social state in a self-reinforcing process. The social locust nymphs may display mass migration behavior. Within the newly formed group, individuals cohere via sensory communication, whether visual, chemical, and\/or mechanical \\cite{Uva1977}. Outbreaks may be exacerbated in periods of drought, when large numbers of locusts congregate on the same breeding or feeding grounds~\\cite{SpeHunWat2008,ColDesSim1998,DesColSim2000}. \n\n\nLocusts are \\emph{phase polyphenic:} while sharing the same genotype, individuals may display different phenotypes \\cite{AppHei1999,PenSim2009} that incorporate variations in morphology \\cite{Dir1953}, coloration \\cite{IslRoeSim1994},\nreproductive features \\cite{SchAlb1999} and, significantly, behavior \\cite{SimMcCHag1999, RogMatDes2003}. An individual can change from a \\emph{solitarious} state (preferring isolation) to a \\emph{gregarious} one (seeking conspecifics). Behavioral state is plastic \\cite{Uva1977,SimMcCHag1999,PenSim2009} and strongly dependent on local population density: in sparse surroundings, a gregarious locust transitions to the solitarious state \\cite{SimMcCHag1999} and vice versa in crowded environments. These phase transitions are called solitarization and gregarization. Gregarization dominates when large numbers of locusts gather at the same site, potentially leading to a destructive outbreak \\cite{DesColSim2000,ColDesSim1998}.\n\nLocust gregarization may be induced by visual, olfactory, or tactile cues. For the desert locust \\emph{Schistocerca gregaria}, the most potent stimulus is tactile: repetitive stroking of the femora of hind legs \\cite{SimMcCHag1999,SimDesHag2001,RogMatDes2003} functions as a crowding indicator. Mechanosensory stimulation of leg nerves leads to serotonin cascades in the metathoracic ganglion, and initiates gregarious behavior \\cite{SimDesHag2001,RogMatDes2003,AnsRogOtt2009}. Gregarization can be induced by rubbing a locust's hind leg for $5\\ s$ per minute during a period of $4\\ hr$ \\cite{SimDesHag2001}. Cessation of physical contact leads to solitarization after $4\\ hr$, though the degree of solitarization achieved during that time depends on the individual's ancestry.\n\nExperiments and models have shed much light on how group alignment \\cite{RomCouSch2009,BuhSumCou2006,Sum2010,YatErbEsc2009} and group motion \\cite{BazBuhHal2008,BazRomTho2011} depend on group size or density and treatments such as diet and denervation. For instance, a low-protein diet (which motivates cannibalism in locusts) leads to stronger interactions between individuals and lowers the threshold density beyond which mean speed and group coherence increase \\cite{BazRomTho2011}. Other data-driven studies include models based on a well-known physics paradigm for self-propelled particles \\cite{VicCziBen1995} and explore the transition between a disordered and a coherent marching group. Both \\cite{EdeWatGru1998} and \\cite{TopBerLog2008} study the dynamics of rolling patterns formed by flying, gregarious swarms. A logistic map was introduced in \\cite{HolChe1996} to describe phase change via a birth rate and a carrying capacity dependent on population density modulated by stochastic effects. \n\nOur current work complements previous locust modeling studies in several ways. First, many of the previous models are individual-based (Lagrangian) simulations, where the position, velocity, and interactions of individual locusts are tracked\\cite{RomCouSch2009,BuhSumCou2006,YatErbEsc2009,BazBuhHal2008,BazRomTho2011}. Ours is density-based (Eulerian), allowing techniques of partial differential equations (PDEs) and their extensions (integro-PDEs) to be utilized. Second, we concentrate on gregarious-solitarious transitions not yet explicitly considered in \\cite{BuhSumCou2006,BazRomTho2011}. We address intrinsic attractive-repulsive social interactions, whereas many current models consider interactions with clumped resources and environmental heterogeneity as their focal points \\cite{ColDesSim1998,DesColSim2000}. Finally, some models \\cite{BazRomTho2011} include anisotropic interactions such as different responses to anterior and posterior neighbors, or consider Newtonian dynamics. To explore minimal mechanisms sufficient for band formation, our work instead uses isotropic interactions and a kinematic approach. The open problem we address via mathematical modeling is to quantify and describe collective gregarization, a key, early process that necessarily occurs before the emergence of a destructive locust outbreak. We do this by linking the physiology of individual-level phase change and interphase interactions to predictions at the level of the gregarious hopper band as a whole.\n\nWe investigate the onset of an outbreak by constructing a continuum mathematical model of behavioral phase for interacting gregarious and solitarious locusts. We classify and quantify group dynamics in wide swaths of parameter space, a task which is challenging by numerical techniques alone. We find that in the limit of low densities, both phases are uniformly spread and the solitarious phase dominates. For sufficiently large populations, a dense, traveling patch of gregarious locusts suddenly emerges, while solitarious locusts become more and more scarce. We identify locust clustering at high densities with the onset of a hopper band. Through analysis of our model, we calculate the critical density beyond which the gregarious group forms, and for the final ratio of gregarious to solitarious locusts. We determine these quantities in terms of behavioral parameters at the level of individual locusts, hence connecting individual and group properties. Our model also displays population-level hysteresis, which has implications for locust management.\n\n\n\\section*{Model}\n\n\\subsection*{Model construction}\n\nLocusts in a group are subject to attractive and\/or repulsive forces based on combined sensory, chemical, and mechanical cues that affect their motion. We assume that sensing is directionally isotropic, a reasonable approximation \\cite{ParMar2005} for organisms receiving sensory inputs of a variety of types, although directional models are possible as well \\cite{EftVriLew2007}. Rather than tracking individual locusts, we consider a population density field $\\rho(\\vec{x},t)$ moving at velocity $\\vec v(\\vec x,t)$. Continuum population modeling\n\\cite{KelSeg1971b, Oku1980} allows us to apply analytical tools in order to characterize swarm formation and structure. Our work draws from classic swarm modeling in which a conserved population density field $\\rho$ moves at a velocity $\\vec v$ that arises from social interactions:\n\\label{eq:social}\n\\begin{equation}\n\\rho_t + \\nabla \\cdot (\\rho \\vec{v}) = 0. \\label{eq:sociala}\n\\end{equation}\nThis is the well-known mass balance equation that tracks individuals moving collectively at velocity $\\vec{v}$. It is typically assumed that individuals can sense the population density nearby, and that this sensing gives rise to attractive-repulsive social forces $\\vec{F}$, or alternatively, social potentials $Q$ (the negative gradients of which are forces). Within this context, the contribution $\\rho(\\vec{x}',t)$ of a small clump of individuals at location $\\vec{x}'$ to the force on the individual at position $\\vec{x}$ is given by $\\vec{F}(\\vec{x}-\\vec{x}') \\rho (\\vec{x},'t) = -\\nabla Q (\\vec{x}-\\vec{x}') \\rho(\\vec{x}',t)$. The corresponding velocity is proportional to the forces exerted by neighbors at all spatial locations, so that $\\vec{v}(\\vec{x},t)$ is given by integration over all $\\vec{x}'$ as\n\\begin{equation}\n\\vec{v}(\\vec{x},t) = -\n\\int_\\Omega {\\nabla Q}(\\vec{x}- \\vec{x}') \\rho (\\vec{x}',t)\\,\nd\\vec{x}'. \\label{eq:socialb}\n\\end{equation}\nThe expression for the velocity $\\vec v(\\vec{x},t)$ in Eqn.~\\eqref{eq:socialb} is a convolution of the density $\\rho(\\vec x,t)$ and the social interaction force $-\\nabla Q(\\vec x - \\vec x')$, which describes the influence of the locust population at location $\\vec{x'}$ on that at location $\\vec{x}$. This is a common formulation of so-called \\emph{nonlocal} interaction models \\cite{MogEde1999,TopBerLew2006,LevTopBer2009,BerTop2011}, which capture interactions that are spatially distributed, in contrast to pure partial differential equations, which include only local terms such as derivatives and gradients, and which describe interactions only over infinitesimal ranges. Nonlocal aggregation models have been studied for various social interactions $Q$; known solutions include steady swarms, spreading populations, and contracting groups. We use the notation $\\vec v = - \\nabla Q * \\rho$ to denote the convolution in Eqn.\\,\\eqref{eq:socialb}. We assume that $Q (\\vec x - \\vec x')$ is radially symmetric and depends only on the distance between $\\vec x$ and $\\vec x'$. The detailed forms of $Q$ in the case of solitarious and gregarious locusts will be described later.\n\nTo adapt Eqs.\\,\\eqref{eq:sociala} and \\eqref{eq:socialb} to biphasic insects, we introduce separate density fields for solitarious and gregarious locusts, $s(\\vec{x},t)$ and $g(\\vec{x},t)$, respectively, and the total local density $\\rho = s+g$. With marching locusts in mind, we consider a two-dimensional geometry, with $\\Omega$ representing the spatial domain and $\\vec{x}= (x,y)$ as spatial coordinates. We now include the phase transitions between solitarious and gregarious locusts. To do so, we define two density-dependent functions, $f_1(\\rho)$ for the the rate of gregarious-to-solitarious transition, and $f_2(\\rho)$ for the rate of solitarious-to-gregarious transition. Our model thus reads\n\\begin{subequations}\n\\label{eq:ge}\n\\begin{alignat}{4}\n\\dot{s} &+ \\nabla \\cdot (\\vec{v}_s s) &= -f_2(\\rho)s &+ f_1(\\rho)g, \\\\\n\\label{eq:ge2}\n\\dot{g} &+ \\nabla \\cdot (\\vec{v}_g g) &= \\phantom{-}f_2(\\rho)s &-\nf_1(\\rho)g, \n\\end{alignat}\n\\end{subequations}\nwhere the velocities are given by\n\\begin{equation}\n\\label{eq:v}\n\\vec{v}_s = -\\nabla(Q_s * \\rho), \\quad \\vec{v}_g = -\\nabla(Q_g * \\rho).\n\\end{equation}\nThese equations are complete once we specify the solitarious and gregarious social interactions $Q_{s,g}$ and the density-dependent conversion rates $f_{1,2}$. Since solitarious locusts are crowd-avoiding, we take $Q_s$ to be purely repulsive. Gregarious locusts, on the other hand, are attracted to others, except for short-distance repulsion due to excluded volume effects. Hence, we model $Q_s$ and $Q_g$ as\n\\begin{equation}\n\\label{eq:Q}\nQ_s(\\vec{x}-\\vec{x}') = R_s \\exp{-|\\vec{x}-\\vec{x}'|\/r_s}, \\quad Q_g(\\vec{x}-\\vec{x}') = R_g\n\\exp{-|\\vec{x}-\\vec{x}'|\/r_g} - A_g \\exp{-|\\vec{x}-\\vec{x}'|\/a_g},\n\\end{equation}\nwhere $R_s, R_g, A_g$ are interaction amplitudes that determine the strengths of attraction and repulsion, and $r_s, r_g$ and\n$a_g$ are interaction length scales that represent typical distances over which one locust can sense and respond to another.\n\nThe above forms of $Q_{s,g}$ describe social interactions that decay exponentially away with distance from the sensing individual and are chosen to be isotropic for simplicity. As evident from Eqn.\\,\\eqref{eq:Q}, $Q_s$ is purely repulsive for all choices of $R_s$ and $r_s$. On the other hand, $Q_g$ is the difference of two exponentials, implying that there may be a distance at which repulsion and attraction balance, resulting in no net contribution to the velocity. The location of this balance point can be obtained by imposing $-\\nabla Q_g = 0$ to obtain the critical distance\n\\begin{equation}\nd = \\frac{a_g r_g}{a_g - r_g} \\ln \\left( \\frac{R_g a_g}{A_g r_g} \\right).\n\\end{equation}\nDepending on the choice of social interaction parameters, the expression for $d$ may yield unphysical results such as negative distances. The distance $d$ also pertains only to two isolated locations $\\vec{x}$ and $\\vec{x}'$ and does not capture population-level features. Even for meaningful values of $d$, a collection of individuals interacting under $Q_g$ may disperse, aggregate, or clump. It is thus important to choose the appropriate parameter ranges for $a_g$, $r_g$, $A_g$ and $R_g$ so that the tendency of gregarious locusts to aggregate is modeled properly. Mathematical studies have shown that in order for cohesiveness to occur, the parameters in $Q_g$ must lie in a particular regime that leads to clumping \\cite{DOrChuBer2006}. Thus, we require $R_g a_g - A_g r_g > 0$ so that repulsion dominates at short length scales, and $A_g a_g^2 - R_g r_g^2>0$ so that attraction dominates at longer ones. Taken together, these conditions guarantee a meaningful critical distance $d$ and macroscopic clumping behavior. We assume these conditions to hold for the remainder of this paper.\n\nIt remains to specify how density affects transitions from one phase to another. We call upon the biological observation that at higher densities, gregarization proceeds more quickly and solitarization more slowly. We model the phase conversion rates with the rational functions\n\\begin{equation}\n\\label{eq:rates}\nf_1(\\rho) = \\frac{\\delta_1}{1+ \\left( \\rho\/k_1 \\right)^2}, \\quad\nf_2(\\rho) = \\frac{\\delta_2 \\left( \\rho\/k_2 \\right)^2}{1+ \\left(\n \\rho\/k_2 \\right)^2}.\n\\end{equation}\n The parameters $\\delta_{1,2}$ are maximal phase transition rates and $k_{1,2}$ are characteristic locust densities at which $f_{1,2}$ take on half of their maximal values. Note that $f_1$ decreases with $\\rho$, capturing the inverse relationship between solitarization rate\nand density, while $f_2$ increases with $\\rho$ and saturates at $\\delta_2$, describing speedier gregarization at higher densities.\n\nOur complete model consists of Eqs.\\,\\eqref{eq:ge}-\\eqref{eq:rates} together with initial conditions specifying $s(\\vec{x},0)$ and\n$g(\\vec{x},0)$. We consider a spatially periodic domain, which simplifies both numerical simulation and mathematical analysis. In certain laboratory studies using ring-shaped arenas, such boundaries are natural (while being less ideal for comparison with field studies) \\cite{BuhSumCou2006}. We do not include locust reproduction or death as these occur on much longer time scales than phase change.\n\nThe model presented here is a general one containing some fundamental elements of locust dynamics. This work can be readily modified and extended to include details pertaining to different locust species, interactions with the surrounding environment, locust reproduction, and more. For instance, in our model, we have not explicitly accounted for the differing activity levels of solitarious and gregarious individuals \\cite{PenSim2009}. Additionally, while gregarization is relatively fast for \\emph{Schistocerca gregaria}, full solitarization may occur only after several generations of locusts. The phase conversions of \\emph{Chortoicetes terminifera}, on the other hand, are characterized by similar timescales for the two phase conversions, so that both gregarization and solitarization occur rapidly within the lifetime of a single locust individual \\cite{GraSwoAns2009}. On another note, vegetation or waterway patterns may impose spatial inhomogeneities such as non-uniform initial distributions of solitarious locusts, or attraction to preferred sites. Preexisting models in the literature have pointed out the important link between the spatial distribution of vegetation, as well as nutritional quality, on locust clustering, gregarization, and swarming \\cite{ColDesSim1998,DesColSim2000,DesSim2000b,DesSim2000}. All of these elements could be used to refine our model for predictive purposes. However, as the first work in the continuum modeling of locust population phase change, ours begins with the fundamental model contained in Eqs.\\,\\eqref{eq:ge}-\\eqref{eq:rates}. Our model is complementary to the preexisting ones in that we focus on how inherent inter-individual interactions can lead to gregarization and swarming, even in a spatially homogeneous environment. Multi-generational dynamics, differential activity levels, resource distribution, and related factors could be considered as possible extensions of our work.\n\n\\subsection*{Parameter selection}\n\nSome of our results are analytical formulas, which may be evaluated for any desired parameter values. Other results depend on numerical computations, and these require specific choices of parameters. For these results, we consider two different sets of phase transition parameters. (1) Most of our numerical results have been obtained using our \\emph{default set} of parameters, based on estimates from the biological literature. Specifically we take $\\delta_{1,2} = \\delta = 0.25\\ hr^{-1}$, corresponding to a gregarization time scale of approximately $1\/\\delta = 4\\ hr$ for desert locusts (for whom some -- but not total -- solitarization occurs on the same time scale) \\cite{SimDesHag2001,PenSim2009}. We also take $k_{1,2}=k = 65\\ locusts\/m^2$, since for desert locusts, the critical density for the onset of collective motion is $50\\ \\mbox{-}\\ 80\\ locusts\/m^2$ \\cite{BazRomTho2011}. We will allow for some deviation from $\\delta_1 = \\delta_2$ and $k_1 = k_2$ via a parameter sensitivity analysis. (2) To examine situations with large differences in the rates of gregarization and solitarization, we consider an \\emph{alternative set} of parameters with $\\delta_1 = 0.025\\ hr^{-1}$ and $\\delta_2 = 0.25\\ hr^{-1}$, so that gregarization is an order of magnitude faster that solitarization. We take $k_1 = 20\\ locusts\/m^2$ and $k_2 = 65\\ locusts\/m^2$ to model a gregarious-to-solitarious transition that occurs at a higher density threshold than the solitarious-to-gregarious transition.\n\nWe use the same social interaction parameters for all results (variations from this set are accounted for by a sensitivity analysis). To estimate the social interaction length scale parameters in Eqs.\\,\\eqref{eq:Q}, we apply the results of \\cite{BuhSumCou2006,BazRomTho2011}, which identify the ``sensing range'' of a desert locust as $0.14\\ m$, and the ``repulsion range'' as $0.04\\ m$, close to the approximately $0.05\\ m$ body length of a desert locust at the fifth instar of its development. For the gregarious phase we thus set the repulsion length scale at $r_g = 0.04\\ m$ and the attractive one at $a_g = 0.14\\ m$, corresponding to the experimental sensing range. These choices agree with theoretical studies showing that for cohesive swarms, attraction occurs over longer length scales than repulsion \\cite{MogEde1999,MogEdeBen2003}. We also assume that solitarious locusts are repelled from others at their sensing range, so that $r_s = 0.14\\ m$. These choices satisfy $r_g < a_g = r_s$ which is assumed for the remainder of this paper.\n\nFinally, we estimate $R_s$, $R_g$, and $A_g$ via explicit velocity computations. The speed of a locust when it is alone varies between $72\\ \\mbox{-}\\ 216\\ m\/hr$, depending on diet \\cite{BazRomTho2011}. At the upper end, this is roughly one body length per second. When it is moving in a group, the individual's speed varies in a tighter range of $144\\ \\mbox{-}\\ 216\\ m\/hr$ \\cite{BazRomTho2011}. In making our phase-dependent velocity estimates, we interpreted the ``moving alone'' and ``moving in a group'' data as typical to solitarious and gregarious locusts, respectively. Using these biological measurements and Eqn.\\,\\eqref{eq:v}, we find $R_s = 11.87\\ m^3\/(hr \\cdot locust)$, $R_g = 5.13\\ m^3\/(hr\\cdot locust)$, and $A_g = 13.33\\ m^3\/(hr\\cdot locust)$. Details are given in Text S1. Our choices of social interaction parameters satisfy conditions mentioned in the previous section, namely $R_g a_g - A_g r_g > 0$, and $A_g a_g^2 - R_g r_g^2>0$ so that gregarious insects will clump.\n\nMost of our parameter choices have been inferred or estimated from published laboratory experiments. It is possible however, that in the field, some parameter values may be quite different from the ones we have used. For instance, locusts in the field may pause while marching to perch on the vegetation, giving rise to an effective speed that is lower than what measured in lab experiments, where perching does not occur. It is also noteworthy that gregarious locusts are more active than solitarious locusts, a fact that is reflected by our method of choosing $R_s, R_g, A_g$ from estimates of the velocities of individuals when moving alone and in a group. As we describe below, we analyze our model varying all parameters within reasonable bounds: our results are qualitatively the same.\n\n\\section*{Results}\n\nWe first determine the simplest solutions to the model, namely those for which the densities of gregarious and solitarious locusts are in a spatially uniform steady state. We probe the stability of that uniform state using linear stability analysis (LSA), a calculation that addresses whether small, spatially nonuniform perturbations grow or decay. This is equivalent to determining the signs of eigenvalues of the linearized system, where positive (negative) eigenvalues imply growing (decaying) perturbations. The rate of initial growth\/decay depends on the wavenumber of the perturbation. The growing perturbations can be interpreted in terms of nascent aggregates of locusts, and the wave numbers as the number of aggregates per unit area. The analysis provides a condition for the onset of aggregation, namely the emergence of positive eigenvalues of the linearized model. In our case, this aggregation condition is shown below in Eqn.\\,\\eqref{eq:cond2}. LSA cannot, in general, predict the ensuing dynamics once perturbations have grown to a large size. Further analysis uses an approximation to eliminate the spatial dependence of the model, which enables an analytical prediction of the proportion of solitarious and gregarious locusts on a longer time scale. To visualize the dynamics of aggregation, we perform numerical simulations in one spatial dimension using the linear stability analysis to identify regimes of interesting behavior. The model displays population-level hysteresis.\n\n\\subsection*{Homogeneous steady states}\n\nThe solitarious $s_0$ and gregarious $g_0$ homogeneous steady-state (HSS) solutions of Eqn.\\,\\eqref{eq:ge} can be written in terms of the total uniform density $\\rho_0$, which is simply the mean value of $\\rho$ for a specified initial condition. The full expressions for $s_0$ and $g_0$ in terms of $\\rho_0$ appear in Text S1; in the small $\\rho_0$ limit these are approximately\n\\begin{equation}\ns_0 \\approx \\rho_0 - \\frac{\\delta_2}{\\delta_1 k_2^2} \\rho_0^3, \\quad\ng_0 \\approx \\frac{\\delta_2}{\\delta_1 k_2^2} \\rho_0^3,\n\\end{equation}\nwhile in the limit of large $\\rho_0$ we find \n\\begin{equation}\ns_0 \\approx \\frac{\\delta_1 k_1^2}{\\delta_2 \\rho_0}, \\quad g_0 \\approx \n\\rho_0 -\\frac{\\delta_1 k_1^2}{\\delta_2 \\rho_0}.\n\\end{equation}\nThe low density HSS is thus composed mostly of solitarious locusts and vice versa for the high-density case, showing the non-monotonicity of $s_0$ with respect to total density $\\rho_0$. In Fig.\\,\\ref{fig:steadystate}(A) we plot the HSS $s_0$ (middle solid blue curve) and $g_0$ (middle broken green curve) for our default set of phase change parameters, $k = 65\\ locusts\/m^2$ and $\\delta = 0.25\\ hr^{-1}$.\n\nAs shown, $s_0$ initially increases with $\\rho_0$. At a critical density $\\rho_*$, $s_0$ reaches a maximum, whereas $g_0$ keeps increasing monotonically. Fig.\\,\\ref{fig:steadystate}(B) shows a blow-up of the region near $\\rho_*$. For our default parameters, the maximum value $s_0^{\\rm max}$ is attained at $\\rho_* =k$, the same density value for which solitarious and gregarious densities coincide so that $s_0^{\\rm max} = s_0(\\rho_*) = g_0(\\rho_*) = k\/2$. However, this feature is a result of our choice $k_1=k_2$ and $\\delta_1=\\delta_2$. In general, the point of maximum solitarious density and the point of equal solitarious and gregarious density do not coincide, as is directly deducible from the full expressions for $s_0$ and $g_0$ in Text S1. To give a sense of detuning from our parameter estimates, we also calculate and plot $s_0$ and $g_0$ for parameter sets chosen randomly from uniform distributions\ncentered at our estimated default set of values for $\\{ \\delta_1, \\delta_2, k_1, k_2\\}$. The bottom and top curve in each set show the 25th and 75th percentile values.\n\nWe also study a much more general case where $ \\delta_1 \\ne \\delta_2, k_1 \\ne k_2 $, in keeping with the distinct rates of transition and critical transition densities seen biologically. As an alternative way to understand the HSS solutions, we consider the fractions $\\phi_{s,g}$ of solitarious and gregarious locusts, where $\\phi_s + \\phi_g = 1$. As shown in Text S1, for the HSS,\n\\begin{equation}\n\\label{eq:phigrho}\n\\phi_g = \\biggl\\{1 + \\gamma K^2 \\frac{1+\\psi^2}{\\psi^2(\\psi^2+K^2)}\\biggr\\}^{-1}.\n\\end{equation}\nHere, $\\gamma = \\delta_1\/\\delta_2$ is the ratio of maximal solitarization rate to maximal gregarization rate, $K = k_1\/k_2$ is the ratio of the characteristic solitarization and gregarization densities for individuals, and $\\psi = \\rho_0\/k_2$ is a rescaled spatially homogeneous density. The gregarious fraction $\\phi_g$ is monotonically increasing in $\\psi$, and hence in $\\rho_0$; that is to say, as total density increases, the gregarious fraction increases. For small $\\rho_0$, $\\phi_g \\approx 0$, but as $\\rho_0$ increases, there is a crossover between solitarious and gregarious populations. Uniformly spread solitarious populations cannot be sustained when the density is too high: the gregarious state will necessarily become the dominant one.\n\n\\subsection*{Linear stability analysis}\n\nTo determine conditions under which a nearly uniformly spread locust population aggregates or disperses, we study the linear stability of the HSS (details appear in Text S1). The calculation is a standard but somewhat tedious exercise. In nonlocal systems such as ours, linear stability results depend on the Fourier transforms $\\widehat{Q}_{s,g}(q)$ of the interaction potentials $Q_{s,g}$. For our locust model, the stability of the HSS depends on the eigenvalue\n\\begin{equation}\n\\label{eq:lambda1}\n\\lambda_1(q) = -q^2 \\left[s_0 \\widehat{Q}_s(q) + \ng_0 \\widehat{Q}_g(q)\\right],\n\\end{equation}\nwhere $q = |\\vec{q}|$ is the perturbation wave number and the Fourier transforms $\\widehat{Q}_{s,g}(q)$ in two dimensions are\n\\begin{eqnarray}\n\\label{eq:qhats}\n\\widehat{Q}_s(q)& =& \\frac{2 \\pi R_s r_s^2}{(1+r_s^2 q^2)^{3\/2}}, \\\\\n\\widehat{Q}_g(q) & = & \\frac{2 \\pi R_g r_g^2}{(1+r_g^2q^2)^{3\/2}}-\n\\frac{2 \\pi A_g a_g^2}{(1+a_g^2 q^2)^{3\/2}}.\n\\end{eqnarray}\nObserve that the eigenvalue $\\lambda_1(q)$ depends on all of the individual-based parameters governing rates of phase change (via $s_0$ and $g_0$) and all of the social interaction amplitudes and length sensing length scales. The HSS derived in the previous section is stable to small perturbations if $\\lambda_1(q)<0$ for all $q$. If $\\lambda_1(q) > 0$ for some $q$, then the HSS is unstable to perturbations of those wave numbers. \n\nOur full analysis of this eigenvalue appears in Text S1. We formulate the instability condition in terms of $\\phi_g$,\n\\begin{equation}\n\\label{eq:cond2}\n\\phi_g > \\phi_g^* = \\frac{R_s r_s^2}{R_s r_s^2 - R_g r_g^2 + A_g a_g^2}.\n\\end{equation}\nIf this condition is satisfied, initially small perturbations from the uniform steady state will grow. This inequality is a key result, and implies that if a sufficiently large fraction of the population is gregarious, the HSS solution is unstable. To obtain a more explicit condition in terms of the density $\\rho_0$, one must substitute $\\phi_g^*$ into Eqn.\\,\\eqref{eq:phigrho}, which relates gregarious fraction to total (scaled) density. One may then calculate the critical density $\\rho_0$ above which the HSS is unstable. Since $\\phi_g$ and $\\rho_0$ are monotonically related, we conclude that the HSS solution is unstable for sufficiently dense populations. The algebra is tedious, and relegated to Text S1. Instead, we present a contour plot in Fig.\\,\\ref{fig:linstab} which succinctly illustrates the stability features of the HSS. The phase change parameter ratios $\\gamma = \\delta_1\/\\delta_2$ and $K = k_1\/k_2$ vary along the horizontal and vertical axes and the contours indicate the critical value of rescaled density $\\psi^* = \\rho_0^*\/k_2$. For scaled densities greater than $\\psi^*$, the HSS solution is unstable. The critical scaled density is monotonically increasing in both $\\gamma$ and $K$. (Note that for an accurate biological interpretation, one must multiply $\\psi^*$ by $k_2$ in order to obtain the unscaled critical density $\\rho_0^*$.)\n\nUpon inserting our default parameters in Eqn.\\,\\eqref{eq:cond2} we find that the homogeneous solution is unstable for $\\rho_0 > \\rho_0^* = 62.3\\ locusts\/m^2$. This value corresponds to the left border of the grey region in Fig.\\,\\ref{fig:steadystate}. For $\\rho_0 > \\rho_0^*$, to the right of the border, we expect the onset of a locust hopper band, \\emph{i.e.},~formation of patches of high locust density that\ncan seed the clustering and gregarization of other locusts. In Fig.\\,\\ref{fig:steadystate}, linear instability can occur even at densities $\\rho_0$ for which $s_0$ exceeds $g_0$ for our chosen parameters (represented by the center solid blue and center broken green curves). This result implies that the onset of instability leading to mass gregarization can take place even if solitarious locusts initially outnumber gregarious ones. We will later discuss mass gregarization in more detail. To visualize detuning from this set of parameters, we include the 25th and 75th percentile values of $\\rho_0^*$ for onset of instability as vertical purple lines; these are again calculated by drawing 10,000 random samples of the parameters $k_{1,2}$, $\\delta_{1,2}$, $R_{s,g}$, $r_{s,g}$, $A_g$, and $a_g$. As seen from Fig.\\,\\ref{fig:steadystate}(b) our conclusions are robust across the randomly chosen parameter sets.\n\nFor our default set of biological parameters, $\\phi_g^* \\approx 0.479$ via Eqn.\\,\\eqref{eq:cond2} and $\\rho_0^*$ turns out to be near $k=k_{1,2}$. We stress that generically, it is not the case that $\\rho_0^*$ needs to be near $k_1$ and\/or $k_2$. For our default parameter set, $K = \\gamma = 1$, in which case $\\psi = 0.959$, so that the critical value $\\rho_0^*$ is 95.9\\% of $k_2$, namely $62.3\\ locusts\/m^2$. However, for different choices of $K$ and $\\gamma$, drastically different outcomes are possible. For instance, for our alternative parameter set where $K \\approx 1\/3$ and $\\gamma = 1\/10$, the critical density is $\\rho_0^* = 15.9\\ locusts\/m^2$, which is quite disparate from the individual gregarization density of $65\\ locusts\/m^2$, and is also less than the solitarization density of $20\\ locusts\/m^2$. Furthermore, for different choices of the social interaction parameters entering into Eqn.\\,\\eqref{eq:cond2}, it is possible to obtain a critical gregarious fraction $\\phi_g^*$ that is much less than 1\/2, meaning that instability and clumping can occur even with just a few gregarious insects.\n\nFor $\\rho_0> \\rho_0^*$, we can also find the wave number $q_{\\rm max}$ corresponding to the most rapidly growing perturbation. Fig.~\\ref{fig:stability} shows $q_{\\rm max}$ for our chosen parameters (center curve) as well as the 25th and 75th percentile values over the 10,000 random parameter draws. The most unstable wave number $q_{\\rm max}$ grows rapidly as a function of $\\rho_0$ and then saturates at $q_{\\rm max} \\approx 8.89\\ m^{-1}$, corresponding to a length scale $2 \\pi \/ q_{\\rm max} \\approx 0.71\\ m$ and indicating that the most quickly growing perturbations occur on the length scale of a few locust bodies.\n\nOur linear stability analysis describes the behavior of small perturbations of uniform steady states, and is not expected to predict long-term or large-amplitude dynamics. For large perturbations, linear analysis is void. Additionally, even to analyze small perturbations of states other than uniform steady states, a different analysis would be needed.\n\n\\subsection*{Numerical simulation}\n\nTo illustrate the swarm dynamics described by Eqn.\\,\\eqref{eq:ge}, we simulate the model on a one-dimensional periodic domain of length $L=3\\ m$ for a total population of $M=50$ locusts. Periodicity of the domain is an important aspect of a robust numerical platform devised for these simulations: we exploit the fact that convolutions $Q*\\rho$ are easy to compute in Fourier space (where they are simply products, \\emph{i.e.}, ${\\hat Q} \\cdot {\\hat\\rho}$), which significantly reduces the computational overhead. Computational issues associated with such convolutions also restrict us to one-dimensional simulations at present. At $t=0$ all locusts are solitarious and are randomly perturbed from the uniform density $s = M\/L$, where $M$ is the total population mass\n\\begin{equation}\nM = \\int_\\Omega \\rho\\,d\\vec{x}.\n\\end{equation}\nWe adjust some parameters so as to adapt our model to the one-dimensional case. Specifically, one must take square roots of $k_{1,2}$ in order to collapse densities in a square to densities along a line segment. Consequently, for our default parameter set we choose $k_{1,2}=k=8\\ locusts\/m$ and $\\delta_{1,2}=\\delta = 0.25\\ hr^{-1}$, whereas for the alternative set we use $k_1 = 4.5\\ locusts\/m$, $k_2 = 8\\ locusts\/m$, $\\delta_1 = 0.025\\ hr^{-1}$ and $\\delta_2 = 0.25\\ hr^{-1}$. In both cases we take the interaction amplitudes $R_s = 6.83\\ m^2\/(hr \\cdot locust)$, $R_g = 6.04\\ m^2\/(hr \\cdot locust)$, and $A_g = 12.9\\ m^2\/(hr \\cdot locust)$, which have also been adapted from their original values to the one-dimensional case. The interaction length scales $r_s$, $r_g$, and $a_g$ are the same as for the two-dimensional case. Details of the numerical method and the parameter choices appear in Text S1.\n\nResults are shown in Fig.\\,\\ref{fig:snapshots} for the default parameter set and in Fig.\\,\\ref{fig:snapshotsNEW} for the alternative set. In each case, the snapshots show $s(x,t)$ (dashed blue curve) and $g(x,t)$ (solid green curve) at selected times. Starting from the randomized solitarious state at $t=0\\ hr$, locusts rapidly redistribute to a roughly spatially uniform density until $t \\approx 3\\ hr$. Tiny variations are present but not visible on the scales of these figures. Gregarization and subsequent rapid spatial segregation follow. In Fig.\\,\\ref{fig:snapshots}, between $t \\approx 3.42\\ hr$ and $t \\approx 3.47\\ hr$, two compactly supported clumps of gregarious locusts emerge, superposed on a background of sparse, solitarious individuals. A similar transition occurs between $t \\approx 3.15\\ hr$ and $t \\approx 3.17\\ hr$ in Fig.\\,\\ref{fig:snapshotsNEW}, but for these parameter values, we find initial clustering with three, rather than two density peaks. The number (or alternatively, length scale) of transient clumps that form appears to be selected dynamically. This intermediate dynamical selection process and the coarsening that ensues are avenues for future numerical and analytical investigation. In each example, the disjoint clusters quickly merge due to the long-range attraction of gregarious individuals. A single remaining pulse is formed by $t\\approx 3.49\\ hr$ in both cases and travels until $t \\approx 6.5\\ hr$, at which time the majority, but not all, of the solitarious locusts have transitioned to the gregarious form. Gregarization continues during the subsequent hours, albeit at a slower rate. For both figures, the gregarization of the final clump continues slowly, approaching an equilibrium at exponentially long times.\n\nTo study the locust gregarization process further, we define the total mass of solitarious and gregarious locusts, $S$ and $G$, as\n\\begin{equation}\nS = \\int_{\\Omega} s\\,d\\vec{x}, \\quad G = \\int_{\\Omega} g\\,d\\vec{x},\n\\label{WasEq29}\n\\end{equation}\nso that the total population mass is $M = S+G$. We also define the mass fractions\n\\begin{equation}\n\\label{eq:whsg}\n\\phi_s = S\/M, \\quad \\phi_g = G\/M, \\quad \\phi_s + \\phi_g = 1,\n\\end{equation}\nwhich we before calculated for HSS solutions, but we now generalize for spatially varying states. These quantities will be useful to further our mathematical analysis. Fig.\\,\\ref{fig:massfrac} shows $\\phi_s(t)$ (blue curve) and $\\phi_g(t)$ (green curve) as arising from the numerical simulations depicted in Fig.\\,\\ref{fig:snapshots} and Fig.\\,\\ref{fig:snapshotsNEW}. Several distinct regimes are visible, and we discuss these below.\n\n\\subsection*{Spatially-homogeneous and spatially-segregated bulk theories}\n\nAs visible in the second and third panels of Fig.\\,\\ref{fig:snapshots} and Fig.\\,\\ref{fig:snapshotsNEW}, the early-time dynamics of Eqs.\\ \\eqref{eq:ge} are approximately spatially homogeneous. As a result, spatially-dependent terms in Eqs.\\ \\eqref{eq:ge} are negligible, $\\rho$ is approximately constant, and hence the governing equations are linear ordinary differential equations (ODEs) that are easily solved. We write the solution of these ODEs in terms of the mass fractions $\\phi_{s,g}$,\n\\begin{equation}\n\\label{eq:homogeneousdynamics}\n\\phi_g(t) = \\frac{f_2(\\rho_0)}{f_1(\\rho_0)+f_2(\\rho_0)} \\left\\{1 - \\exp{-[f_1(\\rho_0)+f_2(\\rho_0)]t}\\right\\}, \\quad \\phi_s(t) = 1 - \\phi_g(t),\n\\end{equation}\nwhere we have used the initial condition $\\phi_s(t=0) = 1$. This analytical solution is plotted in Fig.\\,\\ref{fig:massfrac} as a dotted line, and agrees closely with the numerical results for the first few hours.\n\nIn the later panels of Fig.\\,\\ref{fig:snapshots} and Fig.\\,\\ref{fig:snapshotsNEW}, gregarious and solitarious locusts spatially segregate into areas with disjoint support. This means that in each distinct region, $\\rho(x,t) \\approx s(x, t)$ or $\\rho(x,t) \\approx g(x, t)$. We thus consider a \\emph{bulk} model reduction to study the dynamics of the two non-overlapping solitarious and gregarious populations. In particular, we assume that solitarious locusts are spread throughout most of the domain $\\Omega$, covering an area denoted $\\alpha_s$, whereas gregarious locusts are confined to a region with area $\\alpha_g$. Within these areas, local densities are approximately $S\/\\alpha_s$ and $g = G\/\\alpha_g$. By integrating Eqs.\\ \\eqref{eq:ge} over the domain and assuming that $s$ and $g$ are approximately constant in their support, we obtain\n\\begin{equation}\n\\label{BulkModelEqs}\n\\frac{d\\phi_s}{dt} = - \\frac{c_1\\phi_s^3}{1+c_2\\phi_s^2} \n+ \\frac{c_3 \\phi_g}{1+c_4 \\phi_g^2} = -\n\\frac{d\\phi_g}{dt},\n\\end{equation}\nwhere\n\\begin{equation}\nc_1 = \\frac{\\delta_2 M^2}{\\alpha_s^2 k_2^2} , \\quad c_2 =\n\\frac{M^2}{\\alpha_s^2 k_2^2}, \\quad c_3 = \\delta_1, \\quad c_4 =\n\\frac{M^2}{\\alpha_g^2 k_1^2}.\n\\end{equation}\nThe numerical solution of these ODEs (dashed lines in Fig.\\,\\ref{fig:massfrac}) agrees closely with the late time full-scale numerical simulation results, where we use values of $\\alpha_{s,g}$ measured empirically from the terminal equilibrium. One can reduce Eqn.\\,\\eqref{BulkModelEqs} to a single nonlinear ODE using $\\phi_s=1-\\phi_g$, though this equation is not amenable to analytical solution. Since we are interested in the large population limit for which we expect potential large scale gregarization, we instead study Eqs.\\,\\eqref{BulkModelEqs} for large $M$. In this case, to leading order in $M$, the bulk model reduces to\n\\begin{equation}\n\\label{BulkModelLargeM}\n \\dot{\\phi_s} = - \\delta_2 \\phi_s + \\frac{c_3 }{c_4 \\phi_g} = \n- \\dot{\\phi_g}. \n\\end{equation}\nGiven the expressions for $c_{3,4}$ and the fact that $\\phi_s, \\phi_g \\le 1$, the first term is $O(1)$ whereas the second one is much\nsmaller, $O(1\/M^2)$. For large $M$ then, and to leading order, $\\phi_s$ decays exponentially in time with rate $\\delta_2$. This result is based on the assumption of a segregated state, and thus would be expected to occur only once segregation is nearly complete.\n\nSince for large $M$ (nearly) the entire population will eventually become gregarious, the critical density $\\rho_0^*$ is a crucial result. If the population is in the stable regime (where $\\rho_0 < \\rho_0^*$) then mass gregarization can be avoided and solitarious and gregarious locusts can coexist as uniformly spread populations. However, as soon as the population shifts beyond the border of stability (where $\\rho_0 > \\rho_0^*$) the group gregarizes and the onset of a locust hopper band is inevitable.\n\n\\subsection*{Phase change and hysteresis}\n\nThe biological literature discusses the importance of \\emph{hysteresis} in locust phase change, as reviewed, for instance, in \\cite{PenSim2009}. It is important to disambiguate the possible meanings and interpretations of phase change hysteresis, to place this phenomenon within the context of our model, and most especially, to distinguish between hysteretic features at the individual and population levels.\n\nOne type of hysteresis is simply defined as ``rates of gregarization [that] differ from rates of solitarization'' \\cite{PenSim2009}. Within our model, this type of hysteresis may be interpreted as cases where $\\delta_1 \\neq \\delta_2$ or $k_1 \\neq k_2$. Our results thus far have accounted for this type of hysteresis in three ways. First, for our primary parameter set in which $\\delta_1 = \\delta_2$ and $k_1 = k_2$, we have allowed deviations from equality by performing a sensitivity analysis incorporating variations of up to 30\\% from the base parameter values, as represented in the results of Fig.\\,\\ref{fig:steadystate} and Fig.\\,\\ref{fig:stability}. Second, for our alternative parameter set, we have chosen $\\delta_2 = 10 \\delta_1$ and $k_2 \\approx 3 k_1$. And finally, for analytical results such as the homogeneous steady states and their stability, we have obtained analytical formulas into which any values of $\\delta_{1,2}$ and $k_{1,2}$ can be substituted.\n\nAnother interpretation of hysteresis relates to ``solitarization [having] two phases: an initial rapid phase and a second, slower phase that requires insects to be maintained in isolation across successive moults -- or generations'' \\cite{PenSim2009}. Our model is constructed on the time-scale of a single generation, and thus we cannot account for this type of hysteresis, which would require a multi-generational model.\n\nFinally, we can consider population-level hysteresis. In the context of our model, this type of hysteresis refers to macroscopic properties of solutions of Eqn.\\,\\eqref{eq:ge} (which are outputs of the model) as opposed to differences in individual-level parameters (which are inputs to the model) as in the first type of hysteresis described above. Numerical results suggest that our model has population-level hysteresis; see Fig.\\,\\ref{fig:hysteresis}. This figure shows the gregarious mass fraction $\\phi_g$ as the average density $\\rho_0$ (total mass $M$ divided by domain length $L$) is varied as a control parameter. All phase change, social interaction, and physical domain parameters are the same as in Fig.\\,\\ref{fig:snapshotsNEW}.\n\nThe solid (dashed) red curve is an analytical result, representing the stable (unstable) HSS solution, as calculated previously via linear stability analysis. For small values of $\\rho_0$, the HSS is stable to small perturbations. If locusts join the initially stable population the average density $\\rho_0$ will increase (assuming a fixed spatial domain), shifting the uniform state to the right along the red curve; as yet no clustering will be evident. Beyond the point labeled with an asterisk, the uniform HSS loses stability and clustering occurs, as previously described. This corresponds to a jump represented by the vertical black arrow. The clustered state (green) is now stable. We next ask what happens if locusts are now removed from the aggregate, which corresponds to a reduction in $\\rho_0$ (moving to the left in Fig.\\,\\ref{fig:hysteresis}). We answer this question numerically, by gradually subtracting mass from the population, allowing the system dynamics to evolve, and plotting the gregarious fraction as a function of mass. As the mass is slowly removed, the solution tracks leftwards along the green curve, indicating the persistence of the gregarious band. In fact, the band persists even partway into the regime where the HSS is linearly stable.\n\nThis dynamically observed hysteresis suggest that (for our model) a gregarious aggregation cannot be eliminated by reducing overall density to a low enough level where the HSS is linearly stable. This result has implications for locust control, as we discuss below.\n\n\n\\section*{Discussion}\n\nIn this paper, we derived, analyzed, and simulated a model for the movement, social interactions, and density-dependent interconversions of the solitarious and gregarious forms of phase polyphenic locusts. The model is based on experimental observations and measurements, parameter values inferred from preexisting work, and basic assumptions about individuals' rules of behavior. We included social exchanges via repulsive and\/or attractive interactions for gregarious and solitarious individuals, and we accounted\nfor phase change with density-dependent transitions, with crowding favoring solitarious-to-gregarious conversions. Our model was formulated in terms of continuum equations, allowing us to apply classical techniques such as linear stability analysis and bulk approximation. Since these methods were applied in two spatial dimensions, our results are relevant to insects aggregating in two dimensional structures such as hopper bands. We also provided example simulations in one spatial dimension as proof of principle, and as an indication of typical dynamics.\n\nOur model explicitly takes into account intrinsic social interactions between individuals, in contrast to pre-existing models that focus on how insects respond to quality and spatial heterogeneity of nutrition or other environmental factors \\cite{ColDesSim1998,BazRomTho2011,DesColSim2000}. These approaches are complementary, showing that both intrinsic and extrinsic factors that affect local densities also affect the gregarization transition.\n\nMany of our results are achieved via mathematical analysis. The power of mathematical analysis is that it creates an explicit connection between individual-level and group-level quantities, \\emph{e.g.}, via the inequality Eqn.\\,\\eqref{eq:cond2}. Once we identify the sensing range and interaction strength parameters in Eqn.\\,\\eqref{eq:Q} which govern individual locust attraction to and repulsion from others, we are able to calculate the critical density beyond which mass gregarization occurs.\n\nBriefly, our results and predictions can be summarized as follows: (1) Locusts exist in a spatially uniform steady state distribution only up to a critical total population density. (2) Beyond this critical density, the uniform distribution can not be maintained, and massively dense gregarious clusters form. (3)~Linear stability analysis allows us to understand how the critical density depends on dimensionless ratios of the biological parameters. This dependence is summarized in Fig.\\,\\ref{fig:linstab}. Our analysis also yields the most unstable cluster spacing (from the wave number of the most unstable modes). (4) Numerical simulations illustrate the rapid transitions that take place once gregarization is initiated. Dense packs of gregarious locusts form and grow, and these move and sweep up solitarious locusts in their vicinity. (5) Via bulk approximation, we find estimates for the long-time mass fraction dynamics of solitarious and gregarious locusts. In the large population limit, the entire population will become gregarious. Bulk theory and simulations agree well, as shown in Fig.\\,\\ref{fig:massfrac}. (6) Our model displays population-level hysteresis, via which the critical density at which a gregarious aggregation forms from a dispersed population can be significantly higher than the density at which a gregarious aggregation would break up, as shown in Fig.\\,\\ref{fig:hysteresis}.\n\nOur results shed light on locust control strategies in two ways. First, given the mass gregarization that takes place past the point of linear instability, the density threshold for this instability is a crucial quantity. In accordance with the idea proposed in \\cite{SwoLecSim2010}, our work identifies a threshold below which populations should be kept in order to avoid a gregarious outbreak (assuming biological parameters are known to a sufficiently accurate degree). Furthermore, we have shown how this population-level property depends on individual-level parameters, finding a nontrivial relationship. Second, the apparent population-level hysteresis shows that dispersing a gregarized band, perhaps by killing individuals with pesticides, is harder than preventing group formation in the first place in that band annihilation requires a significantly lower locust density. In short, hysteresis implies that prevention could be more easily achieved than control.\n\nLike all models, ours has its limitations. We did not include features of the environment such as vegetation, shown to have important influence on local crowding and hence gregarization. Our simplifications lead to mathematical tractability, while limiting the direct biological relevance of the model at present. In the field, locusts encounter patchy vegetation and other environmental influences, and adding such factors to the model would make it more relevant to field experiments. Since we have not explicitly included resource gradients or other environmental cues, we do not here recapitulate the long-range motion of locust bands, but merely their formation and clustering. Including environmental factors constitutes an extension of the current framework. Similarly, simulations in two spatial dimensions are more challenging and remain open for future investigation.\n\nOur work suggests several future biological experiments. First, as always, more accurate knowledge of model inputs would lead to better results. For our model, key inputs include the social interaction parameters, namely the length scales ($r_s$, $r_g$, and $a_g$) and interaction amplitudes ($R_s$, $R_g$, and $A_g$) in Eqn.\\,\\eqref{eq:Q} that we inferred from careful experiments such as those in \\cite{BazRomTho2011}. However, to our knowledge, most of these parameters have not been directly measured in experiments on individuals. Second, we encourage observations of macroscopic group properties that could be compared to outputs of our model. These outputs include densities and sizes of bands. Additional quantitative field measurements along the lines of \\cite{BuhSwoCli2011} could help validate and refine our model. Finally, we can imagine experiments that would probe important aspects of the system dynamics (as opposed to physical properties of the bands themselves). Hopper bands are known to undergo complicated dynamics, including splitting and merging \\cite{Uva1977}. BBC video shows an example of such phenomena in \\emph{Locustana pardalina} bands \\cite{Locustvideo}. More accurate data for the dynamics of wild groups, including times for group formation and distances between merging bands and tributaries, could be compared to clumping time and length scales identified by our model. We are especially curious about experiments in which the critical average density for population-level gregarization and clumping might be probed in a controlled lab experiment, perhaps by slowly adding solitarious individuals into a large arena. Experimental measurements like those we have mentioned here would also motivate future two-dimensional extensions of our model where the streaming dynamics of hopper bands, the effects of the environment, and other stimuli could be more fully explored.\n\n\n\\section*{Acknowledgments}\nThis work was supported by a Wallace Scholarly Activities Grant from Macalester College (to CMT), National Science Foundation Grants DMS-1009633 (to CMT), DMS-1021850 and DMS-0719462 (to MRD), and an NSERC Discovery grant (to LEK). We are grateful to the Mathematical Biosciences Institute where portions of this research were performed. We thank the anonymous referees of this paper, whose feedback helped us tremendously.\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\\label{intro}\n\nIn two previous studies \\cite{labiche_99,pacheco_02}, it has been proposed the same inversion in $^{13}$Be between 2s$_{1\/2}$ and 1p$_{1\/2}$ shells as the one found in $^{11}$Be \\cite{tanihata_85} and $^{10}$Li \\cite{chartier_01}. This assumption has been suggested to obtain a good description of $^{14}$Be two-neutron separation energy. \nIn Ref.\\cite{labiche_99}, a simple pairing model was utilized whereas in Ref.\\cite{pacheco_02} a particle-particle RPA (pp-RPA) approach with the D1S Gogny force \\cite{berger_91,decharge_80} was introduced.\n\nThe present study is an extension of the work of Pacheco and Vinh Mau \\cite{pacheco_02}. It aims at getting additional and essential information on the structure of $^{13}$Be from the study of $^{12}$Be and $^{14}$Be. Recently, several measurements on Beryllium isotopes and especially on their excited states have been performed \\cite{shimoura_03,lecouey_04,simon_04,simon_07,sugimoto_07,kondo,kanungo_10}. These new experimental data associated with our present calculations are important both to assess the validity of the model itself for the description of excited states and to test with more constraints the hypothesis of the inversion between 2s$_{1\/2}$ and 1p$_{1\/2}$ shells in $^{13}$Be. The pp-RPA approach is a three-body model that provides information on $(A-2)$, $A$ and $(A+2)$ nuclei starting from a reference core nucleus with $A$ nucleons. A spherical symmetry is assumed. In the present work, we apply it both to $^{10}$Be and $^{12}$Be cores in order to get consistent information on $^{8-14}$Be isotopes. We use a Wood-Saxon (WS) potential corrected by a phenomenological particle-vibration coupling \\cite{vinhmau_95,labiche_99,pacheco_02} for the neutron-core interaction and the D1S Gogny force to describe the neutron-neutron effective interaction. Moreover, in the previous study of Pacheco and Vinh Mau \\cite{pacheco_02}, the two-body spin-orbit interaction term was neglected in the study of 0$^{+}_{1}$ ground state \\cite{girod_83}. As in the present work we are interested in excited states with different spins and parities, the spin-orbit term is included. \n \nIn this article, results associated with ground state properties of even-even $^{8-14}$Be isotopes as well as their excited spectra and transition probabilities are \npresented. Comparisons with experimental data are also discussed in detail. In Sec.\\ref{ppRPA1}, we briefly introduce the pp-RPA approach and give a few analytical formulas concerning radii and transition probabilities. Sec.\\ref{result10Be} is devoted to results obtained from a $^{10}$Be core. The neutron-$^{10}$Be interaction has been fitted from experiment \\cite{ajzenberg_90} and used to generate the single particle basis. The ability of the model to reproduce the experimental knowledge on $^{10}$Be and $^{12}$Be is demonstrated. In Sec.\\ref{result12Be}, similar analysis with a $^{12}$Be core is presented. As the neutron-$^{12}$Be interaction is not known precisely from experiment, we investigate different scenarii for the neutron-core interaction, constrained by experimental knowledge on $^{12}$Be, $^{13}$Be and $^{14}$Be. Conclusions are given in Sec.\\ref{concl}. \n\n\n\\section{pp-RPA formalism and associated observables}\n\\label{ppRPA1}\n\nThe pp-RPA is a well-known formalism used to study nuclei which can be approximated as a core plus or minus two nucleons. An important property of this approach is its ability to account for two-body correlations in the core nucleus. Different ways of deriving pp-RPA equations can be found in the literature \\cite{ring}. For example,\nthe Green's function method shows that pp-RPA approach introduces in the core ground state contribution of multiparticle-multihole configurations \\cite{mulhall_67}. \n\nIn this part, we recall briefly the standard equations in order to introduce our notations. Starting from a nucleus with $A$ nucleons, the pp-RPA equations describing the \nnuclei with $(A+2)$ and $(A-2)$ nucleons are,\n\\begin{multline}\n \\left(\\Omega -[\\epsilon_{a}+\\epsilon_b]\\right) x_{ab} -\\sum_{kl}\\langle kl|V|\\widetilde{ab}\\rangle x_{kl}\\\\\n -\\sum_{\\kappa \\lambda}\\langle \\kappa \\lambda|V|\\widetilde{ab}\\rangle x_{\\kappa\\lambda} = 0,\\label{rpa1}\n\\end{multline}\n\\begin{multline}\n \\left(\\Omega -[\\epsilon_{\\alpha}+\\epsilon_{\\beta}]\\right)x_{\\alpha \\beta}+\n\\sum_{kl}\\langle kl|V|\\widetilde{\\alpha \\beta}\\rangle x_{kl}\\\\\n +\\sum_{\\kappa \\lambda}\\langle \\kappa \\lambda|V|\\widetilde{\\alpha \\beta}\\rangle x_{\\kappa \\lambda}=0. \\label{rpa2}\n\\end{multline}\nIn Eqs.(\\ref{rpa1}) and (\\ref{rpa2}), the set of $\\epsilon$ are single particle energies determined together with the corresponding wave functions in a given neutron-core potential. The chosen potential is presented in Sec.\\ref{result10Be} (see Eq.(\\ref{ws})). Matrix elements of the two-body interaction $V$ are antisymmetrized. Latin indices stand for unoccupied single particle orbits and greek indices for occupied ones. The quantities $x$ gives the standard two-nucleon amplitudes $X$ and $Y$ for nuclei with $(A+2)$ and $(A-2)$ nucleons, respectively. They read \n\\begin{eqnarray}\nX_{mn}^{(N)}&=&\\langle A+2,N|{\\cal{A}}_{mn}^{\\dagger}|A,\\tilde 0 \\rangle \\label{ee1}, \\\\\nY_{mn}^{(M)}&=&\\langle A-2, M|{\\cal{A}}_{mn}|A,\\tilde 0\\rangle, \\label{ee2}\n\\end{eqnarray}\nwhere $m\\leq n$. The states of $(A+2)$ or $(A-2)$ nuclei are labeled by $N$ or $M$, respectively. The state $|A,\\tilde 0\\rangle$ stands for the correlated \nground state of the core. $|A+2,N\\rangle$ and $|A-2,M\\rangle$ are the states of the $(A+2)$ and $(A-2)$ nuclei, respectively. In Eq.(\\ref{ee1}), the pair creation \noperator ${\\cal{A}}^{\\dagger}$ is defined as \n\\begin{equation}\n{\\cal{A}}_{ab}^{\\dagger}(J,M_J)=\\nu_{ab} \\sum_{m_a,m_b} \\left\\langle j_{a} j_{b} m_{a} m_{b}|J,M_J \\right\\rangle a_{a}^{\\dagger}\na_{b}^{\\dagger}, \\label{aa1}\n\\end{equation}\nwith $a \\leq b$ and $\\nu_{ab}=\\left(1+\\delta_{j_{a}j_{b}}\\right)^{-{1\/2}}$ with the two nucleons in the same spherical j-orbital. The annihilation \noperator ${\\cal{A}}$ in Eq.(\\ref{ee2}) is deduced from Eq.(\\ref{aa1}). These expressions are valid for both occupied and unoccupied states. \\\\\nIn Eqs.(\\ref{rpa1}) and (\\ref{rpa2}), $\\Omega$ is the energy of the state related to $(A+2)$ or $(A-2)$ nucleus taking as reference the $A$ nucleus \nground state energy. Hence, for the $(A+2)$ nucleus,\n\\begin{eqnarray}\nE_{N}(A+2)-E_{0}(A)=\\Omega_{N},\\label{e}\\\\\nX_{ab}^{(N)}=x_{ab}^{(N)}, \\ \\ X_{\\alpha \\beta}^{(N)}=x_{\\alpha\\beta}^{(N)},\n\\end{eqnarray}\nand for the $(A-2)$ nucleus,\n\\begin{eqnarray}\nE_{M}(A-2)-E_{0}(A)=-\\Omega_{M} , \\label{e2}\\\\\nY_{ab}^{(M)}=x_{ab}^{(M)}, \\ \\ Y_{\\alpha \\beta}^{(M)}=x_{\\alpha \\beta}^{(M)}.\n\\end{eqnarray}\nMore details concerning the pp-RPA formalism are given in Appendix \\ref{pprpa}.\\\\\nIn addition to energies and amplitudes, other observables as $rms$ radii and transition probabilities will be discussed in Sec.\\ref{result10Be} and \\ref{result12Be}. \nWe give here the expressions for those two quantities. Details can be found in Appendices \\ref{radius} and \\ref{trans}. Following Ref.\\cite{vinhmau_96}, the $rms$ radius $\\langle \\textbf{r}^{2} \\rangle_{A+2}^{1\/2}$ of the $(A+2)$ system can be expressed in terms of the radius of the core $\\langle \\textbf{r}^{2} \\rangle_{A}^{1\/2}$,\n\\begin{equation}\n\\langle \\textbf{r}^{2}\\rangle_{A+2}={{A}\\over{A+2}}\\langle \\textbf{r}^{2}\\rangle_{A}+\\delta\\langle \\textbf{r}^{2}\\rangle,\n\\label{rms}\n\\end{equation}\nwith\n\\begin{equation}\n\\delta\\langle \\textbf{r}^{2}\\rangle={{1}\\over{A+2}}\\left({{2A}\\over{A+2}}\n\\langle \\boldsymbol{\\lambda}^{2}\\rangle+{{1}\\over{2}}\\langle \\boldsymbol{\\rho}^{2}\\rangle \\right).\n\\label{delta}\n\\end{equation}\nIn Eq.(\\ref{delta}), $\\boldsymbol{\\lambda}$ is the distance between the center-of-mass of the two extra-nucleons and the center-of-mass of the core and $\\boldsymbol{\\rho}$ \nthe distance between the two nucleons, \n\\begin{eqnarray}\n\\boldsymbol{\\lambda}&=&{\\dfrac{1}{2}}(\\textbf{r}_{1}+\\textbf{r}_{2}), \\label{lambda}\\\\\n\\boldsymbol{\\rho}&=&\\textbf{r}_{1}-\\textbf{r}_2, \\label{rho}\n\\end{eqnarray}\nwhere $\\textbf{r}_{1}$ and $\\textbf{r}_{2}$ are the coordinates of the two extra-nucleons relative to the center-of-mass of the core. \n\nThe model assumes an inert core plus two correlated neutrons. Therefore the $B(E1)$ for a transition from the 0$^{+}_{1}$ ground state to the 1$^{-}_{f}$ excited state \nis given by the so-called soft dipole strength \\cite{suzuki_90}, \n\\begin{equation}\nB_{f}(E1)=\\left(\\dfrac{e_{n}}{e}\\right)^{2}\\ \\left|\\langle A+2, 1^{-}_{f}||\\sum_{i=1}^{2} r_{i} Y_{1}(\\omega_{i})||A+2, 0 \\rangle \\right|^2,\n\\end{equation}\nwhere the sum runs over the two extra-neutrons. The contribution to the $E1$ strength comes from only the two extra neutrons with an effective charge,\n\\begin{equation}\n e_{n}=\\dfrac{-Z e}{A+2}, \\label{eff}\n\\end{equation}\nwhere $Z$ is the number of protons in the core. The expression of $B(E1)$ and more general transition probabilities in the pp-RPA formalism are given in Appendix \\ref{trans}. In addition, a simple expression for the sum of $B(E1)$ over all the dipole states can be derived \\cite{esbensen_92},\n \\begin{equation}\n \\sum_f B_{f}(E1)= \\dfrac{3}{\\pi}\\left(\\dfrac{Z}{A+2}\\right)^{2}\\left\\langle \\boldsymbol{\\lambda}^{2} \\right\\rangle,\n \\label{sumrule}\n \\end{equation}\nThis formula is very useful because it provides a constraint between $\\sum_{f}B_{f}(E1)$ and $\\boldsymbol{\\lambda}$: the $E1$ strength extracted from experiment should not exceed the value obtained in the right hand side of Eq.(\\ref{sumrule}), calculated with the experimental value of $\\left\\langle \\boldsymbol{\\lambda}^{2} \\right\\rangle$.\n\n\\section{Description of even-even $^{8-12}$Be from a $^{10}$Be core}\n\\label{result10Be}\n\nIn this part, we study even-even $^{8-12}$Be isotopes using the pp-RPA formalism with a $^{10}$Be core. It is well-established that the pure \nHartree-Fock (HF) approximation fails to reproduce $^{11}$Be properties, in particular the inversion between {1\/2}$^+$ and {1\/2}$^-$ states \\cite{ajzenberg_90}. \nThis inversion is due to the coupling with a low energy 2$^{+}$ collective state of the $^{10}$Be core (E$_{x}$=3.36 MeV) characterized by a strong quadrupole \ntransition probability ($B(E2;$0$^{+}_{1}$ $\\rightarrow$2$^{+}_{1})$=52 e$^{2}$fm$^{4}$) \\cite{ajzenberg_84,vinhmau_95,nunes_02}. A phenomenological correction to the one-body potential, simulating the coupling between the neutron and a phonon of the core, has been proposed in Ref.\\cite{vinhmau_95}. This new one-body potential is written as\n\\begin{equation}\nV_{\\nu}(r)=V_{WS}(r)+\\delta V_{\\nu}(r),\n\\label{ws}\n\\end{equation}\nwith\n\\begin{equation}\n\\delta V_{\\nu}(r)=16 \\ \\ a^{2} \\alpha_{\\nu} \\left(\\dfrac{df(r)}{dr}\\right)^2.\n\\label{pv}\n\\end{equation}\nIn Eq.(\\ref{ws}), V$_{WS}$ is a WS potential including central and spin-orbit parts plus a symmetry \nenergy term accounting for neutron excess. In Eq.(\\ref{pv}), $f(r)$ is the Fermi form factor of the WS potential characterized by \nthe diffuseness $a$. The values of parameters of Ref.\\cite{pacheco_02} have been adopted. \nEigen wave functions of this adopted WS potential contain the effect of the coupling between a neutron and a phonon of the core. \nThey are no longer pure one-particle wave functions but a mixing of one single neutron \nstate coupled to the ground state of the core and of a single neutron state coupled to a phonon of the core. \nIn practice, parameters $\\alpha_{\\nu}$ of Eq.(\\ref{pv}) have been fitted from the experimental spectrum of $^{11}$Be \\cite{ajzenberg_90} \nfor 2s$_{1\/2}$, 1p$_{1\/2}$ and 1d$_{5\/2}$ neutron states and taken equal to zero for the other states. From a technical viewpoint, a 20 fm range box has been used \nto determine eigen wave functions. \n\nIn Table \\ref{table1}, results obtained for ground state properties of $^{10,12}$Be are presented. A good agreement for two neutron separation energies S$_{2n}$ in $^{10}$Be and $^{12}$Be is found. The radius of $^{12}$Be calculated using Eq.(\\ref{rms}) is also well reproduced. Predictions for the mean distances $\\langle\\boldsymbol{\\lambda}^{2}\\rangle^{1\/2}$ and $\\langle \\boldsymbol{\\rho}^{2}\\rangle^{1\/2}$ associated with $\\boldsymbol{\\lambda}$ and \n$\\boldsymbol{\\rho}$, Eqs.(\\ref{lambda}) and (\\ref{rho}), are indicated although no experimental values are yet available. \n\\begin{table}[h!]\n\\caption {Theoretical and experimental values of $S_{2n}$ (MeV) in $^{10}$Be and $^{12}$Be (from Ref.\\cite{audi_03}), $\\langle \\textbf{r}^{2}\\rangle^{1\/2}$ \n(fm), $\\langle \\boldsymbol{\\lambda}^{2}\\rangle^{1\/2}$ (fm) and $\\langle\\boldsymbol{\\rho}^{2}\\rangle_{A+2}^{1\/2}$ (fm) in $^{12}$Be (from Ref.\\cite{ozawa_01}).}\n\\begin{center}\n\\begin{tabular}{cccccc}\n\\hline\n\\hline\n & $S_{2n}$($^{10}$Be) & $S_{2n}$($^{12}$Be) & $\\langle \\textbf{r}^{2}\\rangle_{A+2}^{1\/2}$ & $\\langle\\boldsymbol{\\rho}^{2}\\rangle^{1\/2}$ &$\\langle \\boldsymbol{\\lambda}^{2}\\rangle^{1\/2}$ \\\\\n\\hline\nTheory & 8.49 & 3.62 & 2.76 & 4.89 & 4.10 \\\\\n\\hline\nExp. & 8.48 & 3.67$\\pm$0.01 & 2.59$\\pm$0.06 & - & - \\\\\n\\hline\n\\hline\n\\end{tabular}\n\\end{center}\n\\label{table1}\n\\end{table}\n\nIn Table \\ref{table3}, the main pp-RPA amplitudes contributing to the ground state wave function of $^{12}$Be are shown. \nFrom the values of X$_{ab}$ that describe the contribution of a configuration where two neutrons are created in two unoccupied particle states, one sees that the wave function of $^{12}$Be is a mixing of different configurations with the two extra-neutrons mainly in (1p$_{1\/2}$)$^2$, (2s$_{1\/2}$)$^2$ and (1d$_{5\/2}$)$^2$ configurations. The value of $X_{\\alpha \\beta}$ that stands for two-neutron configurations in hole states is quite large indicating strong correlations in the $^{10}$Be-core with the presence of two particles - two holes configurations. Such a strong mixing is an indication of a breakdown of the N=8 shell closure in $^{12}$Be. This result is supported by experimental data \\cite{navin_00} and is consistent with results provided by other models \\cite{nunes_02}. \n\n\\begin{table}[h!]\n\\caption {Main pp-RPA amplitudes of 0$^{+}_{1}$ ground state in $^{12}$Be.}\n\\begin{center}\n\\begin{tabular}{cccc|c}\n\\hline\n\\hline\n & X$_{ab}$ & & & X$_{\\alpha \\beta}$ \\\\\n(1p$_{1\/2}$)$^2$ & (1p$_{1\/2}$, 2p$_{1\/2}$) & (2s$_{1\/2}$)$^2$ & (1d$_{5\/2}$)$^2$ & (1p$_{3\/2}$)$^2$ \\\\\n\\hline\n 0.76 & 0.31 & 0.50 & 0.43 & 0.57 \\\\\n\\hline\n\\hline\n\\end{tabular}\n\\end{center}\n\\label{table3}\n\\end{table}\nAs discussed, results obtained for ground state properties of $^{10}$Be and $^{12}$Be are in an overall good agreement with known experimental data. \n \\begin{figure}[h]\n \t\\begin{center}\n \\vspace{0.9cm}\n \\includegraphics[width=0.45\\textwidth]{fig1.eps}\n \\caption{\\label{12be_etats} Low lying spectra of $^{12}$Be obtained with pp-RPA compared to experiment.}\n \t\\end{center}\n \\end{figure}\nNow we extend our calculation to the description of excited states. We focus on the 0$^{+}$, 0$^{-}$, 1$^-$ and 2$^+$ excited states of \n$^{8}$Be and $^{12}$Be. Calculated excitation energies E$_{x}$ as well as dipole transition probabilities $B(E1)$ are compared\nto experimental ones. In practice, the pp-RPA formalism provides the energy E$_{r}$ of a state relative to the two neutrons + core threshold and the two neutron separation energy S$_{2n}$. The excitation energy E$_{x}$ is thus expressed as \n\\begin{equation}\nE_{x} = E_{r} + S_{2n}.\n\\label{truc1}\n\\end{equation}\n\n\nConcerning $^{8}$Be, our model predicts the absence of low lying 1$^{-}$ and 0$^{+}$ excited states that is in agreement with experimental data. Only a 2$^{+}$ state with an excitation energy of 3.82 MeV is found. This state is experimentally observed at a slightly lower energy of 3.03 MeV. \n\\begin{table}[h!]\n\\caption {Main pp-RPA amplitudes of 0$^{+}_{2}$ state in $^{12}$Be. X$_{\\alpha \\beta}$ amplitudes are found negligible.}\n\\begin{center}\n\\begin{tabular}{cccc}\n\\hline\n\\hline\n & X$_{ab}$ & & \\\\\n(1p$_{1\/2}$)$^2$ & (2s$_{1\/2}$)$^2$ & (1p$_{1\/2}$,2p$_{1\/2}$) & (2s$_{1\/2}$,3s$_{1\/2}$) \\\\\n\\hline\n -0.48 & -0.86 & 0.11 & 0.10 \\\\\n\\hline\n\\hline\n\\end{tabular}\n\\end{center}\n\\label{table3bis}\n\\end{table}\n\nResults for $^{12}$Be are summarized in Fig.\\ref{12be_etats}. The experimental 0$^{+}_{2}$ excited state at E$_{x}$=2.24 MeV \\cite{shimoura_03} is well reproduced with \na theoretical excitation energy of 2.48 MeV. In Table \\ref{table3bis}, the main amplitudes corresponding to this state which is mainly built from (2s$_{1\/2}$)$^2$ and (1p$_{1\/2}$)$^2$ configurations are shown. It can be noted that for 0$^{+}_{2}$ state no effect of correlations in the core, which are represented by \nnegligible contributions from X$_{\\alpha \\beta}$ amplitudes, are found. Looking at both Tables \\ref{table3} and \\ref{table3bis}, one sees that the model gives a higher contribution of the (2s$_{1\/2}$)$^2$ configuration in the 0$^{+}_{2}$ excited state than in the ground state 0$^{+}_{1}$. This trend may be related to the results of Kanungo \\textit{et al.} \\cite{kanungo_10} where the s-wave spectroscopic factor was equal to 0.28 for the ground state and 0.73 for the 0$^{+}_{2}$ excited state. \n\n\nWe also obtain a 1$^{-}_{1}$ state at E$_{x}$=2.59 MeV with a transition probability of $B(E1$;0$^{+}_{1}$ $\\rightarrow$ 1$^{-}_{1})$=0.45 e$^2$ fm$^2$. The \nassociated experimental values are E$_{x}$=2.68(3) MeV and $B(E1)$=0.051(13) e$^2$ fm$^2$ \\cite{iwasaki_00}. The energy of 1$^{-}_{1}$ state is in agreement with experiment whereas the value of the calculated $B(E1)$ is overestimated by a factor of 10. Sagawa \\textit{et al.} \\cite{sagawa_01} find a low energy transition strength \nof $B(E1)$=0.063 $e^{2}$ fm$^{2}$ in the context of large shell model calculations using extended wave functions for loosely-bound 1p$_{1\/2}$ ans 2s$_{1\/2}$ states. In \nour model, as equations are solved in a box, we are free from this kind of correction as our eigen wave functions have already good asymptotic properties. One difference may come from the fact that Sagawa \\textit{et al.} renormalize the depth of their HF potential to reproduce half of the empirical two-neutron separation energy. \nTheir deduced single particle wave functions are thus much more bound than ours, with certainly a smaller spatial extension. This may explain partly why they obtain a lower $E1$ \nstrength. \n\nIn Fig.\\ref{12be_etats_be1}, the calculated $E1$ strength distribution in $^{12}$Be is shown. The $E1$ strength associated with the 1$^{-}_{1}$ state gives the largest contribution in our calculation. In Ref.\\cite{sagawa_01} where no core is assumed, the contribution of the giant dipole resonance is found in the energy range E$_{x}$=10-13 MeV. In our calculation only the soft dipole part of the $E1$ strength is accessible. With the help of Eq.(\\ref{sumrule}) and the calculated value of $\\lambda$, the total deduced $E1$ strength is equal to 1.8 e$^{2}$ fm$^{2}$. Transition probabilities $B(E1)$ as well as radii are two types of observables very sensitive to the content of the wave function. For $^{12}$Be, the ground state is a large mixture of (2s$_{1\/2}$)$^{2}$, (1p$_{1\/2}$)$^{2}$ and (1d$_{5\/2}$)$^{2}$ configurations, as shown in Table \\ref{table3}, while the 1$^{-}$ states are nearly pure two-neutron configurations. In particular, the 1$^{-}_{1}$ state is nearly a pure \n(1p$_{1\/2}$, 2s$_{1\/2}$) configuration. As discussed earlier, the calculated ground state wave function of $^{12}$Be provides a good value for the radius which depends strongly on the values of $\\boldsymbol{\\lambda}$ and $\\boldsymbol{\\rho}$. This agreement strongly lends credence to the calculated value of $\\sum_{f} B_{f}(E1)$. One may also recall that in $^{11}$Li the calculated 1$^{-}_{1}$ low lying state \\cite{bonac_97} was in agreement with later measurement \\cite{nakamura_06}, both for excitation energy and transition probability. In addition, our model predicts two higher 1$^{-}$ states characterized by E$_{x}$=4.24 MeV with $B(E1)$=0.064 $e^{2}$ fm$^{2}$ and E$_{x}$=4.32 MeV with $B(E1)$=0.066 e$^{2}$ fm$^{2}$. These states have not been yet observed experimentally.\n \\begin{figure}[h]\n \t\\begin{center}\n \\vspace{0.9cm}\n \\includegraphics[width=0.45\\textwidth]{fig2.eps}\n \\caption{\\label{12be_etats_be1}Calculated results of $E1$ strength distribution in $^{12}$Be.}\n \t\\end{center}\n \\end{figure}\n\nRegarding 2$^{+}$ states, our model is unable to reproduce the low lying 2$^{+}_{1}$ state, experimentally found at 2.11 MeV \\cite{bernas_62}. However, it predicts \ntwo additional 2$^{+}$ states at higher excitation energies, 3.86 MeV and 4.59 MeV. These results are coherent with those obtained by Romero-Redondo {\\it et al.} \\cite{romero_08,romero_08b} where they studied $^{12}$Be within a three-body model with an inert core. They were unable to reproduce the low 2$^{+}_{1}$ state and also predicted a higher state close to our state at 3.8 MeV. Indeed in our model the phenomenological particle-vibration coupling in Eq.(\\ref{pv}) takes into account the effect of the 2$^{+}_{1}$ state of $^{10}$Be on the single particle scheme of $^{11}$Be. But the 2$^{+}_{1}$ state of $^{10}$Be itself is not present. As shown by Nunes \\textit{et al.} \\cite{nunes_02}, in order to explain this state, one has to take into account explicitly the excitations of the $^{10}$Be core.\n\nConcerning the 0$^{-}_{1}$ state, it is obtained in our study with a relative energy of -0.71 MeV (E$_{x}$=2.91 MeV) close to the results of \nRomero-Redondo \\textit{et al.} \\cite{romero_08} (E$_{x}$=2.5 MeV). It is built from a nearly pure (1p$_{1\/2}$, 2s$_{1\/2}$) configuration. This 0$^{-}_{1}$ state has not been yet observed even in a recent experiment \\cite{kanungo_10}. \n\nAs discussed previously, results obtained for ground states and excited states are found to be in a quite good agreement with experiment, except for the dipole transition probabilities and the 2$^{+}_{1}$ state energy. The pp-RPA approach is able to describe quite well the known spectrum of $^{8}$Be and $^{12}$Be and suggests the presence of higher states which have not been yet observed experimentally.\n\n\\section{Description of even-even $^{10-14}$Be from a $^{12}$Be core}\n\\label{result12Be}\nIn this part, we are interested in the description of even-even $^{10-14}$Be isotopes using the pp-RPA approach starting from a $^{12}$Be core. Concerning neutron states in the field of $^{12}$Be, the situation is still not clear. A 5\/2$^+$ resonance has been first observed at 2.0 MeV above the neutron-$^{12}$Be threshold \\cite{ostrowski_92}. This state is interpreted as one neutron in the 1d$_{5\/2}$ shell. Later experiments have confirmed this resonance with a relative energy between 2.0 MeV and 2.4 MeV \\cite{korsheninnikov_95,belozyorov_98,thoennessen_00,lecouey_04,simon_04,simon_07,kondo}. A lower state has been observed close to 0.3 MeV \\cite{thoennessen_00}. A 1\/2$^{+}$ assignment, as suggested in Ref.\\cite{thoennessen_00}, with a pure neutron s-state implies that the shell order in $^{13}$Be is given by a simple WS potential with an occupied 1p$_{1\/2}$ shell. In a recent experiment by Kondo \\textit{et al.} \\cite{kondo}, they have identified $^{13}$Be resonances of 1\/2$^{-}$ with $E_{r}$=0.45 MeV, 1\/2$^{+}$ with $E_{r}$=1.17 MeV, and 5\/2$^{+}$ with $E_{r}$=2.34 MeV. This experimental result suggests an inversion between the 2s$_{1\/2}$ and 1p$_{1\/2}$ shells as the one predicted in Ref.\\cite{pacheco_02}. In order to clarify those contradictory results, in the following we test two scenarii in $^{13}$Be, \nconcerning shell ordering in order to find a scenario that reproduces at best experimental observables for $^{14}$Be. \n\nIn the first scenario, we assume a normal order of shells with a low lying 2s$_{1\/2}$ neutron state. The 1p$_{1\/2}$ shell is then the last occupied neutron orbital in $^{12}$Be with an energy $\\epsilon$(1p$_{1\/2}$)=-3.17 MeV given by the measured neutron separation energy in $^{12}$Be \\cite{NS}. In the following this scenario is referred as scenario A.\n\nIn the second scenario, the inversion between 2s$_{1\/2}$ and 1p$_{1\/2}$ shells is assumed. Indeed, in $^{12}$Be a 2$^{+}_{1}$ state with an excitation energy of E$_{x}$(2$^{+}_{1}$)=2.6 MeV and a transition probability B(E2;0$^{+}_{1}$ $\\rightarrow$ 2$^{+}_{1}$)$\\approx$50 e$^{2}$ fm$^{4}$ \\cite{iwasaki_00b} is observed close to the one in $^{10}$Be \\cite{ajzenberg_84,vinhmau_95}. A similar effect on the neutron states in $^{13}$Be as the existing one in $^{11}$Be can be expected. Thus assuming that the shell inversion present in $^{11}$Be holds in $^{13}$Be, the last occupied nucleon orbital in $^{12}$Be is the 2s$_{1\/2}$ shell with an energy $\\epsilon$(2s$_{1\/2}$)=-3.17 MeV. The 1p$_{1\/2}$ shell is unbound with an energy not established experimentally. In this second scenario the energy of the 1p$_{1\/2}$ \nshell is considered as a parameter. The energy of the 1d$_{5\/2}$ state is assumed to be $\\epsilon$(1d$_{5\/2}$)=2.27 MeV, a bit more than the usual one ($\\epsilon$(1d$_{5\/2}$)=2.0 MeV) but still in agreement with recent experiments \\cite{simon_07,kondo}. This result is not in contradiction with experimental knowledge. Indeed, it has been shown in Refs.\\cite{simon_07,blanchon_07} that a 1p$_{1\/2}$ state above threshold is needed in order to reproduce the experimental neutron-$^{12}$Be spectrum. In the following, this second scenario is referred as scenario B. \n\nNow, we compare results obtained with the two scenarii with experimental data on even-even $^{10-14}$Be, both for ground state and excited states. \n\n\\begin{table}[h!]\n\\caption {Theoretical and experimental values of $S_{2n}$ (MeV) in $^{12}$Be and $^{14}$Be (from Ref.\\cite{audi_03}), $\\langle \\textbf{r}^{2}\\rangle_{A+2}^{1\/2}$ \n(fm), $\\langle\\boldsymbol{\\lambda}^{2}\\rangle^{1\/2}$ (fm) and $\\langle\\boldsymbol{\\rho}^{2}\\rangle^{1\/2}$ (fm) in $^{14}$Be (from Refs. \\cite{ozawa_01,marques}, $\\boldsymbol{\\lambda}$ deduced using Eq.(\\ref{rms})) in the two cases of non-inversion (A) and inversion (B) of the 2s$_{1\/2}$ and 1p$_{1\/2}$ shells.}\n\\begin{center}\n\\begin{tabular}{cccccc}\n\\hline\n\\hline\n & $S_{2n}$($^{12}$Be) & $S_{2n}$($^{14}$Be) &$\\langle \\textbf{r}^{2}\\rangle_{A+2}^{1\/2}$ & $\\langle\\boldsymbol{\\rho}^{2}\\rangle^{1\/2}$ &\n $\\langle\\boldsymbol{\\lambda}^{2}\\rangle^{1\/2}$ \\\\\n\\hline\n A & 2.91 & 0.51 & 3.45 & 8.45 & 5.45 \\\\\n B & 3.71 & 1.29 & 2.91 & 4.56 & 4.02 \\\\\n\\hline\nExp. & 3.673$\\pm$0.015 & 1.26 $\\pm$ 0.01 & 3.10$\\pm$0.15 & 5.4$\\pm$1.0 & 4.2$\\pm$1.7 \\\\\n\\hline\n\\hline\n\\end{tabular}\n\\end{center}\n\\label{table2}\n\\end{table}\n\nIn scenario A, we first assign a relative energy of 0.3 MeV to the 2s$_{1\/2}$ state, according to the experimental suggestion of a low $1\/2^{+}$ neutron state from Ref.\\cite{thoennessen_00}. In this case all calculated quantities disagree with experimental values. In particular, $^{14}$Be is found under-bound. We then decrease the energy of the 2s$_{1\/2}$ state preserving the agreement with experimental data. The energy of the 1d$_{5\/2}$ state is fixed at 2 MeV and the one of the 2s$_{1\/2}$ state \nat 0.09 MeV (as low as possible ensuring also an unbound $^{13}$Be). Results are summarized in Table \\ref{table2}. One sees that, even in that case, it is impossible to describe correctly both the two-neutron separation energies S$_{2n}$ of $^{12}$Be and $^{14}$Be. The $rms$ radius is overestimated and the $rms$ value of $\\boldsymbol{\\lambda}$ is in the upper part of the experimental error bars. The $rms$ value of $\\boldsymbol{\\rho}$ is also overestimated by more than 2 fm. It is interesting to note that if the 2s$_{1\/2}$ state is bound, results are improved and agree with the $S_{2n}$($^{14}$Be) value given by Descouvemont \\textit{et al.} \\cite{descouvemont_95,adahchour_95,baye_97}. If the 2s$_{1\/2}$ state is unbound and the energy of the d$_{5\/2}$ shell is decreased, results closer to experiment \nare found, as in the work of Thompson and Zhukov \\cite{thompson_96}. However, these assumptions are not justified since a bound 2s$_{1\/2}$ state and a \n1d$_{5\/2}$ state below 2 MeV disagree with all experimental measurements. In addition, scenario A has also been studied within a model introducing a core deformation \\cite{tarutina_04}. Only for a very high deformation parameter ($\\beta > 0.8$), $^{13}$Be has an unbound $1\/2^{+}$ ground state and $^{14}$Be a two-neutron separation energy higher than 1 MeV. \n\nIn scenario B, the energy of the 2s$_{1\/2}$ state is given by the one-neutron separation energy in $^{12}$Be. The energy of the 1p$_{1\/2}$ state is fitted in order to reproduce at best the results for $^{12}$Be and $^{14}$Be. A good agreement with all quantities, including $S_{2n}$($^{12}$Be) is found for a 1p$_{1\/2}$ state energy of 0.48 MeV, as shown in Table \\ref{table3}. This result for the 1p$_{1\/2}$ state energy is in complete agreement with Refs.\\cite{kondo,blanchon_07}. Moreover the 3s$_{1\/2}$ state is found at 1.33 MeV, corresponding to the 1\/2$^{+}$ state with $E_{r}$=1.17 MeV observed in Ref.\\cite{kondo}. Note that we find for the 0$^{+}_{1}$ state equivalent results as in Ref.\\cite{pacheco_02} where the spin-orbit part of the D1S effective interaction was neglected. \n\n\\begin{table}[h!]\n\\caption {Main pp-RPA amplitudes for 0$^{+}_{1}$ ground state in $^{14}$Be without (A) and with (B) inversion of 2s$_{1\/2}$-1p$_{1\/2}$ shells.}\n\\begin{center}\n\\begin{tabular}{cccc|cc}\n\\hline\n\\hline\n & X$_{ab}$ & & & X$_{\\alpha \\beta}$ & \\\\\n & (2s$_{1\/2}$)$^2$ & (1d$_{5\/2}$)$^2$ & & (1p$_{3\/2}$)$^2$ & (1p$_{1\/2}$)$^2$ \\\\\n\\hline\n A & -0.93 & -0.49 & & 0.32 & 0.36 \\\\\n\\hline\n & (1d$_{5\/2}$)$^2$ & (1p$_{1\/2}$)$^2$ & (1p$_{1\/2}$ 2p$_{1\/2}$)& (1p$_{3\/2}$)$^2$ & (2s$_{1\/2}$)$^2$ \\\\\n\\hline\n B & -0.56 & 0.70 & -0.63 & 0.59 & -0.45 \\\\\n\\hline\n\\hline\n\\end{tabular}\n\\end{center}\n\\label{table4}\n\\end{table}\n\nThe pp-RPA amplitudes of 0$^{+}_{1}$ state in $^{14}$Be obtained for scenarii A and B are presented in Table \\ref{table4}. Results depend strongly on the shell inversion hypothesis. As seen from Table \\ref{table4}, in scenario A, $X_{\\alpha \\beta}$ amplitudes are small. This indicates that the core of $^{12}$Be is little affected by two-body correlations, contrary to results reported in Table \\ref{table3}. Now, looking at the amplitudes obtained for scenario B, a qualitative agreement with the components of $^{12}$Be (see Table \\ref{table3}) is displayed. Indeed, $X_{\\alpha \\beta}$ amplitude for the configuration (2s$_{1\/2}$)$^2$ is quite large indicating that in $^{12}$Be a configuration with two holes in the 2s$_{1\/2}$-shell plays an important role. This result is in agreement with the amplitude for the (2s$_{1\/2}$)$^{2}$ configuration presented in Table \\ref{table3}. Thus concerning amplitudes for $^{14}$Be ground state the scenario B gives solutions more consistent than scenario A. \n \\begin{figure}[h]\n \\begin{center}\n \\vspace{0.9cm}\n \\includegraphics[width=0.45\\textwidth]{fig3.eps}\n \\caption{\\label{14be_etats} Low lying spectra of $^{14}$Be obtained with pp-RPA without (A) and with (B) inversion in $^{13}$Be compared to experiment.}\n \\end{center}\n \\end{figure}\n\nIn order to understand in more details consequences of scenarii A and B, we study excited states of $^{10}$Be and $^{14}$Be. \n\nIn $^{10}$Be, two 0$^{+}$ and 1$^{-}$ states are observed experimentally at E$_{x}$(0$^{+}_{2}$)=6.18 MeV \\cite{ajzenberg_88} and E$_{x}$(1$^{-}_{1}$)=5.96 MeV \\cite{ajzenberg_88}, respectively. Two 2$^{+}$ states at E$_{x}$(2$^{+}_1$)=3.37 MeV and E$_{x}$(2$^{+}_2$)=5.96 MeV \\cite{ajzenberg_88} are also known from experiment. On the one hand, concerning scenario A, no 1$^{-}$ state is predicted, whereas a 0$^{+}_{2}$ state at 6.31 MeV and a 2$^{+}_{1}$ state at 3.83 MeV are present in the theoretical excited spectrum. Even though those two states seem to be close to experiment, results may not have to be considered satisfactory since they fail to obtain the \n1$^{-}_{1}$ state. On the other hand, scenario B displays a 1$^{-}_{1}$ state at 3.82 MeV and a 0$^{+}_{2}$ state at 3.96 MeV. The agreement is not quantitatively good. However the two states are close to each other as they are found experimentally. This suggests that these states are formed by two neutron holes coupled to the 0$^{+}_{2}$ excited state of $^{12}$Be which has an excitation energy of 2.4 MeV; that is enough to shift the two states at the right energy. \n\nResults in $^{14}$Be from the two scenarii and comparison with experiment are summarized in Fig.\\ref{14be_etats}. Here it is better suited to discuss results in terms of relative energy E$_{r}$ as in scenario A the experimental two-neutron separation energy $S_{2n}$ is not well reproduced. In both scenarii, a good agreement for the relative energy E$_{r}$ of the 0$^{+}_{2}$ excited state is obtained, E$_{r}$=1.26 MeV and 1.24 MeV for scenario A and B respectively. The experimental value is equal to 1.22(18) MeV \\cite{simon_07}. The energies of the 0$^{+}_{2}$ state are close from each other in both scenarii. In Table \\ref{table4bis}, the amplitudes for the \n0$^{+}_{2}$ state are displayed for both scenarii. In scenario A, 0$^{+}_{2}$ state is mainly built on (1d$_{5\/2}$)$^{2}$, (2s$_{1\/2}$, 3s$_{1\/2}$) and (2s$_{1\/2}$)$^{2}$ configurations. The values of $X_{\\alpha\\beta}$ indicates the presence of correlations in the core nucleus. In scenario B, the 0$^{+}_{2}$ state is explained with \nmainly (1p$_{1\/2}$)$^{2}$ and (1p$_{1\/2}$, 2p$_{1\/2}$) configurations and the $X_{\\alpha\\beta}$ are very small. Experimentally only the energy of this state is known. In a future experiment it would be interesting to investigate the spectroscopic factors of this state in order to discriminate between the two scenarii. \n\\begin{table}[h!]\n\\caption {Main pp-RPA amplitudes for the 0$^{+}_{2}$ excited state in $^{14}$Be without (A) and with (B) inversion of 2s$_{1\/2}$-1p$_{1\/2}$ shells.}\n\\begin{center}\n\\begin{tabular}{cccc|cc}\n\\hline\n\\hline\n & X$_{ab}$ & & & X$_{\\alpha \\beta}$ & \\\\\n & (2s$_{1\/2}$)$^2$ & (2s$_{1\/2}$, 3s$_{1\/2}$) & (1d$_{5\/2}$)$^2$ & (1p$_{3\/2}$)$^2$ & (1p$_{1\/2}$)$^2$ \\\\\n\\hline\n A & 0.42 & 0.58 & -0.73 & 0.27 & 0.27 \\\\\n\\hline\n & (1p$_{1\/2}$)$^2$ & (1p$_{1\/2}$, 2p$_{1\/2}$) & & (1p$_{3\/2}$)$^2$ & (2s$_{1\/2}$)$^2$ \\\\\n\\hline\n B & 0.73 & 0.64 & & -0.08 & 0.04 \\\\\n\\hline\n\\hline\n\\end{tabular}\n\\end{center}\n\\label{table4bis}\n\\end{table}\n\n\nConcerning 1$^{-}$ states in $^{14}$Be, two low lying states with a relative energy $E_{r}$=1.25 MeV and 1.32 MeV are found in scenario A. These values are a bit lower than the experimental one E$_{r}$=1.8$\\pm$0.1 MeV obtained by Labiche \\textit{et al.} \\cite{labiche_01}. $B(E1)$ transition probability between ground state and \n1$^{-}_{1}$ state has not been calculated as both states are not well reproduced in scenario A. \n\nResults appear to be much better in scenario B. In that case, the 1$^{-}_{1}$ state is found at $E_{r}$=1.8 MeV ($E_{x}$=3.1 MeV). Thus ground state properties as well as the energy of the 1$^{-}_{1}$ state are very satisfactory. The $E1$ strength given by our calculation is $B(E1)$=3.7$\\times$10$^{-2}$ e$^{2}$fm$^{2}$. It is smaller than the strength obtained by Descouvemont \\textit{et al.} of 1.40$\\pm$0.40 e$^{2}$fm$^{2}$ in their microscopic cluster model \\cite{descouvemont_95,labiche_01}. This difference comes from the fact that they do not assume any inversion in their model. They obtain a s$_{1\/2}$ state near threshold in their $^{13}$Be spectrum that enhances the $E1$ strength because of its spatial extension. In Fig.\\ref{14be_be1}, the calculated $E1$ strength is shown for the different $1^{-}$ excited states obtained in scenario B. \nThe main $E1$ strength is found in the energy-range E$_{x}$=4-7 MeV. The main strength is located at higher excitation energy than seen in $^{12}$Be. The same trend is observed by Sagawa \\textit{et al.} \\cite{sagawa_01}. In Ref.\\cite{forssen_02} Forss\\'en \\textit{et al.} have extracted the $B(E1)$ distribution from the experimental data of Ref.\\cite{labiche_01}. They have found a narrow $B(E1)$ distribution peaked at about E$_{r}$=2 MeV ($E_{x}$=3.3 MeV). The shape of the strength is thus very different from the usual accumulation of $E1$ strength observed at low energy in other Borromean nuclei such as $^{11}$Li and $^{6}$He. Even using a phenomenological model of Coulomb dissociation with a lot of degrees of freedom, they did not manage to fit the shape of the $E1$ strength in $^{14}$Be. This result is a strong indication of a different structure in $^{14}$Be in comparison with other Borromean nuclei. The absence of a low lying neutron s-state in the spectrum of $^{13}$Be and the appearance of a p-state is a possible explanation of the unusual shape of the soft $E1$ strength. In that sense results obtained for $B(E1)$ are in agreement with scenario B. \n\nConcerning the $E1$ transition probability strength, a value of 0.17 e$^{2}$fm$^{2}$ is found integrated below $E_{r}$=3.2 MeV ($E_{x}$=4.5 MeV). This result seems low compared with the strength of 1.40$\\pm$0.40 e$^{2}$fm$^{2}$ extracted by Forss\\'en \\textit{et al.} Using the sum rule formula of Eq.(\\ref{sumrule}) with the calculated $rms$ value of $\\boldsymbol{\\lambda}$, we obtain a value of 1.26 e$^{2}$fm$^{2}$ in agreement with the one of Ref.\\cite{forssen_02}. The sum rule gives the $E1$ transition probability strength integrated over the whole spectrum. We find that the $E1$ strength extracted below E$_{r}$=3.2 MeV ($E_{x}$=4.5 MeV) is larger than the sum rule as found in Ref.\\cite{forssen_02}. Then the results deduced from the experiment of Labiche \\textit{et al.} may seem doubtful. \n \\begin{figure}[h]\n \\begin{center}\n \\vspace{0.9cm}\n \\includegraphics[width=0.45\\textwidth]{fig4.eps}\n \\caption{\\label{14be_be1}Calculated $E1$ strength distribution in $^{14}$Be for scenario B (with inversion).}\n \\end{center}\n \\end{figure}\n\nConcerning the 2$^{+}_{1}$ state in $^{14}$Be, it was first observed by Bohlen \\textit{et al.} \\cite{bohlen_95} with an excitation energy of E$_{x}$=1.59(11) MeV (E$_{r}$=0.25(6) MeV). Then, this state was confirmed by Korsheninnikov \\textit{et al.} \\cite{korsheninnikov_95}. In a more recent experiment, Sugimoto \\textit{et al.} \\cite{sugimoto_07} found the 2$^{+}_{1}$ state at E$_{x}$=1.54(13) MeV (E$_{r}$=0.28$\\pm$0.01 MeV). As already discussed for $^{12}$Be, this state is absent from our model as it is interpreted as an excitation of the $^{12}$Be core. However, as shown in Fig.\\ref{14be_etats}, a 2$^{+}_{1}$ state at E$_{r}$=1.6 MeV is obtained in both scenarii. \n\nWe think that further investigations are needed both on the theoretical and experimental parts in order to \nachieve a fully consistent description of $^{13}$Be and $^{14}$Be. In our study scenario B reproduces ground state \nas well as excited state properties, except the 2$^{+}_{1}$ state. These results are a strong indication on the validity of scenario B which assumes an inversion between 2s$_{1\/2}$ and 1p$_{1\/2}$ shells in $^{13}$Be.\n\n\n\\section{Conclusions}\n\\label{concl}\n\nWe have employed the pp-RPA approach to describe even-even $^{8-14}$Be isotopes from either a $^{10}$Be or a $^{12}$Be core. A WS potential corrected by a \nphenomenological particle-vibration coupling for the neutron-core interaction and the D1S Gogny force for the neutron-neutron interaction have been employed.\n\nStarting from the experimental spectrum of $^{11}$Be and a $^{10}$Be core, our approach has been able to provide ground state properties as well as excitation energies of the 0$^{+}_{2}$ and 1$^{-}_{1}$ states in $^{12}$Be. As pp-RPA model assumes an inert core, it fails in describing the 2$^{+}_{1}$ state that is probably built on \nan excited $^{10}$Be core. This issue could be cured in a further work introducing explicitly excitations of the core. The calculated $B(E1)$ transition probability of \nthe 1$^{-}_{1}$ state overestimates the experimental value. \n\nConcerning the description of the most exotic Beryllium isotopes, we have applied the same method with a $^{12}$Be core. In that case, $^{13}$Be spectrum has been needed as input of the calculation. Then, two scenarii have been tested: \\textit{i)} scenario A with a normal shell order in $^{13}$Be, \\textit{ii)} scenario B with a shell inversion similar to $^{11}$Be. Scenario A leads to several inconsistencies and is unable to reproduce neither ground state nor excited state properties of $^{14}$Be. In scenario B, the low energy of the 1p$_{1\/2}$ neutron state in the field of $^{12}$Be have been used as free parameter. To fix this parameter two constraints have been required. Firstly, the two-neutron separation energy in $^{12}$Be should be in agreement with the experimental value. Secondly, $^{10}$Be and $^{14}$Be ground and excited states should be in agreement with available data. These two different constraints have led to the conclusion of a 2s$_{1\/2}$-1p$_{1\/2}$ shell inversion in $^{13}$Be as observed in $^{11}$Be and $^{10}$Li. Such an assumption has implied the existence of a $1\/2^{-}$ state in $^{13}$Be with an energy around 0.48 MeV, close to threshold. This state seems to have been observed in a recent experiment at RIKEN \\cite{kondo}.\n\nThe study of the two scenarii argues in favor of the conclusion of Refs.\\cite{labiche_99,pacheco_02}: the 2s$_{1\/2}$-1p$_{1\/2}$ shell inversion is present in $^{13}$Be. The present situation looks like the one of $^{10}$Li when theoretical studies on $^{11}$Li had predicted the necessity to have an inversion in $^{10}$Li \\cite{thompson_94,vinhmau_96}, before it was confirmed experimentally \\cite{aoi_97,simon_99}. \n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\\noindent Deductive program verification performs a rigorous analysis of the correctness of programs with respect to their functional behavior, usually specified formally by \\emph{contracts} (such as pre- and postconditions, can class and loop invariants). The approached has progressed in recent years thanks to the\n development of powerful proof engines. \nIn practice, however, verifying industrial applications remains difficult. \nOne of the obstacles is the lack of intuitive feedback to understand the reasons why a verification attempt failed. \nAlthough in many cases the underlying prover can provide a counterexample containing some usable diagnostic information for debugging, such a counterexample usually contains hundreds of difficult-to-interpret lines. Another obstacle to usability is that integer values generated by the prover for the counterexamples are often very large, and hence do not provide programmers with an easy intuitive understanding of what is wrong.\n\nThis article presents the Counterexample Extraction and Minimization (CEAM) approach for improving the quality of counterexamples produced when a proof fails, and making them usable for identifying and correcting the underlying bugs.\nWe have implemented CEAM as an extension of the AutoProof environment~\\cite{autoproof, tschannen2015autoproof}, a static verification platform for contract-equipped Eiffel~\\cite{meyer1997object} programs based on Hoare-style proofs. AutoProof relies on the Boogie proof system~\\cite{barnett2005boogie, le2011boogie} and takes advantage of Boogie's underlying SMT (Satisfiability Modulo Theories) solver, by default Z3 \\cite{de2008z3}. \n\nWhen a proof fails, CEAM exploits the counterexample models (hereinafter referred to simply as models) generated by the SMT solver and generates simple counterexamples in a format more intuitive to programmers. \nCEAM also provides a minimization mechanism allowing programmers to get simplified counterexamples with integer variables reduced to their minimal possible values. The current version of CEAM supports primitive types (integer, boolean), user-defined types (classes) as well as some commonly used container types (such as arrays and sequences).\n\nSection \\ref{sec: example} illustrates an example of using the CEAM approach. Section \\ref{sec: technology_stack} introduces the technologies used in our verification framework. Section \\ref{sec: implementation} describes the details of the implementation of the CEAM. \nWe evaluate the applicability of the CEAM through a series of examples in Section \\ref{sec: experiment}. \nAfter a review of related work in Section \\ref{sec: related_work}, Section \\ref{sec: conclusion} concludes the paper with our ongoing work.\n\n\\section{An Example Session}\n\\label{sec: example}\nBefore exploring the principles and technologies of the CEAM approach, we look at its practical use on a representative example (Fig.~\\ref{listing: max}). The intent of the \\e{max} function in class \\e{MAX} is to return into \\e{Result} the maximum element of an integer array \\e{a} of size \\e{a.count}. The two postconditions in lines 22 and 23 (labeled by \\emph{is\\_max} and \\emph{in\\_array}) specify this intent: every element of the array should be less than or equal to \\e{Result}; at least one element should be equal to \\e{Result}.\n\nWhen we try to verify the \\e{max} function using AutoProof, verification fails and AutoProof returns an error message ``Postcondition \\emph{is\\_max} may be violated'' (the first row in Fig. \\ref{fig: proof-result}). \nSuch a generic message tells us that the prover cannot establish the postcondition, but does not enable us to find out why. In this case, programmers can look at the model generated by the Z3 solver to understand the cause of the failure. Deciphering the model is a cumbersome task: the model spans hundreds of lines and is expressed in a cryptic formalism.\n\nIn contrast, AutoProof extended with CEAM automatically generates a much simpler counterexample from the model. As displayed in the second row of Fig.~\\ref{fig: proof-result}, the counterexample contains the initial values (on entry of \\e{max}) of the array's size and of some of its elements. Seeing these concrete values, rather than just the prover's general failure message, helps the programmer conjecture possible reasons for the failure. \nThe values in the counterexample are large, however, too large to give the programmer a direct intuition of the problem at a human scale. \n\n\\vspace{-0.2in}\n\\begin{figure}[htbp]\n \\centering\n\\begin{lstlisting}[captionpos=b, basicstyle=\\fontsize{0.25cm}{0.25cm}]\nclass MAX feature\nmax (a: ARRAY $[$INTEGER$]$): INTEGER\t\n require a.count $>$ $0$ \n local\t i: INTEGER\n do\n from \n Result $:=$ a $[1]$; i $:=$ $2$\n invariant\n $2$ <= i and i <= a.count $+$ $1$\n $\\forall$ j: $1$ $|..|$ $($i - $1)$ | a.sequence $[$j$]$ $<=$ Result\n $\\exists$ j: $1$ $|..|$ $($i - $1)$ | a.sequence $[$j$]$ $=$ Result\n until\n i $\\geq$ a.count\n loop\n if a $[$i$]$ > Result then\n Result $:=$ a $[$i$]$\n end\n i $:=$ i $+$ $1$\n variant a.count - i\n end\n ensure\n is_max: $\\forall$ j: $1$ $|..|$ a.count | a.sequence $[$j$]$ $<=$ Result \n in_array: $\\exists$ j: $1$ $|..|$ a.count | a.sequence $[$j$]$ $=$ Result \n end\nend\n\\end{lstlisting}\n\\vspace{-0.15in}\n\\caption{{\\tiny\\e{MAX}} is a class that finds the maximum element of an integer array; a fault (the exit condition at line 13 is incorrect) is injected to the code for presentation purposes.}\n\\label{listing: max}\n\\end{figure} \n\n\\vspace{-0.1in}\n\n\\noindent To provide a more intuitive illustration, CEAM allows the programmer to query AutoProof further to obtain a \\textit{minimal} counterexample in the last row of Fig.~\\ref{fig: proof-result}, where integer variables have been reduced to their minimal possible values. \n\\vspace{-0.1in}\n\n\\begin{figure}[htbp]\n\\centerline{{\\includegraphics[width=3.5in]{figures\/proof_result.png}\n}}\n\\vspace{-0.1in}\n\\caption{Proof result in AutoProof: the first row (highlighted in red) indicates a proof failure; the second row is a counterexample generated based on the Z3 model; the third row is a minimized counterexample.}\n\\label{fig: proof-result}\n\\end{figure}\n\n\\noindent This minimized counterexample provides a simple diagnostic trace of \\e{max}: on loop initialization at line 7, \\e{Result} = 0 and i = 2; at line 13, the exit condition of the loop evaluates to \\e{True} with \\e{a.count} = 2 and \\e{i} = 2, which forces the loop to terminate. These values reveal the fault in the program: the loop terminates too early, preventing the program from getting to the actual maximum value, found at position 2 of the array \\e{a}. To eliminate this error, it suffices to strengthen the exit condition to permit one more loop iteration: change \\e{i} \\e{$\\geq$} \\e{a.count} to \\e{i} \\e{$>$} \\e{a.count}.\n\n\n\n\n\n\n\\section{Technology stack}\n\\label{sec: technology_stack}\n\\noindent This section introduces technologies used in the present work, including language and prover.\n\n\\textbf{Eiffel}~\\cite{meyer1997object, bertrand2016touch} is an object-oriented programming language which natively supports Design-by-Contract\\cite{meyer1992applying}. An Eiffel program consists of a set of \\emph{classes}. A class represents a set of run-time objects characterized by the \\textit{features} applicable to them. \nFig. \\ref{listing: ACCOUNT} shows a simple class representing bank accounts. The class contains two types of features: \n\\emph{attributes} representing data items associated with instances of the class, such as \\e{balance} (line 2) and \\e{credit\\_limit} (line 4); \n\\emph{routines} representing operations applicable to these instances, including \\e{available\\_amount} and \\e{transfer}. \nRoutines are further divided into \\emph{procedures} (with no returned value) and \\emph{functions} (returning a value). Here, \\e{available\\_amount} is a function returning an integer (represented by the special variable \\e{Result}), and \\e{transfer} is a procedure. \n\n\\vspace{-0.2in}\n\\begin{figure}[htbp]\n\\centering\n\\begin{minipage}{.43\\textwidth}\n\\begin{lstlisting}[basicstyle=\\linespread{0.1}\\fontsize{0.27cm}{0.27cm}]\nclass ACCOUNT feature\nbalance: INTEGER \n -- Balance of this account.\ncredit_limit: INTEGER\n -- Credit limit of this account.\navailable_amount: INTEGER\t\n -- Amount available on this account.\n do\n Result $:=$ balance - credit_limit\n end\ntransfer (amount: INTEGER; other: ACCOUNT)\t\n -- Transfer `amount' to the `other' account.\n require\n amount $>=$ $0$ \n amount $<=$ available_amount\n do\n balance $:=$ balance - amount\n other.balance $:=$ other.balance $+$ amount\n ensure\n withdrawal: balance $=$ old balance - amount\n deposit: other.balance $=$ old other.balance $+$ amount\n end\nend\n\\end{lstlisting}\n\\end{minipage}\n\\vspace{-0.1in}\n\\caption{A class implementing the behavior of bank accounts}\n \\label{listing: ACCOUNT}\n\\end{figure}\n\n\\vspace{-0.1in}\n\\noindent Programmers can specify the properties of Eiffel classes by equipping them with contracts of the following types:\n\\begin{itemize} \n\\item A precondition (\\e{require}) must be satisfied at the time of any call to the routine; the precondition of \\e{transfer} (lines 13 -- 15), for example, requires the value of \\e{amount} to be non-negative an no greater than \\e{available_amount}. \n\\item A postcondition (\\e{ensure}) must be guaranteed on routine's exit; for instance, a postcondition of \\e{transfer} at line 20 states that, at the end of the execution of \\e{transfer}, the value of \\e{balance} must have been decreased by \\e{amount}.\n\\item A loop invariant (\\e{invariant}) characterizes the semantics of a loop in the form of a property satisfied after initialization and preserved by every iteration, as illustrated by the invariant of \\e{max} (lines 9 -- 11 in Fig. \\ref{listing: max}) specifies the properties of \\e{i} and \\e{Result} before and after every iteration. \n\\item A loop variant (\\e{variant}) is an integer measure that should always be non-negative and decrease strictly at each loop iteration, ensuring that the loop eventually terminates; the loop variant of the loop in \\e{max} is \\e{a.count - i} (line 19 in Fig. \\ref{listing: max}).\n\\end{itemize}\n\n\\noindent Contracts embedded in the code make it amenable to both dynamic analysis (run-time checking of the contract properties), as in the EiffelStudio environment, and static analysis (Hoare-style proofs), as in AutoProof.\n\n\\vspace{0.05in}\n\\textbf{AutoProof} \\cite{autoproof, tschannen2015autoproof} is a static verifier that checks the correctness of Eiffel programs against their functional specifications (contracts). \n\nWhen verifying an Eiffel program, AutoProof translates the program into a Boogie program \\cite{barnett2005boogie, le2011boogie}, which is then transformed into a set of verification conditions (VCs) in SMT-LIB \\cite{barrett2010smt} format, based on Dijkstra's weakest precondition calculus \\cite{dijkstra1976discipline}. \nThe program's correctness follows from the validity of the VCs. \nBoogie asks an SMT solver (by default Z3, as noted) to reason about the validity of each VC. Specifically, the solver tries to find a model (an interpretation of variables and functions used in the SMT encodings) that satisfies the negation of a VC. \nIf the solver is unable to find such a model (no counterexample exists and thus VC is a tautology), the verification is successful.\nIf it succeeds in obtaining such a model, the verification fails and the solver makes the model available. This model witnesses the invalidity of the VC \\cite{leino2005generating} and thus can be seen as a counterexample\\footnote{The counterexample is a \\textit{potential} counterexample since it can occasionally be spurious because of the prover's incompleteness, although that phenomenon is not significant in our experience.} at the SMT level. In general, an SMT model describes an execution trace (a sequence of program states) of a failed routine, along which the program goes to an error state. The CEAM approach makes use of such models to generate easy-to-understand counterexamples.\n\n\\section{Counterexample extraction and minimization}\n\\label{sec: implementation}\n\\noindent This section first shows how to generate counterexamples based on SMT models, then presents the details of the CEAM strategy for counterexample minimization. \n\n\\subsection{Counterexample extraction}\n\\noindent In general, to construct a counterexample it suffices to extract the concrete values of relevant variables from the corresponding SMT model, and to use these values to produce a counterexample message (as in Fig. \\ref{fig: proof-result}). \nThe format of the message can vary depending on the chosen ``verbosity level''. As the goal of the approach and the tools is to ease the burden on programmers, the message only displays the initial values of relevant input variables in the counterexample, as illustrated in the case at the beginning of this article.\n\nFig. \\ref{listing: withdrawal_counterexample} shows a simplified portion of the Z3 model\\footnote{As the models are too big to include in their entirety, this presentation only displays the parts relevant to the discussion.} corresponding to the failed proof of \\e{transfer}'s postcondition labeled by \\emph{withdrawal} (line 20 in Fig. \\ref{listing: ACCOUNT}).\nTo construct a counterexample for this failure, it suffices to obtain the initial values of its three input variables: the implicit variable \\e{Current}\\footnote{{\\ttfamily{Current}} represents the active object in the current execution context, similar to {\\ttfamily{this}} in Java.} and the two arguments \\e{amount} and \\e{other}. \n\n\\vspace{-0.2in}\n\\begin{figure}[htbp]\n \\centering\n\\begin{minipage}{.43\\textwidth}\n\\begin{lstlisting}[language = Java, basicstyle=\\fontsize{0.27cm}{0.27cm}]\namount -> $5799$\nHeap -> T@U!val!$17$\nCurrent -> T@U!val!$18$\nother -> T@U!val!$18$\nACCOUNT.balance -> T@U!val!$7$\nACCOUNT.credit_limit -> T@U!val!$8$\nSelect -> {\nT@U!val!$17$ T@U!val!$18$ T@U!val!$7$ -> $(- 2147475928)$\nT@U!val!$17$ T@U!val!$18$ T@U!val!$8$ -> $(- 2147481727)$\n}\n\\end{lstlisting}\n\\vspace{-0.1in}\n\\end{minipage}\n\\caption{A slice of model of the proof failure of \\emph{withdrawal}}\n\\label{listing: withdrawal_counterexample}\n\\end{figure}\n\n\\vspace{-0.1in}\n\\noindent In the transformation from Eiffel program to SMT code, to encode the execution semantics of an object-oriented program, the evolution of the \\emph{heap} (the collection of program objects) during an execution is modeled as a sequence of constants prefixed with \\e{Heap}. Here the SMT constant \\e{Heap} (line 2) corresponds to the heap at the initial program state of \\e{transfer}.\n\\e{Select} (line 7) is a function for retrieving the values of objects' fields. \nIt takes three parameters, i.e., a heap state, an object reference and a data field, and returns the value of the specified field.\n\nAs the example shows, the concrete values of primitive variables (such as \\e{amount}) are given directly, whereas the values of non-primitive variables (e.g., \\e{Current} and \\e{other} of \\e{ACCOUNT} type) appear in a symbolic form, prefixed with \\e{T@U!val!}. Such symbolic values can be seen as abstract memory locations for the corresponding variables (see \\cite{leinoboogie, bjorner2018programming}).\nThe \\e{Select} function is available to obtain the values of the corresponding fields.\nFor example, \\e{Current} is an instance of \\e{ACCOUNT} and thus has fields \\e{balance} and \\e{credit\\_limit}. The initial value of \\e{balance} can be obtained by applying \\e{Select} to a tuple made of \\e{Heap} = \\e{T@U!val!17} (line 2), \\e{Current} = \\e{T@U!val!18} (line 3) and \\e{ACCOUNT.balance} = \\e{T@U!val!7} (line 5); the tuple matches the mapping in line 8, therefore the returned value for \\e{balance} is {\\small $-2147475928$}. Similarly, the value of \\e{credit\\_limit} can be retrieved through the mapping in line 9. \n\nTo display the value of a non-primitive variable in the resulting counterexample message, the strategy first checks whether the variable has an alias that has been looked up earlier; if so, it displays the alias relation between the variable and its earliest alias in the message; otherwise, it looks up all of its primitive data fields transitively and display them in the message. \n\nIn this example, the model shows that \\e{other} and \\e{Current} have the same symbolic values. \\e{Current} is, consequently, an alias of \\e{other}. As \\e{Current} is processed prior to \\e{other}, the fields of \\e{other} will not be looked up and the message will display the alias relation between \\e{other} and \\e{Current}. \n\nAfter applying the above rules, the counterexample can be derived: \\e{balance} = {\\small $-2147475928$}, \\e{credit\\_limit} = {\\small $-2147481727$}, \\e{amount} = {\\small $5799$}, \\e{other} = \\e{Current}. \n\nFor variables of container types such as arrays or sequences, the resulting message displays the values of their sizes and containing elements. Here, we use the example of \\e{max} in Fig. \\ref{listing: max} to demonstrate counterexample extraction for container types.\n\nThe AutoProof approach specifies container structures in terms of mathematical structures \\cite{tschannen2015autoproof}. For example, the content of the input array \\e{a} of \\e{max} is specified through a special attribute \\e{sequence} (see lines 10 -- 11 in Fig. \\ref{listing: max}), which represents the mathematical sequence of integer values stored in \\e{a}'s cells. \nTo obtain the content of \\e{a} from the counterexample, we need to get the content of its \\e{sequence} field from the model. Fig. \\ref{fig: counterexample_2} shows a slice of the model for the proof failure of \\e{max}. CEAM first extracts the value of \\e{sequence} by querying \\e{Select} with the values of \\e{Heap}, \\e{a}, and {\\e{ARRAY\\^INTEGER\\^.sequence}} (lines 1 -- 3). Those values match to the mapping in line 5, hence the value of \\e{sequence} is \\e{T@U!val!38}. By using this value, CEAM then queries the two functions \\e{Seq\\#Length} and \\e{Seq\\#Item} to get the values of \\e{sequence}'s size (line 8) and elements (lines 12 -- 14), respectively.\n\n\\vspace{-0.2in}\n\\begin{figure}[htbp]\n \\centering\n\\begin{minipage}{.45\\textwidth}\n\\begin{lstlisting}[language = Java, captionpos=b, basicstyle=\\fontsize{0.27cm}{0.27cm}]\nHeap -> T@U!val!$26$\na -> T@U!val!$18$\nARRAY^INTEGER_32^.sequence -> T@U!val!$9$\nSelect -> {\nT@U!val!$26$ T@U!val!$18$ T@U!val!$9$ -> T@U!val!$38$\n}\nSeq#Length -> {\n T@U!val!$38$ -> $11800$\n T@U!val!$40$ -> $28101$\n}\nSeq#Item -> {\n T@U!val!$38$ $1$ -> $0$\n T@U!val!$38$ $11799$ -> $0$\n T@U!val!$38$ $11800$ -> $5$\n}\n\\end{lstlisting}\n\\end{minipage}\n\\vspace{-0.1in}\n\\caption{A snippet of the model of proof failure of \\emph{is\\_max}}\n\\label{fig: counterexample_2}\n\\end{figure}\n\n\\vspace{-0.1in}\n\\subsection{Counterexample minimization}\n\\noindent Some of the extracted values found to cause a failure, such as $-2147481727$ in the above counterexample, are too large to enable a programmer to visualize easily the cause of the proof failure. CEAM can simplify counterexamples by reducing the absolute value of such integers. Program verification is modular, meaning it processes each routine independently; so does minimization.\n\nAs the counterexample of a routine $r$ consists of the initial states of its input variables, to minimize a counterexample of $r$ it suffices to minimize each of $r$'s input variables.\nThe task of minimizing an input variable $x$ can be reduced to a set of integer minimization tasks based on the type of $x$. The procedure minimize\\_integer in in Algorithm \\ref{alg: minimize variable} minimizes an integer variable. It applies to the absolute value, retaining the sign (lines 1 -- 5). If $x$ is an object reference, the algorithm first checks whether $x$ denotes a container; if yes, it finds the minimal size of $x$ (lines 8 -- 9) and then minimizes $x$'s elements one by one (lines 11 -- 13); otherwise it minimizes each of $x$'s fields (lines 15 -- 16).\n\n\\vspace{-0.1in}\n\\RestyleAlgo{ruled}\n\\SetKwComment{Comment}{\/* }{ *\/}\n\\begin{algorithm}[htbp]\n\\caption{minimize\\_general ($x$): minimize a variable of integer or reference type}\n\\label{alg: minimize variable}\n \\uIf{ x is an integer}{\n \\uIf{v $>$ 0}{\n minimize\\_integer ($x$)\n }\n \\KwSty{else}\\uIf{v $<$ 0} { \n minimize\\_integer ($- x$)\n }\n }\n \\KwSty{else}\\uIf{x is an object reference}{\n \\eIf{$x$ is a container}{\n minimize\\_integer ($x.count$)\n \\\\ $n \\gets$ minimized value of $x.count$ \\\\\n \\FromLoop{$i \\gets 1$}{$i \\leq n$}{\n minimize\\_general ($x[i]$)\n \\\\ $i \\gets i + 1$\n }\n }\n {\n\t \\KwSty{across} {each field $f$ of $x$ \\KwSty{as} $x.f$} \\KwSty{loop}\n\t \\ \\ \\ \\ \\ minimize\\_general ($x.f$)\n\t }\n\t }\n\\end{algorithm}\n\\vspace{-0.1in}\n\n\n\\noindent Algorithm \\ref{alg: minimize integer} shows the details of minimize\\_integer. $B$ represents the Boogie procedure of routine $r$ generated by AutoProof. The core idea is to find the smallest integer bound $m$ such that adding a precondition $0 \\leq x < m$ (line 10) to $B$ still yields the same verification results. When the algorithm ends (no smaller value of $m$ can be found), the model from the last verification run is the minimal possible.\n\n\\begin{algorithm}[htbp]\n\\caption{minimize\\_integer ($x$): minimize an integer}\n\\label{alg: minimize integer}\n \\FromLoop{\n $m$ $\\gets$ current value of $x$\n \\\\ $B$.add\\_precondtion ($0 \\leq x$ $\\wedge$ $x < m$)\n \\\\ verify\n }\n {$no\\ smaller\\ value\\ can\\ be\\ tried$}\n {\n $B$.remove\\_last\\_precondition\n \\\\ $m$ $\\gets$ pick a smaller value\n \\\\ $B$.add\\_precondtion ($0 \\leq x$ $\\wedge$ $x < m$)\n \\\\ verify\n }\n\\end{algorithm}\n\n\\noindent The algorithm starts by assigning to $m$ the value of $x$ in the initial model, then iteratively decreases $m$. \nAt each iteration, it adds a new precondition to $B$ to reduce the the range of $x$ and performs verification based on the updated $B$, to check whether there still exists a model with a smaller value of $x$ within the interval [$0,\\ m$).\n\nPicking a smaller value for $m$ (line 9) can be implemented either by sequentially decreasing the value or using a binary reduction (as in binary search) for acceleration. \nThe current implementation first checks whether $x$ can be 0; if yes, the minimization stops as it has found the minimum; otherwise, it continues applying binary reduction. For more flexibility, it uses two user-specified parameters controlling termination:\n\\begin{itemize}\n\\item \\emph{Tolerance}: lower bound on the size of interval used in the binary search algorithm;\n\\item \\emph{Max iteration}: maximum number of verification iterations allowed when minimizing an integer.\n\\end{itemize} \n\n\\noindent We have not endeavored to prove the correctness of the algorithms since the correctness of the approach (the ``proof of the pudding'') is embodied in the result: as the overall goal is to obtain a counterexample, the final criterion is whether the minimized value is still a counterexample, as established rigorously by the underlying proof technology. If not, the original unminimized counterexample still applies. \n\n\\section{Experiment}\n\\label{sec: experiment}\n\\noindent A preliminary evaluation of the usability of the CEAM approach covers over 40 program versions\\footnote{https:\/\/github.com\/huangl223\/Proof2Test\/tree\/main\/examples} of 9 examples, including some adapted from software verification competitions \\cite{weide2008incremental, bormer2011cost, klebanov20111st}. The examples (listed in Table \\ref{table: experiment}) include: \n1) \\e{ACCOUNT} introduced in Fig. \\ref{listing: ACCOUNT};\n2) a \\e{CLOCK} class implementing a clock counting seconds, minutes, and hours;\n3) a \\e{HEATER} class implementing a heater adjusting it state (on or off) based on the current temperature and a user-defined temperature; \n4) a \\e{LAMP} class describing a lamp equipped with a switch (for switching on\/off the lamp) and a dimmer (for adjusting the light intensity of the lamp); \n5)a \\e{BINARY\\_SEARCH} class implementing the binary search algorithm;\n6) a \\e{LINEAR\\_SEARCH} implementing the linear search algorithm;\n7) a \\e{SQUARE\\_ROOT} that calculates two approximate square\nroots of a positive integer;\n8) \\e{MAX} from Fig. \\ref{listing: max};\n9) a \\e{SUM\\_AND\\_MAX} class computing the maximum and sum of the elements of an array.\n\nEach row in the table reports on the experiment result of a single example, which consists of multiple versions. Each version was intentionally injected with a fault, such as confusions between $+$ and $-$, $\\leq$ and $<$, $>$ and $\\geq$, missing loop invariant(s), pre- or postcondition, etc.\nThe experiments use AutoProof to verify the programs, produce counterexamples for all occurring proof failures, and minimize them. The \\emph{tolerance} and \\emph{max iteration} parameters are currently set to 0 and 20 respectively. \n\nThe third column gives the total number of integer variables whose minimized in the experiment. Cases where no minimization is performed (e.g., the value of an integer variable in the counterexample is already 0 before minimization) are not included. The reduction rate (fourth column), number of iterations (fifth column), verification time (sixth column) and minimization time (last column) per integer are averaged out over all minimized integers of each example.\n\nAs the experiment result shows, CEAM minimization is cost-effective overall: in most cases, conducting minimization reduces the values of integer variables by over 80\\% with an average cost of less than 4 extra verification runs (iterations). Most of the minimized integer values are fairly small and easy-to-understand: out of 125 minimized values, 108 are in the range [-2, 2], out of which 58 are zero; values not in that range are usually close to the values of some predefined constants in the program.\n\n\n\\begin{table*}[htbp]\n \\caption{Experiment Results}\n \\centering\n \\renewcommand\\arraystretch{1.3}\n \\begin{tabular}{|c|c|c|c|c|c|c|}\n \\hline\n Example & \\tabincell{c}{Number\\\\ of versions} & \\tabincell{c}{Total Number of\\\\ Minimized Integers} &\n \\tabincell{c}{Avg. Reduction\\\\ Rate} & \\tabincell{c}{Avg. Number \\\\of Iterations} &\n \\tabincell{c}{Avg. Verification \\\\Time (seconds)} & \\tabincell{c}{Avg. Minimization\\\\ Time (seconds)} \n \\\\ \\hline\n ACCOUNT & 7 & 17 & 99.98\\% & 2.5 & 0.028 & 0.087 \n \\\\ \\hline\n CLOCK & 6 & 13 & 100\\% & 1.46 & 0.019 & 0.034\n \\\\ \\hline\n HEATER & 2 & 4 & 48.4\\% & 4.25 & 0.030 & 0.128 \n \\\\ \\hline\n LAMP &4 &8 & 0.819\\% & 1.875 & 0.115 & 0.233\n \\\\ \\hline\n BINARY\\_SEARCH & 5& 31&98.8\\% & 3.22&0.448 &1.512\n \\\\ \\hline\n LINEAR\\_SEARCH & 3& 9& 99.9\\% & 3.44& 0.087& 0.279\n \\\\ \\hline\n SQUARE\\_ROOT & 4 & 3 & 89.9\\% & 4& 0.133& 0.505\n \\\\ \\hline\n MAX & 4 & 12 & 87.1\\% & 4.25 & 0.213 & 1.456\n \\\\ \\hline\n SUM\\_AND\\_MAX & 6 & 11& 80.7\\%& 3.45& 0.590&1.704\n \\\\ \\hline\n \\end{tabular}%\n \\label{table: experiment}%\n\\end{table*}%\n\n\\vspace{-0.05in}\n\\section{Related Work}\n\\label{sec: related_work}\n\\noindent In line with the objective of helping programmers to understand the causes of proof failures, several approaches have been proposed to provide more user-friendly visualizations of counterexample models \\cite{le2011boogie, chakarov2022better, hauzar2016counterexamples, stoll2019smt, nilizadeh2022generating}.\nClaire et al. \\cite{le2011boogie} developed the Boogie Verification Debugger (BVD), which interprets a counterexample model as a static execution trace (i.e., a sequence of abstract states). David et al. \\cite{hauzar2016counterexamples} transformed the models back into a counterexample trace comprehensible at the original source code level (SPARK) and display the trace using comments. Similarly, Aleksandar et al. \\cite{chakarov2022better} transformed SMT models to a format close to the Dafny syntax. In contrast to the present work, these approaches concentrate on the generation of human-readable counterexample and do not consider any counterexample minimization.\n\nAnother direction of work to ease the understanding of proof failures is to generate more useful counterexamples in the first place: Polikarpova et al. \\cite{polikarpova2013run} developed a tool, Boogaloo, which applies symbolic execution to generate counterexamples for failed Boogie programs. Like the present approach, Boogaloo displays minimal counterexamples in the form of valuations of relevant variables. \nM\\\"{u}ller et al. \\cite{muller2011using} implemented a Visual Studio dynamic debugger plug-in for Spec\\#, to reproduce a failing execution from the view of the prover. Likewise, Petiot et al. \\cite{petiot2018testing, petiot2016your} developed STADY, which produces failing tests for the failed assertions using symbolic execution techniques. That approach is also referred to as \\textit{testing-based counterexample synthesis}: it first translates the original C program into programs suitable for testing (run-time assertion checking), then applies symbolic execution to generate counterexamples (input for failing tests) based on the translated program. Unlike to that approach, CEAM counterexample extraction directly exploits the counterexample models produced by the provers, and hence does not require additional program instrumentation or counterexample generation. \n\n\n\\vspace{-0.1in}\n\\section{Conclusion}\n\\label{sec: conclusion}\n\\noindent This article has presented Counterexample Extraction and Minimization (CEAM), an approach that improves the quality of counterexamples generated in the presence of failed program proofs.\nCEAM automatically generates simple and easy-to-understand counterexamples.\nWe believe this makes the results of failed proofs practical enough to be used by regular programmers. \nThe CEAM implementation is integrated in the AutoProof verifier to assist programmers when debugging failed proofs. \nThe approach could also be applied to other Hoare-style verification tools relying on Boogie-style provers and SMT solvers. \n\nOngoing work includes implementing a feature of automatic test generation based on the counterexamples produced by CEAM, as well as extending the scope of CEAM to include the supports for more data types and program constructs. We also plan to conduct systematic empirical studies to evaluate precisely the benefits of the proposed techniques for programmers with no verification expertise.\n\n\\textit{Acknowledgments:} We thank the anonymous referees for comments which led to significant improvements. The work benefitted from discussions with Filipp Mikoian, Alexander Kogtenkov and Alexander Naumchev from SIT.\n\n\\vspace{-0.1in}\n\\bibliographystyle{splncs04}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}}