after the third crash, i figured it wasn't a fluke, and tried again 
with gdb.  Just before section 8.8.7, there are a pair of multiline 
equations. Go into the first, use the arrow keys to get out and in 
from of the first (starts with der_f2), and enter it & move.  *splat*

I've included the entire fille (207k), as i can't get it to happen in a 
partial file (and had trouble repeating one more time in the full file).




(gdb) run
Starting program: /usr/src/lyx-1_0_x/src/lyx.mm 
In MapColor [flcolor.c 816] ColormapFull. Using subsititutions
LyX: Couldn't get color linen

Program received signal SIGSEGV, Segmentation fault.
0x8112a44 in MathedXIter::ipop (this=0x822db44) at math_iter.C:803
803                 crow = crow->next;
(gsb) bt
#0  0x8112a44 in MathedXIter::ipop (this=0x822db44) at math_iter.C:803
#1  0x8122952 in MathedCursor::SetPos (this=0x8255da8, x=-4, y=116)
    at math_cursor.C:313
#2  0x80e786b in InsetFormula::Edit (this=0x834f0e8, x=0, y=0) at formula.C:483
#3  0x80b5c1a in LyXFunc::Dispatch (this=0x8255218, ac=39, 
    do_not_use_this_arg=0x0) at lyxfunc.C:2268
#4  0x80ac19c in LyXFunc::processKeyEvent (this=0x8255218, ev=0x4007f2ec)
    at lyxfunc.C:325
#5  0x8154eb5 in LyXView::KeyPressMask_raw_callback (fl=0x824d2a0, 
    xev=0x4007f2ec) at LyXView.C:337
#6  0x400383bf in fl_register_raw_callback ()
#7  0x40037758 in fl_last_event ()
#8  0x40037ee2 in fl_treat_interaction_events ()
#9  0x40037f1c in fl_check_forms ()
#10 0x8057a57 in LyXGUI::runTime (this=0x82365e8) at lyx_gui.C:629
#11 0x804dfe5 in LyX::LyX (this=0xbffffbfc, argc=0xbffffca0, argv=0xbffffcb4)
    at ../src/lyx_main.C:128
#12 0x804d88c in main (argc=1, argv=0xbffffcb4) at ../src/main.C:51
(gdb) q
The program is running.  Exit anyway? (y or n) n
Not confirmed.
(gdb) c
Continuing.

lyx: SIGSEGV signal caught
Sorry, you have found a bug in LyX. If possible, please read 'Known bugs'
under the Help menu and then send us a full bug report. Thanks!
lyx: Attempting to save document /home/hawk/Dissertation/dissertation.lyx as...
  1) /home/hawk/Dissertation/dissertation.lyx.emergency
  Save seems successful. Phew.
Bye.

Program received signal SIGABRT, Aborted.
0x401d1601 in kill ()
(gdb) c
Continuing.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb) 




#This file was created by <hawk> Thu Apr  1 16:44:20 1999
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass report
\begin_preamble
\usepackage{isuthesis}
\usepackage{verbatim}
\usepackage[normalem]{ulem}
\newcommand{\rh}{\uwave}
\newcommand{\so}{\sout}
\newcommand{\jd}{\uline}
\newcommand{\wk}{\uuline}%
\newcommand{\jim}{\textsf}
%\renewcommand{\jim}{}
%\renewcommand{\rh}{}
%\renewcommand{\jd}{}
%\renewcommand{\wk}{}
%\renewcommand{\so}{}
\end_preamble
\language default
\inputencoding default
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize letterpaper
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\paperorientation portrait
\leftmargin 1in
\topmargin 1in
\rightmargin 2.25in
\bottommargin 0.1in
\secnumdepth 2
\tocdepth 2
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Title

Numerical optimization of recursive systems of equations
\layout Author

Richard E.
 Hawkins
\layout Abstract

Investigation of numerical methods for the optimization of recursive systems,
 as found in breeding with partial genetic information.
\layout Abstract


\latex latex 

\backslash 
jim{Changes from Jim's suggestions look like this}
\layout Abstract


\latex latex 

\backslash 
wk{Changes from Wolfgang's suggestions look like this}
\layout Abstract


\latex latex 

\backslash 
jd{Changes from Jack's suggestions look like this}
\layout Abstract


\latex latex 

\backslash 
so{Removed text looks like this}
\layout Abstract


\latex latex 

\backslash 
rh{Rick's changes look like this}
\layout Abstract

Investigation of numerical methods for the optimization of recursive systems,
 as found in breeding with partial genetic information.
\layout Standard


\begin_inset LatexCommand \tableofcontents{}

\end_inset 


\layout Chapter

Introduction
\layout Standard


\latex latex 

\backslash 
pagenumbering{arabic}
\layout Standard

Recent years have seen rapid progress in computational technology, genetics,
 and the animal breeding industry, among others.
 While computer speed and storgage have increased, 
\latex latex 

\backslash 
jd{
\latex default 
advances in molecular genetics have made it 
\latex latex 
}
\latex default 
possible to test individual animals for the presence of specific genes,
 and 
\latex latex 

\backslash 
so{
\latex default 
breeders have
\latex latex 
} 
\backslash 
jd{
\latex default 
The breeding industry has 
\latex latex 
} 
\latex default 
become more concentrated.
 These advances can be combined to find more efficient methods of improving
 genetic progress within breeding herds.
 
\begin_float margin 
\layout Standard

jack: I don't know.
 where?
\end_float 
Particularly, refinements of the long-established method of dynamic programming
 to search disjoint subspaces allow the use of genetic testing for individual
 genes to maximize genetic progress, even when such maximization is analytically
 impossible.
\layout Standard

Within living memory,swine were born, raised, lived, and slaughtered primarily
 on the family farm.
 They were mostly bred with the farmer's own herd, or with an impressive
 hog from another nearby farmer.
 Slaughter would take place on the farm, where the assorted parts of the
 carcass would be preserved for personal consumption.

\bar under 
\latex latex 
 
\layout Standard

At the turn of the century, the majority of hogs were sent by rail to a
 handful of regional slaughter and packing houses to feed the growing population
 of the cities 
\begin_inset LatexCommand \cite[ p. 4-5]{Vertical Coordination}

\end_inset 

.
 Rather than feeding the family, raising hogs for market was a way to begin
 or expand a farm with relatively small amounts of capital.
 Still, though, a herd could be maintained and improved by avoiding obvious
 inbreeding and breeding the sows to the 
\latex latex 

\backslash 
sout{
\latex default 
easily recognizable superior
\latex latex 
}
\latex default 
 sires 
\latex latex 

\backslash 
jd{
\latex default 
 with superior phenotypic characteristics
\latex latex 
}
\latex default 
.
\begin_float margin 
\layout Standard

add: --
\begin_inset Quotes eld
\end_inset 

the outwordly observable traits.
\begin_inset Quotes erd
\end_inset 

 ?
\end_float 
 
\layout Standard

The world has changed since then, and hog production with it.
 Increasingly, additional traits of the hog were seen to have a genetic
 basis.
 Some were to be avoided by careful breeding, while others were to be sought
 out.
 Research has found better ways to breed the hog, and the predominant family
 operation of farrow to finish is being replaced by a system with separate
 operations for farrowing, nurseries, and finishing 
\begin_inset LatexCommand \cite[ p. 4]{Vertical Coordination}

\end_inset 

.
 For some, it became profitable to buy sucklings to raise for market.
\layout Standard

While the raising of swine remained primarily a family operation, the production
 of breeding stock rapidly became a concentrated industry.
 
\latex latex 

\backslash 
so{
\latex default 
Brands arose for these commercial breeders, and t
\latex latex 
}
\latex default 
 Today the market is dominated by breeding companies, 
\latex latex 

\backslash 
jd{
\latex default 
each aggressively marketing their own brand of suckling
\latex latex 
}
\latex default 
.

\bar under 
 
\bar default 
These companies are constantly positioning for market share, and can either
 command a better price, or take a larger share, or both, by a relatively
 modest improvement.While a tenth of a per cent of additional meat per hog
 may not have been noticeable to a farmer early in the century, commercial
 farmers see an effect similar to Rockefeller's reducing the number of tacks
 used in barrels: a fraction of a penny per hog can add up.
 Rockefeller saved $60,000 per year by reducing the number of tacks per
 barrel by one, and a commercial operation reaps a measurable amount by
 the slightest improvement--and losses for the slightest defect.
\layout Standard

The market has changed further since then.
 While artificial insemination of swine was not practical even ten years
 ago, today **% of hogs are conceived this way
\begin_float margin 
\layout Standard

Jawn Lawrence survey
\end_float 

\begin_inset LatexCommand \cite{Christian}

\end_inset 

.
 While sales in the past were based merely on animal weight, today price
 is adjusted for carcass quality.
 Statistical sampling and proxy measures such as the thickness of fat on
 the back of a hog create price premiums, whereas a excess fat will bring
 a penalty.
\begin_float margin 
\layout Standard

cite?
\end_float 
 In a multi-stage operation it is now necessary for each manager to be able
 to assess the quality of both inputs and outputs, creating further competitive
 pressure for the industries.
\layout Standard

While genetics have been indirectly recognized as affecting 
\latex latex 

\backslash 
jd{
\latex default 
the performance of 
\latex latex 
}
\latex default 
 animals 
\latex latex 

\backslash 
so{
\latex default 
since
\latex latex 
}
\latex default 
 long before Mendel's age, resulting in selective breeding, the development
 of modern genetics and molecular biology has meant that an increasing number
 of genes that affect quality in various manners have been 
\latex latex 

\backslash 
so{
\latex default 
found.
\latex latex 
}
\latex default 
 
\latex latex 

\backslash 
jd{
\latex default 
 identified.
\latex latex 
}
\latex default 
 The estrogen receptor gene
\begin_float margin 
\layout Standard

xref to example?
\end_float 
 is known to increase litter size 
\begin_inset LatexCommand \cite{Rothschild}

\end_inset 

, while a stress gene causing fainting 
\latex latex 

\backslash 
jd{
\latex default 
and reduced meat quality 
\latex latex 
} 
\latex default 
has also been identified.Not only are these genes recognized, but an individual
 animal may be tested 
\emph on 
prior
\emph default 
 to breeding to avoid less desirable progeny.
\layout Standard

While the famous example of Mendel's Peas concerned a 
\emph on 
qualitative trait,
\emph default 

\begin_inset LatexCommand \index{qualitative trait}

\end_inset 

 or one that is either present or not present, most genes of interest 
\latex latex 

\backslash 
jd{
\latex default 
in livestock genetics
\latex latex 
}
\latex default 
 concern 
\emph on 
quantitative traits
\emph default 

\begin_inset LatexCommand \index{qualitative trait}

\end_inset 

, or those which take a range of values, such as animal size.
 Rather than fully governing outcome, a gene may be one of thousands which
 
\latex latex 

\backslash 
jd{
\latex default 
, along with the environment, 
\latex latex 
} 
\latex default 
contributes to the size of an animal, some with relatively minor individual
 effect, and others with strong effect.
 If these more important genes can be recognized, the possibility exists
 of identifying a better rule for selecting animals to breed, yielding an
 increase in quality without an accompanying increase in cost.
\layout Standard

Better selection decisions have a direct economic impact.
 An improvement in the current generation also improves all subsequent generatio
ns--an extra 1% profit from improved genetics in this year's production
 raises all future years.
 which in turn increases the value of the farm by 1%.
 That is, the change is permanent--as 
\latex latex 

\backslash 
so{
\latex default 
well as
\latex latex 
} 
\backslash 
jd{ 
\latex default 
is the increase in
\latex latex 
} 
\latex default 
the value of the farm
\latex latex 

\backslash 
so{
\latex default 
, by 1%
\latex latex 
}
\latex default 
.
 More importantly, with the improved genetics, the wealth of the operation
 is improved by a quantifiable amount.
\layout Standard

Current breeding methods are based on 
\emph on 
phenotypic
\emph default 

\begin_inset LatexCommand \index{phenotype}

\end_inset 

 information, the observable traits of an animal.
 From this information, a 
\emph on 
breeding value
\emph default 

\begin_inset LatexCommand \index{breeding value}

\end_inset 

 is estimated, or 
\latex latex 

\backslash 
jd{
\latex default 
the
\latex latex 
 
\latex default 
statistical 
\latex latex 
}
\latex default 
expected value of the 
\latex latex 

\backslash 
jd{
\latex default 
collective
\latex latex 
}
\latex default 
 effect of the genes passed by the animal to its progeny.
 The goal is 
\latex latex 

\backslash 
jd{
\latex default 
to maximize rates of
\latex latex 
}
\latex default 
 genetic improvement, an approach which is closely related methodologically
 to that of optimizing profits; in fact, it is a subset.
 In the simplest case, revenue is strictly a multiple of the quantity produced--
pounds of milk, for example--and the cost of testing is very low.
 In these cases, revenue is a simple multiple of the breeding value, production
 costs are taken as constant, and the optima for genetic improvement are
 also the economic optima.
\layout Standard

More complicated cases can be handled as well.
 Quality as well as quantity can be handled: leaner pork may fetch a higher
 price per hundredweight.
 Sales volume may depend upon quality: there is more demand, as well as
 a higher price, for superior semen for artificial insemination.
 Finally, there may be a 
\begin_inset Quotes eld
\end_inset 

brand
\begin_inset Quotes erd
\end_inset 

 premium in having fixed a gene as present in the breeder's animals that
 exceeds the direct value of the gene.
 As with revenues, costs may not be constant.
\begin_float margin 
\layout Standard

Jim: not just in this example
\end_float 
 It will frequently be the case that testing for the presence of genes in
 individual animals imposes a significant cost, and that the number of generatio
ns to test becomes a variable to optimize.
 The quality of the animal may increase or lower costs, as well: a sow with
 larger litters may have increased veterinary costs, partially offsetting
 the gains, while optimizing for disease resistance could be expected to
 reduce the costs of raising the breeding herd and commercial animals.
\layout Section

The Problem
\layout Standard

While Mendel created a discipline
\begin_float margin 
\layout Standard

Jim questions 
\begin_inset Quotes eld
\end_inset 

discipline
\begin_inset Quotes erd
\end_inset 


\end_float 
 with wrinkled and unwrinkled peas, today's geneticist faces 
\latex latex 

\backslash 
so{
\latex default 
harder
\latex latex 
}
\latex default 
 
\latex latex 

\backslash 
jim{
\latex default 
more 
\latex latex 
complex}
\latex default 
 problems.
 Creatures have many traits, most of which are influenced by large numbers
 of genes--enough that they may frequently be treated as having infinite
 count.
 In recent years an increasing number of these genes have been identified.
 
\latex latex 

\backslash 
so{
\latex default 
but usually
\latex latex 
}
\backslash 
jim{
\latex default 
 However, they still 
\latex latex 
}
\latex default 
 work in concert with a large number of as yet undiscovered genes
\begin_inset LatexCommand \cite{need cite}

\end_inset 

.
\layout Standard

Given that a gene contributing significantly to a quantitative trait of
 interest can be detected, it seems likely that this information can be
 used to improve the herd.
 Particularly, the best possible improvement 
\emph on 
using
\emph default 
 the information will be 
\emph on 
at least
\emph default 
 as good as without the information.
 The question is then 
\emph on 
how
\emph default 
 to use the genetic information.
 The question as to 
\emph on 
how
\emph default 
 to use the information is not easy; the first proposed rules, using 
\begin_inset Quotes eld
\end_inset 

genotypic selection,
\begin_float margin 
\layout Standard

More explanation?
\end_float 

\begin_inset Quotes erd
\end_inset 

 have found 
\emph on 
lower
\emph default 
 long-term performance using the genetic information
\begin_inset LatexCommand \cite{Gibson}

\end_inset 

.
\layout Standard

If a gene is designated as 
\begin_inset Formula \( B \)
\end_inset 

 
\latex latex 

\backslash 
jim{ 
\latex default 
when
\latex latex 
}
\latex default 
 present, and 
\begin_inset Formula \( b \)
\end_inset 

 
\latex latex 

\backslash 
jim{
\latex default 
when
\latex latex 
}
\latex default 
 not present, there are three 
\latex latex 

\backslash 
jim{
\latex default 

\begin_inset Quotes eld
\end_inset 

genotypes,
\begin_inset Quotes erd
\end_inset 

 or
\latex latex 
}
\begin_float margin 
\layout Standard

quotes or 
\emph on 
italics
\emph default 
 for terms?
\end_float 
 types of animals: 
\begin_inset Formula \( bb \)
\end_inset 

, 
\begin_inset Formula \( bB \)
\end_inset 

, and 
\begin_inset Formula \( BB \)
\end_inset 

.
 A naive approach would be to breed only the 
\begin_inset Formula \( BB \)
\end_inset 

's, assuming that the gene is desirable.
 However, this is far from optimal.
 Suppose that each 
\begin_inset Formula \( B \)
\end_inset 

 is worth 
\begin_inset Formula \( 1 \)
\end_inset 

 , and that the unknown genes yield a standard-normal distribution for the
 trait.
 Approximately 5% of the 
\begin_inset Formula \( bb \)
\end_inset 

's will draw a value greater than 
\begin_inset Formula \( 2 \)
\end_inset 

 from the distribution, while half of the 
\begin_inset Formula \( BB \)
\end_inset 

's will draw a negative number.
 That 5% is clearly more desirable than the lower half; it is desirable
 to keep some of each.
\layout Standard

The question remains, however, as to the optimal combination.
 By selectively breeding, and with a litter size of 10, a gene can be brought
 from a frequency of 5% to 99% in about 5 generations
\begin_inset LatexCommand \ref{Results}

\end_inset 

.
 This means that if the program were to last for ten generations, with only
 the last generation of concern, the first five could be spent merely looking
 for high values from the normal distribution, with the last five spent
 increasing the frequency of the 
\begin_inset Formula \( BB \)
\end_inset 

 gene.
 This is not the optimal pattern, but is offered to show that the animals
 without the favored gene remain of value in maximizing the trait in question.
 Further, a choice must be made as to which 
\begin_inset Formula \( BB \)
\end_inset 

's to breed.
\layout Standard

While many classes of breeding rules exist, those to be considered here
 will select animals by 
\emph on 
truncation selection
\begin_inset LatexCommand \index{truncation selection}

\end_inset 


\emph default 
 within each of the 
\emph on 
genotypes
\begin_inset LatexCommand \index{genotype}

\end_inset 


\emph default 
, such as 
\begin_inset Formula \( bB \)
\end_inset 

: All creatures above the threshold quality, or 
\emph on 
estimated breeding value
\emph default 

\begin_inset LatexCommand \index{breeding value}

\end_inset 


\begin_inset LatexCommand \index{estimated breeding value}

\end_inset 

, within that genotype breed, and are mated randomly amongst all breeding
 creatures.
\begin_float footnote 
\layout Standard

Faster progress could be made by selecting mates.
 However, this would introduce concerns about inbreeding, making the problem
 far more complicated.
 It is prudent to first solve the simple problem, and then approach the
 more complicated problem with the knowledge gained.
\end_float 
 Further, it will usually be assumed that the herd is arbitrarily large.
 As such, the mean breeding value
\begin_inset LatexCommand \index{breeding value}

\end_inset 

 in the following generation, as well as all other variables of concern,
 are degenerate random variables.
\layout Standard

Preliminary work has already been done in this area.
 Dekkers, and van Arendonk, consider the case of a single 
\latex latex 

\backslash 
jim{
\emph on 
\latex default 
quantitative trait locus,
\emph default 
 or
\latex latex 
}
\latex default 
 QTL, 
\latex latex 

\backslash 
jim{
\latex default 
at which a detectable gene is located,
\latex latex 
}
\latex default 
 and use optimal control to find the maximum improvement in the final generation
 of an infinite herd 
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 

.
\layout Standard

Two basic scenarios, a small finite number of periods, and an infinite horizon
 using consider the case of a single QTL, and use optimal control to find
 the maximum improvement in the final generation of an infinite herd 
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 

.
\layout Standard

Two basic scenarios, a small finite number of periods, and an infinite horizon
 using present (discounted) value
\begin_inset LatexCommand \index{present value}

\end_inset 

, will be used, and each will be examined both with optimal control and
 numeric methods.
 In the simplest model, only the genetic improvement over time is considered.
 This problem is computationally harder, due to stiff Hessian matrices,
 and is of value in testing the robustness of the algorithms.
 Furthermore, an analytic solution is known from the work of Dekkers and
 van Arendonk
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 

.
\layout Subsection

The Breeding Industry
\layout Standard


\latex latex 

\backslash 
jim{
\latex default 
add something about this
\latex latex 
}
\layout Subsection

Economic Model
\layout Standard


\latex latex 

\backslash 
jim{
\latex default 
The breeding model translates directly to an 
\latex latex 
}
\latex default 
 economic model by 
\latex latex 

\backslash 
so{
\latex default 
 can be made by
\latex latex 
}
\latex default 
 using the present value for a finite number of generations.
 Revenues are the present discounted value of some function, possibly linear,
 of the trait in question plus any brand premium, 
\begin_inset Formula 
\begin{equation}
\sum ^{\infty }_{t=0}\rho ^{t}\left[ R(\bar{A}_{t})+B\left( \bar{A}_{t},p_{t}\right) 
\right] 
\end{equation}

\end_inset 


\begin_float margin 
\layout Standard

make 
\begin_inset Formula \( \bar{A} \)
\end_inset 

 a function?
\end_float 
 , where the revenue 
\begin_inset Formula \( R \)
\end_inset 

 reflects the value of animals of the grade indicated by the breeding value,
 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

 
\latex latex 

\backslash 
jim{
\latex default 
in generation 
\begin_inset Formula \( t \)
\end_inset 

 which depends upon gene frequency 
\begin_inset Formula \( p_{t} \)
\end_inset 

 and other cators
\latex latex 
}
\latex default 
, and the brand premium 
\begin_inset Formula \( B \)
\end_inset 

 is an amount, possibly zero, paid beyond the revenue at that same level
 when the gene is fixed, i.e., gene frequency 
\begin_inset Formula \( p_{t}=1 \)
\end_inset 

.
\layout Standard

Costs may be divided into three significant pieces: fixed costs, costs based
 on the quality of the herd, and testing costs.
 As it is assumed that the size of the herd is already chosen, and that
 a full herd will be kept, fixed costs may be ignored in all cases
\latex latex 

\backslash 
jim{
\latex default 
, as they are the same
\latex latex 
}
\latex default 
.
 Cost is discounted in the same manner as revenue.
\layout Standard


\latex latex 

\backslash 
so{
\latex default 
Quality cost is a marginal cost, measuring from the fixed cost,that may
 be either positive or negative.
 If the objective of breeding is to increase litter size, this cost will
 likely be greater than zero, due to increased veterinary costs for the
 extra offspring.
 However, if the object is disease resistance, veterinary costs should drop
 as the breed becomes stronger.
\latex latex 
}
\layout Standard


\latex latex 

\backslash 
jim{
\latex default 
Quality cost is a marginal cost, measuring from the fixed cost,that may
 be either positive or negative.
 Disease resistance, for example will reduce vetrinary costs, yielding a
 negative quantity cost.
 On the other hand, increasing litter size will increase costs, as there
 are more animcals to feed and house.
 This increased cost, however, should be more than offset by the increased
 revenue from the extra animals.
 Similarly, breeding for increased milk yield or animal size may cause the
 animals to eat more, raising costs while producing aditional salable product.
\latex latex 
}
\layout Standard

The final type of cost is that of testing.
 
\latex latex 

\backslash 
so{
\latex default 
In some cases, testing may be continued forever, and treated as a fixed
 cost.
 However, in many real-world cases, the cost is significant.

\latex latex 
 
\latex default 
It is likely that testing may be valuable for several generations, after
 which the gene is to be fixed in the population.
 This should happen once future gains from testing exceed future costs.
 
\latex latex 
}
\latex default 
 
\latex latex 

\backslash 
jim{
\latex default 
If testing were to continue forever, it could be treated as a fixed cost
 of the enterprise.
 However, this is unlikely: unless testing can be done by a casual visual
 inspection, such as a differnt color of animal, it will have at least 
\emph on 
some
\emph default 
 cost.
 Once the gains from use of this genetic information, as compared to the
 program which would be used without the information, exceed the cost of
 testing, testing will cease.

\latex latex 
 }
\layout Standard

Combining these 
\latex latex 

\backslash 
jim{
\latex default 
revenue streams and costs
\latex latex 
}
\latex default 
 yields the value of the enterprise,
\begin_inset Formula 
\begin{equation}
\sum ^{\infty }_{t=0}\rho ^{t}\left[ R(\bar{A}_{t})+B\left( \bar{A}_{t},p_{t}\right) 
-F_{t}-Q\left( \bar{A}_{t},p_{t}\right) -T\left( t\right) \right] 
\end{equation}

\end_inset 

 which is to be maximized
\latex latex 

\backslash 
jim{
\latex default 
, where 
\begin_inset Formula \( \rho  \)
\end_inset 

 is the discount factor, 
\begin_inset Formula \( F_{t} \)
\end_inset 

 is the fixed cost in that time period, 
\begin_inset Formula \( Q \)
\end_inset 

 the quality cost, and 
\begin_inset Formula \( T \)
\end_inset 

 the cost of testing.
 Only models in which 
\begin_inset Formula \( T \)
\end_inset 

 does not change until testing is halted, after which it becomes 
\begin_inset Formula \( 0 \)
\end_inset 

, will be considered; strategies such as testing alternate generations will
 be ignored.
\latex latex 
}
\layout Subsection

Analytic Solutions
\layout Standard

\begin_float margin 
\layout Standard

Jim: i don't know.
 Delete section?
\end_float 
In the simplest case, with a finite horizon, Dekkers and van Arendonk 
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 

 have used optimal control theory to show an analytic solution, solving
 recursively from the final period.
 Chapter [
\begin_inset LatexCommand \ref{sec:analyticSolutions}

\end_inset 

] finds that an analytic solution does not exist for even the simplest case
 with an infinite horizon--while the solution exists, it has one too many
 variables to solve.
\layout Subsection

Computational Solutions
\layout Standard

In the case of a finite number of generations, simple second order methods
 are inadequate to solve the problem (
\latex latex 

\backslash 
S
\latex default 

\begin_inset LatexCommand \ref{NR/SFG}

\end_inset 

, 
\emph on 
infra)
\emph default 
.
\begin_float margin 
\layout Standard

Jim: ??
\end_float 
 Choices made in the early generations have very little weight in the final
 generation, and the Hessian matrix becomes stiff.
\begin_inset LatexCommand \index{matrices, stiff}

\end_inset 

 This can be solved by augmented Newton methods
\begin_inset LatexCommand \index{Newton Methods, Augmented}

\end_inset 

, a genetic algorithm
\begin_inset LatexCommand \index{genetic algorithm}

\end_inset 

, or both.
\layout Standard

The infinite horizon presents a simpler problem in some ways.
 The discounting of the future reduces the stiffness found in the simple
 model--but will make the 
\begin_inset Quotes eld
\end_inset 

far off
\begin_inset Quotes erd
\end_inset 

 generations nearly irrelevant, rather than early generations.
 The key is in determining how many generations are necessary to be a 
\begin_inset Quotes eld
\end_inset 

large number.
\begin_inset Quotes erd
\end_inset 

 That is, is it fifteen, a hundred, or five hundred generations that must
 be considered to approximate infinity?
\layout Standard

Two broad categories of computational solutions are sought: conclusions
 to partial analytic solutions, and 
\begin_inset Quotes eld
\end_inset 

brute force
\begin_inset Quotes erd
\end_inset 

 methods which can handle methods not at all amenable to analytic solution.
 The first category is preferable when possible, but will probably require
 analytic work for each variation of the problem proposed.
 However, these methods will use known and established methods to complete
 problems, and will be certain of achieving optimal solutions.
 
\latex latex 

\backslash 
so{
\latex default 
However the
\latex latex 
}
\latex default 
 
\latex latex 

\backslash 
jim{
\latex default 
Unfortuneately
\latex latex 
}
\latex default 
, such partial solutions generally do not exist for problems of economic
 interest.
 Accordingly, finding methods for the second class are also desirable.
 In some cases, it may be possible to provide a proof of convergence for
 a class of problems, and in others it may not.
 However, the methods likely have value even when proof is impossible: while
 it may not be possible to guarantee optimality, it remains simple to compare
 the proposed solution to the best 
\emph on 
existing
\emph default 
 solution--for a 
\latex latex 

\backslash 
so{
\latex default 
real
\latex latex 
}
\latex default 
 breeder, an improvement upon current output is valuable, even if there
 is an unknowable better improvement.
\layout Section

Objectives
\layout Standard


\latex latex 

\backslash 
so{
\latex default 
A series of results are
\latex latex 
}
\latex default 
 
\latex latex 

\backslash 
jim{
\latex default 
The results 
\latex latex 
}
\latex default 
 expected
\latex latex 
 
\latex default 
from this line of research
\latex latex 

\backslash 
jim{
\latex default 
are
\latex latex 
}
\latex default 
:
\layout Enumerate

An evaluation of the economic value of genetic information 
\layout Enumerate

The devlopment of an approach to quantiatively evaluate gentic improvements
 in a herd.
\layout Enumerate

Application of the program to one or more specific cases of identified pork
 genes.
\layout Standard

To achieve these objectives, the following sub-objectives must be accomplished:
\layout Enumerate

A concise formulation of the recursive optimization problem.
\layout Enumerate

An algorithm or methodology which can find the optimal values for the control
 variables.
\layout Enumerate

An implementation of this algorithm for the specific case of maximizing
 the present discounted value of a herd in which one or more QTL's have
 been identified, considering price premiums for quality and the cost of
 testing.
 The program code for this algorithm should be as modular as possible to
 allow re-use for other problems.
\layout Enumerate


\latex latex 

\backslash 
so{
\latex default 
Application of the program to one or more specific cases of identified pork
 genes.
\latex latex 
}
\layout Chapter


\latex latex 

\backslash 
so{
\latex default 
Literature Review
\latex latex 
}
\layout Section


\latex latex 

\backslash 
so{
\latex default 
Genetics
\latex latex 
}
\layout Section


\latex latex 

\backslash 
so{
\latex default 
Pork Industry
\latex latex 
}
\layout Section


\latex latex 

\backslash 
so{
\latex default 
Analytic Method
\latex latex 
}
\layout Standard

\begin_float margin 
\layout Standard

should this even be here?
\end_float 
\layout Section


\latex latex 

\backslash 
so{
\latex default 
Computational Methods
\latex latex 
}
\layout Standard


\latex latex 

\backslash 
so{
\latex default 
The literature is nearly empty of applicable models, essentially stopping
 with linear-quadratic problems.
 
\latex latex 
}
\layout Subsubsection


\latex latex 

\backslash 
so{
\latex default 
Linear-Quadratic
\begin_inset LatexCommand \index{linear-quadratic}

\end_inset 


\latex latex 
}
\layout Standard


\latex latex 

\backslash 
so{
\latex default 
refholding spot
\latex latex 
}
\layout Subsubsection


\latex latex 

\backslash 
so{
\latex default 
Quasi-Newton
\begin_inset LatexCommand \index{quasi-Newton}

\end_inset 


\latex latex 
}
\layout Subsubsection


\latex latex 

\backslash 
so{
\latex default 
Genetic Algorithms
\begin_inset LatexCommand \index{Genetic Algorithm}

\end_inset 

 
\latex latex 
}
\layout Chapter

Genetics
\layout Standard

Some standard assumptions are made while working with theoretical genetics.
 These assumptions will generally apply to very large groups as well.
 Fundamentally, they are large sample results from the Central Limit Theorem,
 at such a sample size that variance of the population mean.has dropped to
 zero.
\layout Section

Structure of the Model
\layout Standard

Given an initial population in period 
\begin_inset Formula \( 0 \)
\end_inset 

, it is sought to maximize the average phenotypic value 
\begin_inset Formula \( B \)
\end_inset 

 of the animals 
\begin_inset Formula \( T \)
\end_inset 

 generations later, where the phenotypic value is the total effect from
 genotype 
\begin_inset Formula \( g \)
\end_inset 

, polygenic value 
\begin_inset Formula \( A \)
\end_inset 

, and environment 
\begin_inset Formula \( E \)
\end_inset 

:
\begin_inset Formula 
\begin{equation}
B=g+A+E
\end{equation}

\end_inset 

 
\begin_inset Formula \( E \)
\end_inset 

 will be assumed to be 
\begin_inset Formula \( 0 \)
\end_inset 

 in all cases.
\layout Section

The Breeding Value and Total Genetic Value
\layout Standard

There are two contributors to the breeding value: the major genes, and the
 polygenes.
 As the population is arbitrarily large, each range of values is present
 in its statistically expected value.
 It is assumed that it is the mean of the phenotypic value for the entire
 population that is of interest, rather than the traits of individuals.
 In a large population, the average breeding value and phenotypic value
 are the same.
 For example, it is the milk production of a 
\latex latex 

\backslash 
jim{
\latex default 
 dairy
\latex latex 
}
\latex default 
 herd that is most relevant, rather than how much a particular cow produces.
\begin_float footnote 
\layout Standard

Taken largely from
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 

, pp **.
 
\end_float 
 The discussion that follows considers only a single locus with two alleles,
 for the sake of simplicity.
 Except as noted, the concepts carry over directly to the case of multiple
 loci.
\layout Standard

These genotypes are tagged by the variable 
\begin_inset Formula \( m \)
\end_inset 

, taking the values 0, 1, and 2, referring to the number of times the favorable
 allele is present.
 
\begin_inset Formula \( g_{m} \)
\end_inset 

 refers to the genotypic value of the gene, and takes the values 
\begin_inset Formula \( \left\{ -a,0,a\right\}  \)
\end_inset 

 for 
\begin_inset Formula \( m=\{0,1,2\} \)
\end_inset 

 
\latex latex 

\backslash 
jim{
\latex default 
 in the case of additive major genes, which will be the primary case considered.
 An asymmetric responce, such as 
\begin_inset Formula \( \left\{ -b,0,a\right\}  \)
\end_inset 

 is also possible.
\latex latex 
}
\begin_float margin 
\layout Standard

switch order of b,a?
\end_float 
\layout Standard


\latex latex 

\backslash 
jim{
\latex default 
Allowing 
\begin_inset Formula \( i \)
\end_inset 

 to index individual animals, 
\latex latex 
}
\latex default 
 the polygenic breeding values of 
\latex latex 

\backslash 
jim{
\latex default 
an
\latex latex 
}
\latex default 
animal can be estimated by 
\begin_inset Formula \( \hat{A}_{imt} \)
\end_inset 

, the heritability of the trait not accounting for the major gene.
 In the absence of a stochastic contribution, this estimate is the actual
 value.
 
\begin_inset Formula \( \hat{A}_{imt} \)
\end_inset 

 is represented as a deviation from 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

.
\begin_inset Formula 
\[
\hat{A}_{imt}=h^{2}\left( P-g\right) \]

\end_inset 

 
\latex latex 

\backslash 
jim{
\latex default 
where 
\begin_inset Formula \( P \)
\end_inset 

 is the observed phenotypic value of the animal, and 
\begin_inset Formula \( h^{2} \)
\end_inset 

 is the 
\emph on 
heritability
\emph default 

\begin_inset LatexCommand \index{heritability}

\end_inset 

, or the portion of polygenic value which is passed to the next generation
\latex latex 
.}
\emph on 
\latex default 
 
\emph default 
Letting 
\begin_inset Formula \( b_{mt} \)
\end_inset 

 be a weight for genotype 
\begin_inset Formula \( m \)
\end_inset 

 in generation 
\begin_inset Formula \( t \)
\end_inset 

, the animal has a selection value 
\begin_inset Formula 
\begin{equation}
\label{simpleselectionvalue}
I_{imt}=b_{mt}g_{m}+\hat{A}_{imt}
\end{equation}

\end_inset 

For genotypic selection, 
\begin_inset Formula \( b_{mt}=1 \)
\end_inset 

.
 In the absence of gametic phase disequilibrium
\begin_inset LatexCommand \index{disequilibrium, gametic phase}

\end_inset 

, or correllation between polygenic value and the major gene, the variance
 of the total genetic value is the same for each of the three groups, while
 the mean is different, resulting in distributions as seen in Figure 
\begin_inset LatexCommand \ref{simpleselectionvalue}

\end_inset 


\layout Standard

\begin_float fig 
\layout Standard
\align center 

\begin_inset Figure size 208 174
file graphics/threedists.ps
width 4 70
angle -90
flags 9

\end_inset 


\layout Caption

Three Distributions With Same Variance
\begin_inset LatexCommand \label{threedists}

\end_inset 


\end_float 
 
\layout Standard

In each generation, the frequency of the major gene is expressed by 
\begin_inset Formula \( p_{t} \)
\end_inset 

.
 A value of 0 would mean that the entire population were homozygotes without
 the favorable allele, and a value of 1 would mean that the entire population
 had it twice.
 In equilibrium, there will be 
\begin_inset Formula \( p_{t}^{2} \)
\end_inset 

 homozygotes with the favorable allele twice 
\begin_inset Formula \( (AA) \)
\end_inset 

 , 
\begin_inset Formula \( 2p_{t}(1-p_{t}) \)
\end_inset 

 heterozygotes 
\begin_inset Formula \( (Aa) \)
\end_inset 

, and 
\begin_inset Formula \( (1-p_{t})^{2} \)
\end_inset 

 homozygotes without it 
\begin_inset Formula \( (aa) \)
\end_inset 

.
 Expressing the average polygenic breeding value of the population as 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

 , the average breeding value can be expressed as 
\begin_inset Formula 
\begin{equation}
\bar{G}_{t}=a(2p_{t}-1)+\bar{A}_{t}
\end{equation}

\end_inset 

 Also, 
\begin_inset Formula \( \bar{A}_{mt} \)
\end_inset 

 refers to the average polygenic value of animals with major genotype 
\begin_inset Formula \( m \)
\end_inset 

 in generation 
\begin_inset Formula \( t \)
\end_inset 

.
\layout Standard

Combining, the state of the system at time 
\begin_inset Formula \( t \)
\end_inset 

 is fully described by the values 
\begin_inset Formula \( \{\bar{A}_{t},p_{t},\sigma ^{2}_{pt},\mu _{pt}\} \)
\end_inset 

where 
\begin_inset Formula \( \mu _{pt} \)
\end_inset 

 and 
\begin_inset Formula \( \sigma ^{2}_{pt} \)
\end_inset 

 are the mean and variance of the polygenic distribution at time 
\begin_inset Formula \( t \)
\end_inset 

.
 If disequilibrium is considered, then this set must be expanded to account
 for the fact that the polygenic distribution is different for each of the
 three genotypes, and the set becomes 
\begin_inset Formula \( \{\overline{A}_{t},p_{t},\sigma _{mpt},\mu _{mpt}\} \)
\end_inset 

.
 Finally, if optimization is being done with a finite time horizon, the
 number of remaining generations becomes important, and 
\begin_inset Formula \( T-t \)
\end_inset 

 is needed as well.
\layout Standard

The problem is then to choose values for 
\begin_inset Formula \( b_{mt} \)
\end_inset 

 to maximize 
\begin_inset Formula \( A_{T} \)
\end_inset 

, which is homomorphic with choosing 
\begin_inset Formula \( x_{mt} \)
\end_inset 

 or 
\begin_inset Formula \( f_{mt} \)
\end_inset 

.
\layout Section

Standard Types of Breeding
\layout Subsubsection

Truncation
\layout Standard

Selection is by truncation of the breeding intensity 
\begin_inset Formula \( I \)
\end_inset 

.
 For each 
\begin_inset Formula \( m \)
\end_inset 

, a cutoff point 
\begin_inset Formula \( x_{mt} \)
\end_inset 

 is chosen.
 Animals with 
\begin_inset Formula \( I_{imt}>x_{mt} \)
\end_inset 

 are selected to breed for the next generation, while the rest do not breed.
 The breeding animals then randomly choose mates.
\begin_float footnote 
\layout Standard

Choosing mates for them increases problems with inbreeding of other genes.
\end_float 
 This cutoff point can also be expressed as a fraction, 
\begin_inset Formula \( f_{mt} \)
\end_inset 

, which describes the portion of animals of that type bred.
 Then 
\begin_inset Formula 
\begin{equation}
f_{mt}=1-F_{mt}(x_{mt})
\end{equation}

\end_inset 

 where 
\begin_inset Formula \( F_{mt} \)
\end_inset 

 is the cumulative distribution function for 
\begin_inset Formula \( I_{fmt} \)
\end_inset 

.
\layout Subsubsection

Mass Selection
\layout Standard

In mass selection, 
\begin_inset Formula \( b_{mt}=h^{2} \)
\end_inset 

for all 
\begin_inset Formula \( m \)
\end_inset 

.
 Thus 
\begin_inset Formula 
\begin{equation}
I=h^{2}g_{m}+h^{2}\left( P-g_{m}\right) =h^{2}P
\end{equation}

\end_inset 

The genotypic information is simply ignored, and the same truncation point
 is used for each genotype..
 This is the simplest selection method.
\layout Subsubsection

Genotypic Selection
\layout Standard

For genotypic selection, 
\begin_inset Formula \( b_{mt}=1 \)
\end_inset 

 for all 
\begin_inset Formula \( m \)
\end_inset 

.
 This is an initial attempt to take the genotypes into account.
 Thus
\begin_inset Formula 
\begin{equation}
I=1g_{m}+h^{2}\left( P-g_{m}\right) =\left( 1-h^{2}\right) g_{m}+h^{2}P
\end{equation}

\end_inset 


\layout Subsection

disequilibrium
\layout Standard

After a selection with different cutoff points for the different genotypes,
 a negative correlation between the polygenic values and the major genotypes
 of parents will exist.
 This disequilibrium is not currently addressed, and needs to be added.
\layout Subsection

Variance
\layout Standard

Simple models assume that changes in the mean breeding value are small,
 and that therefore changes in the variance of the breeding orders are of
 second order smallness, and need not be considered.
 However, the models considered here attempt to maximize the change that
 can be made, and this would appear to no longer be a reasonable assumption.
 The changes in the mean are a function of the variance.
 If the variance drops significantly due to selection, gains from selection
 will be overstated
\latex latex 

\backslash 
jim{
\latex default 
, as polygenic improvement is proportonal to polygenic variance.
\latex latex 
}
\layout Standard

There are two sources of change to the variance of the polygenic distribution.
 The first is the Bulmer effect
\begin_inset LatexCommand \index{Bulmer effect}

\end_inset 


\begin_inset LatexCommand \cite[pp. 126-131]{Bulmer}

\end_inset 

, which is a reduction in variance due to gametic phase disequilibrium.
 Breaking this down,
\begin_float margin 
\layout Standard

I expect we strike or totally rewrite this.
 Only discuss changeif we do 5-d model.
\end_float 
 
\begin_inset Formula 
\begin{equation}
\sigma _{gt}^{2}=p_{t}\left( 1-p_{t}\right) 
\end{equation}

\end_inset 

 
\begin_inset Formula 
\begin{eqnarray}
\sigma ^{2}_{pt} & = & E\left[ P^{2}_{t}-E\left[ P_{t}\right] ^{2}\right] \\
E\left[ P_{t}\right]  & = & p_{t}^{2}E\left[ P_{t}^{2}|m=2\right] +2p_{t}\left( 
1-p_{t}\right) E\left[ P_{t}^{2}|m=1\right] +\left( 1-p_{t}\right) ^{2}E\left[ 
P_{t}^{2}|m=0\right] 
\end{eqnarray}

\end_inset 

where 
\begin_inset Formula \( E\left[ \right]  \)
\end_inset 

 is the expectation operator.
 The total variance can be expressed as 
\begin_inset Formula 
\begin{equation}
\sigma ^{2}_{At}=\sigma ^{2}_{gt}+\sigma ^{2}_{pt}+2\rho _{t}\sigma _{gt}\sigma _{pt}
\end{equation}

\end_inset 

 where the subscripts 
\begin_inset Formula \( A \)
\end_inset 

, 
\begin_inset Formula \( g \)
\end_inset 

, and 
\begin_inset Formula \( p \)
\end_inset 

 indicated the breeding, genotypic, and polygenic distributions.
 While this can be taken further, it suffices for the present to observe
 that the variance is changing due to selection, and that the simple model
 does not account for this.
\layout Chapter

The Pork Industry
\layout Chapter

Dynamic Programming
\layout Standard

\begin_float margin 
\layout Standard

absorb portions of Methods into this chapter
\end_float 
Computational Methods
\layout Standard

The literature is nearly empty of applicable models, essentially stopping
 with linear-quadratic problems.
 
\layout Subsubsection

Linear-Quadratic
\begin_inset LatexCommand \index{linear-quadratic}

\end_inset 


\layout Standard

refholding spot
\begin_inset LatexCommand \label{scantlit}

\end_inset 


\layout Subsubsection

Quasi-Newton
\begin_inset LatexCommand \index{quasi-Newton}

\end_inset 


\layout Subsubsection

Genetic Algorithms
\begin_inset LatexCommand \index{Genetic Algorithm}

\end_inset 


\layout Chapter


\latex latex 

\backslash 
jim{
\latex default 
The Model
\latex latex 
}
\layout Section


\latex latex 

\backslash 
jim{
\latex default 
The Analytic Problem
\latex latex 
}
\layout Standard

Mathematically, these problems 
\latex latex 

\backslash 
so{
\latex default 
of interest
\latex latex 
}
\latex default 
 present uncommon problems for both analytic and numerical optimization.
 Particularly, the recursive
\begin_inset LatexCommand \index{recursive}

\end_inset 

 nature of the choice space twists the meanings and relevance of the commonly
 used jacobian and Hessian matrices, as well as making the choice space
 more difficult to define.
 In fact, there is almost no literature for numerical methods unless the
 entire system can be well approximated as linear-quadratic (see 
\begin_inset LatexCommand \ref{scantlit}

\end_inset 

).
\begin_float margin 
\layout Standard

fix this ref--to dp literature
\end_float 
 
\layout Section

General Description of 
\latex latex 

\backslash 
so{
\latex default 
Covered
\latex latex 
}
\latex default 
 Models
\layout Standard

A single class of models will be considered, although the definition of
 this class is large enough to cover topics of interest in several fields.
 Within this class of model, application will be made to genetic selection
 rules.
\layout Enumerate

A known initial state, 
\begin_inset Formula \( S_{0} \)
\end_inset 

, fully describing the system at the initial time, 
\begin_inset Formula \( t_{0} \)
\end_inset 

.
\layout Enumerate

A choice set, 
\begin_inset Formula \( \mathcal{A}_{t} \)
\end_inset 

, for all time periods, which can be expressed as a function of 
\begin_inset Formula \( S_{t} \)
\end_inset 

.
\layout Enumerate

Determinism.
 Given the prior state and choice made, it must be possible to calculate
 the current state.
 
\begin_float footnote 
\layout Standard

There is no reason that the state cannot include informations from prior
 state
\end_float 
\layout Enumerate

A single-valued fitness function for the entire model.
 This function should be at least piecewise continuous.
\begin_float margin 
\layout Standard

where should discussion of this go?
\end_float 
\layout Subsection*

The State
\layout Standard

The system must have a fully defined state for each time period.
 This state includes all of the variables for that time period, and if relevant,
 those from prior time periods.
 Among these variables are those used to determine the state of the following
 generation, and one or more which are used for that period's contribution
 to the total fitness.
 Note that for a model with a finite number of generations, the state will
 generally include the number of generations remaining, and thus such models
 always lack the Markov property
\begin_inset LatexCommand \index{Markov property}

\end_inset 

.
\layout Subsection*

The Choice Space
\layout Standard

In each model, there is a choice set in each time period, which itself is
 determined by choices made in prior periods.
 That is, if 
\begin_inset Formula \( \mathcal{C}_{t} \)
\end_inset 

 is the set of choices, or action set
\begin_inset LatexCommand \index{action set}

\end_inset 

, available at time 
\begin_inset Formula \( t \)
\end_inset 

, and 
\begin_inset Formula \( c_{t} \)
\end_inset 

 is the choice actually made, 
\begin_inset Formula \( \mathcal{C}_{t} \)
\end_inset 

 itself is determined by 
\begin_inset Formula \( \left\{ c_{s}:s<t\right\}  \)
\end_inset 

, 
\latex latex 

\backslash 
jim{
\latex default 
as in Figure [
\begin_inset LatexCommand \ref{choicespacefig1}

\end_inset 

]
\latex latex 
}
\latex default 
.
 That is, 
\layout Standard


\begin_inset Formula 
\begin{equation}
\mathcal{C}_{t}=\mathcal{C}_{t}\left( c_{t-1}|\mathcal{C}_{t-1}\left( c_{t-2}\ldots 
c_{0}|\mathcal{C}_{0}\right) \right) 
\end{equation}

\end_inset 


\begin_float fig 
\layout Standard


\begin_inset Figure size 129 132
file choices.eps
flags 1

\end_inset 


\layout Caption


\begin_inset LatexCommand \label{choicespacefig1}

\end_inset 

The choice taken determines the next choice space
\end_float 
 
\layout Standard

This 
\latex latex 

\backslash 
so{
\latex default 
gives the difficulty
\latex latex 
 that}
\latex default 
 
\latex latex 

\backslash 
jim{
\latex default 
complicates matters, as
\latex latex 
}
\latex default 
 a change at time 
\begin_inset Formula \( s \)
\end_inset 

 means that there is not only an interaction between 
\begin_inset Formula \( c_{t} \)
\end_inset 

 and 
\begin_inset Formula \( c_{s} \)
\end_inset 

, which can be handled by considering cross partial derivatives, but that
 
\begin_inset Formula \( c_{s} \)
\end_inset 

 actually 
\emph on 
determines
\emph default 
 
\begin_inset Formula \( \mathcal{C}_{t} \)
\end_inset 

, and thus to speak coherently about effects from changing 
\begin_inset Formula \( c_{s} \)
\end_inset 

 require calculating the changes in 
\begin_inset Formula \( \left\{ c_{t},\mathcal{C}_{t}:t>s\right\}  \)
\end_inset 

 that result.
\layout Standard

\begin_float margin 
\layout Standard

move these 2 paragraphs?
\end_float 
The 
\emph on 
state
\emph default 
 of the system can be fully described by the number of periods remaining
 in the program (if finite), the current frequency of the gene identified,
 or 
\emph on 
major gene
\emph default 

\begin_inset LatexCommand \index{major gene}

\end_inset 

, the mean of the unknown genes, or 
\emph on 
polygenes
\emph default 

\begin_inset LatexCommand \index{polygene}

\end_inset 

, the polygenic variance, and the correlation between the genotype and polygenic
 distribution.
\layout Standard

Each period, a choice is made as to the proportion of each group to be bred
 must be made.
 An additional choice of whether or not to test can be made, as well: it
 may well be the case that at some level of improvement, the benefits of
 the information no longer outweigh the cost.
\layout Subsection*

Determinism
\layout Standard

While a stochastic model would certainly have interest, it is first necessary
 to find appropriate tools for a deterministic system.
 
\layout Subsection*

Objective Function
\layout Standard

It is necessary to have a single objective function for the entire model
 to optimize.
 This function could be a value for a single period, or it can be some weighted
 combination.
 While continuity is desirable, it is not strictly necessary.
 However, it must be finite valued at all locations.
 Genetic algorithms generally have, within limits, some ability to move
 across discontinuities and to escape from local optima.
\begin_float margin 
\layout Standard

need ref
\end_float 
\layout Section

Formulation
\layout Standard

At this time, a simplified version of the genetic model will be used, including
 some strong assumptions.
 Particularly, an infinitely large herd with an infinite number of genes
 is assumed, yielding a normal distribution of the breeding values of the
 animals.
 It is further assumed that genetic progress does not cause deviations from
 normality.
 Initially, the variance of the distribution will be assumed to be fixed,
 though this restriction will eventually be relaxed.
\begin_float margin 
\layout Standard

will it?
\end_float 
\layout Standard

For the case of optimization of genetic improvement with a QTL, the general
 model can be further specified.
 The time periods are the generations of breeding, and the state variables
 are the frequency of the major genes (including covariance), mean and variance
 of the polygenic distribution, the covariance of the polygenic and major
 genes (if included), and the breeding value (which is actually a function
 of the others).
 The major genes and polygenic effect will be assumed to interact only in
 a linear manner.
\begin_float margin 
\layout Standard

include a discussion of this?
\end_float 
\layout Subsection*

Simple Case: One Locus
\layout Standard

In each generation, there will be the same number of 
\begin_inset Quotes eld
\end_inset 

kinds
\begin_inset Quotes erd
\end_inset 

 of creature, as determined by the combinations of major genes.
 With single locus with only two possible values, there are three types
 of creatures, namely those with 0, 1, or 2 of the gene.
 Generally, the number of types is the product of the number of permutations
 for each locus.
\layout Standard

The choice set for each generation is the fraction of each kind of creature
 to be bred to produce the following generation.
 The sum of the products of these fractions with the frequency of that type
 of creature must equal
\latex latex 
 
\backslash 
jim{
\latex default 

\begin_inset Formula \( Q \)
\end_inset 

 
\latex latex 
}
\latex default 
the fraction of the entire population needed to produce the next generation:
\begin_inset Formula 
\begin{equation}
\label{genericqcons}
\sum _{m}p_{mt}f_{mt}=Q
\end{equation}

\end_inset 

Note that these choices are not fully independent; if there are 
\begin_inset Formula \( n \)
\end_inset 

 types, the first 
\begin_inset Formula \( n-1 \)
\end_inset 

 choices also determine the final choice.
 Additionally, while the fractions are necessarily in the 
\begin_inset Formula \( \left[ 0,1\right]  \)
\end_inset 

 range, not all choices are necessarily possible.
 For example, if 
\begin_inset Formula \( .2 \)
\end_inset 

 of the population is needed to breed the following generation, and type
 
\begin_inset Formula \( m \)
\end_inset 

 has a frequency of 
\begin_inset Formula \( .4 \)
\end_inset 

, 
\begin_inset Formula \( f_{mt} \)
\end_inset 

 must be chosen from 
\begin_inset Formula \( \left[ 0,.5\right]  \)
\end_inset 

.
\layout Standard

Given the multivariate distribution of the major and polygenes,
\begin_float margin 
\layout Standard


\begin_inset Quotes eld
\end_inset 

major and polygenes
\begin_inset Quotes erd
\end_inset 

 or 
\begin_inset Quotes eld
\end_inset 

major and poly- genes
\begin_inset Quotes erd
\end_inset 

 or ??
\end_float 
 and the frequencies of the kinds, the average polygenic breeding value
 may be calculated.
 
\begin_float margin 
\layout Standard

include formula here?
\end_float 
Alternatively, and more easily, it can be calculated from it's prior value.
 For example, with a single major gene, and ignoring gametic phase disequilibriu
m
\begin_inset LatexCommand \index{disequilibrium, gametic phase}

\end_inset 

, the result is
\begin_inset Formula 
\begin{equation}
\bar{A}_{t+1}=\bar{A}_{t}+\frac{\sigma _{t}}{Q}\sum q_{mt}z_{mt}
\end{equation}

\end_inset 


\latex latex 

\backslash 
jim{
\latex default 
where 
\begin_inset Formula \( z_{mt} \)
\end_inset 

 is the height of the standard normal distribution at the truncation point.
\latex latex 
}
\begin_float margin 
\layout Standard

is 
\begin_inset Formula \( \sigma _{t} \)
\end_inset 

 correct? 
\begin_inset Formula \( \sigma _{mt} \)
\end_inset 

 ? 
\begin_inset Formula \( h^{2} \)
\end_inset 


\begin_inset Formula \( \sigma  \)
\end_inset 

 
\end_float 
 Similarly, the total breeding value
\begin_inset LatexCommand \index{breeding value, total}

\end_inset 

, 
\begin_inset Formula \( \bar{G}_{t} \)
\end_inset 

 can be calculated from 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

 and the gene frequencies at time 
\begin_inset Formula \( t \)
\end_inset 

.
\layout Standard

Finally, the objective function will typically be one of two forms: a function,
 perhaps equality, of 
\begin_inset Formula \( \bar{G}_{T} \)
\end_inset 

, the value after the final breeding, or a sum of a discounted profit function
 of the values of the state variables in all generations.
 The first is appropriate when measuring the maximum genetic progress in
 a given number of generations.
 The latter calculates the economic value of a breeding program.
 Note that it is not necessarily the breeding value alone which is used,
 but more likely a function of the breeding value.
 One such case could be a price premium for animals which exceed a certain
 quality.
 In this case, the breeding value might represent the amount of meat produced,
 which could be sold at different prices depending upon how lean it is.
 Another example would be a fixed price premium for the fixation of a gene
 in the population, which would introduce a discontinuity into the objective
  function.
\layout Subsection*

Simplified Finite Number of Generations
\layout Standard

In this simplified version, only the mean breeding value of the herd after
 the final breeding generation is considered.
 This is a test of the maximum rate of progress over a finite period, but
 is not economically reasonable: it neglects both the sale of the animals
 during most of the program, and the residual value of the operation.
 Further, the present value of the early generations should count for 
\emph on 
more
\emph default 
 than the final generation, rather than nothing.
\layout Standard

Nonetheless, this model is useful in developing the numerical methods, and
 ferrets out potential problems in the methods.
 It also shows the maximum rate at which genetic progress 
\emph on 
could
\emph default 
 be made in a fixed number of generations, which is almost surely not the
 same solution as the economic problem.
 Additionally, this is the problem for which analytical solution has been
 demonstrated, and is therefore useful as a check on the accuracy of the
 methods.
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 


\begin_float margin 
\layout Standard

should the solution be included?
\end_float 
\layout Subsection*

Discounted Finite Generations
\layout Standard

The objective function is then the net present value of all future profits,
 discounted for all periods considered in the model.
\layout Standard

It should be noted that the discounted finite generations problem is not
 in itself of interest; it is developed as a tool for the infinite horizon
 problem.
\begin_float margin 
\layout Standard

cross reference this? 
\end_float 
\layout Standard

The simplest form is to simply discount the revenues of each generation,
 assuming that costs are fixed and that revenues are a linear function of
 revenue, e.g., that the breeding value represents milk produced.
 In this case, the problem is to maximize total profit
\begin_inset Formula 
\begin{equation}
\pi =\sum _{t=0}^{T}\left( 1-r\right) ^{t}\bar{G}_{t}
\end{equation}

\end_inset 


\latex latex 

\backslash 
jim{
\latex default 
where 
\begin_inset Formula \( r \)
\end_inset 


\latex latex 
 
\latex default 
is the discount rate, and is equal to 
\begin_inset Formula \( 1-\rho  \)
\end_inset 


\latex latex 
 }
\latex default 
Note that the first generation can be left out of the summation, as profits
 during that generation are predetermined by the initial state.
 However, as more complicated cases may have variable costs from choices
 made, this generation will be left in for the sake of consistency.
\layout Standard

This formulation, however, still only accounts for a very simple case of
 a single major gene affecting a single trait.
 Further, it does not take into account economic factor such as premiums
 for fixed gene lines, profits, or the ability to terminate testing as a
 choice variable.
 To account for such abilities, profitability should be considered.
 For example, consider a simple case in which a hog has both meat yield
 
\begin_inset Formula \( Y \)
\end_inset 

 and leanness 
\begin_inset Formula \( Z \)
\end_inset 

.
 At a fixed leanness, or quality, 
\begin_inset Formula \( Z \)
\end_inset 

, revenues are presumably linear in 
\begin_inset Formula \( Y \)
\end_inset 

.
 However, there is no 
\emph on 
a priori
\emph default 
 reason to believe that revenue is linear in leanness, though it would presumabl
y be increasing within some range of interest, and then likely decreasing.
 Assuming that the desirability of leanness is unimodal, or that there is
 a single most desirable value, with desirability decreasing above and below
 this value, weak quasiconcavity should apply to revenues as a function
 of 
\begin_inset Formula \( Z \)
\end_inset 

.
 Finally, it is possible that for a given set of genes for yield, that total
 meat produced may be different for different levels of leanness.
 Revenue then becomes a function of leanness, and the problem expands to
 be that of maximizing 
\begin_inset Formula 
\begin{equation}
\pi =\sum ^{T}_{t=0}\left( 1-t\right) ^{t}\pi _{t}\left( Y_{t},Z_{t}\right) 
\end{equation}

\end_inset 

Note that this formulation includes the possibility that costs for change
 with the size or leanness of the animal.
 Letting 
\begin_inset Formula \( \gamma  \)
\end_inset 

 denote the vector of total genetic and breeding values, this becomes 
\begin_inset Formula 
\begin{equation}
\pi =\sum ^{T}_{t=0}\left( 1-t\right) ^{t}\pi \left( \gamma _{t}\right) 
\end{equation}

\end_inset 


\layout Standard

Finally, some models will include a price premium or penalty based on the
 presence of a gene.
 To remain general, let 
\begin_inset Formula \( \theta  \)
\end_inset 

 denote the vector of all gene frequencies and their covariances, and the
 problem becomes
\begin_inset Formula 
\begin{equation}
\label{finsumstate}
\pi =\sum ^{T}_{t=0}\left( 1-t\right) ^{t}\pi \left( \gamma _{t},\theta _{t}\right) 
\end{equation}

\end_inset 


\begin_inset LatexCommand \label{finprofofstat}

\end_inset 


\layout Standard

While these optimization problems express the profit function 
\begin_inset Formula \( \pi  \)
\end_inset 

 as a function of the state variables, the determinism of the model means
 that the state variables themselves are functions of the choice variables,
 
\begin_inset Formula \( f_{mt} \)
\end_inset 

.
 Letting 
\begin_inset Formula \( \phi  \)
\end_inset 

be the vector of fractions selected, equation 
\begin_inset LatexCommand \ref{finsumstate}

\end_inset 

 becomes, 
\begin_inset Formula 
\begin{equation}
\label{finsumphi}
\pi =\sum ^{T}_{t=0}\left( 1-t\right) ^{t}\pi \left( \phi _{t}\right) 
\end{equation}

\end_inset 


\layout Standard

The final modification is to note that the cessation of testing for one
 or more genes may be included in the model.
 That is, it is entirely possible that the a point may be reached at which
 the value of the information from continued testing is less than the cost.
 Consideration will be limited to cases in which testing occurs in every
 generation until terminated.
 As such, the testing choice variable for a gene takes a whole number value.
 Letting 
\begin_inset Formula \( \tau _{m} \)
\end_inset 

 indicate the the first generation without testing for gene
\begin_float margin 
\layout Standard

don't use m.
 It indicates type.
 What variable to index loci with?
\end_float 
 
\begin_inset Formula \( m \)
\end_inset 

, and 
\begin_inset Formula \( \tau  \)
\end_inset 

 itself be the entire vector, 
\begin_inset LatexCommand \ref{finsumphi}

\end_inset 

 becomes 
\begin_inset Formula 
\begin{equation}
\label{finsumtest}
\pi =\sum ^{T}_{t=0}\left( 1-t\right) ^{t}\pi \left( \phi _{t},\tau \right) 
\end{equation}

\end_inset 

 It should be noted that selecting 
\begin_inset Formula \( f_{mt} \)
\end_inset 

 after testing stops is nonsensical; there is only one type after this point,
 from which all must be chosen.
\layout Subsection*

Infinite Horizon
\layout Standard

This is the actual economic problem of interest.
 As an economic model, the herd should be assumed to continue forever--even
 though the farmer will eventually retire, the discounted value of the remaining
 infinite horizon reflects the value for which he can sell the herd.
 This problem is actually easier to solve analytically than the finite horizon--
in the cases in which it 
\emph on 
is
\emph default 
 soluble.
 However, unless the problem can be analytically reduced to a single equation
 or function, it is not possible to solve for an infinite number of generations;
 a rule must be found for approximation of this horizon.
\layout Standard

The problem is not as futile as it sounds.
 With the introduction of discounting, far off
\begin_float margin 
\layout Standard


\begin_inset Quotes eld
\end_inset 

far off
\begin_inset Quotes erd
\end_inset 

? colloquial
\end_float 
 generations have an increasingly diminished impact.
 Thus it can be expected that a convergence
\begin_inset LatexCommand \index{convergence}

\end_inset 

 theorem can be written to the effect that for any desired 
\begin_inset Formula \( \epsilon  \)
\end_inset 

, and for any generation 
\begin_inset Formula \( T \)
\end_inset 

, that 
\begin_inset Formula \( N_{\epsilon ,T} \)
\end_inset 

 can be chosen sufficiently large that 
\begin_inset Formula 
\begin{equation}
\left| f_{mt}^{N_{\epsilon ,T}}-f_{mt}\right| <\epsilon \forall t\leq T
\end{equation}

\end_inset 

 
\layout Standard

\begin_float footnote 
\layout Standard


\latex latex 

\backslash 
so{
\latex default 
old paragraph: Even in the non-discounted finite case, solutions for adjacent
 numbers of generations strongly resemble each other.
 The early generations for ten generations are quite similar to those for
 fifteen
\begin_inset LatexCommand \ref{Results}

\end_inset 

,which will already be quite close to infinite.
\latex latex 
}
\end_float 
Furthermore, the introduction of a generation in which to cease testing
 as a choice variable simplifies, rather than complicates, the problem.
 Once testing ends, selection is by mass selection, in which the animals
 to breed are selected solely on the observable value of the trait.
 The genetic progress under mass selection is well known, and thus once
 the gene is fixed (or even not fixed, but testing ended), there is nothing
 new to the problem.
 A 
\begin_inset Quotes eld
\end_inset 

canned
\begin_inset Quotes erd
\end_inset 

 function can be written for the value of the entire future after the cutoff
 generation, as discussed at []
\begin_float margin 
\layout Standard

ref
\end_float 
.
 This changes the problem from 
\begin_inset Quotes eld
\end_inset 

find choices for all generations forever,
\begin_inset Quotes erd
\end_inset 

 with an infinite number of choice variables, to 
\begin_inset Quotes eld
\end_inset 

choose a finite number of generations, and choices for those generations.
\begin_inset Quotes erd
\end_inset 


\layout Standard

Even without such a cutoff, the problem remains tractable.
 Gene frequencies That is, after a very small number of generations, the
 gene frequency becomes very close to one, and remains so permanently, which
 closely approximates mass selection, given that essentially all of the
 herd have become homozygotes with the gene.
 Accordingly, an infinite horizon may be simulated by considering 
\begin_inset Quotes eld
\end_inset 

enough
\begin_inset Quotes erd
\end_inset 

 generations
\layout Section

Genetic Models
\layout Standard

Very little consideration will be given to purely genetic models without
 economic consequence.
 In fact, there is only one possible genetic question that can be answered,
 namely 
\begin_inset Quotes eld
\end_inset 

What is the greatest genetic progress possible in 
\begin_inset Formula \( N \)
\end_inset 

 generations?
\begin_inset Quotes erd
\end_inset 

 where 
\begin_inset Formula \( N \)
\end_inset 

 is a fixed number.
 Any other question must involve a state from at least two generations after
 the initial state, which means that these must be weighted.
 Barring Divine Revelation, the question of how to weight generations is
 inherently a question of relative economic value.
\layout Section

Analytic Methods for Soluble Cases
\layout Standard


\begin_inset LatexCommand \label{sec:analyticSolutions}

\end_inset 

There are categories of cases for which it is possible to partially solve
 analytically, such as the case considered in 
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 

.
 However, even in this case, analytic methods fail to yield a complete solution,
 but instead take the problem to a point at which iterative methods can
 solve for the truncation points.
 This is as far as such a method can get.
\layout Standard

However, Dekkers et al solved for a finite case.
 The actual economic problem is for the infinite horizon, in which the business
 continues indefinitely.
 The problem can easily be reformulated to include discounting and an infinite
 horizon.
 Consider again the Dekkers model.
 The genetic value 
\begin_inset Formula \( G_{t} \)
\end_inset 

 is defined as the sum of the effects of the major gene and the polygenic
 value
\begin_inset Formula 
\begin{equation}
\label{siminfobjfn}
\bar{G}_{t}=a\left( 2p_{t}-1\right) +\bar{A}_{t}
\end{equation}

\end_inset 

where 
\begin_inset Formula \( p_{t} \)
\end_inset 

 is the frequency of the major gene
\begin_inset LatexCommand \index{gene frequency}

\end_inset 

, or the portion of loci in the population that actually have this gene,
 and 
\begin_inset Formula \( a \)
\end_inset 

 is the of 
\emph on 
each copy 
\emph default 
of the gene.
 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 


\emph on 
 
\emph default 
is the mean of the polygenic value, which is assumed to be normally distributed
 with standard deviation 
\begin_inset Formula \( \sigma  \)
\end_inset 


\emph on 
.
 
\emph default 
The available choice variables are 
\begin_inset Formula \( \left\{ f_{mt}:m\in \{0,1,t\},t\in \{0,1,...T-1\right\}  \)
\end_inset 

, the fraction of type 
\begin_inset Formula \( m \)
\end_inset 

 that will be bred in generation 
\begin_inset Formula \( t \)
\end_inset 

 to produce the next generation.
 These are isomorphic with the truncation points 
\begin_inset Formula \( x_{mt} \)
\end_inset 

 and density 
\begin_inset Formula \( z_{mt} \)
\end_inset 

 of the standard normal distribution.
 Breeding is by 
\begin_inset Quotes eld
\end_inset 

truncation
\begin_inset Quotes erd
\end_inset 

: all animals better than the truncation point breed, and are randomly assigned
 to another breeder.
 
\begin_inset Formula \( Q \)
\end_inset 

 is the fraction of the entire population that must be bred to produce another
 population of the same size.
 The initial values of 
\begin_inset Formula \( p_{0} \)
\end_inset 

 and 
\begin_inset Formula \( \bar{A}_{0} \)
\end_inset 

 are known.
\layout Standard

Dekkers problem was to maximize the total genetic progress by the final
 generation 
\begin_inset Formula \( T \)
\end_inset 

:
\begin_inset Formula 
\begin{equation}
\label{finobjfn}
Max_{f_{mt}}\left\{ L|\bar{A}_{0},p_{0},Q\right\} 
\end{equation}

\end_inset 

where
\begin_inset Formula 
\begin{eqnarray}
L & = & \sum ^{T-1}_{t=0}\left\{ H_{t}-\lambda _{t}p_{t}-\gamma 
_{t}\bar{A}_{t}\right\} -\lambda _{T}p_{T}+\lambda _{0}p_{0}-\gamma 
_{T}\bar{A}_{0}+a\left( 2p_{T}-1\right) +\bar{A}_{T}\\
H_{t} & = & \frac{\lambda _{t+1}}{Q}\left\{ f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 
1-p_{t}\right) \right\} \nonumber \\
 &  & +\gamma _{t+1}\left\{ \bar{A}_{t}+\frac{\sigma }{Q}\left[ 
p_{t}z_{1t}+2p_{t}\left( 1-p_{t}\right) z_{2t}+\left( 1-p_{t}\right) ^{2}z_{3t}\right] 
\right\} \nonumber \\
 &  & +\epsilon _{t}\left\{ Q-f_{1t}p_{t}^{2}-2f_{2t}p_{t}\left( 1-p_{t}\right) 
-f_{3t}\left( 1-p_{t}\right) ^{2}\right\} 
\end{eqnarray}

\end_inset 

 
\begin_inset LatexCommand \cite[eq 6-9]{dekkers}

\end_inset 

.
\layout Standard

The extension to an infinite horizon with discounting is straightforward.
 Using a constant discount value 
\begin_inset Formula \( r \)
\end_inset 

, note that the total genetic value in generation 
\begin_inset Formula \( t \)
\end_inset 

 is  with present value at time 
\begin_inset Formula \( t=0 \)
\end_inset 

 is
\begin_inset Formula 
\begin{equation}
\left( 1-r\right) ^{t}\bar{G}_{t}=\left( 1-r\right) ^{t}a\left( 2p_{t}-1\right) 
+\bar{A}_{t}
\end{equation}

\end_inset 

 and the objective function to maximize becomes
\begin_inset Formula 
\begin{equation}
\label{simpleinfhoriz}
G=\sum ^{\infty }_{t=0}\left( 1-r\right) ^{t}\left[ a\left( 2p_{t}-1\right) 
+\bar{A}_{t}\right] 
\end{equation}

\end_inset 

 subject to
\begin_float margin 
\layout Standard

the folowing equations were broken
\end_float 

\begin_inset Formula 
\begin{eqnarray}
Q & = & f_{1t}p_{t}^{2}+f_{2t}2p_{t}\left( 1-p_{t}\right) +f_{3t}\left( 
1-p_{t}^{2}\right) \label{siminfqcns} \\
p_{t+1} & = & \frac{1}{Q}\left\{ f_{1t}p^{2}_{t}+f_{2t}p_{t}\left( 1-p_{t}\right) 
\right\} \label{siminfprule} \\
\bar{A}_{t+1} & = & \bar{A}_{t}+\frac{\sigma }{Q}\left\{ p^{2}_{t}z_{1t}+2p_{t}\left( 
1-p_{t}\right) z_{2t}+\left( 1-p_{t}\right) ^{2}z_{3t}\right\} \label{siminfarule} 
\end{eqnarray}

\end_inset 

where (
\begin_inset LatexCommand \ref{siminfqcns}

\end_inset 

) is the constraint keeping population size constant, and (
\begin_inset LatexCommand \ref{siminfprule}

\end_inset 

) and (
\begin_inset LatexCommand \ref{siminfarule}

\end_inset 

) describe the progression of 
\begin_inset Formula \( p \)
\end_inset 

 and 
\begin_inset Formula \( \bar{A} \)
\end_inset 

 given the choices made and the current state.
 This formulation has the same constraints as the Dekkers formulation, save
 only that the Lagrange multipliers are required for an infinite number
 of time periods.
\layout Standard

However, it is useful to rewrite this exclusively in terms of 
\begin_inset Formula \( x_{mt} \)
\end_inset 

.
 Letting 
\begin_inset Formula \( \phi  \)
\end_inset 

 and 
\begin_inset Formula \( \Phi  \)
\end_inset 

 represent the pdf and cdf, respectively, of the standard normal distribution,
 
\begin_inset Formula 
\begin{eqnarray}
f_{mt} & = & 1-\Phi \left( x_{mt}\right) \\
z_{mt} & = & \phi \left( x_{mt}\right) 
\end{eqnarray}

\end_inset 

 Equations (
\begin_inset LatexCommand \ref{siminfqcns}

\end_inset 

-
\begin_inset LatexCommand \ref{siminfarule}

\end_inset 

) become 
\begin_inset Formula 
\begin{eqnarray}
Q & = & \left( 1-\Phi \left( x_{1t}\right) \right) p_{t}^{2}+\left( 1-\Phi \left( 
x_{2t}\right) \right) 2p_{t}\left( 1-p_{t}\right) +\left( 1-\Phi \left( x_{3t}\right) 
\right) \left( 1-p_{t}^{2}\right) \label{siminfxqcons} \\
p_{t+1} & = & \frac{1}{Q}\left\{ \left( 1-\Phi \left( x_{1t}\right) \right) 
p_{t}^{2}+\left( 1-\Phi \left( x_{2t}\right) \right) _{2t}p_{t}\left( 1-p_{t}\right) 
\right\} \\
\bar{A}_{t+1} & = & \bar{A}_{t}+\frac{\sigma }{Q}\left\{ p_{t}^{2}\phi \left( 
x_{1t}\right) +2p_{t}\left( 1-p_{t}\right) \phi \left( x_{2t}\right) +\left( 
1-p_{t}\right) ^{2}\phi \left( x_{3t}\right) \right\} \\
 & \forall  & 0\leq t\leq \infty 
\end{eqnarray}

\end_inset 

 The Hamiltonian remains
\begin_inset Formula 
\begin{eqnarray}
H_{t} & = & \frac{\lambda _{t+1}}{Q}\left\{ \left( 1-\Phi \left( x_{1t}\right) \right) 
p_{t}^{2}+\left( 1-\Phi \left( x_{2t}\right) \right) p_{t}\left( 1-p_{t}\right) 
\right\} \nonumber \\
 &  & +\gamma _{t+1}\left\{ \bar{A}_{t}+\frac{\sigma }{Q}\left[ p_{t}^{2}\phi \left( 
x_{1t}\right) +2p_{t}\left( 1-p_{t}\right) \phi \left( x_{2t}\right) +\left( 
1-p_{t}\right) ^{2}\phi \left( x_{3t}\right) \right] \right\} \nonumber \\
 &  & +\epsilon _{t}\left\{ Q-\left( 1-\Phi \left( x_{1t}\right) \right) 
p_{t}^{2}-2\left( 1-\Phi \left( x_{2t}\right) \right) p_{t}\left( 1-p_{t}\right) 
-\left( 1-\Phi \left( x_{3t}\right) \right) \left( 1-p_{t}\right) ^{2}\right\} 
\end{eqnarray}

\end_inset 

 and 
\begin_inset Formula 
\begin{equation}
L=G+\sum _{t=0}^{\infty }\left\{ H_{t}-\lambda _{t}p_{t}-\gamma 
_{t}\bar{A}_{t}\right\} +\lambda _{0}p_{0}+\gamma _{0}\bar{A}_{0}
\end{equation}

\end_inset 


\begin_float margin 
\layout Standard

Up to here, I think I've made no changes.
 
\end_float 
 which differs from Dekkers' in the lack of a final period, and inclusion
 of the discounted values of all generations in G.
 
\layout Standard

The partial derivatives of 
\begin_inset Formula \( L \)
\end_inset 

 are taken with respect to the choice variables 
\begin_inset Formula \( x_{mt} \)
\end_inset 

, the state variables 
\begin_inset Formula \( p_{t} \)
\end_inset 

 and 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

, and the Lagrangian multipliers, all of which derivatives must be equal
 to zero.
 
\layout Standard

Taking the first partials of 
\begin_inset Formula \( L \)
\end_inset 

 yields
\begin_inset Formula 
\[
\nabla _{x_{t}}L=\nabla _{x_{t}}H\]

\end_inset 


\begin_inset Formula 
\begin{eqnarray}
\nabla _{x_{t}}L & = & \nabla _{x_{t}}H\nonumber \\
 & = & 0\nonumber \\
 & = & \frac{\lambda _{t+1}}{Q}\left[ \begin{array}{c}
-p_{t}^{2}\phi \left( x_{1t}\right) \\
-p_{t}\left( 1-p_{t}\right) \phi \left( x_{2t}\right) \\
0
\end{array}\right] \nonumber \\
 &  & -\frac{\gamma _{t+1}\sigma }{Q}\left[ \begin{array}{c}
p_{t}^{2}x_{1t}\phi \left( x_{1t}\right) \\
2p_{t}\left( 1-p_{t}\right) x_{2t}\phi \left( x_{2t}\right) \\
\left( 1-p_{t}^{2}\right) x_{3t}\phi \left( x_{3t}\right) 
\end{array}\right] +\epsilon _{t}\left[ \begin{array}{c}
p_{t}^{2}\phi \left( x_{1t}\right) \\
2p_{t}\left( 1-p_{t}\right) \phi \left( x_{2t}\right) \\
\left( 1-p_{t}^{2}\right) \phi \left( x_{3t}\right) 
\end{array}\right] 
\end{eqnarray}

\end_inset 

  
\layout Standard

For 
\begin_inset Formula \( p_{t} \)
\end_inset 

,
\begin_inset Formula 
\begin{eqnarray}
\frac{\partial L}{\partial p_{t}} & = & 2\left( 1-r\right) ^{t}a-\lambda _{t}\nonumber 
\\
 &  & +\frac{\lambda _{t+1}}{Q}\left\{ 2\left( 1-\Phi \left( x_{1t}\right) \right) 
p_{t}+\left( 1-\Phi \left( x_{2t}\right) \right) \left( 1-2p_{t}\right) \right\} 
\nonumber \\
 &  & +2\frac{\gamma _{t+1}\sigma }{Q}\left\{ p_{t}\phi \left( x_{1t}\right) +\left( 
1-2p_{t}\right) \phi \left( x_{2t}\right) -\left( 1-p_{t}\right) \phi \left( 
x_{3t}\right) \right\} \label{siminfpt} \\
 &  & +2\epsilon _{t}\left\{ -\left( 1-\Phi \left( x_{1t}\right) \right) p_{t}-\left( 
1-\Phi \left( x_{2t}\right) \right) \left( 1-2p_{t}\right) +\left( 1-\Phi \left( 
x_{3t}\right) \right) \left( 1-p_{t}\right) \right\} \nonumber 
\end{eqnarray}

\end_inset 

The partial with respect to 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

 yields information about 
\begin_inset Formula \( \gamma _{t} \)
\end_inset 

 , its shadow value
\begin_inset Formula 
\begin{equation}
\label{simgameq}
\frac{\partial L}{\partial \bar{A}_{t}}=\left( 1-r\right) ^{t}+\gamma _{t+1}-\gamma 
_{t}
\end{equation}

\end_inset 

while 
\begin_inset Formula \( \lambda  \)
\end_inset 

 and 
\begin_inset Formula \( \epsilon  \)
\end_inset 

 yield only the dynamic behavior of 
\begin_inset Formula \( p_{t} \)
\end_inset 

 and the breeding constraint:
\begin_inset Formula 
\begin{eqnarray}
L_{\lambda _{t+1}} & = & \frac{1}{Q}\left\{ f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 
1-p_{t}\right) \right\} -p_{t+1}\label{siminflam} \\
L_{\epsilon _{t}} & = & Q-f_{1t}p_{t}^{2}-f_{2t}2p_{t}\left( 1-p_{t}\right) 
-f_{3t}\left( 1-p_{t}\right) ^{2}\label{siminfes} \\
L_{\gamma _{t+1}} & = & \bar{A}_{t}+\frac{\sigma }{Q}\left[ p_{t}^{2}\phi \left( 
x_{1t}\right) +2p_{t}\left( 1-p_{t}\right) \phi \left( x_{2t}\right) +\left( 
1-p_{t}\right) ^{2}\phi \left( x_{3t}\right) \right] -\bar{A}_{t+1}
\end{eqnarray}

\end_inset 

 Unlike the Dekkers formulation, there is no final period, and thus no derivativ
es are calculated for that special case.
\layout Standard

As all of these equations are also equal to 0,[ 
\begin_inset LatexCommand \ref{simgameq}

\end_inset 

 ] means that 
\begin_inset Formula 
\begin{equation}
\label{siminfgamnext}
\gamma _{t+1}=\gamma _{t}-\left( 1-r\right) ^{t}
\end{equation}

\end_inset 

 This result is drastically different than Dekkers', which found that 
\begin_inset Formula \( \gamma _{t}=1\forall t \)
\end_inset 

.
 As 
\begin_inset Formula \( \gamma _{t} \)
\end_inset 

 is the shadow value for 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

,and the initial value 
\begin_inset Formula \( \bar{A}_{0} \)
\end_inset 

is known, it follows that 
\begin_inset Formula \( \gamma _{t} \)
\end_inset 

 is a known value that can be directly calculated.
 As the growth is additive, 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

 contributes its own value in the current and each subsequent generation.
 This value can be discounted to time 
\begin_inset Formula \( 0 \)
\end_inset 

, yielding 
\begin_inset Formula 
\begin{equation}
\frac{\partial G}{\partial \bar{A}_{t}}=\frac{\left( 1-r\right) ^{t}}{r}
\end{equation}

\end_inset 

 or that 
\begin_inset Formula 
\begin{equation}
\label{siminfgamval}
\gamma _{t}=\frac{\left( 1-r\right) ^{t}}{r}
\end{equation}

\end_inset 

This relation can also be found by starting with the limiting value at infinity
 of zero, and writing 
\begin_inset Formula \( \gamma _{0} \)
\end_inset 

 as an infinite sum of the later values.
\layout Standard

From [
\begin_inset LatexCommand \ref{siminff1}

\end_inset 

] and [
\begin_inset LatexCommand \pageref{siminfgamval}

\end_inset 

] come the equations
\begin_inset Formula 
\begin{equation}
\label{siminfepssln}
-\frac{\lambda _{t+1}}{Q}\left[ \begin{array}{c}
1\\
.5\\
0
\end{array}\right] +\frac{\left( 1-r\right) ^{t}\sigma }{rQ}\left[ \begin{array}{c}
x_{1t}\\
x_{2t}\\
x_{3t}
\end{array}\right] =\epsilon _{t}\left[ \begin{array}{c}
1\\
1\\
1
\end{array}\right] 
\end{equation}

\end_inset 

 which may be solved 
\begin_inset Formula 
\begin{eqnarray}
x_{3t}-x_{2t} & = & \frac{r}{\left( 1-r\right) ^{t}}\frac{\lambda _{t+1}}{2\sigma 
}\label{siminfx3x2} \\
x_{2t}-x_{1t} & = & \frac{r}{\left( 1-r\right) ^{t}}\frac{\lambda _{t+1}}{2\sigma 
}\label{siminfx2x1} 
\end{eqnarray}

\end_inset 

 Which gives the result that
\begin_inset Formula 
\begin{equation}
x_{3t}-x_{2t}=x_{2t}-x_{1t}
\end{equation}

\end_inset 

 or that the truncation points are equidistant, as Dekkers found in the
 finite model.
 Considering the limiting case of steep discounting, this yield for the
 first generation the same result as for Dekkers' final generation, as expected.
\layout Standard

The relations of [
\begin_inset LatexCommand \ref{siminfepssln}

\end_inset 

] can be used to remove the 
\begin_inset Formula \( \epsilon _{t} \)
\end_inset 

 from [
\begin_inset LatexCommand \ref{siminfpt}

\end_inset 

], which becomes
\begin_inset Formula 
\begin{eqnarray}
\lambda _{t} & = & 2\left( 1-r\right) ^{t}a\nonumber \\
 &  & +\frac{\lambda _{t+1}}{Q}\left\{ 2\left( 1-\Phi \left( x_{1t}\right) \right) 
p_{t}+\left( 1-\Phi \left( x_{2t}\right) \right) \left( 1-2p_{t}\right) \right\} 
\nonumber \\
 &  & +2\frac{\left( 1-r\right) ^{t}\sigma }{rQ}\left\{ p_{t}\phi \left( x_{1t}\right) 
+\left( 1-2p_{t}\right) \phi \left( x_{2t}\right) -\left( 1-p_{t}\right) \phi \left( 
x_{3t}\right) \right\} \nonumber \\
 &  & -\frac{\lambda _{t+1}}{Q}\left\{ 2\left( 1-\Phi \left( x_{1t}\right) \right) 
p_{t}+\left( 1-\Phi \left( x_{2t}\right) \right) \left( 1-2p_{t}\right) \right\} 
\nonumber \\
 &  & -2\frac{\left( 1-r\right) ^{t}\sigma }{rQ}\nonumber \\
 &  & \, \, \, \, \left\{ \left( 1-\Phi \left( x_{1t}\right) \right) 
x_{1t}p_{t}+\left( 1-\Phi \left( x_{2t}\right) \right) x_{2t}\left( 1-2p_{t}\right) 
-\left( 1-\Phi \left( x_{3t}\right) \right) x_{3t}\left( 1-p_{t}\right) \right\} 
\nonumber \\
 & = & 2\left( 1-r\right) ^{t}a+2\frac{\left( 1-r\right) ^{t}\sigma }{rQ}\left\{ 
\left[ \phi \left( x_{1t}\right) -\left( 1-\Phi \left( x_{1t}\right) \right) 
x_{1t}\right] p_{t}\right. \nonumber \\
 &  & \, \, \, \, \, \left. +\left[ \phi \left( x_{2t}\right) -\left( 1-\Phi \left( 
x_{2t}\right) \right) x_{2t}\right] \left( 1-2p_{t}\right) -\left[ \phi \left( 
x_{3t}\right) -\left( 1-\Phi \left( x_{3t}\right) \right) x_{3t}\right] \left( 
1-p_{t}\right) \right\} \label{siminfliso} 
\end{eqnarray}

\end_inset 

 Which is an expression, if not pretty, for 
\begin_inset Formula \( x_{mt} \)
\end_inset 

 and 
\begin_inset Formula \( \lambda _{t} \)
\end_inset 

.
\layout Standard

Unfortunately, this expression is not amenable to analytic or numeric solution.
 For any given time period, equations [
\begin_inset LatexCommand \ref{siminfqcns}

\end_inset 

], [
\begin_inset LatexCommand \ref{siminfx3x2}

\end_inset 

], [
\begin_inset LatexCommand \ref{siminfx2x1}

\end_inset 

], and [
\begin_inset LatexCommand \ref{siminfliso}

\end_inset 

] produce five equations in only four unknowns for any given time period:
 the three 
\begin_inset Formula \( x_{mt} \)
\end_inset 

, and the multipliers 
\begin_inset Formula \( \lambda _{t} \)
\end_inset 

 and 
\begin_inset Formula \( \lambda _{t+1} \)
\end_inset 

.
 If 
\begin_inset Formula \( \lambda _{t} \)
\end_inset 

 were known for any finite period, the problem would be soluble for all
 periods.
 While the limiting value for large time is 
\begin_inset Formula \( 0 \)
\end_inset 

, namely the result that there is very little value of something that far
 away, it is not possible to do an infinite summation as was done to produce
 (
\begin_inset LatexCommand \ref{siminfgamval}

\end_inset 

), as the remaining terms for each period are combinations of the CDF and
 PDF of the standard normal distribution.
\layout Standard

The only remaining possibility would be to find a value for 
\begin_inset Formula \( \lambda _{0} \)
\end_inset 

.
 While the expression 
\begin_inset Formula 
\begin{equation}
\lambda _{0}=\frac{d}{dp_{0}}G
\end{equation}

\end_inset 

 this is of little value, as calculating this value requires knowledge of
 the solution.
\layout Standard

As such, there appears to be no solution available for the pure infinite
 horizon problem.
\layout Section

Infinite Horizon With Testing Costs
\layout Standard

While the simple problem of the infinite horizon cannot be treated analytically,
 due to the inability to find an initial Lagrangian multiplier for some
 finite time period, the introduction of a cost for genetic testing makes
 the problem tractable.
\layout Standard

Animals do not come with labels on their foreheads indicating their genetic
 makeup; if so, the polygenic distribution will be known as well.
 Instead, there is some finite costs for testing an animal, and testing
 should not occur if the gains are outweighed by the cost.
\layout Standard

Conveniently, it is possible to put a ceiling on the value of testing.
 The greatest possible gain from the major gene is for it to become fully
 present in the population.
 That is, for 
\begin_inset Formula \( p_{t} \)
\end_inset 

 to change from its present value to 
\begin_inset Formula \( 1 \)
\end_inset 

.
 Consider first the extreme case of taking this entire gain in a single
 generation.
 If no selection at all were to occur, the gene would keep its current frequency.
 Thus the change for the next generation is 
\begin_inset Formula \( 1-p_{t} \)
\end_inset 

, which has a value of 
\begin_inset Formula \( 2a\left( 1-p_{t}\right)  \)
\end_inset 

 in the subsequent generation.
 Further, compared to no selection, it has that value in all future generations.
 Thus the present value of the change is 
\begin_inset Formula 
\begin{eqnarray}
PV & = & \sum _{i=1}^{\infty }\left( 1-r\right) ^{i}2a\left( 1-p_{t}\right) \nonumber 
\\
 & = & 2a\left( 1-p_{t}\right) \frac{1-r}{r}
\end{eqnarray}

\end_inset 

 Thus, in no case is it worth testing the animals if the cost of testing
 is greater than this value.
\layout Standard

However, even if selection by major gene is not profitable, mass selection
 would still presumably be used, allowing a tighter limit to be drawn.
 Mass selection will continue to cause the frequency of the major gene to
 change; animals with this gene will be selected at lower polygenic values,
 and thus become relatively more common in the population.
 Without testing, the observed or phenotypic truncation point will be the
 same for all groups, with the result that the polygenic truncation points
 are separated by exactly 
\begin_inset Formula \( a \)
\end_inset 

, or that 
\begin_inset Formula 
\begin{equation}
x_{1t}+a=x_{2t}=x_{3t}-a
\end{equation}

\end_inset 

 The frequency in the next generation as a function of the current frequency
 can then be calculated.
 First, the overall truncation point is
\begin_inset Formula 
\begin{equation}
x_{t}=\Phi ^{-1}\left( 1-Q\right) 
\end{equation}

\end_inset 

 That is, all creatures in the upper fraction 
\begin_inset Formula \( Q \)
\end_inset 

of the population are kept.
 For creatures that don't have the gene at all, the phenotypic and polygenic
 value are the same, and thus 
\begin_inset Formula 
\begin{equation}
x_{3t}=\Phi ^{-1}\left( 1-Q\right) 
\end{equation}

\end_inset 

 
\begin_inset Formula 
\[
p_{t+1}(p_{t})=\frac{1}{Q}\left\{ \left( 1-\Phi \left( x_{2t}\right) \right) \right\} 
\]

\end_inset 


\layout Standard

break
\layout Standard

Given that the program of breeding for mass selection is well known, it
 is possible to write a value function for the current value of the future
 gains from mass selection,
\begin_inset Formula 
\[
PV_{m}\left( p_{t}\right) =\sum _{i=1}^{\infty }\left( 1-r\right) ^{i}\left[ 2a\left( 
p_{t+i}^{m}-p_{t}\right) +\left( \bar{A}^{m}_{t+i}-\bar{A}_{t}\right) \right] \]

\end_inset 

 
\layout Standard

The amount of work to be invested in finding a better bound will depend
 upon how much computation the bound saves; a loose bound does no harm,
 but merely requires additional computation.
 
\layout Subsection*

Purpose of the Bound
\layout Standard

The bound has only one real purpose: if the maximu
\begin_float margin 
\layout Standard

as of 2/20/99, bound has not been used
\end_float 
m gain from all future testing exceeds this generation's cost of testing,
 there is no reason to test, and mass selection will be used forevermore.
 
\layout Chapter

Genetic Algorithms
\layout Standard

Add brief discussion
\layout Chapter

Dynamic Programming
\layout Standard

Dynamic programming can only be applied to discrete problems.
 However, in many cases, it is possible to discretize a continuous problem,
 and find a reasonable approximation.
\layout Section

History of Dynamic Programming
\layout Standard

Dynamic programming, in and of itself, is nothing new.
 It has been used as a computational method since the 1950's, but its ability
 to solve problems is highly dependent upon available processing power and
 fast storage (cache or core memory).
\layout Standard

Dynamic programming is used in programs that have a fixed number of available
 states, and in which the 
\begin_inset Quotes eld
\end_inset 

history
\begin_inset Quotes erd
\end_inset 

 of the problem, or the path by which the state was reached, is irrelevant.
 That is, the states all must have the Markov property
\begin_inset LatexCommand \index{Markov property}

\end_inset 

.
 
\latex latex 

\backslash 
jim{
\latex default 
A state is "Markov" if the state contains all relevant information, regardless
 of how it was reached.
 If the state has the Markov property, it does not matter in which generation
 the state was reache, nor does the path by which it was reached matter.
\latex latex 
}
\begin_float margin 
\layout Standard

more on Markov?
\end_float 
 
\layout Standard

Dynamic programming can thus be used to solve policy questions, such as
 the order of applying treatment to fields, in which both 
\emph on 
which
\emph default 
 steps to take as well as which 
\emph on 
order
\emph default 
 to take them in are considered.
 The value of each state is known, and therefore once both steps of the
 tentative solution 
\begin_inset Quotes eld
\end_inset 

apply forty tons of phosphor, then plant corn
\begin_inset Quotes erd
\end_inset 

 is calculated, considering the solution, 
\begin_inset Quotes eld
\end_inset 

apply twenty tons of herbicide, then forty tons of phosphor, then plant
 corn
\begin_inset Quotes erd
\end_inset 

 requires only calculating the effect of the first step, and then using
 the already calculated value for corn.
\layout Standard

While the problems soluble by dynamic programming are inherently discrete,
 there is a long history of its use in solving continuous problems.
 This is done by the expedient of discretizing the problem, allowing only
 certain states, a procedure that dates to **.
\begin_float margin 
\layout Standard

get this
\end_float 
 In some cases, this approximate solution is sufficient.
 For example, if the problem involves a 
\begin_inset Formula \( [0,1] \)
\end_inset 

 choice variable, and knowledge of the solution to within 
\begin_inset Formula \( .01 \)
\end_inset 

 is sufficient, then only 
\begin_inset Formula \( 100 \)
\end_inset 

 states need be considered.
 If such an answer is not precise enough, the first solution can be used
 as a center for a search over a smaller area with a finer grid.
\layout Standard

However, published numeric solutions almost universally consider compact
 search spaces.
 The few examples of non-compact spaces
\begin_float margin 
\layout Standard

ref
\end_float 
 have all used contiguous spaces, which are not appropriate for the breeding
 problem.
\layout Section

The Breeding Problem and Dynamic Programming
\layout Standard

The naive approach to the breeding problem would be to look at the solution
 spaces as 
\begin_inset Formula \( \left\{ f_{mt}\right\}  \)
\end_inset 

.
 However, this is far too complicated a space to use as a state space for
 dynamic programming: at even a resolution of 
\begin_inset Formula \( .01 \)
\end_inset 

, there are 
\begin_inset Formula \( 100 \)
\end_inset 

 possible values for each choice, or 
\begin_inset Formula \( 10^{4} \)
\end_inset 

 per generation with only one choice gene.
 Then for 
\begin_inset Formula \( T \)
\end_inset 

 generations, there are 
\begin_inset Formula \( 10^{4T} \)
\end_inset 

 possible states to consider.
\layout Standard

However, for a finite horizon problem, or an infinite horizon problem with
 a known 
\begin_inset Formula \( \hat{p} \)
\end_inset 

 bound such as [
\begin_float margin 
\layout Standard

ref
\end_float 
], 
\begin_inset Formula \( p_{t} \)
\end_inset 

 alone may be used as the state.
 
\begin_inset Formula \( p \)
\end_inset 

 may be divided into as many states as desired, and and the optimal choice
 for each value of 
\begin_inset Formula \( p \)
\end_inset 

 can be calculated.
\layout Standard

Consider again the nature of the general problem: once a change has been
 made to 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

, the change is permanent.
 The only choice to be made depends upon the present value of 
\begin_inset Formula \( p_{t} \)
\end_inset 

.
\begin_float margin 
\layout Standard

Will non-constant variance destroy this?
\end_float 
The optimal behavior for 
\begin_inset Formula \( p_{t}>\hat{p} \)
\end_inset 

 is known, namely to switch to mass selection.
 This is entered into the action space as a beginning.
 Letting 
\begin_inset Formula 
\begin{equation}
\Delta =\frac{1}{S}
\end{equation}

\end_inset 

 where 
\begin_inset Formula \( \Delta  \)
\end_inset 

 is the spacing between potential values of 
\begin_inset Formula \( p_{t} \)
\end_inset 

 for a number of states 
\begin_inset Formula \( S \)
\end_inset 

, the first action considered is for 
\begin_inset Formula \( p_{t}=\hat{p}-\Delta  \)
\end_inset 

.
 There are only two choice variables to consider, 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 and 
\begin_inset Formula \( f_{2t} \)
\end_inset 

.
 As 
\begin_inset Formula \( p_{t+1}\geq p_{t} \)
\end_inset 

, for each value of of the fractions considered, the future path is known.
 That is, for each trial value of 
\begin_inset Formula \( f_{t} \)
\end_inset 

 considered, 
\begin_inset Formula \( p_{t+1}\left( f_{t}\right)  \)
\end_inset 

 is calculated, and the future value of this choice is selected from the
 table of known results.
 If this value is less than testing costs, the decision not to test is stored
 for this variable, a is the present value of mass selection at this frequency.
 Additionally, a tighter bound has been found, and 
\begin_inset Formula \( \hat{p} \)
\end_inset 

 takes on this new value.
 If testing was worthwhile, this fact is stored, as testing will be worthwhile
 at all smaller frequencies,
\begin_float margin 
\layout Standard

prove this?
\end_float 
 as are the optimal fractions and the net present value of this frequency.
 
\layout Standard

This step is repeated until a frequency is found which finds value in testing,
 at which point the comparison to testing cost is skipped for all smaller
 values, and 
\begin_inset Formula \( \hat{p} \)
\end_inset 

 is reset to 
\begin_inset Formula \( \Delta  \)
\end_inset 

 greater than this frequency.
 Actions for 
\begin_inset Formula \( p_{t} \)
\end_inset 

 are then calculated for all smaller values.
\layout Standard

Eventually, values of 
\begin_inset Formula \( p_{t} \)
\end_inset 

 will be considered which find 
\begin_inset Formula \( p_{t+1}<\hat{p} \)
\end_inset 

 for the optimal values of 
\begin_inset Formula \( f_{t} \)
\end_inset 

.
 This is easily handled; for each trial value of 
\begin_inset Formula \( f_{t} \)
\end_inset 

, the value of the resultant 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

 has already been saved, and need not be recalculated.
\layout Standard

For a single state variable 
\begin_inset Formula \( p_{t} \)
\end_inset 

, this appears to be an efficient search: rather than checking all possible
 values of 
\begin_inset Formula \( p_{t} \)
\end_inset 

, only a portion are checked.
 While this is convenient for the single state variable, it will be critical
 as the number of state variables increases.
\layout Section

An Initial Algorithm
\layout Standard

Consider first the simple problem of one gene with fixed variance.
 For any given 
\begin_inset Formula \( p_{t} \)
\end_inset 

and 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

, there is an associated maximal present value 
\begin_inset Formula \( G\left( p_{t}\right)  \)
\end_inset 

.
 First note that the starting value 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

 affects the present value by only a known offset
\begin_inset Formula 
\begin{equation}
G\left( p_{t},\bar{A}_{t}\right) =G\left( p_{t},0\right) +\frac{\bar{A}_{t}}{r}
\end{equation}

\end_inset 

Then break 
\begin_inset Formula \( G \)
\end_inset 

 into three pieces: the initial fixed effects, which choices in 
\begin_inset Formula \( t \)
\end_inset 

 cannot affect, the initial effects in the subsequent generation, and all
 time after that:
\begin_inset Formula 
\begin{eqnarray*}
G\left( p_{t}\right)  & = & \bar{A}_{t}+a\left( 2p_{t}-1\right) \\
 &  & +\left( 1-r\right) \left[ \frac{\sigma }{Qr}\left\{ 
2p_{t+1}^{2}z_{1t+1}+2p_{t+1}\left( 1-p_{t+1}\right) z_{2t+2}+\left( 1-p_{t+1}\right) 
^{2}z_{3t+1}\right\} +\bar{A}_{t}\right] \\
 &  & +\left( 1-r\right) a\frac{1}{Q}\left\{ 2f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 
1-2p_{t}\right) \right\} \\
 &  & +\sum _{s=t+2}^{\infty }\left( 1-r\right) ^{s}\left[ a\left( 2p_{t}-1\right) 
+\bar{A}_{s}\right] 
\end{eqnarray*}

\end_inset 

 Note that part of the value of 
\begin_inset Formula \( \bar{A}_{s} \)
\end_inset 

 in the summation can be regrouped into the first term, as can the appearance
 of 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

 in the period 
\begin_inset Formula \( t+1 \)
\end_inset 

.
 However, another approach will be more fruitful, namely redefining the
 objective function.
 Consider
\begin_inset Formula 
\begin{eqnarray}
F\left( p_{t}\right)  & \equiv  & +\frac{\sigma }{Qr}\left\{ 
2p_{t}^{2}z_{1t}+2p_{t}\left( 1-p_{t}\right) z_{2t}+\left( 1-p_{t}\right) 
^{2}z_{3t}\right\} \nonumber \\
 &  & +\frac{a}{Q}\left\{ 2f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 1-2p_{t}\right) \right\} 
\nonumber \\
 &  & +\left( 1-r\right) F\left( p_{t+1}\right) 
\end{eqnarray}

\end_inset 

As 
\begin_inset Formula 
\begin{equation}
G\left( p_{t}\right) =\frac{\bar{A}_{t}}{r}+a\left( 2p_{t}-1\right) +\left( 1-r\right) 
F\left( p_{t+1}\left( p_{t}\right) \right) 
\end{equation}

\end_inset 

 maximizing 
\begin_inset Formula \( F \)
\end_inset 

 homomorphous with maximizing 
\begin_inset Formula \( G \)
\end_inset 

.
\layout Standard

The problem is now in a state to which dynamic programming can be applied.
 Using 
\begin_inset Formula \( S \)
\end_inset 

 possible states for 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

, let 
\begin_inset Formula \( p_{t+1}\left( p_{t},f_{t}\right)  \)
\end_inset 

 be the closest allowed state to the actual computed value.
 Finding optimal values for 
\begin_inset Formula \( f_{t}\left( p_{t}\right)  \)
\end_inset 

 becomes almost trivial.
\layout Standard

The existence of 
\begin_inset Formula \( F(p_{t+1>t}) \)
\end_inset 

 is taken as a given; it will be called recursively if necessary.
 This reduces the problem to finding the best set of 
\begin_inset Formula \( f_{t} \)
\end_inset 

 for the current generation.
 An initial trial solution is considered, from whatever source, yielding
 a tentative 
\begin_inset Formula \( p^{t}_{t+1} \)
\end_inset 

.
 
\begin_inset Formula \( F\left( p_{t+1}^{t}\right)  \)
\end_inset 

 is treated as known, and the remainder of 
\begin_inset Formula \( F\left( p_{t}\right)  \)
\end_inset 

 is optimized over 
\begin_inset Formula \( \left\{ f_{t}:p_{t+1}\left( p_{t},f_{t}\right) 
=p_{t+1}^{t}\right\}  \)
\end_inset 

, for which standard optimization methods suffice.
 This is compared to the maximum over 
\begin_inset Formula \( \left\{ f_{t}:p_{t+1}\left( p_{t},f_{t}\right) 
=p_{t+1}^{t}+\delta \right\}  \)
\end_inset 

, and the better value is stored.
\layout Standard

The optimal value and behavior with granularity 
\begin_inset Formula \( \delta  \)
\end_inset 

 can now be found by simply calling this optimal value function for 
\begin_inset Formula \( F\left( p_{0}\right)  \)
\end_inset 

, which calls itself recursively to find any other needed values for other
 values of 
\begin_inset Formula \( p_{t} \)
\end_inset 

.
 Many possible states will likely be passed over, saving computational time.
 These solutions can then be used as starting values for another run with
 a finer grain, until the desired level of resolution is found.
\layout Standard

As a side effect of this method, the stiff matrix problem found with the
 genetic algorithm in section [] is avoided entirely: there is never an
 attempt to directly determine the present value of the effect of a change
 in a current variable on a state several generations away; all such calculation
s find the optimal value by looking ahead only one generation.
\layout Section

Application to Multiple State Variables
\layout Standard

The method does not translate directly to multiple variables, although adaptatio
ns are possible.
 Similar to the problem at [], the search space explodes as additional states
 are considered.
 For example, with a grain of 
\begin_inset Formula \( .01 \)
\end_inset 

, only 
\begin_inset Formula \( 101 \)
\end_inset 

 states exist for the simple model of section [].
 However, adding only a second gene, still keeping the variance fixed, increases
 this toe 
\begin_inset Formula \( 101^{2} \)
\end_inset 

.
 Adding variance for each gene, and covariance, reaches 
\begin_inset Formula \( 101^{5} \)
\end_inset 

, or in excess of ten billion states to consider.
 Storing a single double precision floating point variable for each of these
 would take on the order of eighty gigabytes of temporary storage.
\layout Standard

The above method, however, allowed the possibility of all possible combinations
 of allowed values.
 However, if there is a 
\begin_inset Quotes eld
\end_inset 

reasonably good
\begin_inset Quotes erd
\end_inset 

 starting point, this is not necessary.
 Instead, from this starting point, only a small range of values need be
 considered.
 
\layout Standard

For example, suppose that consideration of of the mass selection solution
 allows placing a bound of fifteen generations, and provides initial values
 for 
\begin_inset Formula \( \left\{ p_{t}^{1},p_{t}^{2},\sigma _{t}^{1},\sigma 
_{t}^{2},\sigma _{t}^{12}:0\leq t\leq 15\right\}  \)
\end_inset 

.
 Suppose further that the researcher is experienced with the problem, perhaps
 from prior runs, and is thus able to set likely bounds for the values in
 each generation.
 While it is not possible to store or even allocate space for all possible
 values in the domain, it may be possible to create 
\begin_inset Quotes eld
\end_inset 

disjoint bubbles
\begin_inset Quotes erd
\end_inset 

 within the space for examination.
 
\layout Standard

For graphical simplicity, consider a simple case of two probabilities and
 their correlation.
 Starting with low values for each of the three, it seems reasonable to
 expect that each of the probabilities and the correlation will approach
 
\begin_inset Formula \( 1 \)
\end_inset 

 in the face of selection.
 With an initial trial solution as in figure (
\begin_inset LatexCommand \ref{bubblelines}

\end_inset 

),
\begin_float fig 
\layout Standard
\align center 

\begin_inset Figure size 133 184
file graphics/bubblelines.eps
width 4 45
angle 270
flags 9

\end_inset 


\layout Caption


\begin_inset LatexCommand \label{bubblelines}

\end_inset 

Initial Trial Solution
\end_float 
 and a grain of 
\begin_inset Formula \( .01 \)
\end_inset 

 for each of the three variables, there are 
\begin_inset Formula \( 10^{6} \)
\end_inset 

 possible states, a manageable number.
 However, the researcher is likely to desire a greater granularity, 
\begin_inset Formula \( .0001 \)
\end_inset 

, or even 
\begin_inset Formula \( .000001 \)
\end_inset 

, requiring 
\begin_inset Formula \( 10^{12} \)
\end_inset 

 or 
\begin_inset Formula \( 10^{18} \)
\end_inset 

 states, respectively.
\layout Standard
\pextra_type 3

However, the changes in each variable from period to period are typically
 far larger than the grain; there are large ranges in each variable which
 are known ahead of time to be unlikely to be reached.
 Instead, some region, a cube in 
\begin_inset Formula \( \Re ^{3} \)
\end_inset 

around each point of the trial solution is most likely to be reached figure
 (
\begin_inset LatexCommand \ref{bubbles1}

\end_inset 

).
\layout Standard

\begin_float fig 
\layout Standard
\align center 

\begin_inset Figure size 133 184
file graphics/bubbles1.eps
width 4 45
angle 270
flags 9

\end_inset 


\layout Caption


\begin_inset LatexCommand \label{bubbles1}

\end_inset 

Partition of space near trial solution into disjoint bubblettes.
\end_float 
While there is no 
\emph on 
a priori
\emph default 
 reason to assume a cube (or hypercube in higher dimensions), this cube
 can be chosen so as to include any size and shape of region.
\layout Standard
\pextra_type 3 \pextra_widthp 60

If reasonable 
\emph on 
a priori
\emph default 
 bounds can be placed on the size of these cubes for each step, and this
 region is divided into ten possible values for each of the three variables,
 each such bubble contains only 
\begin_inset Formula \( 10^{3} \)
\end_inset 

states, which is manageable for even large number of generations.
 Figure (
\begin_inset LatexCommand \ref{bubbles2}

\end_inset 

)shows five possible states for each state variable.
 If the trial solution is 
\begin_inset Quotes eld
\end_inset 

close enough,
\begin_inset Quotes erd
\end_inset 

 or if the bubbles are large enough, the solution at each point will be
 within one of the divisions of the cube, and the dynamic programming approach
 would then seem to be successive steps with finer grain and smaller bubbles
 in each period.
 For example, if the solution shown in figure(
\begin_inset LatexCommand \ref{bubbles3}

\end_inset 

)is found to be the best, smaller bubbles and bubblettes may be found around
 this new tentative solution, as in figure (
\begin_inset LatexCommand \ref{bubbles4}

\end_inset 

)This process would be repeated until with sufficiently fine grain the solution
 does not move.
\begin_float fig 
\layout Standard
\align center 

\begin_inset Figure size 133 184
file graphics/bubbles2.eps
width 4 45
angle 270
flags 9

\end_inset 


\layout Caption


\begin_inset LatexCommand \label{bubbles2}

\end_inset 

Division of bubbles into bubblettes
\end_float 
\begin_float fig 
\layout Standard
\align center 

\begin_inset Figure size 133 184
file graphics/bubbles3.eps
width 4 45
angle 270
flags 9

\end_inset 


\layout Caption


\begin_inset LatexCommand \label{bubbles3}

\end_inset 

Possible new trajectory
\end_float 
\begin_float fig 
\layout Standard
\align center 

\begin_inset Figure size 133 184
file graphics/bubbles4.eps
width 4 45
angle 270
flags 9

\end_inset 


\layout Caption


\begin_inset LatexCommand \label{bubbles4}

\end_inset 

New disjoint bubbles and bubblettes
\end_float 
\layout Subsection

Missing the Bubbles
\layout Standard

The foregoing example has a critical implicit assumption: that the number
 of steps to the solution is known.
 This is important as the bubbles are identified with with a specific step.
 It is entirely possible that these bubbles overlap; this is not a problem.
 The problem, rather, is that that a tentative solution steps outside of
 the 
\begin_inset Quotes eld
\end_inset 

next
\begin_inset Quotes erd
\end_inset 

 bubble, as in figure (
\begin_inset LatexCommand \ref{bubblemiss}

\end_inset 

).
\begin_float fig 
\layout Standard
\align center 

\begin_inset Figure size 133 191
file graphics/bubblemiss.eps
width 4 45
angle 270
flags 9

\end_inset 


\layout Caption


\begin_inset LatexCommand \label{bubblemiss}

\end_inset 

Missing the bubbles entirely
\end_float 
 To this point, it has been assumed that the each step will land in a known
 neighborhood, that of the bubble previously associated with that step.
 However, the dashed line lands in the 
\begin_inset Quotes eld
\end_inset 

wrong
\begin_inset Quotes erd
\end_inset 

 bubble, while the dotted line fails to land within 
\emph on 
any
\emph default 
 bubble.
\layout Standard

This is not a trivial problem.
 The essence of dynamic programming is to reuse previously calculated states.
 However, the bubbles have been used because the number of potential states
 is too great to store, let alone calculate.
 If a step is made outside a bubble, it would seem likely that the next
 step is also outside the bubble.
 Each of these will require calculations of multiple possible states for
 comparison.
 Some manner must be found to index or search through the bubbles, so that
 once a new bubble has been created, later steps can find it and take advantage
 of its calculations.
\layout Standard

Another source of misstep can come with a change in the number of generations
 in the solution.
 For example, if the initial solution takes fifteen generations before reaching
 a state in which testing is not profitable, it may be that a path is found
 which reaches this level in fourteen generations.
 This may mean that the thirteenth step proceeds to the bubble previously
 associated with the fifteenth, as with the dashed line in figure (
\begin_inset LatexCommand \ref{bubblemiss}

\end_inset 

).
\layout Section

A Structure for the Bubblettes
\layout Standard

Before turning to the Bubbles, it is necessary to consider the nature of
 the bubblettes.
\layout Standard

Most fundamentally, each bubblettes has three possible states: fully calculated,
fully uncalculated, and uncalculated with hints of some nature.
\layout Standard

The fully calculated bubblette must, at a minimum, contain the following
 information: the fact that it is calculated, all state variables for the
 bubblette, and the 
\begin_inset Quotes eld
\end_inset 

next
\begin_inset Quotes erd
\end_inset 

 bubblette--the bubblette reached in the next generation.
 However, more information is desirable, and eases calculation.
 Particularly, it is desirable to store the choice variables, such as the
 
\begin_inset Formula \( f_{t} \)
\end_inset 

, which lead to the next bubblette.
 Additionally, the value of the objective function for the bubblette is
 desirable--it allows a later bubblette which considers this state to do
 so by making a single stop, rather than considering the successor states.
 Finally, some 
\begin_inset Quotes eld
\end_inset 

hint
\begin_inset Quotes erd
\end_inset 

 as to the location of the next bubblette may be desirable; it is not clear
 that knowledge of the next bubblette necessarily means where it is located
 within the machine.
\layout Standard

If a bubble is not yet calculated, it may yet have a 
\begin_inset Quotes eld
\end_inset 

hint
\begin_inset Quotes erd
\end_inset 

 left from a prior run or some other information.
 This hint, perhaps the result for this or an adjacent location in a prior
 run, can be used as a starting point when the bubblette searches for its
 values.
 However, storing the hint does take storage space.
 As such, it may be desirable to add a pointer variable to bubblettes for
 hints, allowing them to point to another bubblette for a hint, rather than
 storing information itself.
\layout Section

A structure for the bubbles
\layout Standard

As the bubble is divided into bubblettes, it clearly must, at a minimum,
 contain storage space for it's constituent bubblettes.
 While it is conventional to think of 
\begin_inset Quotes eld
\end_inset 

balls
\begin_inset Quotes erd
\end_inset 

 in n-space for such a region, the hypercube is more natural to the computer:
 a 
\begin_inset Formula \( 5\times 5\times \ldots \times 5 \)
\end_inset 

region is well defined in memory, but the set of all regions within distance
 
\begin_inset Formula \( 5 \)
\end_inset 

 is not.
 The result is probably wasted states, but it may be possible to mitigate
 this by storing not bubblettes, but pointers to bubblettes, and only allocating
 space for bubblettes as needed.
 For eleven possible values for each of five state variables, this means
 
\begin_inset Formula \( 161051 \)
\end_inset 

 pointers, which will take 
\begin_inset Formula \( 629 \)
\end_inset 

 kilobytes of storage on a thirty-two bit machine.
 While this is a massive amount of storage, and will be largely unused,
 this is still less than ten megabytes for fifteen bubbles, leaving the
 balance for calculated states.
\layout Standard

It will generally be assumed that there are an odd number of levels for
 each variable: the center of the bubble comes from some prior knowledge
 or solution, and a symmetric number of levels on each side results in an
 odd number.
\layout Standard

Merely containing the bubblettes, however, is not enough for the bubble
 structure.
 It is necessary to search the bubbles, so that they are not needlessly
 duplicated.
 Therefore, each bubble should store the domain for each state variable.
 To facilitate a rapid search, it may be desirable to have these actually
 be pointers elsewhere; arrays of minima and maxima for each state variable
 can be kept elsewhere, with a pointer stored in the bubble structure.
 A stranded step could then search for an existing bubble rapidly with a
 construct such as
\layout LyX-Code

where ( (mystate1.ge.state1min) .and.
 (mystate1 .le.state1max) .and.
 (mystate2.ge.state2min) ...)
\layout LyX-Code


\protected_separator 
 
\protected_separator 
candidateBubbles=.true.
\layout LyX-Code

elsewhere
\layout LyX-Code


\protected_separator 
 
\protected_separator 
candidateBubbles=.false.
\layout LyX-Code

endwhere
\layout Standard

thereby gaining a list of candidate bubble instantly.
 By comparison, if it had to reference the variables within structures to
 do comparisons, the search would be slowed by orders of magnitude.
 If a bubble is found, the bubblette is either calculated or referenced.
 If not, a new bubble is created, with the state in question at its center.
\layout Standard

Another useful feature in a bubble would be reference hints for uncalculated
 bubblettes.
 After a run of the algorithm, bubblettes will exist for some or all of
 the bubblettes, many of which will be contained within the corresponding
 bubble on the next run.
 These values can be saved as hints for the corresponding bubblettes within
 the smaller bubbles of the next pass.
\layout Section

An initial strategy
\layout Standard

At this stage, it is possible to make an initial attempt to use dynamic
 programming to solve a problem.
 From the performance of the attempt, information will be gained for later
 refinement.
\layout Subsection

Replacing choice variables with state variables
\layout Standard


\begin_inset LatexCommand \label{sec:replacechoicevars}

\end_inset 

One final obstacle must be addressed before attempting a dynamic programming
 solution: the discretization of the choice space.
\layout Standard

While the state space, and permitted tentative state spaces, have already
 been defined in terms of bubbles in [], these states are reached as result
 of tentative selection of choice variables.
 Furthermore, the literature on discretized problems has generally assumed
 the discretization of the choice variables.
 However, discretizing the 
\begin_inset Formula \( f_{t} \)
\end_inset 

 variables in this case will not result in a cleanly indexable space for
 the state variables, and the success of any dynamic programming solution
 relies on the ability to easily look up prior solved situations.
 Finally, there is no 
\emph on 
a priori
\emph default 
 reason to believe that such a discretization of the choice variables would
 result in a state space in which values would be repeated.
\begin_float margin 
\layout Standard

Maybe define a 
\begin_inset Quotes eld
\end_inset 

close enough
\begin_inset Quotes erd
\end_inset 

 in state space as an alternative approach? But the search costs will be
 staggering.
\end_float 
\layout Standard

Another approach would lie
\begin_float margin 
\layout Standard

it is 
\begin_inset Quotes eld
\end_inset 

lie,
\begin_inset Quotes erd
\end_inset 

 isn't it?
\end_float 
 in keeping the discretization of state space, while fixing 
\begin_inset Quotes eld
\end_inset 

canonical
\begin_inset Quotes erd
\end_inset 

 values for allowed choices.
 As search algorithms generally use some type of Newton method to select
 trial solutions, it is necessary to be able to define the distance between
 points.
 Consider, for example, the function 
\begin_inset Formula 
\begin{equation}
y=-\left( x-3\right) ^{4}
\end{equation}

\end_inset 

 ignoring for the moment that a trivial inverse exists.
 This function takes a maximum value of 
\begin_inset Formula \( 0 \)
\end_inset 

 at 
\begin_inset Formula \( x=3 \)
\end_inset 

.
 Suppose that the search range has been reduced to  
\begin_inset Formula \( \left[ -0.750,.250\right]  \)
\end_inset 

, with a grain of 
\begin_inset Formula \( .001 \)
\end_inset 

for 
\begin_inset Formula \( x \)
\end_inset 

, centered around the initial guess of 
\layout Standard


\begin_inset Formula 
\begin{eqnarray}
\hat{x} & = & 3.3\nonumber \\
\hat{y} & = & -.008
\end{eqnarray}

\end_inset 

Calculating numerical derivatives becomes problematic.
 The actual derivative is 
\begin_inset Formula 
\begin{equation}
\frac{dy}{dx}=-4\left( x-3\right) ^{3}
\end{equation}

\end_inset 

 so that to change 
\begin_inset Formula \( y \)
\end_inset 

 by 
\begin_inset Formula \( .001 \)
\end_inset 

 requires a change of approximately 
\begin_inset Formula \( .00926 \)
\end_inset 

.
 However, changes of 
\begin_inset Formula \( .007 \)
\end_inset 

 and 
\begin_inset Formula \( .014 \)
\end_inset 

 will both result in a calculated 
\begin_inset Formula \( y \)
\end_inset 

 of 
\begin_inset Formula \( .007 \)
\end_inset 

, though the numerical derivative of the former is twice the size of the
 latter.
 Numerical calculation of the Hessian would result in even worse exaggerations.
\layout Standard

To solve this problem would require limiting the allowed values of 
\begin_inset Formula \( x \)
\end_inset 

, so that for all 
\begin_inset Formula \( \left\{ x:\hat{f}\left( x\right) =\hat{y}\right\}  \)
\end_inset 

, 
\begin_inset Formula \( f\left( \hat{x}(x)\right) = \)
\end_inset 

 
\begin_inset Formula \( \hat{y} \)
\end_inset 

, and to work only with 
\begin_inset Formula \( \hat{x} \)
\end_inset 

 and not 
\begin_inset Formula \( x \)
\end_inset 

 itself.
\layout Standard

However, as dimensions increase, or as functions which are not invertible
 inexpensively are used, this will become an impossible problem.
\layout Standard

These difficulties suggest that transforming the problem into one of choosing
 state spaces transitions from those permitted, and afterwards transforming
 the solution back into the choices that reach them, may be the easiest
 way to solve the problem.
 Given rules on state space transitions, such as Equations [], the back-conversi
on should run in linear time in the number of generations used.
\begin_float margin 
\layout Standard

more on this?
\end_float 
 
\layout Subsection

Simple Dynamic Programming Model
\layout Standard

For an initial model to demonstrate the concept, consider again the simple
 model of [
\begin_inset LatexCommand \ref{finobjfn}

\end_inset 

].
 As this model has a known solution, it will be the first to be solved.
 However, in designing structures and methods, more attention will be paid
 to the usefulness of the model in solving the general case than the problem
 at hand.
\layout Standard

Using equations [
\begin_inset LatexCommand \ref{siminfprule}

\end_inset 


\begin_inset LatexCommand \ref{siminfarule}

\end_inset 


\begin_inset LatexCommand \ref{siminfqcns}

\end_inset 

], 
\begin_inset Formula 
\begin{eqnarray}
p_{t+1} & = & \frac{1}{Q}\left\{ f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 1-p_{t}\right) 
\right\} \label{dp2prule} \\
\bar{A}_{t+1} & = & \bar{A}_{t}+\frac{\sigma }{Q}\left\{ p_{t}^{2}z_{1t}+2p_{t}\left( 
1-p_{t}\right) z_{2t}+\left( 1-p_{t}^{2}\right) z_{3t}\right\} \label{dp2abarrule} \\
Q & = & f_{1t}p_{t}^{2}+f_{2t}2p_{t}\left( 1-p_{t}\right) +f_{3t}\left( 
1-p_{t}^{2}\right) \label{dp2qcons} 
\end{eqnarray}

\end_inset 

 [
\begin_inset LatexCommand \ref{siminfprule}

\end_inset 

] can be manipulated into
\begin_inset Formula 
\begin{equation}
\label{dpsimf2off1}
f_{2t}\left( f_{1t}|p_{t+1}\right) =\frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 
1-p_{t}\right) }
\end{equation}

\end_inset 

 [
\begin_inset LatexCommand \ref{siminfqcns}

\end_inset 

] becomes 
\begin_inset Formula 
\begin{eqnarray}
f_{3t}\left( f_{1t}|p_{t+1}\right)  & = & \frac{Q-f_{1t}p_{t}^{2}-f_{2t}\left( 
f_{1t}|p_{t+1}\right) 2p_{t}\left( 1-p_{t}\right) }{\left( 1-p_{t}\right) 
^{2}}\nonumber \\
 & = & \frac{Q-f_{1t}p_{t}^{2}-\frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 
1-p_{t}\right) }2p_{t}\left( 1-p_{t}\right) }{\left( 1-p_{t}\right) ^{2}}\nonumber 
\label{dpsimf3off1} \\
 & = & \frac{Q+f_{1t}p_{t}^{2}-2Qp_{t+1}}{\left( 1-p_{t}\right) 
^{2}}\label{dpsimf3off1} 
\end{eqnarray}

\end_inset 

 and [
\begin_inset LatexCommand \ref{siminfarule}

\end_inset 

] becomes 
\begin_inset Formula 
\begin{equation}
\label{dpsiminfanextoff1}
\bar{A}_{t+1}=\bar{A}_{t}+\frac{\sigma }{Q}\left\{ \begin{array}{c}
p_{t}^{2}\phi \left( \Phi ^{-1}\left( 1-f_{1t}\right) \right) \\
+2p_{t}\left( 1-p_{t}\right) \phi \left( \Phi ^{-1}\left( 
+1-\frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 1-p_{t}\right) }\right) \right) \\
+\left( 1-p_{t}^{2}\right) \phi \left( \Phi ^{-1}\left( 
+1-\frac{Q+f_{1t}p_{t}^{2}-2Qp_{t+1}}{\left( 1-p_{t}\right) ^{2}}\right) \right) 
\end{array}\right\} 
\end{equation}

\end_inset 


\layout Standard

This allows the translation of the problem into a one-dimensional problem
 for purposes of dynamic programming.
 The sole variable is 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

, and [
\begin_inset LatexCommand \ref{dpsiminfanextoff1}

\end_inset 

] is used to find the maximal 
\begin_inset Formula \( \bar{A}_{t+1} \)
\end_inset 

 for the chosen 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

.
 To make the calculation useful for dynamic programming, it is actually
 the change, the maximal value of 
\begin_inset Formula \( \bar{A}_{t+1}-\bar{A}_{t} \)
\end_inset 

 that is calculated, so that the information is useful regardless of the
 prior state.
 Also, given that the available libraries minimize rather than maximize,
 and that 
\begin_inset Formula \( \bar{A}_{t+1} \)
\end_inset 

is linear in 
\begin_inset Formula \( Q \)
\end_inset 

 and 
\begin_inset Formula \( p \)
\end_inset 

, the new function 
\begin_inset Formula \( y \)
\end_inset 

 is defined as 
\layout Standard


\begin_inset Formula 
\begin{eqnarray}
y & = & -\frac{Q}{p}\left( \bar{A}_{t+1}-\bar{A}_{t}\right) \nonumber \\
 & = & -p_{t}^{2}z_{1t}-2p_{t}\left( 1-p_{t}\right) z_{2t}-\left( 1-p_{t}\right) 
^{2}z_{3t}\nonumber \\
 & = & -p_{t}^{2}z_{1t}-2p_{t}\left( 1-p_{t}\right) z\left( 
\frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 1-p_{t}\right) }\right) \nonumber \\
 &  & -\left( 1-p_{t}\right) ^{2}z\left( \frac{Q+f_{1t}p_{t}^{2}-2Qp_{t+1}}{\left( 
1-p_{t}\right) ^{2}}\right) 
\end{eqnarray}

\end_inset 

 with the derivative
\begin_inset Formula 
\begin{eqnarray}
\frac{dy}{df_{1t}} & = & -p_{t}^{2}x\left( f_{1t}\right) -2p_{t}\left( 1-p_{t}\right) 
x\left( f_{2t}\left( f_{1t}\right) \right) \frac{df_{2t}}{df_{1t}}\nonumber \\
 &  & -\left( 1-p_{t}\right) ^{2}x\left( f_{3t}\left( f_{1t}\right) \right) 
\frac{df_{3t}}{df_{1t}}\nonumber \\
 & = & -p_{t}^{2}\Phi ^{-1}\left( 1-f_{1t}\right) -2p_{t}\left( 1-p_{t}\right) \Phi 
^{-1}\left( 1-f_{2t}\left( f_{1t}\right) \right) \frac{-p_{t}^{2}}{p_{t}\left( 
1-p_{t}\right) }\nonumber \\
 &  & -\left( 1-p_{t}\right) ^{2}\Phi ^{-1}\left( 1-f_{3t}\left( f_{1t}\right) \right) 
\frac{p_{t}^{2}}{\left( 1-p_{t}\right) ^{2}}\nonumber \\
 & = & -p_{t}^{2}\Phi ^{-1}\left( 1-f_{1t}\right) +2p_{t}^{2}\Phi ^{-1}\left( 
1-f_{2t}\right) \nonumber \\
 &  & -p_{t}^{2}\Phi ^{-1}\left( 1-f_{3t}\right) 
\end{eqnarray}

\end_inset 


\layout Standard

or?
\begin_inset Formula 
\begin{eqnarray}
\frac{dy}{df_{1t}} & = & -p_{t}^{2}x_{mt}\left( f_{1t}\right) -2p_{t}\left( 
1-p_{t}\right) x\left( \frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 1-p_{t}\right) 
}\right) \frac{df_{2t}}{df_{1t}}\nonumber \\
 &  & -\left( 1-p_{t}\right) ^{2}x\left( 
\frac{Q-f_{1t}p_{1t}^{2}-\frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 1-p_{t}\right) 
}}{\left( 1-p_{t}\right) ^{2}}\right) \frac{df_{3t}}{df_{1t}}\nonumber \\
 & = & -p_{t}^{2}\Phi ^{-1}\left( f_{1t}\right) -2p_{t}^{2}\Phi ^{-1}\left( 
\frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 1-p_{t}\right) }\right) 
\frac{-p_{t}^{2}}{p\left( 1-p_{t}\right) }\nonumber \\
 &  & -\left( 1-p_{t}\right) ^{2}\Phi ^{-1}\left( 
\frac{Q-f_{1t}p_{1t}^{2}-\frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 1-p_{t}\right) 
}}{\left( 1-p_{t}\right) ^{2}}\right) \frac{-p_{t}^{2}\left( 1-\frac{1}{p_{t}\left( 
1-p_{t}\right) }\right) }{\left( 1-p_{t}\right) ^{2}}\nonumber \\
 & = & -p_{t}^{2}\Phi ^{-1}\left( f_{1t}\right) +2\frac{p_{t}^{3}}{1-p_{t}}\Phi 
^{-1}\left( \frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 1-p_{t}\right) }\right) 
\nonumber \\
 &  & +p_{t}^{2}\left( 1-\frac{1}{p_{t}\left( 1-p_{t}\right) }\right) \Phi ^{-1}\left( 
\frac{Q-f_{1t}p_{1t}^{2}-\frac{Qp_{t+1}-f_{1t}p_{t}^{2}}{p_{t}\left( 1-p_{t}\right) 
}}{\left( 1-p_{t}\right) ^{2}}\right) 
\end{eqnarray}

\end_inset 

When 
\begin_inset Formula \( y \)
\end_inset 

 is minimized, the increase in 
\begin_inset Formula \( \bar{A}_{t+1} \)
\end_inset 

 is maximal.
\layout Standard

Note that while the derivative of 
\begin_inset Formula \( y \)
\end_inset 

 has been calculated, this will not always be possible.
 however, the optimization routines in standard libraries are both faster
 and more efficient when this derivative is available.
\layout Standard

Also note that the conversion yields a different starting point than the
 actual mass selection solution.
 While the frequencies are those reached by mass selection, the 
\begin_inset Formula \( f_{t} \)
\end_inset 

 are actually different, as they are selected to maximize 
\begin_inset Formula \( \bar{A}_{t+1} \)
\end_inset 

 in the subsequent generation.
 As such, the starting point is actually a superior solution to the mass
 selection solution.
\layout Subsection

Solving the Model
\layout Standard

Program 
\family typewriter 
dp2
\family default 
 is the initial solution to the problem.
 At this stage, the goal is a clean and easily understood routine, and no
 attempts have been made at optimization of the algorithm.
\layout Standard

The mass selection solution is taken as the starting value.
 An array of bubbles is created with indices from 
\begin_inset Formula \( 0 \)
\end_inset 

 to the total number of generations considered, 
\family typewriter 
totGenerations
\family default 
.
 Each of these bubbles is centered around the corresponding mass selection
 gene frequency.
 Bubble 
\begin_inset Formula \( 0 \)
\end_inset 

 has a single bubblette, as the starting frequency is a parameter of the
 problem.
 Each of the other bubbles receive bubblettes to reach from 
\begin_inset Formula \( .05 \)
\end_inset 

 beneath the mass selection value to as close as possible to 
\begin_inset Formula \( 1.0 \)
\end_inset 

 without exceeding it, and a grain of 
\begin_inset Formula \( .05 \)
\end_inset 

 is used for all generations.
 This is far larger than is needed, but by extending beyond all conceivable
 values, issues related to stepping past boundaries are avoided for the
 moment.
\layout Standard

The function  
\family typewriter 
bestVal()
\family default 
is defined, which returns the best possible increase in the value of the
 objective function that can be reached from a specified bubble.
 This is the change in value from that particular choice of frequency at
 that generation, 
\emph on 
including the value from all subsequent choices.

\emph default 
 
\layout Standard

The function works by sequentially considering a subset of the possible
 choices for the 
\emph on 
next
\emph default 
 period's major gene frequency.
 However, before it does so, it checks to see if this bubblette has already
 been considered.
 If so, it returns the previously calculated value.
 Failing this, an initial guess, which will for the moment and for illustrative
 purposes be assumed to be 
\begin_inset Formula \( 0 \)
\end_inset 

, as to the offset from the center of the next bubble is made.
 The corresponding bubblette in the next generation is queried for its value,
 to which the gain 
\begin_inset Formula \( \Delta \bar{A}_{t+1} \)
\end_inset 

 resulting from this tentative choice is added, and the result placed in
 
\family typewriter 
testVal
\family default 
.
 
\family typewriter 
testVal
\family default 
 is also copied to the local variable 
\family typewriter 
thisBest
\family default 
, which stores the best value of the best step found to date.
\layout Standard

The routine then tries an offset one greater than the first considered,
 and calculates its value in the same way.
 If the result is better than that stored in 
\family typewriter 
thisBest
\family default 
, 
\family typewriter 
thisBest
\family default 
 is updated, and the process repeated for the next larger offset.
\layout Standard

If the result of the first step is inferior to 
\family typewriter 
thisBest
\family default 
, the direction is switched; the offset one less than the stating value
 is considered.
\layout Standard

The process is repeated until the next value considered declines.
 At this time, the prior step is recognized as the best, the step stored
 in 
\family typewriter 
nextp
\family default 
, and the value returned.
 
\layout Standard

It is important to note at this time that the bubblette with the highest
 value will not necessarily be chosen.
\begin_float footnote 
\layout Standard

In fact, it seems that this is rarely what happens.
\end_float 
 It is not only the value of the bubblette itself that matters, but also
 the value 
\emph on 
added
\emph default 
 in stepping to that bubblette.
 Thus adding 
\begin_inset Formula \( .5 \)
\end_inset 

 while reaching a bubblette with value 
\begin_inset Formula \( .3 \)
\end_inset 

 is more valuable than adding 
\begin_inset Formula \( .2 \)
\end_inset 

 while reaching a bubblette with value 
\begin_inset Formula \( .4 \)
\end_inset 

.
 Additionally, though the value of the bubblette is fixed regardless of
 the step taken to reach it, the value added reaching it will vary depending
 upon the prior state.
 Thus different bubblettes will be chosen from different prior states.
 In non-trivial problems, it is expected that there will be a tradeoff between
 the stepping gain and the value of the bubblette; if this were not the
 case, both could be maximized.
\layout Standard


\family typewriter 
bestVal()
\family default 
does have a 
\begin_inset Quotes eld
\end_inset 

special
\begin_inset Quotes erd
\end_inset 

 case for the final period.
 The last choice is made in the penultimate generation.
 
\family typewriter 
bestVal()
\family default 
 is called again, but recognizes that it is called for the final generations,
 and simply returns 
\begin_inset Formula \( \left( 2p-1\right) a \)
\end_inset 

, the contribution of the major gene in the final period.
\layout Standard

The function operates recursively.
 As such, querying the sole bubblette in generation 
\begin_inset Formula \( 0 \)
\end_inset 

 for its value results in calculation of needed values for all subsequent
 generations.
\layout Standard

When a solution is reached, the bubbles are 
\begin_inset Quotes eld
\end_inset 

collapsed.
\begin_inset Quotes erd
\end_inset 

 New bubbles are created centered about the path chosen, and with the grain
 reduced.
 Additionally, hints are stored regarding the 
\begin_inset Quotes eld
\end_inset 

expected
\begin_inset Quotes erd
\end_inset 

 path from bubblette to bubblette.
 For the center bubblettes, this is simply the next centered bubblette.
 For other bubblettes 
\emph on 
in the region calculated in the prior iteration,
\emph default 
 the hint is the bubblette at the same point in space which was previously
 reached.
 Due to the collapsing, there will be somewhat arbitrary choices made as
 to which bubblettes correspond to which.
 Rather then spend effort and computation on the matter, this is simply
 left to the default rounding performed by Fortran: at most, it will be
 off by a single state in any dimension, and adjacent states will be checked
 in any event.
 
\layout Standard

A mininum of two bubblettes above and below the center will be created within
 each bubble.
 However, a check is made to determine how many states were actually checked
 in that direction for that bubble, and if larger than two, this quantity
 is used instead.
 Furthermore, a check is made to insure that no boundary states were chosen
 in the final solution--this could indicate that a better state existed
 after the boundary.
 In this case, the boundary is doubled, and the iteration repeated with
 the same grain.
\begin_inset LatexCommand \label{boundarydoubling}

\end_inset 


\begin_float margin 
\layout Standard

is the repetition really needed? discuss?
\end_float 
\layout Standard

The process is repeated until the grain of the probability space is satisfactori
ly small, with the final iteration yielding the reported solution.
\layout Standard

Using the equations from 
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 

, it is possible to use standard iterative methods to find the optimal values.
 However, this does not solve the problem, but rather uses iteration to
 reach an already found solution.
 Dekkers' method yields the following value for fifteen generations,
\layout Standard

qbegin include
\begin_inset Include \verbatiminput{/home/hawk/Dissertation/sumres.15}

\end_inset 


\layout LyX-Code


\size footnotesize 
end include
\layout LyX-Code


\size footnotesize 

\protected_separator 

\layout LyX-Code


\size footnotesize 

\protected_separator 
h2=0.300
\protected_separator 
 sigp= 1.000
\protected_separator 
 a=0.250
\protected_separator 
 d=0.000 Q=0.200
\protected_separator 

\protected_separator 
 NO disequilibrium
\layout LyX-Code


\size footnotesize 

\protected_separator 

\layout LyX-Code


\size footnotesize 

\protected_separator 
OPTIMUM SELECTION (convergence in 290 iterations)
\layout LyX-Code


\size footnotesize 
Gen
\protected_separator 

\protected_separator 
 p
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 G
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 Abar
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 f1
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 f2
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 f3
\layout LyX-Code


\size footnotesize 

\protected_separator 
1 0.05000 -0.224999994039536
\protected_separator 
 0.00000 0.500295 0.327620 0.185734
\layout LyX-Code


\size footnotesize 

\protected_separator 
2 0.08406
\protected_separator 
 0.207228153944016
\protected_separator 
 0.41520 0.428348 0.292564 0.181085
\layout LyX-Code


\size footnotesize 

\protected_separator 
3 0.12777
\protected_separator 
 0.644088208675385
\protected_separator 
 0.83020 0.380323 0.268445 0.176079
\layout LyX-Code


\size footnotesize 

\protected_separator 
4 0.18062
\protected_separator 
 1.085383772850037
\protected_separator 
 1.24507 0.346372 0.250374 0.170677
\layout LyX-Code


\size footnotesize 

\protected_separator 
5 0.24178
\protected_separator 
 1.530712127685547
\protected_separator 
 1.65982 0.321152 0.235861 0.164811
\layout LyX-Code


\size footnotesize 

\protected_separator 
6 0.31006
\protected_separator 
 1.979507923126221
\protected_separator 
 2.07448 0.301616 0.223486 0.158368
\layout LyX-Code


\size footnotesize 

\protected_separator 
7 0.38402
\protected_separator 
 2.431057214736938
\protected_separator 
 2.48904 0.285942 0.212349 0.151197
\layout LyX-Code


\size footnotesize 

\protected_separator 
8 0.46200
\protected_separator 
 2.884529113769531
\protected_separator 
 2.90353 0.272983 0.201804 0.143082
\layout LyX-Code


\size footnotesize 

\protected_separator 
9 0.54213
\protected_separator 
 3.338995933532715
\protected_separator 
 3.31793 0.261977 0.191297 0.133716
\layout LyX-Code


\size footnotesize 
10 0.62241
\protected_separator 
 3.793446540832520
\protected_separator 
 3.73224 0.252411 0.180264 0.122658
\layout LyX-Code


\size footnotesize 
11 0.70074
\protected_separator 
 4.246827125549316
\protected_separator 
 4.14646 0.243907 0.167976 0.109237
\layout LyX-Code


\size footnotesize 
12 0.77496
\protected_separator 
 4.698039531707764
\protected_separator 
 4.56056 0.236185 0.153314 0.092416
\layout LyX-Code


\size footnotesize 
13 0.84291
\protected_separator 
 5.145965099334717
\protected_separator 
 4.97451 0.229023 0.134196 0.070581
\layout LyX-Code


\size footnotesize 
14 0.90244
\protected_separator 
 5.589468955993652
\protected_separator 
 5.38825 0.222212 0.105829 0.041521
\layout LyX-Code


\size footnotesize 
15 0.95144
\protected_separator 
 6.027318954467773
\protected_separator 
 5.80160 0.215555 0.052549 0.007065
\layout LyX-Code


\size footnotesize 
16 0.98777
\protected_separator 
 6.457773208618164
\protected_separator 
 6.21389 0.000000 0.000000 0.000000
\layout LyX-Code


\size footnotesize 

\protected_separator 

\layout LyX-Code


\size footnotesize 

\protected_separator 
MASS SELECTION
\layout LyX-Code


\size footnotesize 
Gen
\protected_separator 

\protected_separator 
 p
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 G
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 Abar
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 f1
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 f2
\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 

\protected_separator 
 f3
\layout LyX-Code


\size footnotesize 

\protected_separator 
1 0.05000 -0.224999994039536
\protected_separator 
 0.00000 0.356053 0.267948 0.192415
\layout LyX-Code


\size footnotesize 

\protected_separator 
2 0.06809
\protected_separator 
 0.202594995498657
\protected_separator 
 0.41855 0.352384 0.264710 0.189730
\layout LyX-Code


\size footnotesize 

\protected_separator 
3 0.09215
\protected_separator 
 0.632719278335571
\protected_separator 
 0.83664 0.347544 0.260449 0.186207
\layout LyX-Code


\size footnotesize 

\protected_separator 
4 0.12370
\protected_separator 
 1.066016197204590
\protected_separator 
 1.25417 0.341266 0.254944 0.181672
\layout LyX-Code


\size footnotesize 

\protected_separator 
5 0.16429
\protected_separator 
 1.503146409988403
\protected_separator 
 1.67100 0.333305 0.247997 0.175977
\layout LyX-Code


\size footnotesize 

\protected_separator 
6 0.21523
\protected_separator 
 1.944672703742981
\protected_separator 
 2.08706 0.323501 0.239494 0.169049
\layout LyX-Code


\size footnotesize 

\protected_separator 
7 0.27719
\protected_separator 
 2.390885829925537
\protected_separator 
 2.50229 0.311860 0.229472 0.160944
\layout LyX-Code


\size footnotesize 

\protected_separator 
8 0.34968
\protected_separator 
 2.841590642929077
\protected_separator 
 2.91675 0.298649 0.218199 0.151907
\layout LyX-Code


\size footnotesize 

\protected_separator 
9 0.43069
\protected_separator 
 3.295939683914185
\protected_separator 
 3.33060 0.284411 0.206169 0.142358
\layout LyX-Code


\size footnotesize 
10 0.51654
\protected_separator 
 3.752383232116699
\protected_separator 
 3.74411 0.269933 0.194065 0.132851
\layout LyX-Code


\size footnotesize 
11 0.60243
\protected_separator 
 4.208878993988037
\protected_separator 
 4.15767 0.256081 0.182607 0.123948
\layout LyX-Code


\size footnotesize 
12 0.68336
\protected_separator 
 4.663304328918457
\protected_separator 
 4.57162 0.243602 0.172390 0.116090
\layout LyX-Code


\size footnotesize 
13 0.75530
\protected_separator 
 5.113923549652100
\protected_separator 
 4.98628 0.232973 0.163768 0.109519
\layout LyX-Code


\size footnotesize 
14 0.81586
\protected_separator 
 5.559716701507568
\protected_separator 
 5.40178 0.224359 0.156834 0.104277
\layout LyX-Code


\size footnotesize 
15 0.86451
\protected_separator 
 6.000436305999756
\protected_separator 
 5.81818 0.217659 0.151476 0.100251
\layout LyX-Code


\size footnotesize 
16 0.90209
\protected_separator 
 6.436436176300049
\protected_separator 
 6.23539 0.000000 0.000000 0.000000
\layout Standard

Without using any of the optimal control equations, dp2 yields essentally
 the same results:q
\layout Subsection

Mechanics of Conversion to Frequency Space
\layout Standard

As discussed in 
\begin_inset LatexCommand \ref{sec:replacechoicevars}

\end_inset 

, a fundamental change to the problem has been made while converting to
 frequency space, and the reduction from a two-dimensional search space
 to a single-dimensional space.
 While the same answer will be reached at the optimal solution, the starting
 point is not the same as the mass selection solution.
\layout Paragraph

choosing f1 & f2
\layout Standard

With 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

 chosen, 
\begin_inset Formula \( f_{t} \)
\end_inset 

 should be chosen to maximize 
\begin_inset Formula \( \Delta \bar{A}_{t+1} \)
\end_inset 

.
 The optimization problem is 
\begin_inset Formula 
\begin{eqnarray}
max_{f_{t}}L & = & \Delta \bar{A}_{t+1}\nonumber \\
 &  & +\lambda \left[ f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 1-p_{t}\right) 
-Qp_{t+1}\right] +\mu \left[ f_{1t}p_{t}^{2}+f_{2t}2p_{t}\left( 1-p_{t}\right) 
+f_{3t}\left( 1-p_{t}^{2}\right) \right] \nonumber \\
 & = & \frac{\sigma }{Q}\left\{ p_{t}^{2}z_{1t}+2p_{t}\left( 1-p_{t}\right) 
z_{2t}+\left( 1-p_{t}^{2}z_{3t}\right) \right\} \nonumber \\
 &  & +\lambda \left[ f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 1-p_{t}\right) 
-Qp_{t+1}\right] +\mu \left[ f_{1t}p_{t}^{2}+f_{2t}2p_{t}\left( 1-p_{t}\right) 
+f_{3t}\left( 1-p_{t}^{2}\right) \right] 
\end{eqnarray}

\end_inset 

 which would require an iterative solution, due to the presence of inverses
 of the normal cumulative distribution function.
 As such, it is simpler to use a routine from a standard library.
 Still, such routines require boundaries for the search.
\layout Standard


\begin_inset Formula \( f_{1t} \)
\end_inset 

 will be used as the choice variable, with 
\begin_inset Formula \( f_{2t} \)
\end_inset 

 determined by this choice.
 In any 
\begin_inset Quotes eld
\end_inset 

sane
\begin_inset Quotes erd
\end_inset 

 choice, 
\begin_inset Formula 
\begin{equation}
f_{1t}>f_{2t}
\end{equation}

\end_inset 

 This will generally be used as the lower bound, and can be calculated as
 
\begin_inset Formula 
\begin{equation}
f^{0}_{1tmin}=Q\frac{p_{t+1}}{p_{t}}
\end{equation}

\end_inset 

 
\layout Standard

In the special case where setting 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 and 
\begin_inset Formula \( f_{2t} \)
\end_inset 

 equal causes these portions to exceed 
\begin_inset Formula \( Q \)
\end_inset 

, 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 must be increased; the floor has been understated.
 The new floor will still allocate nothing, or as close to nothing as allocated
 by the algorithm, to 
\begin_inset Formula \( f_{3t} \)
\end_inset 

.
 As such, [
\begin_inset LatexCommand \ref{dp2qcons}

\end_inset 

] reduces to 
\begin_inset Formula 
\begin{equation}
f_{1t}p_{t}^{2}+f_{2t}2p_{t}\left( 1-p_{t}\right) =Q
\end{equation}

\end_inset 

 which combined with [
\begin_inset LatexCommand \ref{dp2prule}

\end_inset 

] yields two equations in two unknowns for the minimal value of 
\begin_inset Formula \( f_{1t} \)
\end_inset 

.
 As 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 rises from this value, 
\begin_inset Formula \( f_{2t} \)
\end_inset 

 must diminish, and 
\begin_inset Formula \( f_{3t} \)
\end_inset 

 will rise.
 Solving the equations,
\begin_inset Formula 
\begin{eqnarray}
\left[ \begin{array}{cc}
p_{t}^{2} & 2p_{t}\left( 1-p_{t}\right) \\
p_{t}^{2} & p_{t}\left( 1-p_{t}\right) 
\end{array}\right] \left[ \begin{array}{c}
f_{1t}\\
f_{2t}
\end{array}\right]  & = & \left[ \begin{array}{c}
Q\\
Qp_{t+1}
\end{array}\right] \nonumber \\
\left[ \begin{array}{cc}
p_{t} & 2\left( 1-p_{t}\right) \\
p_{t} & \left( 1-p_{t}\right) 
\end{array}\right] \left[ \begin{array}{c}
f_{1t}\\
f_{2t}
\end{array}\right]  & = & \frac{Q}{p_{t}}\left[ \begin{array}{c}
1\\
p_{t+1}
\end{array}\right] \nonumber \\
\left[ \begin{array}{c}
f_{1t}\\
f_{2t}
\end{array}\right]  & = & \frac{Q}{p_{t}}\frac{\left[ \begin{array}{cc}
\left( 1-p_{t}\right)  & -2\left( 1-p_{t}\right) \\
-p_{t} & p_{t}
\end{array}\right] }{p_{t}\left( 1-p_{t}\right) -p_{t}2\left( 1-p_{t}\right) }\left[ 
\begin{array}{c}
1\\
p_{t+1}
\end{array}\right] \nonumber \\
 & = & -\frac{Q}{p_{t}}\frac{\left[ \begin{array}{cc}
\left( 1-p_{t}\right)  & -2\left( 1-p_{t}\right) \\
-p_{t} & p_{t}
\end{array}\right] }{p_{t}\left( 1-p_{t}\right) }\left[ \begin{array}{c}
1\\
p_{t+1}
\end{array}\right] \nonumber \\
 & = & -\frac{Q}{p_{t}^{2}\left( 1-p_{t}\right) }\left[ \begin{array}{c}
\left( 1-p_{t}\right) -2\left( 1-p_{t}\right) p_{t+1}\\
p_{t}+p_{t}p_{t+1}
\end{array}\right] \nonumber \\
 & = & -\frac{Q}{p_{t}^{2}\left( 1-p_{t}\right) }\left[ \begin{array}{c}
\left( 1-p_{t}\right) \left( 1-2p_{t+1}\right) \\
p_{t}\left( 1+p_{t+1}\right) 
\end{array}\right] \nonumber \\
 & = & \left[ \begin{array}{c}
\frac{Q\left( 2p_{t+1}-1\right) }{p_{t}^{2}}\\
\frac{Q\left( 1+p_{t+1}\right) }{p_{t}\left( 1-p_{t}\right) }
\end{array}\right] 
\end{eqnarray}

\end_inset 

 of which only the first is used.
\layout Standard

An upper bound must similarly be found.
 For 
\begin_inset Formula 
\begin{equation}
p_{t}<\sqrt{Q}
\end{equation}

\end_inset 

 it is possible to use all of the homozygotes, and 
\begin_inset Formula 
\begin{equation}
f_{1tmax}^{0}=1
\end{equation}

\end_inset 

 For larger values of 
\begin_inset Formula \( p_{t} \)
\end_inset 

, 
\begin_inset Formula 
\begin{equation}
f_{1tmax}^{1}=\frac{Q}{p_{t}^{2}}
\end{equation}

\end_inset 

 selects entirely from this type, and is used as the maximum.
\layout Standard

For this finite model, each generation has its own bubble; the next bubble
 is known with certainty.
 For the initial pass, sufficient bubblettes are used such that the full
 range 
\begin_inset Formula \( \left( 0,1\right)  \)
\end_inset 

 is available in each choice generation, save that a single bubblette is
 available for generation 
\begin_inset Formula \( 0 \)
\end_inset 

, as its gene frequency is predetermined as part of the problem.
\layout Standard

An initial grain of 
\begin_inset Formula \( .05 \)
\end_inset 

 is set for 
\begin_inset Formula \( p_{t} \)
\end_inset 

 in all generations, and the bubblette of generation 
\begin_inset Formula \( 0 \)
\end_inset 

 is asked for its value.
 
\layout Standard

When a bubblette is asked for its value, it firsts checks to see if it has
 been calculated already.
 If so, it returns its value.
 If not, it checks itself for a hint from prior generations, choosing a
 hint of 
\begin_inset Formula \( 0 \)
\end_inset 

 if none is found.
 Having established the hint, the a 
\begin_inset Quotes eld
\end_inset 

sanity check
\begin_inset Quotes erd
\end_inset 


\begin_float margin 
\layout Standard

discuss danger of check & missing optima
\end_float 
 is made on the hint: the gene frequency will never decrease from generation
 to generation; any such step is wrong.
 As such, if the hint suggests reducing the next generation's frequency
 below the present level, it is rejected, and increase to a sane level.
 Similarly, a sanity check is made to insure that the 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

 considered is actually a possible transition.
\layout Standard

This achieved, the value of the hint is calculated.
 The bubblette from the next generation corresponding to the hint is queried,
 and 
\begin_inset Formula \( \Delta \bar{A}_{t+1} \)
\end_inset 

 is added to this value.
 This is stored as the best tentative value, and the next higher bubblette
 in the next generation is checked.
 If that bubblette is better, it becomes the new hint, and the search proceeds
 in that direction as long as progress is made.
 If inferior, the next lower bubblette is checked, and the search proceeds
 in that direction as long as it is successful.
 However, if the initial hint is less than 
\begin_inset Formula \( 0 \)
\end_inset 

, either from a sanity check or the initial hint, the search starts first
 in the negative direction, and switches to positive if appropriate.
 
\layout Standard

Once a bubblette selects a value in this manner, it stores the final hint,
 indicating the next state chosen, its value, and the fact of calculation.
 It then returns.
\layout Standard

After the initial bubblette returns a value, the optimal path can be found
 by stepping from bubble to bubble, which is the method used by 
\family typewriter 
candidateFromBubbles
\family default 
 to form a reportable solution.
\layout Standard

With a solution found, another iteration is made.
 If any of the steps chosen as optimal were on the boundary of a bubblette,
 it is not clear that a further step was not desirable.
 That boundary is doubled, and the process repeated with the same grain.
\layout Standard

If no boundaries were used, the optimal solution becomes the base frequency
 of the next solution.
 
\layout Standard

Initially, the boundaries were set by doubling one more than the highest
 state actually used in that direction (above or below the base), with a
 minimum of ten.
 This resulted in a solution time of 
\begin_inset Formula \( 40.1 \)
\end_inset 

 seconds (also using zero rather than the actual value for hints).
 Changing this to one larger than was actually used, with a minimum of two,
 significantly improved performance, to 
\begin_inset Formula \( 27.7 \)
\end_inset 

 seconds, or a reduction in processing of about one third.
 Enabling the hints further reduced processing time to 
\begin_inset Formula \( 16.7 \)
\end_inset 

 seconds, only a third of the initial amount.
 Interestingly, storing 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 to use as a hint in subsequent iterations actually 
\emph on 
increased
\emph default 
 the execution time by a marginal amount, to 
\begin_inset Formula \( 16.9 \)
\end_inset 

 seconds.
\layout Subsection

Adding Discounting
\layout Standard

To this point, the only concern has been the maximum amount of 
\emph on 
progress
\emph default 
 that can be made, and only the final generation has been considered.
 It is not difficult, however, to modify the work done to this point to
 allow for an infinite horizon.
\layout Standard

Previously, the program considered the effect of the major gene only in
 the final generation, and added the gain in polygenic value from each generatio
n, creating a sum equal to the value in the final generation.
\layout Standard

It is a property of the genetic model that changes in polygenic value are
 permanent.
 As such, a change in generation 
\begin_inset Formula \( t \)
\end_inset 

 increases all generations by the same amount.
 The discounted value of an increase 
\begin_inset Formula \( b \)
\end_inset 

, with a discounted value 
\begin_inset Formula 
\begin{equation}
d=1-r
\end{equation}

\end_inset 

 is not difficult to calculate for a finite horizon: 
\layout Standard


\begin_inset Formula 
\begin{eqnarray}
\sum _{i=0}^{T}bd^{i} & = & \sum _{i=0}^{\infty }bd^{i}-\sum _{i=T+1}^{\infty 
}bd^{i}\nonumber \\
 & = & \sum _{i=0}^{\infty }bd^{i}-d^{T+1}\sum _{i=0}^{\infty }bd^{i}\nonumber \\
 & = & b\frac{1-d^{T+1}}{1-d}\label{identfinitediscount} 
\end{eqnarray}

\end_inset 

 
\layout Standard

To calculate a discounted value, then, 
\family typewriter 
bestVal()
\family default 
need only be modified to apply the identity in [
\begin_inset LatexCommand \ref{identfinitediscount}

\end_inset 

] to the calculated value for 
\begin_inset Formula \( \Delta \bar{A}_{t+1} \)
\end_inset 

, discount this value and that returned from 
\family typewriter 
nextVal()
\family default 
, and add the current value of the major gene.This is accomplished by a simple
 if/then structure in 
\family typewriter 
bestVal()
\family default 
.
 To stay with a single code base, these actions are taken only if the variable
 discount has a non-zero value.
 The only other change required is to change the print routine for tentative
 solutions such that the present value of each generation and its future
 is displayed.
 The present value 
\emph on 
of the choice made
\emph default 
 is reported for each generation.
 This is not the same as the present value of the generation; the value
 of the current state is not included.
 By calculating in this manner, it is easier to compare the relative value
 of choices later when choosing whether or not to test.
\layout Subsection

An Infinite Horizon
\layout Standard

Extending the problem to an infinite horizon is also straightforward, and
 can be done in a number of different ways.
 
\latex latex 

\backslash 
sout{Heading: simplistic approach}
\layout Standard

The simplest approach, which will be used for the moment, is simply to use
 the solution for the 
\begin_inset Formula \( n \)
\end_inset 

-generation problem as a starting point for the 
\begin_inset Formula \( n+1 \)
\end_inset 

-generation solution.
 The starting value for final 
\begin_inset Formula \( p_{t} \)
\end_inset 

 is taken as increasing by half as much as in the prior generation, but
 no more than half of the distance to 
\begin_inset Formula \( 1.0 \)
\end_inset 

.
\layout Standard

Due to steep discounting, future generations eventually have very little
 present value.
 Furthermore, the 
\emph on 
difference
\emph default 
 between the present value of subsequent far off generations declines.
 As such, for any arbitrarily small 
\begin_inset Formula \( \epsilon  \)
\end_inset 

, there exists an 
\begin_inset Formula \( n \)
\end_inset 

 such that the difference between the present values of proceeding for 
\begin_inset Formula \( n \)
\end_inset 

 and for 
\begin_inset Formula \( n+1 \)
\end_inset 

 generations is less than 
\begin_inset Formula \( \epsilon  \)
\end_inset 

.
 This is the first approach taken, and requires minimal modifications such
 that the prior version of the program is placed in a loop, which exits
 when the gain between subsequent generations is less than the specified
 convergence criterion.
\layout Subsubsection

Using Mass Selection
\layout Standard

While the simplistic approach could work, it is not guaranteed to without
 significant work, as the routines used have an upper bound on the 
\begin_inset Formula \( p_{t} \)
\end_inset 

 for which inverses of distribution functions may be calculated.
 However, a better method exists.
 In the simple approach, the entire value of the added generation is an
 increase, though it is possibly offset by different actions in prior generation
s (the steps that are optimal for 
\begin_inset Formula \( n \)
\end_inset 

 and 
\begin_inset Formula \( n+1 \)
\end_inset 

 generations are not the same, and thus the first 
\begin_inset Formula \( n \)
\end_inset 

 steps of the 
\begin_inset Formula \( n+1 \)
\end_inset 

 generation solution are worth less than the 
\begin_inset Formula \( n \)
\end_inset 

 generation solution).
 A more efficient solution is to instead of ignoring generations after 
\begin_inset Formula \( n \)
\end_inset 

 to switch to mass selection, and calculate the present value in that manner.
 This simplifies the calculations in [
\begin_inset LatexCommand \ref{identfinitediscount}

\end_inset 

], which becomes 
\begin_inset Formula 
\begin{equation}
\label{identinfdiscount}
\sum _{i=0}^{\infty }bd^{i}=\frac{b}{1-d}
\end{equation}

\end_inset 

 
\layout Standard

The only further modification required is to change 
\family typewriter 
bestVal()
\family default 
such that in the final generation, it returns the present discounted value
 of future generations under mass selection.
\layout Paragraph

The Value of Mass Selection
\layout Standard

Starting with 
\begin_inset Formula 
\begin{equation}
\left[ \begin{array}{ccccc}
x_{1t} & -x_{2t} &  &  & -\frac{a}{\sigma }\\
x_{1t} &  & -x_{3t} &  & -2\frac{a}{\sigma }\\
 &  &  & \Phi \left( -x_{1t}\right) p_{t}^{2}+\Phi \left( -x_{2t}\right) p_{t}\left( 
1-p_{t}\right) +\Phi \left( -x_{3t}\right) \left( 1-p_{t}\right) ^{2} & -Q
\end{array}\right] =0
\end{equation}

\end_inset 

 yields 
\begin_inset Formula 
\begin{equation}
\Phi \left( -x_{1t}\right) p_{t}^{2}+\Phi \left( -x_{1t}+\frac{a}{\sigma }\right) 
p_{t}\left( 1-p_{t}\right) +\Phi \left( -x_{1t}+2\frac{a}{\sigma }\right) \left( 
1-p_{t}\right) ^{2}-Q
\end{equation}

\end_inset 

 or
\begin_inset Formula 
\[
L=\Phi \left( -x_{1t}\right) p_{t}^{2}+\Phi \left( -x_{2t}\right) p_{t}\left( 
1-p_{t}\right) +\Phi \left( -x_{3t}\right) \left( 1-p_{t}\right) ^{2}-Q\]

\end_inset 

 and 
\begin_inset Formula 
\begin{eqnarray}
L' & = & x_{1t}\phi ^{2}\left( -x_{1t}\right) p_{t}^{2}+\left( x_{1t}-\frac{a}{\sigma 
}\right) \phi ^{2}\left( -x_{1t}+\frac{a}{\sigma }\right) p_{t}\left( 1-p_{t}\right) 
\nonumber \\
 &  & +\left( x_{1t}-2\frac{a}{\sigma }\right) \phi ^{2}\left( 
-x_{1t}+2\frac{a}{\sigma }\right) \left( 1-p_{t}\right) ^{2}
\end{eqnarray}

\end_inset 

 These equations are fed to a numeric routine for solution; reducing to
 the single variable 
\begin_inset Formula \( x_{1t} \)
\end_inset 

 speeds calculation.
 The resultant values are calculated and discounted until 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

 is within the constant 
\family typewriter 
peps
\family default 
, the limit of resolution for gene frequency, of 
\family typewriter 

\begin_inset Formula \( 1.0 \)
\end_inset 

.
 
\begin_inset Formula \( p_{t} \)
\end_inset 


\family default 
 is then accepted as being equal to one, and the gain in polygenic value
 becomes fixed for all later generations, and [
\begin_inset LatexCommand \ref{identinfdiscount}

\end_inset 

] is used to add the value of all future gain.
\begin_float margin 
\layout Standard

The 
\family typewriter 
pcrit
\family default 
 limit doesn't make sense in the finite horizon, as state isn't Markov
\end_float 
\layout Subsection

Testing Costs
\layout Standard

The results so far consider only the revenue from the breeding program,
 and not the costs.
 Realistically, a cost should be imposed when animals are tested, and the
 breeding program should only continue when the benefits exceed the cost,
 the benefit being the gain 
\emph on 
in excess of
\emph default 
 the gain from mass selection.
 The algorithm changes only slightly to handle this variation: the best
 possible breeding choice is still found, but its value is compared to the
 value of switching to mass selection.
 If it does not beat mass selection by the testing cost 
\begin_inset Formula \( c \)
\end_inset 

, the switch is made.
 Using a discount rate of 
\begin_inset Formula \( 8\% \)
\end_inset 

 and a test cost of 
\begin_inset Formula \( .1 \)
\end_inset 

 with Dekkers' parameters, the transition to mass selection occurs after
 generation 
\begin_inset Formula \( 7 \)
\end_inset 

.
 
\layout Subsection

Changing the Horizon
\layout Standard

The largest computational cost is not in calculating the values of the states,
 but in preparing the bubblettes for this computation.
 Once it is known that states beyond a given generation are not used, there
 is no reason to continue calculating these states.
 Similarly, if a breeding program has not switched to mass selection, a
 longer program may be desirable.
 The control variable 
\family typewriter 
smartShrinkGens
\family default 
 is added to handle this situation.
\layout Standard

With 
\family typewriter 
smartShrinkGens
\family default 
 set, if mass selection is not chosen in the final choice generation, the
 time horizon is increased by one.
 The solution of the current iteration, augmented by mass selection for
 the final generation, is taken as the center, and the next iteration is
 run with the same grain.
\layout Standard

Conversely, if the switch to mass selection occurs before the final generation,
 the generation in which the switch occurs becomes the final generation.
 However, the grain is reduced, as the available states are a subset of
 the states already considered.
\layout Standard

This final model can be expressed as 
\begin_inset Formula 
\begin{eqnarray}
\max _{T,\left\{ f_{t}:0\leq <T-1\right\} }L & = & \sum _{t=0}^{T-1}\left( 1-d\right) 
^{t+1}\left[ a\left( 2p_{t+1}\left( f_{t}\right) -1\right) +\frac{\Delta 
\bar{A}_{t+1}\left( f_{t}\right) }{d}-c\right] \nonumber \\
 &  & +\left( 1-d\right) ^{T}\left[ \frac{a}{d}+\frac{\Delta \bar{A}}{d^{2}}\right] 
\label{dp2finalobj} 
\end{eqnarray}

\end_inset 


\begin_float margin 
\layout Standard

discuss 20% penalty for 
\begin_inset Formula \( \pm 3 \)
\end_inset 

 rather than 
\begin_inset Formula \( \pm 2 \)
\end_inset 


\end_float 
 
\layout Standard


\latex latex 

\backslash 
pagebreak
\layout Section

Two Dimensions: Adding Disequilibrium
\layout Standard

The model given in [
\begin_inset LatexCommand \ref{dp2finalobj}

\end_inset 

] is incomplete in several ways.
 The first to be considered is that of 
\emph on 
gametic phase disequilibrium
\emph default 
 
\latex latex 

\backslash 
jd{
\latex default 
between the major gene and polygenes
\latex latex 
}
\latex default 
.
\emph on 

\begin_inset LatexCommand \index{gametic phase disequilibrium}

\end_inset 


\emph default 
 While not considered to this point, the selection intensity on the polygenes
 is weaker for type BB than for Bb, which is in turn weaker than for bb.
 This is a simple consequence of the higher fractions selected from BB and
 Bb; animals with a lower polygenic value than in bb survive selection.
\layout Standard

As with the first model, the actual choice variables, 
\begin_inset Formula \( f_{t} \)
\end_inset 

, will not be used.
 Rather than a single state variable and an internal optimization given
 that variable, a pair of state variables will now be used: 
\begin_inset Formula \( p_{t} \)
\end_inset 

, and the difference between the 
\latex latex 

\backslash 
jd{
\latex default 
average
\latex latex 
}
\latex default 
polygenic values 
\latex latex 

\backslash 
jd{
\latex default 
associated with the B and b gamets,
\latex latex 
}
\latex default 
 
\begin_inset Formula \( \bar{A}_{B,t}-\bar{A}_{b,t} \)
\end_inset 

.
 
\layout Subsection

Gametic Phase Disequilibrium
\layout Standard

The
\begin_float margin 
\layout Standard

should this go in an earlier section?
\end_float 
 single dimensional approache ignores the effects of 
\begin_inset Quotes eld
\end_inset 

gametic phase disequilibrium,
\begin_inset Quotes erd
\end_inset 


\begin_inset LatexCommand \index{disequilibrium, gametic phase}

\end_inset 

, a well known consequence of selection.
\begin_inset LatexCommand \cite{IQG}

\end_inset 

.
 Under selection, the superior homozygotes, BB, are subject to a lesser
 selection intensity for polygenic effects than the other types,
\begin_inset LatexCommand \cite{Dekkers}

\end_inset 

 and as a consequence, have a lower polygenic value.
 Rather than a single 
\latex latex 

\backslash 
jd{
\latex default 
average
\latex latex 
 
\latex default 
polygenic
\latex latex 
}
\latex default 
 value 
\begin_inset Formula \( \bar{A}_{t} \)
\end_inset 

, 
\latex latex 

\backslash 
so{
\latex default 
there are
\latex latex 
}
\latex default 
 now two values, 
\begin_inset Formula \( \bar{A}_{B,t} \)
\end_inset 

 and 
\begin_inset Formula \( \bar{A}_{b,t} \)
\end_inset 

 
\latex latex 

\backslash 
jd{
\latex default 
must be distiguished
\latex latex 
}
\latex default 
, reflecting 
\latex latex 

\backslash 
jd{
\latex default 
average
\latex latex 
 
\latex default 
polygenic values for gametes carrying the B and b allelles, respectively.
\latex latex 
}
\latex default 
 As each individual gets two gametes, one from each parent, the average
 polygenic values for BB, Bb, and bb are then, respectively, 
\begin_inset Formula \( 2\bar{A}_{B,t} \)
\end_inset 

, 
\begin_inset Formula \( \bar{A}_{B,t}+\bar{A}_{b,t} \)
\end_inset 

, and 
\begin_inset Formula \( 2\bar{A}_{b,t} \)
\end_inset 

.
 The overall value is then a weighted average,
\begin_inset Formula 
\begin{equation}
\bar{A}_{t}=2p_{t}\bar{A}_{B,t}+2\left( 1-p_{t}\right) \bar{A}_{b,t}
\end{equation}

\end_inset 

 
\layout Standard

Similarly
\begin_float footnote 
\layout Standard

similar or similarly? does it modify 
\begin_inset Quotes eld
\end_inset 

problem
\begin_inset Quotes erd
\end_inset 

 or 
\begin_inset Quotes eld
\end_inset 

written
\begin_inset Quotes erd
\end_inset 

?
\end_float 
 to the single dimensional problem, these average values can be written
 as recursive equations:
\begin_inset Formula 
\begin{equation}
\label{diseqABt1}
\bar{A}_{B,t+1}=\frac{f_{1t}p_{t}^{2}\left( \bar{A}_{B,t}+\frac{1}{2}i_{1t}\sigma 
\right) +f_{2t}p_{t}\left( 1-p_{t}\right) \frac{1}{2}\left( 
\bar{A}_{B,t}+\bar{A}_{b,t}+i_{2t}\sigma \right) }{f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 
1-p_{t}\right) }
\end{equation}

\end_inset 

 and 
\begin_inset Formula 
\begin{equation}
\label{diseqAbt1}
\bar{A}_{b,t+1}=\frac{f_{2t}p_{t}\left( 1-p_{t}\right) \frac{1}{2}\left( 
\bar{A}_{B,t}+\bar{A}_{b,t}+i_{2t}\sigma \right) +f_{3t}\left( 1-p_{t}\right) 
^{2}\left( \bar{A}_{b,t}+\frac{1}{2}i_{3t}\sigma \right) 
}{1-f_{1t}p_{t}^{2}-f_{2t}p_{t}\left( 1-p_{t}\right) }
\end{equation}

\end_inset 


\begin_float margin 
\layout Standard

jack: is 
\begin_inset Formula \( \bar{A}_{b,t+1} \)
\end_inset 

correct?
\end_float 
 the first of which is Dekkers' equation 10.
 Note that this usage differs from Dekkers' introduction of 
\begin_inset Formula \( W_{B,t}=p_{t}\bar{A}_{B,t} \)
\end_inset 

 and 
\begin_inset Formula \( W_{b,t}=\left( 1-p_{t}\right) \bar{A}_{b,t} \)
\end_inset 

.
 While this change was advantageous for the use of optimal control, it would
 introduce complications for the methods below.
 Particularly, the raw polygenic values have the same units, which allows
 their difference to be defined, while the 
\begin_inset Formula \( W \)
\end_inset 

 are weighted to reflect their contributions to the overal average polygenic
 value.
\layout Subsection

Finding the State Variables
\layout Standard

As before, there are more choice variables than state variables, and non-lineari
ty makes the actual choice variables impractical for dynamic programming.
 Two 
\latex latex 

\backslash 
sout{
\latex default 
choice
\latex latex 
} 
\backslash 
rh{
\latex default 
state
\latex latex 
}
\latex default 
 variables are now needed, and the mechanism for maximising [
\begin_inset LatexCommand \ref{dpsiminfanextoff1}

\end_inset 

] is now irrelevant.
 The choice of 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

 and 
\latex latex 

\backslash 
rh{
\latex default 
a single additional variable for period 
\begin_inset Formula \( t+1 \)
\end_inset 


\latex latex 
}
\latex default 
d
\latex latex 
 
\backslash 
so{
\latex default 
such other state variable as is chosen
\latex latex 
}
\latex default 
 will 
\emph on 
exactly
\emph default 
 define 
\begin_inset Formula \( f_{mt} \)
\end_inset 

, 
\latex latex 

\backslash 
jd{
\latex default 
as [
\begin_inset LatexCommand \ref{siminfqcns}

\end_inset 

], [
\begin_inset LatexCommand \ref{diseqABt1}

\end_inset 

], and [
\begin_inset LatexCommand \ref{diseqAbt1}

\end_inset 

] create three equations in the three unknowns 
\begin_inset Formula \( f_{mt} \)
\end_inset 

 
\latex latex 
}
\latex default 
.
\layout Standard

The new fitness function for a given generation, comparable to [
\begin_inset LatexCommand \ref{siminfobjfn}

\end_inset 

] is now 
\begin_inset Formula 
\begin{equation}
\label{diseqrawobjfn}
\bar{G}_{t}=a\left( 2p_{t}-1\right) +2p_{t}\bar{A}_{B,t}+2\left( 1-p_{t}\right) 
\bar{A}_{b,t}
\end{equation}

\end_inset 

 However, subsituting [
\begin_inset LatexCommand \ref{diseqABt1}

\end_inset 

] and [
\begin_inset LatexCommand \ref{diseqAbt1}

\end_inset 

] into[
\begin_inset LatexCommand \ref{diseqrawobjfn}

\end_inset 

] does not yield a simple result such as [
\begin_inset LatexCommand \ref{siminfarule}

\end_inset 

], in which the change 
\latex latex 

\backslash 
jd{
\latex default 
in 
\begin_inset Formula \( \bar{A} \)
\end_inset 

 
\latex latex 
} 
\latex default 
is easily isolated.
 Instead, a dependence upon two variables of the prior generation
\latex latex 

\backslash 
jd{
\latex default 
, 
\begin_inset Formula \( \bar{A}_{B,t} \)
\end_inset 

 and 
\begin_inset Formula \( \bar{A}_{b,t} \)
\end_inset 

 ,
\latex latex 
}
\latex default 
 remains.
 In order to create a useful algorithm, it is necessary to completely isolate
 the effects of the past 
\latex latex 

\backslash 
jd{
\latex default 
states
\latex latex 
}
\latex default 
 and the 
\latex latex 

\backslash 
so{
\latex default 
changes made
\latex latex 
 }
\latex default 
 
\latex latex 

\backslash 
jd{
\latex default 
choices made; it is necessary to have an expression such as [**] which describes
 the effect of the choice on the objective function
\latex latex 
}
\latex default 
.
 
\layout Standard

One way of doing this is to find an expression for 
\begin_inset Formula \( \bar{A}_{B,t+1}-\bar{A}_{b,t+1} \)
\end_inset 

 
\latex latex 

\backslash 
rh{
\latex default 
 in terms of 
\begin_inset Formula \( \bar{A}_{B,t}-\bar{A}_{b,t} \)
\end_inset 

, 
\begin_inset Formula \( p_{t} \)
\end_inset 

, 
\begin_inset Formula \( p_{t+1} \)
\end_inset 

, and 
\begin_inset Formula \( f_{t} \)
\end_inset 

.
 Using the relation that
\latex latex 
 }
\latex default 
 
\begin_inset Formula 
\begin{equation}
i=\frac{z}{f}
\end{equation}

\end_inset 

 
\begin_inset LatexCommand \cite[equation 11.5]{iqg}

\end_inset 


\latex latex 

\backslash 
rh{
\latex default 
, noting that the denominator of 
\begin_inset LatexCommand \ref{diseqABt1}

\end_inset 

 is equal to 
\begin_inset Formula \( Qp_{t+1}, \)
\end_inset 

 and rearranging terms,
\latex latex 
}
\layout Standard


\begin_inset Formula 
\begin{eqnarray}
\bar{A}_{B,t+1} & = & \frac{f_{1t}p_{t}^{2}\bar{A}_{B,t}+f_{2t}p_{t}\left( 
1-p_{t}\right) \frac{1}{2}\left( \bar{A}_{B,t}+\bar{A}_{b,t}\right) 
+p_{t}^{2}\frac{1}{2}z_{1t}\sigma +p_{t}\left( 1-p_{t}\right) \frac{1}{2}z_{2t}\sigma 
}{Qp_{t+1}}\nonumber \\
 & = & \frac{\left[ f_{1t}p_{t}^{2}+f_{2}p_{t}\left( 1-p_{t}\right) \right] 
\bar{A}_{B,t}-f_{2t}p_{t}\left( 1-p_{t}\right) \frac{1}{2}\left( 
\bar{A}_{B,t}-\bar{A}_{b,t}\right) +p_{t}^{2}\frac{1}{2}z_{1t}\sigma +p_{t}\left( 
1-p_{t}\right) \frac{1}{2}z_{2t}\sigma }{Qp_{t+1}}\nonumber \\
 & = & \frac{Qp_{t+1}\bar{A}_{B,t}-f_{2t}p_{t}\left( 1-p_{t}\right) 
\frac{1}{2}d_{t}+p_{t}^{2}\frac{1}{2}z_{1t}\sigma +p_{t}\left( 1-p_{t}\right) 
\frac{1}{2}z_{2t}\sigma }{Qp_{t+1}}\\
 & = & \bar{A}_{B,t}-\frac{f_{2t}p_{t}\left( 1-p_{t}\right) 
}{2Qp_{t+1}}d_{t}+\frac{p_{t}^{2}z_{1t}+p_{t}\left( 1-p_{t}\right) 
z_{2t}}{2Qp_{t+1}}\sigma 
\end{eqnarray}

\end_inset 

 similarly,
\layout Standard


\begin_inset Formula 
\begin{eqnarray}
\bar{A}_{b,t+1} & = & \frac{f_{2t}p_{t}\left( 1-p_{t}\right) \frac{1}{2}\left( 
\bar{A}_{B,t}+\bar{A}_{b,t}\right) +p_{t}\left( 1-p_{t}\right) \frac{1}{2}z_{2t}\sigma 
+f_{3t}\left( 1-p_{t}\right) ^{2}\bar{A}_{b,t}+\left( 1-p_{t}\right) 
^{2}\frac{1}{2}z_{3t}\sigma }{Q-Qp_{t+1}}\nonumber \\
 & = & \frac{f_{2t}p_{t}\left( 1-p_{t}\right) \frac{1}{2}\left( 
\bar{A}_{B,t}-\bar{A}_{b,t}\right) +\left[ f_{3t}\left( 1-p_{t}\right) 
^{2}+f_{2t}p_{t}\left( 1-p_{t}\right) \right] \bar{A}_{b,t}}{Q\left( 1-p_{t+1}\right) 
}\nonumber \\
 &  & +\frac{p_{t}\left( 1-p_{t}\right) \frac{1}{2}z_{2t}+\left( 1-p_{t}\right) 
^{2}\frac{1}{2}z_{3t}}{Q\left( 1-p_{t+1}\right) }\sigma \nonumber \\
 & = & \frac{\left[ f_{3t}\left( 1-p_{t}\right) ^{2}+f_{2t}p_{t}\left( 1-p_{t}\right) 
\right] }{Q\left( 1-p_{t+1}\right) }\bar{A}_{b,t}+\frac{1}{2}\frac{f_{2t}p_{t}\left( 
1-p_{t}\right) }{Q\left( 1-p_{t+1}\right) }d_{t}\nonumber \\
 &  & +\frac{1}{2}\frac{p_{t}\left( 1-p_{t}\right) z_{2t}+\left( 1-p_{t}\right) 
^{2}z_{3t}}{Q\left( 1-p_{t+1}\right) }\sigma \nonumber \\
 & = & \frac{\left[ Q-f_{1t}p_{t}^{2}-f_{2t}2p_{t}\left( 1-p_{t}\right) 
+f_{2t}p_{t}\left( 1-p_{t}\right) \right] }{Q\left( 1-p_{t+1}\right) 
}\bar{A}_{b,t}+\frac{1}{2}\frac{f_{2t}p_{t}\left( 1-p_{t}\right) }{Q\left( 
1-p_{t+1}\right) }d_{t}\nonumber \\
 &  & +\frac{1}{2}\frac{p_{t}\left( 1-p_{t}\right) z_{2t}+\left( 1-p_{t}\right) 
^{2}z_{3t}}{Q\left( 1-p_{t+1}\right) }\sigma \nonumber \\
 & = & \bar{A}_{b,t}+\frac{1}{2}\frac{f_{2t}p_{t}\left( 1-p_{t}\right) }{Q\left( 
1-p_{t+1}\right) }d_{t}+\frac{1}{2}\frac{p_{t}\left( 1-p_{t}\right) z_{2t}+\left( 
1-p_{t}\right) ^{2}z_{3t}}{Q\left( 1-p_{t+1}\right) }\sigma 
\end{eqnarray}

\end_inset 

 yielding
\begin_inset Formula 
\begin{eqnarray}
d_{t+1} & \equiv  & \bar{A}_{B,t+1}-\bar{A}_{b,t+1}\nonumber \\
 & = & \bar{A}_{B,t}-\frac{1}{2Q}\frac{f_{2t}p_{t}\left( 1-p_{t}\right) 
}{p_{t+1}}d_{t}+\frac{1}{2Q}\frac{p_{t}^{2}z_{1t}+p_{t}\left( 1-p_{t}\right) 
z_{2t}}{p_{t+1}}\sigma \nonumber \\
 &  & -\bar{A}_{b,t}-\frac{1}{2Q}\frac{f_{2t}p_{t}\left( 1-p_{t}\right) }{\left( 
1-p_{t+1}\right) }d_{t}-\frac{1}{2Q}\frac{p_{t}\left( 1-p_{t}\right) z_{2t}+\left( 
1-p_{t}\right) ^{2}z_{3t}}{\left( 1-p_{t+1}\right) }\sigma \nonumber \\
 & = & d_{t}-\frac{1}{2Q}\left[ \frac{f_{2t}p_{t}\left( 1-p_{t}\right) 
}{p_{t+1}}+\frac{f_{2t}p_{t}\left( 1-p_{t}\right) }{\left( 1-p_{t+1}\right) }\right] 
d_{t}\nonumber \\
 &  & +\frac{1}{2Q}\left[ \frac{p_{t}^{2}z_{1t}+p_{t}\left( 1-p_{t}\right) 
z_{2t}}{p_{t+1}}-\frac{p_{t}\left( 1-p_{t}\right) z_{2t}+\left( 1-p_{t}\right) 
^{2}z_{3t}}{\left( 1-p_{t+1}\right) }\right] \sigma \nonumber \\
 & = & d_{t}-\frac{1}{2Q}f_{2t}p_{t}\left( 1-p_{t}\right) \left[ 
\frac{1-p_{t+1}+p_{t+1}}{p_{t+1}\left( 1-p_{t+1}\right) }\right] d_{t}\nonumber \\
 &  & +\frac{1}{2Q}\left[ \frac{p_{t}^{2}}{p_{t+1}}z_{1t}+p_{t}\left( 1-p_{t}\right) 
\left[ \frac{1}{p_{t+1}}-\frac{1}{1-p_{t+1}}\right] z_{2t}-\frac{\left( 1-p_{t}\right) 
^{2}}{\left( 1-p_{t+1}\right) }z_{3t}\right] \sigma \nonumber \\
 & = & d_{t}-\frac{1}{2Q}f_{2t}\frac{p_{t}\left( 1-p_{t}\right) }{p_{t+1}\left( 
1-p_{t+1}\right) }d_{t}\nonumber \\
 &  & +\frac{1}{2Q}\left[ \frac{p_{t}^{2}}{p_{t+1}}z_{1t}+p_{t}\left( 1-p_{t}\right) 
\left[ \frac{1}{p_{t+1}}-\frac{1}{1-p_{t+1}}\right] z_{2t}-\frac{\left( 1-p_{t}\right) 
^{2}}{\left( 1-p_{t+1}\right) }z_{3t}\right] \sigma \label{diseqdrule} 
\end{eqnarray}

\end_inset 


\layout Standard


\begin_inset Formula 
\begin{equation}
\label{diseqABrule}
\bar{A}_{B,t+1}-\bar{A}_{B,t}\jd {-}\frac{f_{2t}p_{t}\left( 1-p_{t}\right) 
}{2Qp_{t+1}}\left( \bar{A}_{B,t}-\bar{A}_{b,t}\right) 
+\frac{f_{1t}p_{t}^{2}i_{1t}\sigma +f_{2t}p_{t}\left( 1-p_{t}\right) i_{2t}\sigma 
}{2Qp_{t+1}}
\end{equation}

\end_inset 

  
\layout Standard

Before proceeding to 
\begin_inset Formula \( \bar{A}_{b,t+1} \)
\end_inset 

, it is useful to define 
\begin_inset Formula 
\begin{equation}
d_{t}\equiv \bar{A}_{B,t}-\bar{A}_{b,t}
\end{equation}

\end_inset 

 and derive
\begin_inset Formula 
\begin{eqnarray}
1-p_{t+1} & = & 1-\frac{1}{Q}\left\{ f_{1t}p_{t}^{2}+f_{2t}p_{t}\left( 1-p_{t}\right) 
\right\} \nonumber \\
 & = & \frac{Q-f_{1t}p_{t}^{2}-f_{2t}p_{t}\left( 1-p_{t}\right) }{Q}\nonumber \\
 & = & \frac{f_{1}p_{t}^{2}+f_{2t}2p_{t}\left( 1-p_{t}\right) +f_{3t}\left( 
1-p_{t}^{2}\right) -f_{1t}p_{t}^{2}-f_{2t}p_{t}\left( 1-p_{t}\right) }{Q}\nonumber \\
 & = & \frac{1}{Q}\left\{ f_{2t}p_{t}\left( 1-p_{t}\right) +f_{3t}\left( 
1-p_{t}^{2}\right) \right\} 
\end{eqnarray}

\end_inset 


\begin_inset Formula 
\begin{eqnarray}
Q\left( 1-p_{t+1}\right) \bar{A}_{b,t+1} & = & f_{2t}p_{t}\left( 1-p_{t}\right) 
\frac{1}{2}\left( \bar{A}_{B,t}+\bar{A}_{b,t}+i_{2t}\sigma \right) \nonumber \\
 &  & +f_{3t}\left( 1-p_{t}\right) ^{2}\left( \bar{A}_{b,t}+\frac{1}{2}i_{3t}\sigma 
\right) \nonumber \\
 & = & \left[ f_{2t}p_{t}\left( 1-p_{t}\right) +f_{3t}\left( 1-p_{t}^{2}\right) 
\right] \bar{A}_{b,t}+f_{2t}p_{t}\left( 1-p_{t}\right) \frac{1}{2}\left( 
\bar{A}_{B,t}-\bar{A}_{b,t}\right) \nonumber \\
 &  & +f_{2t}p_{t}\left( 1-p_{t}\right) \frac{1}{2}i_{3t}\sigma +f_{3t}\left( 
1-p_{t}\right) ^{2}\frac{1}{2}i_{3t}\sigma \nonumber \\
 & = & Q\left( 1-p_{t+1}\right) \bar{A}_{b,t}+f_{2t}p_{t}\left( 1-p_{t}\right) 
\frac{1}{2}\left( \bar{A}_{B,t}-\bar{A}_{b,t}\right) \nonumber \\
 &  & +f_{2t}p_{t}\left( 1-p_{t}\right) \frac{1}{2}i_{3t}\sigma +f_{3t}\left( 
1-p_{t}\right) ^{2}\frac{1}{2}i_{3t}\sigma 
\end{eqnarray}

\end_inset 

 
\layout Standard


\begin_inset Formula 
\begin{equation}
\label{diseqAbrule}
\bar{A}_{b,t+1}-\bar{A}_{b,t}=\frac{f_{2t}p_{t}\left( 1-p_{t}\right) }{2Q\left( 
1-p_{t+1}\right) }\left( \bar{A}_{B,t}-\bar{A}_{b,t}\right) +\frac{f_{2t}p_{t}\left( 
1-p_{t}\right) i_{2t}\sigma +f_{3t}\left( 1-p_{t}\right) ^{2}i_{3t}\sigma }{2Q\left( 
1-p_{t+1}\right) }
\end{equation}

\end_inset 

   allowing the calculation,
\begin_inset Formula 
\begin{eqnarray}
\Delta d_{t+1} & = & \left( \bar{A}_{B,t+1}-\bar{A}_{b,t+1}\right) -\left( 
\bar{A}_{B,t}-\bar{A}_{b,t}\right) \nonumber \\
 & = & \frac{f_{2t}p_{t}\left( 1-p_{t}\right) }{2Qp_{t+1}}\left( 
\bar{A}_{B,t}-\bar{A}_{b,t}\right) +\frac{f_{1t}p_{t}^{2}i_{1t}\sigma 
+f_{2t}p_{t}\left( 1-p_{t}\right) i_{2t}\sigma }{2Qp_{t+1}}\nonumber \\
 &  & -\frac{f_{2t}p_{t}\left( 1-p_{t}\right) }{2Q\left( 1-p_{t+1}\right) 
}d_{t}-\frac{f_{2t}p_{t}\left( 1-p_{t}\right) i_{2t}\sigma +f_{3t}\left( 
1-p_{t}\right) ^{2}i_{3t}\sigma }{2Q\left( 1-p_{t+1}\right) }\nonumber \\
 & = & \frac{f_{2}p_{t}\left( 1-p_{t}\right) }{2Qp_{t+1}\left( 1-p_{t+1}\right) 
}d_{t}\nonumber \\
 &  & +\frac{p_{t}^{2}\left( 1-p_{t+1}\right) z_{1t}+p_{t}\left( 1-p_{t}\right) 
z_{2t}+\left( 1-p_{t}\right) ^{2}p_{t+1}z_{3t}}{2Qp_{t+1}\left( 1-p_{t+1}\right) 
}\sigma \label{dp3dt1} 
\end{eqnarray}

\end_inset 

 
\layout Standard

Also note that [
\begin_inset LatexCommand \ref{diseqABrule}

\end_inset 

] and [
\begin_inset LatexCommand \ref{diseqABrule}

\end_inset 

] can be written as 
\layout Standard


\begin_inset Formula 
\begin{eqnarray}
\bar{A}_{B,T} & = & \bar{A}_{B,0}+\sum _{t=0}^{T-1}\frac{f_{2t}p_{t}\left( 
1-p_{t}\right) }{2Qp_{t+1}}\left( \bar{A}_{B,t}-\bar{A}_{b,t}\right) 
+\frac{f_{1t}p_{t}^{2}i_{1t}\sigma +f_{2t}p_{t}\left( 1-p_{t}\right) i_{2t}\sigma 
}{2Qp_{t+1}}\nonumber \\
 & = & \bar{A}_{B,0}+\sum ^{T-1}_{t=0}\Delta \bar{A}_{B,t+1}\label{diseqABassum} 
\end{eqnarray}

\end_inset 

 and 
\begin_inset Formula 
\begin{equation}
\label{diseqAbassum}
\bar{A}_{b,T}=\bar{A}_{b,0}+\sum _{t=0}^{T-1}\Delta \bar{A}_{b,t+1}
\end{equation}

\end_inset 

 Which means that as in the prior case, changes 
\latex latex 

\backslash 
jd{
\latex default 
in the average polygenic value
\latex latex 
}
\latex default 
 are permanent.
 However, as [
\begin_inset LatexCommand \ref{diseqrawobjfn}

\end_inset 

] depends upon 
\begin_inset Formula \( p_{t} \)
\end_inset 

, the value of 
\begin_inset Formula \( \Delta \bar{A}_{B,t} \)
\end_inset 

 is not the same in all future 
\latex latex 

\backslash 
so{
\latex default 
equations
\latex latex 
} 
\backslash 
jd{
\latex default 
generations
\latex latex 
}
\latex default 
, making calculations such as [**], which calculates the present value of
 a change, impossible.
\begin_float margin 
\layout Standard

write prior expresson above
\end_float 
\layout Standard

Instead, consider
\begin_inset Formula 
\begin{eqnarray}
\bar{A}_{t+1}-\bar{A}_{t} & = & 2p_{t+1}\bar{A}_{Bt+1}+2\left( 1-p_{t+1}\right) 
\bar{A}_{b,t+1}-2p_{t}\bar{A}_{B,t}-2\left( 1-p_{t}\right) \bar{A}_{b,t}\nonumber \\
 & = & 2\bar{A}_{b,t+1}+2p_{t+1}\left( \bar{A}_{B,t+1}-\bar{A}_{b,t+1}\right) 
-2\bar{A}_{b,t}-2p_{t}\left( \bar{A}_{B,t}-\bar{A}_{b,t}\right) \nonumber \\
 & = & 2\left( \bar{A}_{b,t+1}-\bar{A}_{b,t}\right) 
+2p_{t+1}d_{t+1}-2p_{t}d_{t}\nonumber \\
 & = & 2\left( \frac{f_{2t}p_{t}\left( 1-p_{t}\right) }{2Q\left( 1-p_{t+1}\right) 
}d_{t}+\frac{f_{2t}p_{t}\left( 1-p_{t}\right) i_{2t}\sigma +f_{3t}\left( 
1-p_{t}\right) ^{2}i_{3t}\sigma }{2Q\left( 1-p_{t+1}\right) }\right) \nonumber \\
 &  & +2p_{t+1}d_{t+1}-2p_{t}d_{t}\nonumber \\
 & = & \frac{f_{2t}p_{t}\left( 1-p_{t}\right) \left[ d_{t}+i_{2t}\sigma \right] 
+f_{3t}\left( 1-p_{t}\right) ^{2}i_{3t}\sigma }{Q\left( 1-p_{t+1}\right) 
}+2p_{t+1}d_{t+1}-2p_{t}d_{t}\nonumber \\
 & = & \frac{p_{t}\left( 1-p_{t}\right) \left[ f_{2t}d_{t}+z_{2t}\sigma \right] 
+\left( 1-p_{t}\right) ^{2}z_{3t}\sigma }{Q\left( 1-p_{t+1}\right) 
}+2p_{t+1}d_{t+1}-2p_{t}d_{t}\label{diseqArule} 
\end{eqnarray}

\end_inset 

which
\latex latex 

\backslash 
so{
\latex default 
, while not pretty,
\latex latex 
}
\latex default 
 is written entirely in terms of the state variables 
\begin_inset Formula \( p_{t} \)
\end_inset 

 and 
\begin_inset Formula \( d_{t} \)
\end_inset 

 , and fractions which are functions of these choice variables.
 Thus [
\begin_inset LatexCommand \ref{diseqArule}

\end_inset 

] can be used to write the present value of 
\latex latex 

\backslash 
so{
\latex default 
a change
\latex latex 
}
\latex default 
 
\latex latex 

\backslash 
jd{
\latex default 
the change in state
\latex latex 
}
\latex default 
 as
\begin_inset Formula 
\begin{equation}
pv=\frac{2\left( 1-r\right) }{r}\left[ \bar{A}_{t+1}-\bar{A}_{t}\right] 
\end{equation}

\end_inset 


\layout Subsection

The State
\layout Standard

The state at any time will be described by the pair 
\begin_inset Formula \( \left( p_{t},d_{t}\right)  \)
\end_inset 

, where 
\begin_inset Formula \( d_{t} \)
\end_inset 

 is the disequilibrium at 
\latex latex 

\backslash 
so{
\latex default 
the
\latex latex 
}
\latex default 
 time 
\latex latex 

\backslash 
jd{
\latex default 

\begin_inset Formula \( t \)
\end_inset 

 
\latex latex 
}
\latex default 
, 
\begin_inset Formula 
\begin{equation}
d_{t}=\bar{A}_{B,t}-\bar{A}_{b,t}
\end{equation}

\end_inset 

 Rather than calculating 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 to maximize the polygenic gain, the successor states 
\latex latex 

\backslash 
jd{
\latex default 

\begin_inset Formula \( p_{t+1} \)
\end_inset 

 and 
\begin_inset Formula \( d_{t+1} \)
\end_inset 


\latex latex 
}
\latex default 
 are chosen, and the choice made fully dictates 
\begin_inset Formula \( f_{t} \)
\end_inset 

.
 Equations [
\begin_inset LatexCommand \ref{dp2prule}

\end_inset 

], [
\begin_inset LatexCommand \ref{dp3dt1}

\end_inset 

], and [
\begin_inset LatexCommand \ref{dp2qcons}

\end_inset 

] constitute a system of three equations in the three unknowns 
\begin_inset Formula \( f_{t} \)
\end_inset 

 , which can be solved by a library routine.
 As a practical matter, [
\begin_inset LatexCommand \ref{dp2qcons}

\end_inset 

] is used to eliminate 
\begin_inset Formula \( f_{3t} \)
\end_inset 

 from the system to reduce computation.
\layout Subsection

Mass selection With Gametic Phase Disequilibrium
\layout Standard


\latex latex 

\backslash 
so{
\latex default 
While
\latex latex 
} 
\backslash 
jd{
\latex default 
When
\latex latex 
}
\latex default 
 igoring disequilibrium, all genotypes had the same polygenic distribution,
 and mass selection truncation points 
\begin_inset Formula \( x_{t} \)
\end_inset 

 were calculated by setting 
\begin_inset Formula 
\begin{equation}
x_{1t}-\frac{a}{\sigma }=x_{2t}=x_{3t}+\frac{a}{\sigma }
\end{equation}

\end_inset 

 This is no longer the case under disequilibrium; the new rule is 
\begin_inset Formula 
\begin{equation}
x_{1t}+\left( 2\bar{A}_{B,t}-\frac{a}{\sigma }\right) =x_{2t}+\left( 
\bar{A}_{B,t}+\bar{A}_{b,t}\right) =x_{3t}+2\bar{A}_{b,t}+\frac{a}{\sigma }
\end{equation}

\end_inset 

 which can be rewritten as 
\begin_inset Formula 
\begin{equation}
x_{1t}+\left( 2\bar{A}_{b,t}+2d_{t}-\frac{a}{\sigma }\right) =x_{2t}+\left( 
2\bar{A}_{b,t}+d_{t}\right) =x_{3t}+\left( 2\bar{A}_{b,t}+\frac{a}{\sigma }\right) 
\end{equation}

\end_inset 

 or 
\begin_inset Formula 
\begin{equation}
x_{1t}+\left( d_{t}-\frac{a}{\sigma }\right) =x_{2t}=x_{3t}-\left( 
d_{t}-\frac{a}{\sigma }\right) 
\end{equation}

\end_inset 

 
\layout Subsection

Translation from state to choice variables
\layout Standard

Given that the problem is to be solved with state variables rather than
 choice variables, it is necessary to have a mechanism allowing translation
 from state transitions to the corresponding choice variables, both to report
 the results and to check for violations of possible states.
 
\layout Standard

Given that 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 has already been eliminated from [
\begin_inset LatexCommand \ref{diseqArule}

\end_inset 

], it is useful to solve [
\begin_inset LatexCommand \ref{dp2prule}

\end_inset 

] for 
\begin_inset Formula \( f_{1t} \)
\end_inset 

,
\begin_inset Formula 
\begin{equation}
f_{1t}=\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) }{p_{t}^{2}}
\end{equation}

\end_inset 

 which can be used to solve [
\begin_inset LatexCommand \ref{dp2qcons}

\end_inset 

] for 
\begin_inset Formula \( f_{3t} \)
\end_inset 

,
\begin_inset Formula 
\begin{eqnarray}
f_{3t} & = & \frac{Q-\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) 
}{p_{t}^{2}}p_{t}^{2}-2p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 1-p_{t}\right) 
^{2}}\nonumber \\
 & = & \frac{Q-Qp_{t+1}+f_{2t}p_{t}\left( 1-p_{t}\right) -2p_{t}\left( 1-p_{t}\right) 
f_{2t}}{\left( 1-p_{t}\right) ^{2}}\nonumber \\
 & = & \frac{Q\left( 1-p_{t+1}\right) -p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 
1-p_{t}\right) ^{2}}
\end{eqnarray}

\end_inset 

 which is in turn csubstituted into [
\begin_inset LatexCommand \ref{diseqArule}

\end_inset 

] 
\begin_inset Formula 
\begin{eqnarray}
0 & = & f_{2}p_{t}\left( 1-p_{t}\right) \frac{d_{t}}{\sigma }\nonumber \\
 &  & +p_{t}^{2}\left( 1-p_{t+1}\right) z\left( \frac{Qp_{t+1}-f_{2t}p_{t}\left( 
1-p_{t}\right) }{p_{t}^{2}}\right) \nonumber \\
 &  & +p_{t}\left( 1-p_{t}\right) z\left( f_{2t}\right) \nonumber \\
 &  & +\left( 1-p_{t}\right) ^{2}p_{t+1}z\left( \frac{Q\left( 1-p_{t+1}\right) 
-p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 1-p_{t}\right) ^{2}}\right) \nonumber \\
 &  & -\frac{\left( d_{t+1}-d_{t}\right) }{\sigma }\left( 2Qp_{t+1}\left( 
1-p_{t+1}\right) \right) 
\end{eqnarray}

\end_inset 

which can be solved by a fast numeric routine
\layout Subsection

Translation from state to choice variables (new)
\layout Standard

While working with the state variables 
\begin_inset Formula \( d \)
\end_inset 

 and 
\begin_inset Formula \( p \)
\end_inset 

 is sufficient to describe the 
\emph on 
behavior
\emph default 
 of the system, it is not enough to quantitatively 
\emph on 
evaluate
\emph default 
 a path: the original 
\begin_inset Formula \( f_{t} \)
\end_inset 

, 
\begin_inset Formula \( x_{t} \)
\end_inset 

 and 
\begin_inset Formula \( z_{t} \)
\end_inset 

 are needed in equations such as [
\begin_inset LatexCommand \ref{diseqArule}

\end_inset 

] to determine the value of the proposed state to the breeder.
 Equations [
\begin_inset LatexCommand \ref{diseqArule}

\end_inset 

], [
\begin_inset LatexCommand \ref{diseqdrule}

\end_inset 

], and [
\begin_inset LatexCommand \ref{dp2qcons}

\end_inset 

] are three equations in the three choice variables, determining them exactly.
 While it is not possible to write an explicit, closed form solution, it
 is possible to reduce the equaitons to a single variable in a single unknown,
 and then solve with a fast numeric routine.
\layout Standard

As 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 has already been eliminated from [
\begin_inset LatexCommand \ref{diseqArule}

\end_inset 

], and 
\begin_inset Formula \( f_{3t} \)
\end_inset 

 has generally been treated as an artifact of the choice of 
\begin_inset Formula \( f_{1t} \)
\end_inset 

 and 
\begin_inset Formula \( f_{2t} \)
\end_inset 

, 
\begin_inset Formula \( f_{2t} \)
\end_inset 

 seems to be the natural choice.
 Manipulating [
\begin_inset LatexCommand \ref{dp2prule}

\end_inset 

] yields 
\begin_inset Formula 
\begin{equation}
f_{1t}=\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) }{p_{t}^{2}}
\end{equation}

\end_inset 

 which can in turn be used in [
\begin_inset LatexCommand \ref{dp2qcons}

\end_inset 

] to get 
\begin_inset Formula 
\begin{eqnarray}
f_{3t} & = & \frac{Q-\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) 
}{p_{t}^{2}}p_{t}^{2}-2p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 1-p_{t}\right) 
^{2}}\nonumber \\
 & = & \frac{Q-Qp_{t+1}+f_{2t}p_{t}\left( 1-p_{t}\right) -2p_{t}\left( 1-p_{t}\right) 
f_{2t}}{\left( 1-p_{t}\right) ^{2}}\nonumber \\
 & = & \frac{Q\left( 1-p_{t+1}\right) -p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 
1-p_{t}\right) ^{2}}
\end{eqnarray}

\end_inset 

both of which are placed into [
\begin_inset LatexCommand \ref{diseqdrule}

\end_inset 

], [
\begin_inset LatexCommand \ref{diseqdrule}

\end_inset 

],
\begin_inset Formula 
\begin{eqnarray}
0 & = & d_{t}-d_{t+1}-\frac{1}{2Q}f_{2t}\frac{p_{t}\left( 1-p_{t}\right) 
}{p_{t+1}\left( 1-p_{t+1}\right) }d_{t}\nonumber \\
 &  & +\frac{1}{2Q}\left[ \frac{p_{t}^{2}}{p_{t+1}}z\left( 
\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) }{p_{t}^{2}}\right) +p_{t}\left( 
1-p_{t}\right) \left[ \frac{1}{p_{t+1}}-\frac{1}{1-p_{t+1}}\right] z\left( 
f_{2t}\right) \right. \nonumber \\
 &  & \left. -\frac{\left( 1-p_{t}\right) ^{2}}{\left( 1-p_{t+1}\right) }z\left( 
\frac{Q\left( 1-p_{t+1}\right) -p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 
1-p_{t}\right) ^{2}}\right) \right] \sigma 
\end{eqnarray}

\end_inset 

 which has a derivative of
\begin_inset Formula 
\begin{eqnarray*}
der_{f_{2}} & = & -\frac{1}{2Q}\frac{p_{t}\left( 1-p_{t}\right) }{p_{t+1}\left( 
1-p_{t+1}\right) }d_{t}\\
 &  & +\frac{1}{2Q}\left[ \frac{p_{t}^{2}}{p_{t+1}}x\left( 
\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) }{p_{t}^{2}}\right) \frac{-\left( 
1-p_{t}\right) }{p_{t}}\right. \\
 &  & +p_{t}\left( 1-p_{t}\right) \left[ \frac{1}{p_{t+1}}-\frac{1}{1-p_{t+1}}\right] 
x\left( f_{2t}\right) \\
 &  & \left. -\frac{\left( 1-p_{t}\right) ^{2}}{\left( 1-p_{t+1}\right) }x\left( 
\frac{Q\left( 1-p_{t+1}\right) -p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 
1-p_{t}\right) ^{2}}\right) \frac{-p_{t}}{1-p_{t}}\right] \sigma \\
 & = & -\frac{\sigma }{2Q}\frac{p_{t}\left( 1-p_{t}\right) }{p_{t+1}\left( 
1-p_{t+1}\right) }\left[ \frac{d_{t}}{\sigma }+\left( 1-p_{t+1}\right) x_{1}-\left( 
1-2p_{t+1}\right) x\left( f_{2t}\right) -p_{t+1}x_{3}\right] 
\end{eqnarray*}

\end_inset 

 
\layout Standard


\begin_inset Formula 
\begin{eqnarray}
 & = & \frac{1}{2Q}\frac{p_{t}\left( 1-p_{t}\right) }{p_{t+1}\left( 1-p_{t+1}\right) 
}d_{t}\nonumber \\
 &  & -\frac{1}{2Q}\left[ \frac{p_{t}^{2}}{p_{t+1}}x\left( 
\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) }{p_{t}^{2}}\right) 
\frac{1-p_{t}}{p_{t}}\right. \nonumber \\
 &  & +p_{t}\left( 1-p_{t}\right) \left[ \frac{1}{p_{t+1}}-\frac{1}{1-p_{t+1}}\right] 
x\left( f_{2t}\right) \nonumber \\
 &  & \left. -\frac{\left( 1-p_{t}\right) ^{2}}{\left( 1-p_{t+1}\right) }x\left( 
\frac{Q\left( 1-p_{t+1}\right) -p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 
1-p_{t}\right) ^{2}}\right) \frac{p_{t}}{1-p_{t}}\right] \sigma \nonumber \\
 & = & \frac{1}{2Q}\frac{p_{t}\left( 1-p_{t}\right) }{p_{t+1}\left( 1-p_{t+1}\right) 
}d_{t}\nonumber \\
 &  & -\frac{1}{2Q}\left[ \frac{p_{t}\left( 1-p_{t}\right) }{p_{t+1}}x\left( 
\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) }{p_{t}^{2}}\right) \right. \nonumber 
\\
 &  & +p_{t}\left( 1-p_{t}\right) \left[ \frac{1}{p_{t+1}}-\frac{1}{1-p_{t+1}}\right] 
x\left( f_{2t}\right) \nonumber \\
 &  & \left. -\frac{p_{t}\left( 1-p_{t}\right) }{\left( 1-p_{t+1}\right) }x\left( 
\frac{Q\left( 1-p_{t+1}\right) -p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 
1-p_{t}\right) ^{2}}\right) \right] \sigma \nonumber \\
 & = & \frac{p_{t}\left( 1-p_{t}\right) }{2Q}\sigma \left[ \frac{\frac{d_{t}}{\sigma 
}}{p_{t+1}\left( 1-p_{t+1}\right) }-\frac{x\left( \frac{Qp_{t+1}-f_{2t}p_{t}\left( 
1-p_{t}\right) }{p_{t}^{2}}\right) }{p_{t+1}}\right. \nonumber \\
 &  & \left. -\left[ \frac{1}{p_{t+1}}-\frac{1}{1-p_{t+1}}\right] x\left( 
f_{2t}\right) +\frac{x\left( \frac{Q\left( 1-p_{t+1}\right) -p_{t}\left( 
1-p_{t}\right) f_{2t}}{\left( 1-p_{t}\right) ^{2}}\right) }{1-p_{t+1}}\right] 
\nonumber \\
 & = & \frac{p_{t}\left( 1-p_{t}\right) }{p_{t+1}\left( 1-p_{t+1}\right) }\frac{\sigma 
}{2Q}\left[ \frac{d_{t}}{\sigma }-\left( 1-p_{t+1}\right) x\left( 
\frac{Qp_{t+1}-f_{2t}p_{t}\left( 1-p_{t}\right) }{p_{t}^{2}}\right) \right. \nonumber 
\\
 &  & \left. -x\left( f_{2t}\right) +p_{t+1}x\left( \frac{Q\left( 1-p_{t+1}\right) 
-p_{t}\left( 1-p_{t}\right) f_{2t}}{\left( 1-p_{t}\right) ^{2}}\right) \right] 
\end{eqnarray}

\end_inset 


\layout Subsection

Is 
\begin_inset Formula \( \Delta \bar{A}_{t+1} \)
\end_inset 

 monotone in 
\begin_inset Formula \( d_{t+1} \)
\end_inset 

?
\layout Standard

Differentiating [
\begin_inset LatexCommand \ref{diseqArule}

\end_inset 

], 
\begin_inset Formula 
\begin{eqnarray*}
\frac{\partial \Delta \bar{A}_{t+1}}{\partial d_{t+1}} & = & \frac{p_{t}\left( 
1-p_{t}\right) d_{t}}{Q\left( 1-p_{t+1}\right) }\frac{\partial f_{2t}}{\partial 
d_{t+1}}+\frac{\left( 1-p_{t}\right) ^{2}\sigma }{Q\left( 1-p_{t+1}\right) 
}\frac{\partial z_{3t}}{\partial d_{t+1}}+2p_{t+1}\\
 & = & \frac{p_{t}\left( 1-p_{t}\right) d_{t}}{Q\left( 1-p_{t+1}\right) 
}\frac{1}{\frac{\partial d_{t+1}}{\partial f_{2t}}}+\frac{\left( 1-p_{t}\right) 
^{2}\sigma }{Q\left( 1-p_{t+1}\right) }\frac{\partial z_{3t}}{\partial 
f_{3t}}\frac{\partial f_{3t}}{\partial f_{2t}}\frac{1}{\frac{\partial 
d_{t+1}}{\partial f_{2t}}}+2p_{t+1}\\
 & = & \frac{p_{t}\left( 1-p_{t}\right) d_{t}}{Q\left( 1-p_{t+1}\right) 
}\frac{1}{\frac{\partial d_{t+1}}{\partial f_{2t}}}+\frac{\left( 1-p_{t}\right) 
^{2}\sigma }{Q\left( 1-p_{t+1}\right) }\frac{\partial z_{3t}}{\partial 
f_{3t}}\frac{\partial f_{3t}}{\partial f_{2t}}\frac{1}{\frac{\partial 
d_{t+1}}{\partial f_{2t}}}+2p_{t+1}
\end{eqnarray*}

\end_inset 


\layout Standard


\latex latex 

\backslash 
pagebreak
\layout Subsection

N-dimensional search rules
\layout Standard

An algorithm that can solve 
\begin_inset Formula \( n \)
\end_inset 

 dimensions rather than a fixed number is more valuable and easily maintained
 than a set of algorithms for assorted dimensions.
 Furthermore, it is easier to write than an algorithm for any fixed 
\begin_inset Formula \( n \)
\end_inset 

 larger than two.
 Accordingly, the focus will be on the algorithm of arbitrary dimension.
\layout Standard

To solve [
\begin_inset LatexCommand \pageref{dp2finalobj}

\end_inset 

], steps were made in one direction or the other until a gain was no longer
 found.
 This process may be used iteratively to solve multiple dimensions.
 
\family typewriter 
bestval()
\family default 
is initially called with no location information, causing it to start at
 the first variable.
 It evaluates this variable as before, but rather than directly calling
 the next generation, it calls the same generation, but with the current
 iteration value.
\layout Standard

When 
\family typewriter 
bestVal()
\family default 
 receives an array of positions of rank 
\begin_inset Formula \( n \)
\end_inset 

, it queries the next generation.
\layout Section

Four Dimensions: Differential Selection by Gender
\layout Section

Unknown Infinite Horizon
\layout Section

Variable variance
\layout Standard

The actual variance is binomial, for large enough 
\begin_inset Formula \( n \)
\end_inset 

 that it is adequately approximated by the normal.
\layout Standard

Redefine model.
 
\begin_inset Formula \( n \)
\end_inset 

 is the number of minor gene sites, and 
\begin_inset Formula \( q \)
\end_inset 

 is the minor gene frequency.
 Letting 
\begin_inset Formula \( \pi  \)
\end_inset 

 and 
\begin_inset Formula \( \theta  \)
\end_inset 

 be the draw for each,
\begin_inset Formula 
\begin{eqnarray*}
\pi  & \in  & \left\{ 0,1,2\right\} \\
\theta  & \in  & \left\{ 0,1,\ldots 2n\right\} 
\end{eqnarray*}

\end_inset 

 and the value of an animal is 
\begin_inset Formula 
\[
\pi a+\theta b-\left( a+nq_{0}b\right) \]

\end_inset 


\layout Chapter


\latex latex 

\backslash 
sout{moved to appendix}
\layout Chapter

Results
\begin_inset LatexCommand \label{Results}

\end_inset 


\layout Section

Simple Finite Generations
\layout Subsubsection

Simple Newton Raphson
\begin_inset LatexCommand \label{NR/SFG}

\end_inset 


\layout Section

Discounted Finite Generations
\layout Section

Infinite Horizon
\layout Chapter

Conclusions
\layout Standard


\latex latex 

\backslash 
appendix
\layout Chapter

Glossary 
\layout Section

Terms
\layout Subsubsection*

Breeding Value
\layout Standard

The average effect of all genes that a parent passes on to offspring..
\layout Subsubsection*

Diploid
\layout Standard

Having two chromosomes.
 All animals, and many plants, are diploid.
\layout Subsubsection*

Genetic Phase Disequilibrium
\layout Standard

When different truncation points are used for the genotypes, the result
 is a different truncation point for the polygenes in each group.
 In the next generation, the polygenes will have different means and variances
 in the different group.
 This creates a negative correlation between the major and polygenes known
 as Gametic Phase Disequilibrium.
\layout Subsubsection*

Genotype
\layout Standard

Classification by the presence of the gene.
 E.g., aa, aA, and AA.
\layout Subsubsection*

Genotype
\layout Standard

The actual genetic status of the organism for a given locus.
 For example, 
\begin_inset Formula \( Bb \)
\end_inset 

.
\layout Subsubsection*

Heterozygote
\layout Standard

In a diploid organism, a heterozygote for a given locus has a two different
 alleles at the locus in question.
\layout Subsubsection*

Heritability
\layout Standard

The fraction of phenotypic variation in a trait that is due to genetics.
\layout Subsubsection*

Homozygote
\layout Standard

An organism with two of the same allele at the locus in question.
\layout Subsubsection*

Locus
\layout Standard

A point on a chromosome where a gene is located.
\layout Subsubsection*

Major Gene
\layout Standard

A gene with a large effect.
 It is assumed that the major gene can be identified, by QTL or other methods.
\layout Subsubsection*

Mass Selection
\layout Standard

Also phenotypic selection.
 Organisms are selected to reproduce based solely upon their own phenotypic
 value for the trait.
\layout Subsubsection*

Phenotype
\layout Standard

The observed trait.
 For example, the weight of an animal.
\layout Subsubsection*

Polygenes
\layout Standard

Polygenes cannot be identified, but are seen only by their combined effect
 on phenotype.
 It is assumed that each of the polygenes has a small effect compared to
 the whole and to the major gene.
\layout Subsubsection*

Qualitative trait
\layout Standard

A trait that takes on only one of a finite set of possibilities.
\layout Subsubsection*

Quantitative Trait
\layout Standard

A quantitative trait is one which takes a quantitative rather than qualitative
 value.
 Mendel's peas were qualitatively either wrinkled or not; they were one
 of the two types.
 A quantitative trait would instead be a measure of the height of the peas:
 a value in the range of three to six inches, for example, with the intermediate
 values being possible.
\layout Subsubsection*

QTL
\layout Standard

Quantitative trait locus, the locus that controls or affects a quantitative
 trait.
\layout Subsubsection*

Genotypic Selection
\layout Standard

Genotypic selection considers both the phenotypic and genotypic values.
 a value of 
\begin_inset Formula \( I=g+h^{2}(P-g) \)
\end_inset 

 is used, where 
\begin_inset Formula \( P \)
\end_inset 

 is the phenotypic value, 
\begin_inset Formula \( g \)
\end_inset 

 the genotypic value, and 
\begin_inset Formula \( h^{2} \)
\end_inset 

 the heritability.
\layout Subsubsection*

Truncation Point.
\layout Standard

A cutoff point on the selection criterion for selection.
 All creatures above this point breed, and those below do not.
 
\layout Section

Variable Names and Definitions
\layout Standard

The following variables have the following meaning unless otherwise specified:d
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center \LyXTable
multicol5
12 2 0 0 -1 -1 -1 -1
1 1 0 0
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
1 1 0 0
8 1 0 "" ""
8 1 1 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""
0 8 1 0 0 0 0 "" ""

Variable
\newline 
Meaning
\newline 

\begin_inset Formula \( g \)
\end_inset 


\newline 
genotypic value for the identified major gene
\newline 

\begin_inset Formula \( h^{2} \)
\end_inset 

 
\newline 
heritability of the trait
\newline 

\begin_inset Formula \( P \)
\end_inset 

 
\newline 
the phenotypic value
\newline 

\begin_inset Formula \( m \)
\end_inset 

 
\newline 
an indicator for genotype
\newline 

\begin_inset Formula \( A \)
\end_inset 

 
\newline 
polygenic breeding value
\newline 

\begin_inset Formula \( \hat{A} \)
\end_inset 

 
\newline 
estimated polygenic breeding value
\newline 

\begin_inset Formula \( b_{mt} \)
\end_inset 

 
\newline 
weight used for genotype 
\begin_inset Formula \( m \)
\end_inset 

selected in generation 
\begin_inset Formula \( t \)
\end_inset 


\newline 

\begin_inset Formula \( a \)
\end_inset 


\newline 
the value of each allele of the major gene
\newline 

\begin_inset Formula \( p_{t} \)
\end_inset 

 
\newline 
the frequency of the major gene in generation 
\begin_inset Formula \( t \)
\end_inset 


\newline 

\begin_inset Formula \( q_{mt} \)
\end_inset 

 
\newline 
the fraction of the population in generation 
\begin_inset Formula \( t \)
\end_inset 

 of type 
\begin_inset Formula \( m \)
\end_inset 


\newline 

\begin_inset Formula \( x_{mt} \)
\end_inset 

 
\newline 
the truncation point for genotype 
\begin_inset Formula \( m \)
\end_inset 

 in generation 
\begin_inset Formula \( t \)
\end_inset 

 
\layout Section

The Assumptions
\layout Standard

This work is done primarily in the limiting case of a very large population,
 with a vary large number of genes.
 It is assumed that the breeding value can be written as an additive function
 of the major genes and of the sum of the interactions of the polygenes,
 and the statistical distribution of the polygenes is known.
 For the baseline case, there is a single major gene, and each copy of the
 gene adds directly to a normally distributed value for the polygenes.
 A heterozygote receives a value of 
\begin_inset Formula \( 0 \)
\end_inset 

, while the homozygotes receive 
\begin_inset Formula \( \pm a \)
\end_inset 

.
 The variance of the polygenic breeding value is known, the distribution
 is normal, and it is initially normalized at 0, and equal fractions of
 males and females are chosen.
\begin_float footnote 
\layout Standard

If this were not done, the solution would be to take few enough males to
 impregnate all the females, and the effects of inbreeding would have to
 be considered.
\end_float 
\layout Standard

The decrease in variance of the polygenic breeding value due to selection
 and phase disequilibrium are disregarded in the simplest case.
 Also, due to random mating of those chosen to reproduce, the major gene
 will always be in equilibrium: all genotypes have the same 
\begin_inset Formula \( p_{t} \)
\end_inset 

, and so an organism has the same chance of getting the major gene from
 a parent regardless of the genotype to which the parent belonged.
\layout Chapter

dp2 program
\layout Bibliography
\bibitem [Dekkers 98]{Dekkers}

Dekkers paper.
\layout Bibliography
\bibitem [Varian]{varian}

Varian
\layout Bibliography
\bibitem [Vertical Coordination]{Vertical Coordination}

Vertical Coordination and Consumer Welfare: The Case of the Pork Industry,
 USDA AER #753, August, 1997
\layout Bibliography
\bibitem [Bulmer]{Bulmer}

Bulmer, The Mathematical Theory of Quantitative Genetics, Clarendon Press,
 1980
\layout Bibliography
\bibitem [Rothschild]{Rothschild}

Rothschild,***
\layout Bibliography
\bibitem [Gibsen]{Gibsen}

Gibsen, **, 1994
\layout Bibliography
\bibitem [IQG]{iqg}

Falconer & Mackay,Introduction to Quantitative Genetics, Fourth Edition,Longman,
 1966.
\layout Standard
\bibitem {4}


\begin_inset LatexCommand \printindex{}

\end_inset 


\the_end



Reply via email to