text:
Delusion

A delusion is a false fixed belief that is not amenable to change in light of conflicting evidence. As a pathology, it is distinct from a belief based on false or incomplete information, confabulation, dogma, illusion, hallucination, or some other misleading effects of perception, as individuals with those beliefs are able to change or readjust their beliefs upon reviewing the evidence. However:

"The distinction between a delusion and a strongly held idea is sometimes difficult to make and depends in part on the degree of conviction with which the belief is held despite clear or reasonable contradictory evidence regarding its veracity."

Delusions have been found to occur in the context of many pathological states (both general physical and mental) and are of particular diagnostic importance in psychotic disorders including schizophrenia, paraphrenia, manic episodes of bipolar disorder, and psychotic depression.

Types
Delusions are categorized into four different groups:

 * Bizarre delusion: Delusions are deemed bizarre if they are clearly implausible and not understandable to same-culture peers and do not derive from ordinary life experiences. An example named by the DSM-5 is a belief that someone replaced all of one's internal organs with someone else's without leaving a scar, depending on the organ in question.
 * Non-bizarre delusion: A delusion that, though false, reflects real–life situations and is at least technically possible; it may include feelings of being followed, poisoned, infected etc. e.g., the affected person mistakenly believes that they are under constant police surveillance.
 * Mood-congruent delusion: Any delusion with content consistent with either a depressive or manic state, e.g., a depressed person believes that news anchors on television highly disapprove of them, or a person in a manic state might believe they are a powerful deity.
 * Mood-neutral delusion: A delusion that does not relate to the patient's emotional state; for example, a belief that an extra limb is growing out of the back of one's head is neutral to either depression or mania.

French psychiatry (which is influenced by psychoanalysis), however, also etablishes a difference between "paranoid" (paranoïde) and "paranoiac" (paranoïaque) delusion. The paranoid delusion, observed in schizophrenia, is non-systematized and is characterized by a disorganized structure and confused speech and thoughts. The paranoiac delusion, observed in paraphrenia, is highly systematized (which means it is very organized and clear) and is focused on a single theme.

Themes
In addition to these categories, delusions often manifest according to a consistent theme. Although delusions can have any theme, certain themes are more common. Some of the more common delusion themes are:
 * Delusion of control: False belief that another person, group of people, or external force controls one's general thoughts, feelings, impulses, or behaviors.
 * Delusional jealousy: False belief that a spouse or lover is having an affair, with no proof to back up the claim.
 * Delusion of guilt or sin (or delusion of self-accusation): Ungrounded feeling of remorse or guilt of delusional intensity.
 * Thought broadcasting: False belief that other people can know one's thoughts.
 * Delusion of thought insertion: Belief that another thinks through the mind of the person.
 * Persecutory delusions: False belief that one is being persecuted.
 * Delusion of reference: False belief that insignificant remarks, events, or objects in one's environment have personal meaning or significance. "Usually the meaning assigned to these events is negative, but the 'messages' can also have a grandiose quality."
 * Erotomania: False belief that another person is in love with them.
 * Religious delusion: Belief that the affected person is a god or chosen to act as a god.
 * Somatic delusion: Delusion whose content pertains to bodily functioning, bodily sensations or physical appearance. Usually the false belief is that the body is somehow diseased, abnormal or changed. A specific example of this delusion is delusional parasitosis: Delusion in which one feels infested with insects, bacteria, mites, spiders, lice, fleas, worms, or other organisms.
 * Delusion of poverty: Person strongly believes they are financially incapacitated. Although this type of delusion is less common now, it was particularly widespread in the days preceding state support.

Grandiose delusions
Grandiose delusions or delusions of grandeur are principally a subtype of delusional disorder but could possibly feature as a symptom of schizophrenia and manic episodes of bipolar disorder. Grandiose delusions are characterized by fantastical beliefs that one is famous, omnipotent or otherwise very powerful. The delusions are generally fantastic, often with a supernatural, science-fictional, or religious bent. In colloquial usage, one who overestimates one's own abilities, talents, stature or situation is sometimes said to have "delusions of grandeur". This is generally due to excessive pride, rather than any actual delusions. Grandiose delusions or delusions of grandeur can also be associated with megalomania.

Persecutory delusions
Persecutory delusions are the most common type of delusions and involve the theme of being followed, harassed, cheated, poisoned or drugged, conspired against, spied on, attacked, or otherwise obstructed in the pursuit of goals. Persecutory delusions are a condition in which the affected person wrongly believes that they are being persecuted. Specifically, they have been defined as containing two central elements: The individual thinks that:
 * harm is occurring, or is going to occur
 * the persecutors have the intention to cause harm

According to the DSM-IV-TR, persecutory delusions are the most common form of delusions in schizophrenia, where the person believes they are "being tormented, followed, sabotaged, tricked, spied on, or ridiculed". In the DSM-IV-TR, persecutory delusions are the main feature of the persecutory type of delusional disorder. When the focus is to remedy some injustice by legal action, they are sometimes called "querulous paranoia".

Causes
Explaining the causes of delusions continues to be challenging and several theories have been developed. One is the genetic or biological theory, which states that close relatives of people with delusional disorder are at increased risk of delusional traits. Another theory is the dysfunctional cognitive processing, which states that delusions may arise from distorted ways people have of explaining life to themselves. A third theory is called motivated or defensive delusions. This one states that some of those persons who are predisposed might experience the onset of delusional disorder in those moments when coping with life and maintaining high self-esteem becomes a significant challenge. In this case, the person views others as the cause of their personal difficulties in order to preserve a positive self-view.

This condition is more common among people who have poor hearing or sight. Also, ongoing stressors have been associated with a higher possibility of developing delusions. Examples of such stressors are immigration, low socioeconomic status, and even possibly the accumulation of smaller daily struggles.

Specific delusions
The top two factors mainly concerned in the germination of delusions are disorder of brain functioning and background influences of temperament and personality.

Higher levels of dopamine qualify as a sign of disorders of brain function. That they are needed to sustain certain delusions was examined by a preliminary study on delusional disorder (a psychotic syndrome) instigated to clarify if schizophrenia had a dopamine psychosis. There were positive results - delusions of jealousy and persecution had different levels of dopamine metabolite HVA and homovanillyl alcohol (which may have been genetic). These can be only regarded as tentative results; the study called for future research with a larger population.

It is simplistic to say that a certain measure of dopamine will bring about a specific delusion. Studies show age and gender to be influential and it is most likely that HVA levels change during the life course of some syndromes.

On the influence of personality, it has been said: "Jaspers considered there is a subtle change in personality due to the illness itself; and this creates the condition for the development of the delusional atmosphere in which the delusional intuition arises."

Cultural factors have "a decisive influence in shaping delusions". For example, delusions of guilt and punishment are frequent in a Western, Christian country like Austria, but not in Pakistan, where it is more likely persecution. Similarly, in a series of case studies, delusions of guilt and punishment were found in Austrian patients with Parkinson's being treated with l-dopa, a dopamine agonist.

Pathophysiology
The two-factor model of delusions posits that dysfunction in both belief formation systems and belief evaluation systems are necessary for delusions. Dysfunction in evaluations systems localized to the right lateral prefrontal cortex, regardless of delusion content, is supported by neuroimaging studies and is congruent with its role in conflict monitoring in healthy persons. Abnormal activation and reduced volume is seen in people with delusions, as well as in disorders associated with delusions such as frontotemporal dementia, psychosis and Lewy body dementia. Furthermore, lesions to this region are associated with "jumping to conclusions", damage to this region is associated with post-stroke delusions, and hypometabolism this region associated with caudate strokes presenting with delusions.

The aberrant salience model suggests that delusions are a result of people assigning excessive importance to irrelevant stimuli. In support of this hypothesis, regions normally associated with the salience network demonstrate reduced grey matter in people with delusions, and the neurotransmitter dopamine, which is widely implicated in salience processing, is also widely implicated in psychotic disorders.

Specific regions have been associated with specific types of delusions. The volume of the hippocampus and parahippocampus is related to paranoid delusions in Alzheimer's disease, and has been reported to be abnormal post mortem in one person with delusions. Capgras delusions have been associated with occipito-temporal damage and may be related to failure to elicit normal emotions or memories in response to faces.

Diagnosis
The modern definition and Jaspers' original criteria have been criticised, as counter-examples can be shown for every defining feature.

Studies on psychiatric patients show that delusions vary in intensity and conviction over time, which suggests that certainty and incorrigibility are not necessary components of a delusional belief.

Delusions do not necessarily have to be false or 'incorrect inferences about external reality'. Some religious or spiritual beliefs by their nature may not be falsifiable, and hence cannot be described as false or incorrect, no matter whether the person holding these beliefs was diagnosed as delusional or not. In other situations the delusion may turn out to be true belief. For example, in delusional jealousy, where a person believes that their partner is being unfaithful (and may even follow them into the bathroom believing them to be seeing their lover even during the briefest of partings), it may actually be true that the partner is having sexual relations with another person. In this case, the delusion does not cease to be a delusion because the content later turns out to be verified as true or the partner actually chose to engage in the behavior of which they were being accused.

In other cases, the belief may be mistakenly assumed to be false by a doctor or psychiatrist assessing it, just because it seems to be unlikely, bizarre or held with excessive conviction. Psychiatrists rarely have the time or resources to check the validity of a person's claims leading to some true beliefs to be erroneously classified as delusional. This is known as the Martha Mitchell effect, after the wife of the attorney general who alleged that illegal activity was taking place in the White House. At the time, her claims were thought to be signs of mental illness, and only after the Watergate scandal broke was she proved right (and hence sane).

Similar factors have led to criticisms of Jaspers' definition of true delusions as being ultimately 'un-understandable'. Critics (such as R. D. Laing) have argued that this leads to the diagnosis of delusions being based on the subjective understanding of a particular psychiatrist, who may not have access to all the information that might make a belief otherwise interpretable. R. D. Laing's hypothesis has been applied to some forms of projective therapy to "fix" a delusional system so that it cannot be altered by the patient. Psychiatric researchers at Yale University, Ohio State University and the Community Mental Health Center of Middle Georgia have used novels and motion picture films as the focus. Texts, plots and cinematography are discussed and the delusions approached tangentially. This use of fiction to decrease the malleability of a delusion was employed in a joint project by science-fiction author Philip Jose Farmer and Yale psychiatrist A. James Giannini. They wrote the novel Red Orc's Rage, which, recursively, deals with delusional adolescents who are treated with a form of projective therapy. In this novel's fictional setting other novels written by Farmer are discussed and the characters are symbolically integrated into the delusions of fictional patients. This particular novel was then applied to real-life clinical settings.

Another difficulty with the diagnosis of delusions is that almost all of these features can be found in "normal" beliefs. Many religious beliefs hold exactly the same features, yet are not universally considered delusional. For instance, if a person was holding a true belief then they will of course persist with it. This can cause the disorder to be misdiagnosed by psychiatrists. These factors have led the psychiatrist Anthony David to note that "there is no acceptable (rather than accepted) definition of a delusion." In practice, psychiatrists tend to diagnose a belief as delusional if it is either patently bizarre, causing significant distress, or excessively pre-occupying the patient, especially if the person is subsequently unswayed in belief by counter-evidence or reasonable arguments.

Joseph Pierre, M.D. states that one factor that helps differentiate delusions from other kinds of beliefs is that anomalous subjective experiences are often used to justify delusional beliefs. While idiosyncratic and self-referential content often make delusions impossible to share with others, Pierre suggests that it may be more helpful to emphasize the level of conviction, preoccupation, and extension of a belief rather than the content of the belief when considering whether a belief is delusional.

It is important to distinguish true delusions from other symptoms such as anxiety, fear, or paranoia. To diagnose delusions a mental state examination may be used. This test includes appearance, mood, affect, behavior, rate and continuity of speech, evidence of hallucinations or abnormal beliefs, thought content, orientation to time, place and person, attention and concentration, insight and judgment, as well as short-term memory.

Johnson-Laird suggests that delusions may be viewed as the natural consequence of failure to distinguish conceptual relevance. That is, irrelevant information would be framed as disconnected experiences, then it is taken to be relevant in a manner that suggests false causal connections. Furthermore, relevant information would be ignored as counterexamples.

Definition
Although non-specific concepts of madness have been around for several thousand years, the psychiatrist and philosopher Karl Jaspers was the first to define the four main criteria for a belief to be considered delusional in his 1913 book General Psychopathology. These criteria are:
 * 1) certainty (held with absolute conviction)
 * 2) incorrigibility (not changeable by compelling counterargument or proof to the contrary)
 * 3) impossibility or falsity of content (implausible, bizarre, or patently untrue)
 * 4) not amenable to understanding (i.e., belief cannot be explained psychologically)

Furthermore, when beliefs involve value judgments, only those which cannot be proven true are considered delusions. For example: a man claiming that he flew into the Sun and flew back home. This would be considered a delusion, unless he were speaking figuratively, or if the belief had a cultural or religious source. Only the first three criteria remain cornerstornes of the current definition of a delusion in the DSM-5.

Robert Trivers writes that delusion is a discrepancy in relation to objective reality, but with a firm conviction in reality of delusional ideas, which is manifested in the "affective basis of delusion".

Treatment
Delusions and other positive symptoms of psychosis are often treated with antipsychotic medication, which exert a medium effect size according to meta-analytic evidence. Cognitive behavioral therapy (CBT) improves delusions relative to control conditions according to a meta-analysis. A meta-analysis of 43 studies reported that metacognitive training (MCT) reduces delusions at a medium to large effect size relative to control conditions.

Criticism
Some psychiatrists criticize the practice of defining one and the same belief as normal in one culture and pathological in another culture for cultural essentialism. They argue that it is not justified to assume that culture can be simplified to a few traceable, distinguishable and statistically quantifiable factors and that everything outside those factors must be biological since cultural influences are mixed, including not only parents and teachers but also peers, friends, and media, and the same cultural influence can have different effects depending on earlier cultural influences. Other critical psychiatrists argue that just because a person's belief is unshaken by one influence does not prove that it would remain unshaken by another. For example, a person whose beliefs are not changed by verbal correction from a psychiatrist, which is how delusion is usually diagnosed, may still change his or her mind when observing empirical evidence, only that psychiatrists rarely, if ever, present patients with such situations.

Anthropologist David Graeber has criticized psychiatry's assumption that an absurd belief goes from being delusional to "being there for a reason" merely because it is shared by many people by arguing that just as genetic pathogens like viruses can take advantage of an organism without benefitting said organism, memetic phenomena can spread while being harmful to societies, implying that entire societies can become ill. David Graeber argued that if somatic medicine did not have higher scientific standards than psychiatry's way of defining delusion, pandemics like the plague would have been considered to transsubstantiate from an illness to "a phenomenon that benefits the people" as soon as it had spread to a sufficiently large portion of the population. It was argued by Graeber that since deinstitutionalisation made sales of psychiatric medication profitable by no longer needing to spend money on keeping the patients in mental hospitals, corrupt incentives for psychiatry to allege "needs" for treatments have increased (in particular with regard to medicines that are said to be needed in daily doses, not so much regarding devices that can be kept for longer periods of time) which may itself be a harmful memetic pandemic in society that leads to diagnosing and medication of criticisms of widespread beliefs that are actually absurd and harmful, making the absurd belief that is not labelled as an illness profitable anyway by attracting criticisms that are labelled as illnesses.

title: Delusion


text:
Dynamic programming

Dynamic programming is both a mathematical optimization method and an algorithmic paradigm. The method was developed by Richard Bellman in the 1950s and has found applications in numerous fields, from aerospace engineering to economics.

In both contexts it refers to simplifying a complicated problem by breaking it down into simpler sub-problems in a recursive manner. While some decision problems cannot be taken apart this way, decisions that span several points in time do often break apart recursively. Likewise, in computer science, if a problem can be solved optimally by breaking it into sub-problems and then recursively finding the optimal solutions to the sub-problems, then it is said to have optimal substructure.

If sub-problems can be nested recursively inside larger problems, so that dynamic programming methods are applicable, then there is a relation between the value of the larger problem and the values of the sub-problems. In the optimization literature this relationship is called the Bellman equation.

Mathematical optimization
In terms of mathematical optimization, dynamic programming usually refers to simplifying a decision by breaking it down into a sequence of decision steps over time.

This is done by defining a sequence of value functions V1, V2, ..., Vn taking y as an argument representing the state of the system at times i from 1 to n.

The definition of Vn(y) is the value obtained in state y at the last time n.

The values Vi at earlier times i = n −1, n − 2, ..., 2, 1 can be found by working backwards, using a recursive relationship called the Bellman equation.

For i = 2, ..., n, Vi−1 at any state y is calculated from Vi by maximizing a simple function (usually the sum) of the gain from a decision at time i − 1 and the function Vi at the new state of the system if this decision is made.

Since Vi has already been calculated for the needed states, the above operation yields Vi−1 for those states.

Finally, V1 at the initial state of the system is the value of the optimal solution. The optimal values of the decision variables can be recovered, one by one, by tracking back the calculations already performed.

Control theory
In control theory, a typical problem is to find an admissible control $$\mathbf{u}^{\ast}$$ which causes the system $$\dot{\mathbf{x}}(t) = \mathbf{g} \left( \mathbf{x}(t), \mathbf{u}(t), t \right)$$ to follow an admissible trajectory $$\mathbf{x}^{\ast}$$ on a continuous time interval $$t_{0} \leq t \leq t_{1}$$ that minimizes a cost function
 * $$J = b \left( \mathbf{x}(t_{1}), t_{1} \right) + \int_{t_{0}}^{t_{1}} f \left( \mathbf{x}(t), \mathbf{u}(t), t \right) \mathrm{d} t$$

The solution to this problem is an optimal control law or policy $$\mathbf{u}^{\ast} = h(\mathbf{x}(t), t)$$, which produces an optimal trajectory $$\mathbf{x}^{\ast}$$ and a cost-to-go function $$J^{\ast}$$. The latter obeys the fundamental equation of dynamic programming:
 * $$- J_{t}^{\ast} = \min_{\mathbf{u}} \left\{ f \left( \mathbf{x}(t), \mathbf{u}(t), t \right) + J_{x}^{\ast \mathsf{T}} \mathbf{g} \left( \mathbf{x}(t), \mathbf{u}(t), t \right) \right\}$$

a partial differential equation known as the Hamilton–Jacobi–Bellman equation, in which $$J_{x}^{\ast} = \frac{\partial J^{\ast}}{\partial \mathbf{x}} = \left[ \frac{\partial J^{\ast}}{\partial x_{1}} ~ \frac{\partial J^{\ast}}{\partial x_{2}} ~ \dots ~ \frac{\partial J^{\ast}}{\partial x_{n}} \right]^{\mathsf{T}}$$ and $$J_{t}^{\ast} = \frac{\partial J^{\ast}}{\partial t}$$. One finds that minimizing $$\mathbf{u}$$ in terms of $$t$$, $$\mathbf{x}$$, and the unknown function $$J_{x}^{\ast}$$ and then substitutes the result into the Hamilton–Jacobi–Bellman equation to get the partial differential equation to be solved with boundary condition $$J \left( t_{1} \right) = b \left( \mathbf{x}(t_{1}), t_{1} \right)$$. In practice, this generally requires numerical techniques for some discrete approximation to the exact optimization relationship.

Alternatively, the continuous process can be approximated by a discrete system, which leads to a following recurrence relation analog to the Hamilton–Jacobi–Bellman equation:
 * $$J_{k}^{\ast} \left( \mathbf{x}_{n-k} \right) = \min_{\mathbf{u}_{n-k}} \left\{ \hat{f} \left( \mathbf{x}_{n-k}, \mathbf{u}_{n-k} \right) + J_{k-1}^{\ast} \left( \hat{\mathbf{g}} \left( \mathbf{x}_{n-k}, \mathbf{u}_{n-k} \right) \right) \right\}$$

at the $$k$$-th stage of $$n$$ equally spaced discrete time intervals, and where $$\hat{f}$$ and $$\hat{\mathbf{g}}$$ denote discrete approximations to $$f$$ and $$\mathbf{g}$$. This functional equation is known as the Bellman equation, which can be solved for an exact solution of the discrete approximation of the optimization equation.

Example from economics: Ramsey's problem of optimal saving
In economics, the objective is generally to maximize (rather than minimize) some dynamic social welfare function. In Ramsey's problem, this function relates amounts of consumption to levels of utility. Loosely speaking, the planner faces the trade-off between contemporaneous consumption and future consumption (via investment in capital stock that is used in production), known as intertemporal choice. Future consumption is discounted at a constant rate $$\beta \in (0,1)$$. A discrete approximation to the transition equation of capital is given by
 * $$k_{t+1} = \hat{g} \left( k_{t}, c_{t} \right) = f(k_{t}) - c_{t}$$

where $$c$$ is consumption, $$k$$ is capital, and $$f$$ is a production function satisfying the Inada conditions. An initial capital stock $$k_{0} > 0$$ is assumed.

Let $$c_t$$ be consumption in period $t$, and assume consumption yields utility $$u(c_t)=\ln(c_t)$$ as long as the consumer lives. Assume the consumer is impatient, so that he discounts future utility by a factor $b$ each period, where $$00$$, and suppose that this period's capital and consumption determine next period's capital as $$k_{t+1}=Ak^a_t - c_t$$, where $A$ is a positive constant and $$0<a<1$$. Assume capital cannot be negative. Then the consumer's decision problem can be written as follows:

 * $$\max \sum_{t=0}^T b^t \ln(c_t)$$ subject to $$k_{t+1}=Ak^a_t - c_t \geq 0$$ for all $$t=0,1,2,\ldots,T$$

Written this way, the problem looks complicated, because it involves solving for all the choice variables $$c_0, c_1, c_2, \ldots, c_T$$. (The capital $$k_0$$ is not a choice variable—the consumer's initial capital is taken as given.)

The dynamic programming approach to solve this problem involves breaking it apart into a sequence of smaller decisions. To do so, we define a sequence of value functions $$V_t(k)$$, for $$t=0,1,2,\ldots,T,T+1$$ which represent the value of having any amount of capital $k$ at each time $t$. There is (by assumption) no utility from having capital after death, $$V_{T+1}(k)=0$$.

The value of any quantity of capital at any previous time can be calculated by backward induction using the Bellman equation. In this problem, for each $$t=0,1,2,\ldots,T$$, the Bellman equation is

 * $$V_t(k_t) \, = \, \max \left( \ln(c_t) + b V_{t+1}(k_{t+1}) \right)$$ subject to $$k_{t+1}=Ak^a_t - c_t \geq 0$$

This problem is much simpler than the one we wrote down before, because it involves only two decision variables, $$c_t$$ and $$k_{t+1}$$. Intuitively, instead of choosing his whole lifetime plan at birth, the consumer can take things one step at a time. At time $t$, his current capital $$k_t$$ is given, and he only needs to choose current consumption $$c_t$$ and saving $$k_{t+1}$$.

To actually solve this problem, we work backwards. For simplicity, the current level of capital is denoted as $k$. $$V_{T+1}(k)$$ is already known, so using the Bellman equation once we can calculate $$V_T(k)$$, and so on until we get to $$V_0(k)$$, which is the value of the initial decision problem for the whole lifetime. In other words, once we know $$V_{T-j+1}(k)$$, we can calculate $$V_{T-j}(k)$$, which is the maximum of $$\ln(c_{T-j}) + b V_{T-j+1}(Ak^a-c_{T-j})$$, where $$c_{T-j}$$ is the choice variable and $$Ak^a-c_{T-j} \ge 0$$.

Working backwards, it can be shown that the value function at time $$t=T-j$$ is

 * $$V_{T-j}(k) \, = \, a \sum_{i=0}^j a^ib^i \ln k + v_{T-j}$$

where each $$v_{T-j}$$ is a constant, and the optimal amount to consume at time $$t=T-j$$ is

 * $$c_{T-j}(k) \, = \, \frac{1}{\sum_{i=0}^j a^ib^i} Ak^a$$

which can be simplified to

 * $$\begin{align}

c_{T}(k) & = Ak^a\\ c_{T-1}(k) & = \frac{Ak^a}{1+ab}\\ c_{T-2}(k) & = \frac{Ak^a}{1+ab+a^2b^2}\\ &\dots\\ c_2(k) & = \frac{Ak^a}{1+ab+a^2b^2+\ldots+a^{T-2}b^{T-2}}\\ c_1(k) & = \frac{Ak^a}{1+ab+a^2b^2+\ldots+a^{T-2}b^{T-2}+a^{T-1}b^{T-1}}\\ c_0(k) & = \frac{Ak^a}{1+ab+a^2b^2+\ldots+a^{T-2}b^{T-2}+a^{T-1}b^{T-1}+a^Tb^T} \end{align}$$

We see that it is optimal to consume a larger fraction of current wealth as one gets older, finally consuming all remaining wealth in period $T$, the last period of life.

Computer science
There are two key attributes that a problem must have in order for dynamic programming to be applicable: optimal substructure and overlapping sub-problems. If a problem can be solved by combining optimal solutions to non-overlapping sub-problems, the strategy is called "divide and conquer" instead. This is why merge sort and quick sort are not classified as dynamic programming problems.

Optimal substructure means that the solution to a given optimization problem can be obtained by the combination of optimal solutions to its sub-problems. Such optimal substructures are usually described by means of recursion. For example, given a graph G=(V,E), the shortest path p from a vertex u to a vertex v exhibits optimal substructure: take any intermediate vertex w on this shortest path p. If p is truly the shortest path, then it can be split into sub-paths p1 from u to w and p2 from w to v such that these, in turn, are indeed the shortest paths between the corresponding vertices (by the simple cut-and-paste argument described in Introduction to Algorithms). Hence, one can easily formulate the solution for finding shortest paths in a recursive manner, which is what the Bellman–Ford algorithm or the Floyd–Warshall algorithm does.

Overlapping sub-problems means that the space of sub-problems must be small, that is, any recursive algorithm solving the problem should solve the same sub-problems over and over, rather than generating new sub-problems. For example, consider the recursive formulation for generating the Fibonacci sequence: Fi = Fi−1 + Fi−2, with base case F1 = F2 = 1. Then F43 = F42 + F41, and F42 = F41 + F40. Now F41 is being solved in the recursive sub-trees of both F43 as well as F42. Even though the total number of sub-problems is actually small (only 43 of them), we end up solving the same problems over and over if we adopt a naive recursive solution such as this. Dynamic programming takes account of this fact and solves each sub-problem only once.

This can be achieved in either of two ways:

 * Top-down approach: This is the direct fall-out of the recursive formulation of any problem. If the solution to any problem can be formulated recursively using the solution to its sub-problems, and if its sub-problems are overlapping, then one can easily memoize or store the solutions to the sub-problems in a table. Whenever we attempt to solve a new sub-problem, we first check the table to see if it is already solved. If a solution has been recorded, we can use it directly, otherwise we solve the sub-problem and add its solution to the table.
 * Bottom-up approach: Once we formulate the solution to a problem recursively as in terms of its sub-problems, we can try reformulating the problem in a bottom-up fashion: try solving the sub-problems first and use their solutions to build-on and arrive at solutions to bigger sub-problems. This is also usually done in a tabular form by iteratively generating solutions to bigger and bigger sub-problems by using the solutions to small sub-problems. For example, if we already know the values of F41 and F40, we can directly calculate the value of F42.

Some programming languages can automatically memoize the result of a function call with a particular set of arguments, in order to speed up call-by-name evaluation (this mechanism is referred to as call-by-need). Some languages make it possible portably (e.g. Scheme, Common Lisp, Perl or D). Some languages have automatic memoization built in, such as tabled Prolog and J, which supports memoization with the M. adverb. In any case, this is only possible for a referentially transparent function. Memoization is also encountered as an easily accessible design pattern within term-rewrite based languages such as Wolfram Language.

Bioinformatics
Dynamic programming is widely used in bioinformatics for tasks such as sequence alignment, protein folding, RNA structure prediction and protein-DNA binding. The first dynamic programming algorithms for protein-DNA binding were developed in the 1970s independently by Charles DeLisi in US and Georgii Gurskii and Alexander Zasedatelev in USSR. Recently these algorithms have become very popular in bioinformatics and computational biology, particularly in the studies of nucleosome positioning and transcription factor binding.

Dijkstra's algorithm for the shortest path problem
From a dynamic programming point of view, Dijkstra's algorithm for the shortest path problem is a successive approximation scheme that solves the dynamic programming functional equation for the shortest path problem by the Reaching method.

In fact, Dijkstra's explanation of the logic behind the algorithm, namely "Problem 2. Find the path of minimum total length between two given nodes $P$ and $Q$.

We use the fact that, if $R$ is a node on the minimal path from $P$ to $Q$, knowledge of the latter implies the knowledge of the minimal path from $P$ to $R$."

is a paraphrasing of Bellman's famous Principle of Optimality in the context of the shortest path problem.

Fibonacci sequence
Using dynamic programming in the calculation of the nth member of the Fibonacci sequence improves its performance greatly. Here is a naïve implementation, based directly on the mathematical definition:

function fib(n) if n <= 1 return n    return fib(n − 1) + fib(n − 2)

Notice that if we call, say,, we produce a call tree that calls the function on the same value many different times:

In particular,  was calculated three times from scratch. In larger examples, many more values of, or subproblems, are recalculated, leading to an exponential time algorithm.

Now, suppose we have a simple map object, m, which maps each value of  that has already been calculated to its result, and we modify our function to use it and update it. The resulting function requires only O(n) time instead of exponential time (but requires O(n) space):

var m := map(0 → 0, 1 → 1) function fib(n) if key n is not in map m         m[n] := fib(n − 1) + fib(n − 2) return m[n]

This technique of saving values that have already been calculated is called memoization; this is the top-down approach, since we first break the problem into subproblems and then calculate and store values.

In the bottom-up approach, we calculate the smaller values of  first, then build larger values from them. This method also uses O(n) time since it contains a loop that repeats n − 1 times, but it only takes constant (O(1)) space, in contrast to the top-down approach which requires O(n) space to store the map.

function fib(n) if n = 0 return 0 else var previousFib := 0, currentFib := 1 repeat n − 1 times // loop is skipped if n = 1 var newFib := previousFib + currentFib previousFib := currentFib currentFib := newFib return currentFib

In both examples, we only calculate  one time, and then use it to calculate both   and , instead of computing it every time either of them is evaluated.

A type of balanced 0–1 matrix
Consider the problem of assigning values, either zero or one, to the positions of an $n × n$ matrix, with $n$ even, so that each row and each column contains exactly $n / 2$ zeros and $n / 2$ ones. We ask how many different assignments there are for a given $$n$$. For example, when $n = 4$, five possible solutions are

 * $$\begin{bmatrix}

0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \end{bmatrix} \text{ and } \begin{bmatrix} 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \end{bmatrix} \text{ and } \begin{bmatrix} 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 \end{bmatrix} \text{ and } \begin{bmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 \\ 1 & 0 & 0 & 1 \end{bmatrix} \text{ and } \begin{bmatrix} 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \end{bmatrix}.$$

There are at least three possible approaches: brute force, backtracking, and dynamic programming.

Brute force consists of checking all assignments of zeros and ones and counting those that have balanced rows and columns ($n / 2$ zeros and $n / 2$ ones). As there are $$2^{n^2}$$ possible assignments and $$\tbinom{n}{n/2}^n$$ sensible assignments, this strategy is not practical except maybe up to $$n=6$$.

Backtracking for this problem consists of choosing some order of the matrix elements and recursively placing ones or zeros, while checking that in every row and column the number of elements that have not been assigned plus the number of ones or zeros are both at least $n / 2$. While more sophisticated than brute force, this approach will visit every solution once, making it impractical for $n$ larger than six, since the number of solutions is already 116,963,796,250 for $n$ = 8, as we shall see.

Dynamic programming makes it possible to count the number of solutions without visiting them all. Imagine backtracking values for the first row – what information would we require about the remaining rows, in order to be able to accurately count the solutions obtained for each first row value? We consider $k × n$ boards, where $1 ≤ k ≤ n$, whose $$k$$ rows contain $$n/2$$ zeros and $$n/2$$ ones. The function f to which memoization is applied maps vectors of n pairs of integers to the number of admissible boards (solutions). There is one pair for each column, and its two components indicate respectively the number of zeros and ones that have yet to be placed in that column. We seek the value of $$ f((n/2, n/2), (n/2, n/2), \ldots (n/2, n/2)) $$ ($$n$$ arguments or one vector of $$n$$ elements). The process of subproblem creation involves iterating over every one of $$\tbinom{n}{n/2}$$ possible assignments for the top row of the board, and going through every column, subtracting one from the appropriate element of the pair for that column, depending on whether the assignment for the top row contained a zero or a one at that position. If any one of the results is negative, then the assignment is invalid and does not contribute to the set of solutions (recursion stops). Otherwise, we have an assignment for the top row of the $k × n$ board and recursively compute the number of solutions to the remaining $( k − 1) × n$ board, adding the numbers of solutions for every admissible assignment of the top row and returning the sum, which is being memoized. The base case is the trivial subproblem, which occurs for a $1 × n$ board. The number of solutions for this board is either zero or one, depending on whether the vector is a permutation of $n / 2$ $$(0, 1)$$ and $n / 2$ $$(1, 0)$$ pairs or not.

For example, in the first two boards shown above the sequences of vectors would be ((2, 2) (2, 2) (2, 2) (2, 2))      ((2, 2) (2, 2) (2, 2) (2, 2))     k = 4 0     1      0      1              0      0      1      1

((1, 2) (2, 1) (1, 2) (2, 1))      ((1, 2) (1, 2) (2, 1) (2, 1))     k = 3 1     0      1      0              0      0      1      1

((1, 1) (1, 1) (1, 1) (1, 1))      ((0, 2) (0, 2) (2, 0) (2, 0))     k = 2 0     1      0      1              1      1      0      0

((0, 1) (1, 0) (0, 1) (1, 0))      ((0, 1) (0, 1) (1, 0) (1, 0))     k = 1 1     0      1      0              1      1      0      0

((0, 0) (0, 0) (0, 0) (0, 0))      ((0, 0) (0, 0), (0, 0) (0, 0))

The number of solutions is

 * $$ 1,\, 2,\, 90,\, 297200,\, 116963796250,\, 6736218287430460752, \ldots $$

Links to the MAPLE implementation of the dynamic programming approach may be found among the external links.

Checkerboard
Consider a checkerboard with n × n squares and a cost function  which returns a cost associated with square   (  being the row,   being the column). For instance (on a 5 × 5 checkerboard),

Thus

Let us say there was a checker that could start at any square on the first rank (i.e., row) and you wanted to know the shortest path (the sum of the minimum costs at each visited rank) to get to the last rank; assuming the checker could move only diagonally left forward, diagonally right forward, or straight forward. That is, a checker on  can move to ,   or.

This problem exhibits optimal substructure. That is, the solution to the entire problem relies on solutions to subproblems. Let us define a function  as

 * q(i, j) = the minimum cost to reach square (i, j).

Starting at rank  and descending to rank , we compute the value of this function for all the squares at each successive rank. Picking the square that holds the minimum value at each rank gives us the shortest path between rank  and rank.

The function  is equal to the minimum cost to get to any of the three squares below it (since those are the only squares that can reach it) plus. For instance:

 * $$q(A) = \min(q(B),q(C),q(D))+c(A) \, $$

Now, let us define  in somewhat more general terms:

 * $$q(i,j)=\begin{cases} \infty & j < 1 \text{ or }j > n \\ c(i, j) & i = 1 \\ \min(q(i-1, j-1), q(i-1, j), q(i-1, j+1)) + c(i,j) & \text{otherwise.}\end{cases}$$

The first line of this equation deals with a board modeled as squares indexed on  at the lowest bound and   at the highest bound. The second line specifies what happens at the first rank; providing a base case. The third line, the recursion, is the important part. It represents the  terms in the example. From this definition we can derive straightforward recursive code for. In the following pseudocode,  is the size of the board,   is the cost function, and   returns the minimum of a number of values:

function minCost(i, j)    if j < 1 or j > n         return infinity else if i = 1 return c(i, j)    else return min( minCost(i-1, j-1), minCost(i-1, j), minCost(i-1, j+1) ) + c(i, j)

This function only computes the path cost, not the actual path. We discuss the actual path below. This, like the Fibonacci-numbers example, is horribly slow because it too exhibits the overlapping sub-problems attribute. That is, it recomputes the same path costs over and over. However, we can compute it much faster in a bottom-up fashion if we store path costs in a two-dimensional array  rather than using a function. This avoids recomputation; all the values needed for array  are computed ahead of time only once. Precomputed values for  are simply looked up whenever needed.

We also need to know what the actual shortest path is. To do this, we use another array ; a predecessor array. This array records the path to any square. The predecessor of  is modeled as an offset relative to the index (in  ) of the precomputed path cost of. To reconstruct the complete path, we lookup the predecessor of, then the predecessor of that square, then the predecessor of that square, and so on recursively, until we reach the starting square. Consider the following pseudocode:

function computeShortestPathArrays for x from 1 to n        q[1, x] := c(1, x)     for y from 1 to n         q[y, 0]     := infinity q[y, n + 1] := infinity for y from 2 to n        for x from 1 to n             m := min(q[y-1, x-1], q[y-1, x], q[y-1, x+1]) q[y, x] := m + c(y, x)            if m = q[y-1, x-1] p[y, x] := -1 else if m = q[y-1, x]                p[y, x] :=  0 else p[y, x] := 1

Now the rest is a simple matter of finding the minimum and printing it.

function computeShortestPath computeShortestPathArrays minIndex := 1 min := q[n, 1] for i from 2 to n        if q[n, i] < min minIndex := i            min := q[n, i]     printPath(n, minIndex)

function printPath(y, x)    print(x) print("<-") if y = 2 print(x + p[y, x]) else printPath(y-1, x + p[y, x])

Sequence alignment
In genetics, sequence alignment is an important application where dynamic programming is essential. Typically, the problem consists of transforming one sequence into another using edit operations that replace, insert, or remove an element. Each operation has an associated cost, and the goal is to find the sequence of edits with the lowest total cost.

The problem can be stated naturally as a recursion, a sequence A is optimally edited into a sequence B by either:

 * 1) inserting the first character of B, and performing an optimal alignment of A and the tail of B
 * 2) deleting the first character of A, and performing the optimal alignment of the tail of A and B
 * 3) replacing the first character of A with the first character of B, and performing optimal alignments of the tails of A and B.

The partial alignments can be tabulated in a matrix, where cell (i,j) contains the cost of the optimal alignment of A[1..i] to B[1..j]. The cost in cell (i,j) can be calculated by adding the cost of the relevant operations to the cost of its neighboring cells, and selecting the optimum.

Different variants exist, see Smith–Waterman algorithm and Needleman–Wunsch algorithm.

Tower of Hanoi puzzle
The Tower of Hanoi or Towers of Hanoi is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.

The objective of the puzzle is to move the entire stack to another rod, obeying the following rules:

 * Only one disk may be moved at a time.
 * Each move consists of taking the upper disk from one of the rods and sliding it onto another rod, on top of the other disks that may already be present on that rod.
 * No disk may be placed on top of a smaller disk.

The dynamic programming solution consists of solving the functional equation

 * S(n,h,t) = S(n-1,h, not(h,t)) ; S(1,h,t) ; S(n-1,not(h,t),t)

where n denotes the number of disks to be moved, h denotes the home rod, t denotes the target rod, not(h,t) denotes the third rod (neither h nor t), ";" denotes concatenation, and

 * S(n, h, t) := solution to a problem consisting of n disks that are to be moved from rod h to rod t.

For n=1 the problem is trivial, namely S(1,h,t) = "move a disk from rod h to rod t" (there is only one disk left).

The number of moves required by this solution is 2n − 1. If the objective is to maximize the number of moves (without cycling) then the dynamic programming functional equation is slightly more complicated and  3n − 1 moves are required.

Egg dropping puzzle
The following is a description of the instance of this famous puzzle involving N=2 eggs and a building with H=36 floors:
 * Suppose that we wish to know which stories in a 36-story building are safe to drop eggs from, and which will cause the eggs to break on landing (using U.S. English terminology, in which the first floor is at ground level). We make a few assumptions:

 * An egg that survives a fall can be used again.
 * A broken egg must be discarded.
 * The effect of a fall is the same for all eggs.
 * If an egg breaks when dropped, then it would break if dropped from a higher window.
 * If an egg survives a fall, then it would survive a shorter fall.
 * It is not ruled out that the first-floor windows break eggs, nor is it ruled out that eggs can survive the 36th-floor windows.

 * If only one egg is available and we wish to be sure of obtaining the right result, the experiment can be carried out in only one way. Drop the egg from the first-floor window; if it survives, drop it from the second-floor window. Continue upward until it breaks. In the worst case, this method may require 36 droppings. Suppose 2 eggs are available. What is the lowest number of egg-droppings that is guaranteed to work in all cases?

To derive a dynamic programming functional equation for this puzzle, let the state of the dynamic programming model be a pair s = (n,k), where

 * n = number of test eggs available, n = 0, 1, 2, 3, ..., N − 1.
 * k = number of (consecutive) floors yet to be tested, k = 0, 1, 2, ..., H − 1.

For instance, s = (2,6) indicates that two test eggs are available and 6 (consecutive) floors are yet to be tested. The initial state of the process is s = (N,H) where N denotes the number of test eggs available at the commencement of the experiment. The process terminates either when there are no more test eggs (n = 0) or when k = 0, whichever occurs first. If termination occurs at state s = (0,k) and k > 0, then the test failed.

Now, let

 * W(n,k) = minimum number of trials required to identify the value of the critical floor under the worst-case scenario given that the process is in state s = (n,k).

Then it can be shown that

 * W(n,k) = 1 + min{max(W(n − 1, x − 1), W(n,k − x)): x = 1, 2, ..., k }

with W(n,0) = 0 for all n > 0 and W(1,k) = k for all k. It is easy to solve this equation iteratively by systematically increasing the values of n and k.

Faster DP solution using a different parametrization
Notice that the above solution takes $$O( n k^2 )$$ time with a DP solution. This can be improved to $$O( n k \log k )$$ time by binary searching on the optimal $$x$$ in the above recurrence, since $$W(n-1,x-1)$$ is increasing in $$x$$ while $$W(n,k-x)$$ is decreasing in $$x$$, thus a local minimum of $$\max(W(n-1,x-1),W(n,k-x))$$ is a global minimum. Also, by storing the optimal $$x$$ for each cell in the DP table and referring to its value for the previous cell, the optimal $$x$$ for each cell can be found in constant time, improving it to $$O( n k )$$ time. However, there is an even faster solution that involves a different parametrization of the problem:

Let $$k$$ be the total number of floors such that the eggs break when dropped from the $$k$$th floor (The example above is equivalent to taking $$k=37$$).

Let $$m$$ be the minimum floor from which the egg must be dropped to be broken.

Let $$f(t,n)$$ be the maximum number of values of $$m$$ that are distinguishable using $$t$$ tries and $$n$$ eggs.

Then $$f(t,0) = f(0,n) = 1$$ for all $$t,n \geq 0$$.

Let $$a$$ be the floor from which the first egg is dropped in the optimal strategy.

If the first egg broke, $$m$$ is from $$1$$ to $$a$$ and distinguishable using at most $$t-1$$ tries and $$n-1$$ eggs.

If the first egg did not break, $$m$$ is from $$a+1$$ to $$k$$ and distinguishable using $$t-1$$ tries and $$n$$ eggs.

Therefore, $$f(t,n) = f(t-1,n-1) + f(t-1,n)$$.

Then the problem is equivalent to finding the minimum $$x$$ such that $$f(x,n) \geq k$$.

To do so, we could compute $$\{ f(t,i) : 0 \leq i \leq n \}$$ in order of increasing $$t$$, which would take $$O( n x )$$ time.

Thus, if we separately handle the case of $$n=1$$, the algorithm would take $$O( n \sqrt{k} )$$ time.

But the recurrence relation can in fact be solved, giving $$f(t,n) = \sum_{i=0}^{n}{ \binom{t}{i} }$$, which can be computed in $$O(n)$$ time using the identity $$\binom{t}{i+1} = \binom{t}{i} \frac{t-i}{i+1}$$ for all $$i \geq 0$$.

Since $$f(t,n) \leq f(t+1,n)$$ for all $$t \geq 0$$, we can binary search on $$t$$ to find $$x$$, giving an $$O( n \log k )$$ algorithm.

Matrix chain multiplication
Matrix chain multiplication is a well-known example that demonstrates utility of dynamic programming. For example, engineering applications often have to multiply a chain of matrices. It is not surprising to find matrices of large dimensions, for example 100×100. Therefore, our task is to multiply matrices $A_1, A_2, .... A_n$. Matrix multiplication is not commutative, but is associative; and we can multiply only two matrices at a time. So, we can multiply this chain of matrices in many different ways, for example:

and so on. There are numerous ways to multiply this chain of matrices. They will all produce the same final result, however they will take more or less time to compute, based on which particular matrices are multiplied. If matrix A has dimensions m×n and matrix B has dimensions n×q, then matrix C=A×B will have dimensions m×q, and will require m*n*q scalar multiplications (using a simplistic matrix multiplication algorithm for purposes of illustration).

For example, let us multiply matrices A, B and C. Let us assume that their dimensions are m×n, n×p, and p×s, respectively. Matrix A×B×C will be of size m×s and can be calculated in two ways shown below:

 * 1) Ax(B×C)    This order of matrix multiplication will require nps + mns scalar multiplications.
 * 2) (A×B)×C    This order of matrix multiplication will require mnp + mps scalar calculations.

Let us assume that m = 10, n = 100, p = 10 and s = 1000. So, the first way to multiply the chain will require 1,000,000 + 1,000,000 calculations. The second way will require only 10,000+100,000 calculations. Obviously, the second way is faster, and we should multiply the matrices using that arrangement of parenthesis.

Therefore, our conclusion is that the order of parenthesis matters, and that our task is to find the optimal order of parenthesis.

At this point, we have several choices, one of which is to design a dynamic programming algorithm that will split the problem into overlapping problems and calculate the optimal arrangement of parenthesis. The dynamic programming solution is presented below.

Let's call m[i,j] the minimum number of scalar multiplications needed to multiply a chain of matrices from matrix i to matrix j (i.e. Ai × .... × Aj, i.e. i<=j). We split the chain at some matrix k, such that i <= k < j, and try to find out which combination produces minimum m[i,j].

The formula is:

if i = j, m[i,j]= 0 if i < j, m[i,j]= min over all possible values of k (m[i,k]+m[k+1,j] + $p_{i-1}*p_k*p_j$) where k ranges from i to j − 1.

 * $p_(i-1)$ is the row dimension of matrix i,
 * $p_k$ is the column dimension of matrix k,
 * $p_j$ is the column dimension of matrix j.

This formula can be coded as shown below, where input parameter "chain" is the chain of matrices, i.e. $A_1, A_2, ... A_n$:

function OptimalMatrixChainParenthesis(chain) n = length(chain) for i = 1, n        m[i,i] = 0    // Since it takes no calculations to multiply one matrix for len = 2, n        for i = 1, n - len + 1 j = i + len -1 m[i,j] = infinity     // So that the first calculation updates for k = i, j-1 q = m[i, k] + m[k+1, j] + $p_{i-1}*p_k*p_j$ if q < m[i, j]    // The new order of parentheses is better than what we had m[i, j] = q   // Update s[i, j] = k   // Record which k to split on, i.e. where to place the parenthesis

So far, we have calculated values for all possible $((A_{1} × A_{2}) × A_{3}) × ... A_{n}$, the minimum number of calculations to multiply a chain from matrix i to matrix j, and we have recorded the corresponding "split point"$A_{1}×(((A_{2}×A_{3})× ... ) × A_{n})$. For example, if we are multiplying chain $(A_{1} × A_{2}) × (A_{3} × ... A_{n})$, and it turns out that $m[i, j]$ and $s[i, j]$, that means that the optimal placement of parenthesis for matrices 1 to 3 is $(A_1\times A_2)\times A_3$ and to multiply those matrices will require 100 scalar calculations.

This algorithm will produce "tables" m[, ] and s[, ] that will have entries for all possible values of i and j. The final solution for the entire chain is m[1, n], with corresponding split at s[1, n]. Unraveling the solution will be recursive, starting from the top and continuing until we reach the base case, i.e. multiplication of single matrices.

Therefore, the next step is to actually split the chain, i.e. to place the parenthesis where they (optimally) belong. For this purpose we could use the following algorithm:

function PrintOptimalParenthesis(s, i, j)    if i = j         print "A"i else print "("         PrintOptimalParenthesis(s, i, s[i, j])          PrintOptimalParenthesis(s, s[i, j] + 1, j)          print ")"

Of course, this algorithm is not useful for actual multiplication. This algorithm is just a user-friendly way to see what the result looks like.

To actually multiply the matrices using the proper splits, we need the following algorithm:

History of the name
The term dynamic programming was originally used in the 1940s by Richard Bellman to describe the process of solving problems where one needs to find the best decisions one after another. By 1953, he refined this to the modern meaning, referring specifically to nesting smaller decision problems inside larger decisions, and the field was thereafter recognized by the IEEE as a systems analysis and engineering topic. Bellman's contribution is remembered in the name of the Bellman equation, a central result of dynamic programming which restates an optimization problem in recursive form.

Bellman explains the reasoning behind the term dynamic programming in his autobiography, Eye of the Hurricane: An Autobiography:

"I spent the Fall quarter (of 1950) at RAND. My first task was to find a name for multistage decision processes. An interesting question is, 'Where did the name, dynamic programming, come from?' The 1950s were not good years for mathematical research. We had a very interesting gentleman in Washington named Wilson. He was Secretary of Defense, and he actually had a pathological fear and hatred of the word 'research'. I'm not using the term lightly; I'm using it precisely. His face would suffuse, he would turn red, and he would get violent if people used the term research in his presence. You can imagine how he felt, then, about the term mathematical. The RAND Corporation was employed by the Air Force, and the Air Force had Wilson as its boss, essentially. Hence, I felt I had to do something to shield Wilson and the Air Force from the fact that I was really doing mathematics inside the RAND Corporation. What title, what name, could I choose? In the first place I was interested in planning, in decision making, in thinking. But planning, is not a good word for various reasons. I decided therefore to use the word 'programming'. I wanted to get across the idea that this was dynamic, this was multistage, this was time-varying. I thought, let's kill two birds with one stone. Let's take a word that has an absolutely precise meaning, namely dynamic, in the classical physical sense. It also has a very interesting property as an adjective, and that is it's impossible to use the word dynamic in a pejorative sense. Try thinking of some combination that will possibly give it a pejorative meaning. It's impossible. Thus, I thought dynamic programming was a good name. It was something not even a Congressman could object to. So I used it as an umbrella for my activities."

The word dynamic was chosen by Bellman to capture the time-varying aspect of the problems, and because it sounded impressive. The word programming referred to the use of the method to find an optimal program, in the sense of a military schedule for training or logistics. This usage is the same as that in the phrases linear programming and mathematical programming, a synonym for mathematical optimization.

The above explanation of the origin of the term may be inaccurate: According to Russell and Norvig, the above story "cannot be strictly true, because his first paper using the term (Bellman, 1952) appeared before Wilson became Secretary of Defense in 1953." Also, Harold J. Kushner stated in a speech that, "On the other hand, when I asked [Bellman] the same question, he replied that he was trying to upstage Dantzig's linear programming by adding dynamic. Perhaps both motivations were true."

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Dynamic programming


text:
User:Vaughan

See User Contributions for recent work.

I agree to multi-license all my contributions, with the exception of my user pages, as described below:

Citation tool

title: User:Vaughan


text:
Science and Health with Key to the Scriptures

Science and Health with Key to the Scriptures by Mary Baker Eddy is, along with the Bible, one of the two central texts of the Christian Science religion. Eddy described it as her "most important work". She began writing it in February 1872, and the first edition was published in 1875. However, she would continue working on it and making changes for the rest of her life.

The book was selected as one of the "75 Books By Women Whose Words Have Changed The World", by the Women's National Book Association.

As of 2001, the book had sold over nine million copies.

Basic beliefs
Christian Science develops its theology and its healing method from these statements contained in Science and Health:

 * "God is All-in all."
 * "God is good."
 * "God is Mind, and God is infinite; hence all is Mind."

Structure
The last edition of the book consists of a short preface, the main section, a "Key to the Scriptures" section, and a Fruitage section. Some editions include a word index.

Main section
The main section is 500 pages long and comprises chapters titled as follows:

 * Prayer
 * Atonement and Eucharist
 * Marriage
 * Christian Science versus Spiritualism
 * Animal Magnetism Unmasked
 * Science, Theology, Medicine
 * Physiology
 * Footsteps of Truth
 * Creation
 * Science of Being
 * Some Objections Answered
 * Christian Science Practice (which explains how healing is undertaken)
 * Teaching Christian Science
 * Recapitulation (the text used for class instruction in Christian Science healing).

Key to the Scriptures
This section is 100 pages long, and comprises:
 * Genesis (a detailed analysis of the two versions of the creation story given in the book of Genesis)
 * The Apocalypse (an analysis of parts of the book of Revelation)
 * Glossary (giving the spiritual meaning of 114 Biblical terms)

Fruitage
This section is 100 pages long and consists of 84 testimonies of the healing power derived from reading Science and Health. There are descriptions of healings of addiction, asthma, broken bones, cataracts, cancer, deafness, eczema, fibroid tumor, and rheumatism. Prior intervention by physicians is mentioned in 50 of these cases, and one relates a confirmatory X-ray image by a physician.

Copyright
The first edition was copyrighted by Eddy in 1875, in part to help separate her work from the "sea of metaphysical writing" circulating at the time. The copyright for Science and Health went through several renewals including a posthumous renewal in 1934 by the Christian Science Board of Directors. In December 1971, Congress passed a law extending the copyright on Science and Health by 75 years to the Christian Science Board of Directors. There was some opposition to the bill, as it would prevent dissident groups from publishing their own edited versions of the book.

In 1985 however, following a legal suit brought by United Christian Scientists, a group which wanted to publish their own version of the book, the copyright extension was found unconstitutional by Federal District Judge Thomas Penfield Jackson. In 1987 the United States Court of Appeals for the District of Columbia upheld the ruling of the district court. As a result, Science and Health has been in the public domain since 1987.

Editions
The first edition was published in 1875 by Eddy, who was then in her mid-fifties and known as Mary Baker Glover. It was printed by W.F. Brown & Co. Their invoice for 1,000 copies, dated October 30, 1875, was made out to George M. Barry and Edward Hitchins for US$2,285.35. The edition consisted of 456 pages, plus 2 pages of errata. However, there were hundreds of typographic errors, some because the printer, not understanding the author's meaning, had tried to correct the wording without consulting her. The second edition, printed by Rand, Avery & Co, appeared in 1878, with 167 pages of new material. It was called Science and Health Volume 2 to indicate that it was a supplement to the first edition, but it, too, was full of typographic errors. Finally, the third edition printed by John Wilson at the University Press in Cambridge, Massachusetts, was of a high standard. Twelve further two-volume editions followed, before the 16th edition appeared as a single volume in 1886. This edition of the book had 552 pages, plus an index of 38 pages, and "with Key to the Scriptures" had been added to the title. Eddy remained loyal to the University Press for the rest of her life, and in 1897 even made a substantial investment to save it from bankruptcy.

Eddy closed her Massachusetts Metaphysical College and left Boston in 1889, in order to revise the text for the 50th edition (1891). This edition consisted of 578 pages plus a 73-page index, and for the first time included marginal headings. The 226th "thousand" edition appeared in 1902, and included the chapter "Fruitage," making up the page count of 700 pages which remains to this day. The last numbered edition was the 418th, which appeared in 1906, but further changes were made until 1910. According to the Mary Baker Eddy Library, major editions include those printed in 1875, 1878, 1881, 1883, 1886, 1891, 1902, and 1907.

Many sources overlook the importance of this book in its finalized form in 1910. It is well known as the foundational guidance for the Church of Christ, Scientist, but the book also managed to stir up questions about issues that so many male religious leaders and thinkers believed they had settled. In writing about the first edition of Science and Health, feminist scholar and biographer Gillian Gill homes in on this point: "The real issue is the author's audacity, her daring to think that a woman like her, with her resources, could write, not the expected textbook on mental healing techniques, not the comfortable compendium of healing anecdotes, but a book that takes on the great questions of God and man, good and evil, and that rejects orthodox verities."

Summary
Science and Health encapsulates the teachings of Christian Science and Christian Scientists often call it their "textbook". At Sunday services, the sermon consists of passages from the Bible with "correlative passages" from Science and Health. Eddy called the two books Christian Science's "dual and impersonal pastor".


text:
Mary Baker Eddy

Mary Baker Eddy (nee Baker; July 16, 1821 – December 3, 1910) was an American religious leader and author who founded The Church of Christ, Scientist, in New England in 1879. She also founded The Christian Science Monitor in 1908, and three religious magazines: the Christian Science Sentinel, The Christian Science Journal, and The Herald of Christian Science. She wrote numerous books and articles, the notable of which were Science and Health with Key to the Scriptures and Manual of The Mother Church. Other works were edited posthumously into the Prose Works Other than Science and Health.

Family
Eddy was born Mary Morse Baker on July 16, 1821, in a farmhouse in Bow, New Hampshire to farmer Mark Baker (d. 1865) and his wife Abigail Barnard Baker, née Ambrose (d. 1849). Eddy was the youngest of six children: boys Samuel Dow (1808), Albert (1810), and George Sullivan (1812), followed by girls Abigail Barnard (1816), Martha Smith (1819), and Mary Morse (1821). She was the cousin of U.S. Representative Henry M. Baker.

She was the sixth generation of her family born in the United States. The farmhouse she was born in was built by her grandfather, Joseph Baker Jr., on a tract of land his maternal grandfather, Captain John Lovewell, had been given for service in the American Revolutionary War. Eddy's father Mark inherited, alongside his elder brother James, the farm when Joseph Jr. died in 1816.

Mark Baker was an active member of the Tilton Congregationalist Church. McClure's reported he had a reputation for holding strong opinions and quarrelling with those he disagreed with; one neighbor described him as "[a] tiger for a temper and always in a row." They also reported he was an ardent supporter of slavery and a Copperhead who was reportedly pleased to hear about Abraham Lincoln's death. Despite trying to oust his Republican pastor during the war alongside a faction of his church, he refused to leave the church alongside other members of the faction when they failed. Instead, he continued to attend services, but would storm out at the mention of the American Civil War during a service.

Eddy and her father reportedly had a volatile relationship. Ernest Sutherland Bates and John V. Dittemore wrote in 1932 that Baker sought to break Eddy's will with harsh punishment, although her mother often intervened; in contrast to Mark Baker, Eddy's mother was described as devout, quiet, light-hearted, and kind.

Health
Eddy experienced periods of sudden illness. Those who knew the family described her as suddenly falling to the floor, writhing and screaming, or silent and apparently unconscious, sometimes for hours. Historian Robert Peel wrote that these fits would require the family to send Eddy to the village doctor.

The cause for Eddy's illness was unclear, but biographer Caroline Fraser wrote she believed the cause was most likely psychogenic in nature. According to psychoanalyst Julius Silberger, Eddy may have been motivated to have these fits in an effort to control her father's attitude toward her. Fraser attributed the illness likely to a combination of hypochondria and histrionics as well.

Tilton, New Hampshire
In 1836, when Eddy was about 14 to 15 years old, she moved with her family to the town of Sanbornton Bridge, New Hampshire, approximately 20 mi north of Bow. Sanbornton Bridge was renamed in 1869 as Tilton, New Hampshire.

Ernest Bates and John Dittemore write that Eddy was not able to attend Sanbornton Academy when the family first moved there but was required instead to start at the district school (in the same building) with the youngest girls. She withdrew after a month because of poor health, then received private tuition from the Reverend Enoch Corser. She entered Sanbornton Academy in 1842.

She was received into the Congregational church in Tilton on July 26, 1838, when she was 17, according to church records published by Cather and Milmine. Eddy had written in her autobiography in 1891 that she was 12 when this happened, and that she had discussed the idea of predestination with the pastor during the examination for her membership; this may have been an attempt to mirror the story of a 12-year-old Jesus in the Temple.

Marriage, widowhood
Eddy was badly affected by four deaths in the 1840s. She regarded her brother Albert as a teacher and mentor, but he died in 1841. In 1844, her first husband George Washington Glover (a friend of her brother Samuel) died after six months of marriage. They had married in December 1843 and set up home in Charleston, South Carolina, where Glover had business, but he died of yellow fever in June 1844 while living in Wilmington, North Carolina. Eddy was with him in Wilmington, six months pregnant. She had to make her way back to New Hampshire, 1400 mi by train and steamboat, where her only child George Washington Glover II was born on September 12 in her father's home.

Her husband's death, the journey back, and the birth left her physically and mentally exhausted, and she ended up bedridden for months. As Eddy was unable to care for him, her son was nursed by a local woman while Eddy herself was cared for by a household servant.

Eddy's mother died in November 1849. Her mother's death was then followed three weeks later by the death of Eddy's fiancé, lawyer John Bartlett.

Eddy's father Mark Baker remarried in 1850; his second wife Elizabeth Patterson Duncan (d. June 6, 1875) had been widowed twice, and had some property and income from her second marriage. Baker apparently made clear to Eddy that her son would not be welcome in the new marital home.

Study with Phineas Quimby
Eddy married Dr. Daniel Patterson, a dentist, in 1853. Mesmerism had become popular in New England; and on October 14, 1861, Patterson, wrote to mesmerist Phineas Parkhurst Quimby, who reportedly cured people without medicine, asking if he could cure his wife. Quimby replied that he had too much work in Portland, Maine and that he could not visit her, but if Patterson brought his wife to him he would treat her. Eddy did not immediately go, instead trying the water cure at Dr. Vail's Hydropathic Institute, but her health deteriorated even further. A year later, in October 1862, Eddy first visited Quimby. She improved considerably, and publicly declared that she had been able to walk up 182 steps to the dome of city hall after a week of treatment. The cures were temporary, however, and Eddy suffered relapses.

Despite the temporary nature of the "cure", she attached religious significance to it, which Quimby did not. She believed that it was the same type of healing that Christ Jesus had performed. From 1862 to 1865, Quimby and Eddy engaged in lengthy discussions about healing methods practiced by Quimby and others. She took notes on her own ideas on healing, as well as writing dictations from him and "correcting" them with her own ideas, some of which possibly ended up in the "Quimby manuscripts" that were published later and attributed to him. Despite Quimby not being especially religious, he embraced the religious connotations Eddy was bringing to his work, since he knew his more religious patients would appreciate it. Phineas Quimby died on January 16, 1866, shortly after Eddy's father.

J. Gordon Melton has argued "certainly Eddy shared some ideas with Quimby. She differed with him in some key areas, however, such as specific healing techniques. Moreover, she did not share Quimby's hostility toward the Bible and Christianity." Biographer Gillian Gill has disagreed with other scholars arguing they "have flouted the evidence and shown willful bias in accusing Mrs. Eddy of owing her theory of healing to Quimby and of plagiarizing his unpublished work."

1866 fall
On February 1, 1866, while living in Lynn, Massachusetts, Eddy slipped and fell on a patch of ice. A contemporary account by the Lynn Reporter stated:

"Mrs. Mary Patterson of Swampscott fell upon the ice near the corner of Market and Oxford Streets on Thursday evening and was severely injured. She was taken up in an insensible condition and carried into the residence of S. M. Bubier, Esq., near by, where she was kindly cared for during the night. Dr. Cushing, who was called, found her injuries to be internal and of a severe nature, inducing spasms and internal suffering. She was removed to her home in Swampscott yesterday afternoon, though in a very critical condition."

When Georgine Milmine interviewed Dr. Cushing forty years later, he stated that his records from the time documented that Eddy was in a "semi-hysterical" intense emotional state which subsided after she was given a small amount of morphine.

On February 14, 1866, the day after Eddy finished her care with Dr. Cushing, Eddy wrote to Julius Dresser, another patient of Phineas Quimby, claiming that her injury and her subsequent medical care had undone all of the healing that Quimby had done before, and requested that he heal her. Dresser refused, stating that he was not enough to take on the burden of healing, and urged Eddy to instead spread Quimby's teachings further. Eddy would later credit her fall as her moment of spiritual revelation, claiming that after rejecting the medicines offered to her by her doctor, she opened her Bible three days after her fall and returned to full health after reading of Jesus healing the sick.

Spiritualism
Eddy separated from her second husband Daniel Patterson in 1866, after which she boarded for four years with several families in Lynn, Massachusetts and elsewhere. Frank Podmore wrote:

"But she was never able to stay long in one family. She quarrelled successively with all her hostesses, and her departure from the house was heralded on two or three occasions by a violent scene. Her friends during these years were generally Spiritualists; she seems to have professed herself a Spiritualist, and to have taken part in séances. She was occasionally entranced, and had received 'spirit communications' from her deceased brother Albert. Her first advertisement as a healer appeared in 1868, in the Spiritualist paper The Banner of Light. During these years she carried about with her a copy of one of Quimby's manuscripts giving an abstract of his philosophy. This manuscript she permitted some of her pupils to copy."

After she became well known, reports surfaced that Eddy was a medium in Boston at one time. At the time when she was said to be a medium there, she lived some distance away. According to Gill, Eddy knew spiritualists and took part in some of their activities, but was never a convinced believer. For example, she visited her friend Sarah Crosby in 1864, who believed in Spiritualism. According to Sibyl Wilbur, Eddy attempted to show Crosby the folly of it by pretending to channel Eddy's dead brother Albert and writing letters which she attributed to him. In regard to the deception, biographer Hugh Evelyn Wortham stated "Mrs. Eddy's followers explain it all as a pleasantry on her part to cure Mrs. Crosby of her credulous belief in spiritualism." However, Martin Gardner has argued against this, stating that Eddy was working as a spiritualist medium and was convinced by the messages. According to Gardner, Eddy's mediumship converted Crosby to Spiritualism.

In one of her spiritualist trances to Crosby, Eddy gave a message that was supportive of Phineas Parkhurst Quimby, stating "P. Quimby of Portland has the spiritual truth of diseases. You must imbibe it to be healed. Go to him again and lean on no material or spiritual medium." The paragraph that included this quote was later omitted from an official sanctioned biography of Eddy.

Between 1866 and 1870, Eddy boarded at the home of Brene Paine Clark who was interested in Spiritualism. Seances were often conducted there, but Eddy and Clark engaged in vigorous, good-natured arguments about them. Eddy's arguments against Spiritualism convinced at least one other who was there at the time—Hiram Crafts—that "her science was far superior to spirit teachings." Clark's son George tried to convince Eddy to take up Spiritualism, but he said that she abhorred the idea. According to Cather and Milmine, Richard Hazeltine attended seances at Clark's home, and Eddy had acted as a trance medium, claiming to channel the spirits of the Apostles.

Mary Gould, a Spiritualist from Lynn, claimed that one of the spirits that Eddy channeled was Abraham Lincoln. According to eyewitness reports cited by Cather and Milmine, Eddy was still attending séances as late as 1872. In these later séances, Eddy would attempt to convert her audience into accepting Christian Science. Eddy showed extensive familiarity with Spiritualist practice, but she denounced it in later Christian Science writings. Historian Ann Braude wrote that there were similarities between Spiritualism and Christian Science, but the main difference was that Eddy came to believe, after she founded Christian Science, that spirit manifestations had never really had bodies to begin with, because matter is unreal and that all that really exists is spirit, before and after death.

In the fiftieth edition of her book, Science and Health with Key to the Scriptures, published in 1891, Eddy added the chapter, Christian Science and Spiritualism. This chapter was renamed in 1910 to Christian Science versus Spiritualism.

Hinduism
Scholars debate the influence of Hinduism on Eddy and her work. The 1930 work Hinduism Invades America argues Eddy referenced the Bhagavad-Gita in the 33rd edition of Science and Health. Gillian Gill argued that that her editor, Reverend James Henry Wiggin, had introduced the references, and Eddy removed from the 1891 revision all the references to Eastern religions. Christian Scientist church member and historian Stephen Gottschalk argued that Eddy consciously distinguished Christian Science from Eastern religions starting in the mid-1880s. Damodar Singhal noted that whether or not Eddy was directly influenced by Hindu philosophy, "the echoes of Vedanta in [her] literature are often striking."

Building a church
Eddy divorced Daniel Patterson for adultery in 1873. She published her work in 1875 in a book entitled Science and Health (years later retitled Science and Health with Key to the Scriptures) which she called the textbook of Christian Science, after several years of offering her healing method. The first publication run was 1,000 copies, which she self-published. During these years, she taught what she considered the science of "primitive Christianity" to at least 800 people. Many of her students became healers themselves. The last 100 pages of Science and Health (chapter entitled "Fruitage") contains testimonies of people who claimed to have been healed by reading her book. She made numerous revisions to her book from the time of its first publication until shortly before her death.

In January 1877, Eddy spurned an approach from one of her students, Daniel Spofford. She then married another student of hers, Asa Gilbert Eddy. On January 1, 1877, the two were wed, and she became Mary Baker Eddy in a small ceremony presided over by a Unitarian minister.

In 1881, Mary Baker Eddy started the Massachusetts Metaphysical College with a charter from the state which allowed her to grant degrees. In Spring 1882, the Eddys moved to Boston to Massachusetts Metaphysical College. Gilbert Eddy's health began to decline around this time, and he died June 3 that year.

Eddy devoted the rest of her life to the establishment of the church, writing its bylaws, The Manual of The Mother Church, and revising Science and Health. By the 1870s, she was telling her students, "Some day I will have a church of my own." In 1879, she and her students established the Church of Christ, Scientist, "to commemorate the word and works of our Master [Jesus], which should reinstate primitive Christianity and its lost element of healing." In 1881, she founded the Massachusetts Metaphysical College, where she taught approximately 800 students between the years 1882 and 1889, when she closed it. Eddy charged her students $300 each for tuition, a large sum for the time. In 1892, at Eddy's direction, the church reorganized as The First Church of Christ, Scientist. In 1894, an edifice for The First Church of Christ, Scientist was completed in Boston.

Her students spread across the country practicing healing, and instructing others. Eddy authorized these students to list themselves as Christian Science Practitioners in the church's The Christian Science Journal. She also founded the Christian Science Sentinel, a weekly magazine with articles about how to heal and testimonies of healing.

When the church re-organized in 1892, Eddy was made the leader of the church as "Pastor Emeritus". In 1895, she ordained the Bible and Science and Health as the pastor.

Eddy founded The Christian Science Publishing Society in 1898, which became the publishing home for numerous publications launched by her and her followers. In 1908, at the age of 87, she founded The Christian Science Monitor, a daily newspaper. She also founded the Christian Science Journal in 1883, a monthly magazine aimed at the church's members and, in 1898, the Christian Science Sentinel, a weekly religious periodical written for a more general audience, and the Herald of Christian Science, a religious magazine with editions in many languages.

Malicious animal magnetism
The opposite of Christian Science mental healing was the use of mental powers for destructive or selfish reasons – for which Eddy used terms such as animal magnetism, hypnotism, or mesmerism interchangeably. "Malicious animal magnetism", sometimes abbreviated as M.A.M., is what Catherine Albanese called "a Calvinist devil lurking beneath the metaphysical surface". As there is no personal devil or evil in Christian Science, M.A.M. or mesmerism became the explanation for the problem of evil. Eddy was concerned that a new practitioner could inadvertently harm a patient through unenlightened use of their mental powers, and that less scrupulous individuals could use them as a weapon.

Animal magnetism became one of the most controversial aspects of Eddy's life. The McClure's biography spends a significant amount of time on malicious animal magnetism, which it uses to make the case that Eddy had paranoia. During the Next Friends lawsuit, it was used to charge Eddy with incompetence and "general insanity".

According to Gillian Gill, Eddy's experience with Richard Kennedy, one of her early students, was what led her to began her examination of malicious animal magnetism. Eddy had agreed to form a partnership with Kennedy in 1870, in which she would teach him how to heal, and he would take patients. The partnership was rather successful at first, but by 1872 Kennedy had fallen out with his teacher and torn up their contract. Although there were multiple issues raised, the main reason for the break according to Gill was Eddy's insistence that Kennedy stop "rubbing" his patient's head and solar plexus, which she saw as harmful since, as Gill states, "traditionally in mesmerism or hypnosis the head and abdomen were manipulated so that the subject would be prepared to enter into trance." Kennedy clearly did believe in clairvoyance, mind reading, and absent mesmeric treatment; and after their split Eddy believed that Kennedy was using his mesmeric abilities to try to harm her and her movement.

In 1882, Eddy publicly claimed that her last husband, Asa Gilbert Eddy, had died of "mental assassination". Daniel Spofford was another Christian Scientist expelled by Eddy after she accused him of practicing malicious animal magnetism. This gained notoriety in a case irreverently dubbed the "Second Salem Witch Trial".

Later, Eddy set up "watches" for her staff to pray about challenges facing the Christian Science movement and to handle animal magnetism which arose. Gill writes that Eddy got the term from the New Testament account of the garden of Gethsemane, where Jesus chastises his disciples for being unable to "watch" even for a short time; and that Eddy used it to refer to "a particularly vigilant and active form of prayer, a set period of time when specific people would put their thoughts toward God, review questions and problems of the day, and seek spiritual understanding." Critics such as Georgine Milmine in Mclure's, Edwin Dakin, and John Dittemore, all claimed this was evidence that Eddy had a great fear of malicious animal magnetism; although Gilbert Carpenter, one of Eddy's staff at the time, insisted she was not fearful of it, and that she was simply being vigilant.

As time went on, Eddy tried to lessen the focus on animal magnetism within the movement, and she worked to clearly define it as unreality which only had power if one conceded to it. Though, it continued to play an important role in the teaching of Christian Science.

The belief in malicious animal magnetism remains a part of Christian Science doctrine. Christian Scientists use it as a specific term for a hypnotic belief in a power apart from God.

British Israelism
Eddy was introduced to British Israelism by Julia Field-King, who herself was introduced by the writings of C. A. L. Totten. Totten alleged to have traced Queen Victoria's genealogy to King David and Field-King offered to create a genealogy tracing Eddy to King David. Eddy eventually requested Field-King cease work on the genealogy and transferred her to London to work on expanding the church there. Since her death, academics have debated the extent of Eddy's relationship with British Israelism with Christian Scientist historian Robert Peel arguing she was "intrigued by the theory for several years," while keeping "it resolutely out of her work and her writing on Christian Science." He acknowledges she uses the term "Anglo-Israel" in one poem, but argues the meaning is "metaphorical" instead of "ethnic or historical."

Political Scientist Michael Barkun argued that "Eddy continued to maintain an interest in British-Israelism, although she kept it out of her doctrinal writings" and noted that a "schismatic offshoot" organized by Annie Cecelia Bill in England after Eddy's death centered on British-Israelism. Professor of religious studies John K. Simmons, citing Peel, argued that Eddy "gave the theory no real credence, at least in verifiable written form," but acknowledged British-Israelism "seemed to attract the turn-of-the-century metaphysical crowd."

Use of medicine
There is controversy about how much Eddy used morphine. Biographers Ernest Sutherland Bates and Edwin Franden Dakin described Eddy as a morphine addict. Miranda Rice, a friend and close student of Eddy, told a newspaper in 1906: "I know that Mrs. Eddy was addicted to morphine in the seventies." A diary kept by Calvin Frye, Eddy's personal secretary, suggests that Eddy occasionally reverted to "the old morphine habit" when she was in pain. Gill writes that the prescription of morphine was normal medical practice at the time, and that "I remain convinced that Mary Baker Eddy was never addicted to morphine."

Eddy recommended to her son that, rather than go against the law of the state, he should have her grandchildren vaccinated. She also paid for a mastectomy for her sister-in-law. Eddy used glasses for several years for very fine print, but later dispensed with them almost entirely. She found she could read fine print with ease. In 1907, Arthur Brisbane interviewed Eddy. At one point he picked up a periodical, selected at random a paragraph, and asked Eddy to read it. According to Brisbane, at the age of eighty six, she read the ordinary magazine type without glasses. Towards the end of her life she was frequently attended by physicians.

Next Friends lawsuit
In 1907, the New York World sponsored a lawsuit, known as "The Next Friends suit", which journalist Erwin Canham described as "designed to wrest from [Eddy] and her trusted officials all control of her church and its activities." During the course of the legal case, four psychiatrists interviewed Eddy, then 86 years old, to determine whether she could manage her own affairs, and concluded that she was able to. Physician Allan McLane Hamilton told The New York Times that the attacks on Eddy were the result of "a spirit of religious persecution that has at last quite overreached itself", and that "there seems to be a manifest injustice in taxing so excellent and capable an old lady as Mrs. Eddy with any form of insanity."

A 1907 article in the Journal of the American Medical Association noted that Eddy exhibited hysterical and psychotic behavior. Psychiatrist Karl Menninger in his book The Human Mind (1927) cited Eddy's paranoid delusions about malicious animal magnetism as an example of a "schizoid personality".

Psychologists Leon Joseph Saul and Silas L. Warner, in their book The Psychotic Personality (1982), came to the conclusion that Eddy had diagnostic characteristics of Psychotic Personality Disorder (PPD). In 1983, psychologists Theodore Barber and Sheryl C. Wilson suggested that Eddy displayed traits of a fantasy prone personality.

Psychiatrist George Eman Vaillant wrote that Eddy was hypochrondriacal. Psychopharmacologist Ronald K. Siegel has written that Eddy's lifelong secret morphine habit contributed to her development of "progressive paranoia".

Death
Eddy died of pneumonia on the evening of December 3, 1910, at her home at 400 Beacon Street, in the Chestnut Hill section of Newton, Massachusetts. Her death was announced the next morning, when a city medical examiner was called in. She was buried on December 8, 1910, at Mount Auburn Cemetery in Cambridge, Massachusetts. Her open-air mausoleum was designed by New York architect Egerton Swartwout (1870–1943).

Legacy
A bronze memorial relief of Eddy by Lynn sculptor Reno Pisano was unveiled in December 2000, at the corner of Market Street and Oxford Street in Lynn, Massachusetts, near the site of her fall in 1866.

Eddy was named one of the "100 Most Significant Americans of All Time" in 2014 by Smithsonian Magazine, and her book Science and Health with Key to the Scriptures was ranked as one of the "75 Books by Women Whose Words Have Changed the World" by the Women's National Book Association in 1992.

Residences
In 1921, on the 100th anniversary of Eddy's birth, a 100-ton (in rough) and 60–70 tons (hewn) pyramid with a 121 sqfoot footprint was dedicated on the site of her birthplace in Bow, New Hampshire. A gift from James F. Lord, it was dynamited in 1962 by order of the church's board of directors. Also demolished was Eddy's former home in Pleasant View, as the Board feared that it was becoming a place of pilgrimage. Eddy is featured on a New Hampshire historical marker (number 105) along New Hampshire Route 9 in Concord, New Hampshire.

Several of Eddy's homes are owned and maintained as historic sites by the Longyear Museum and may be visited (the list below is arranged by date of her occupancy):

 * 1855–1860 – Hall's Brook Road, North Groton, New Hampshire
 * 1860–1862 – Stinson Lake Road, Rumney, New Hampshire
 * 1865–1866 – 23 Paradise Road, Swampscott, Massachusetts
 * 1868,1870 – 277 Main Street, Amesbury, Massachusetts
 * 1868–1870 – 133 Central Street, Stoughton, Massachusetts
 * 1875–1882 – 8 Broad Street, Lynn, Massachusetts (NRHP-listed in 2021)
 * 1889–1892 – 62 North State Street, Concord, New Hampshire (NRHP-listed in 1982)
 * 1908–1910 – 400 Beacon Street, Chestnut Hill, Massachusetts (NRHP-listed in 1986)

Selected works

 * Source: "Writings" via the Mary Baker Eddy Library.

title: Mary Baker Eddy


text:
Wikipedia talk:Current disputes over articles

I propose this page for discussion of "destructive" activities that rise above the level of deleting whole pages or inserting "joe is kewl" into articles at random.

For example, we might say:

 * Lir is calling Christopher Columbus a slavetrader and reverting (all, most?) other contributors' changes.

I think it's better to call such a dispute an edit war than to use such a provocative term as vandalism. --Ed Poor

 * COuld be a good idea. Might keep traffic down on the mailing list too! -- Tarquin

What kind of doublethink allows people to think that "edit war" is a less provocative term than "vandalism"? War is worse than vandalism, and both are destructive acts. There's no way to destroy anything on Wikipedia, other than good will, and this page does a better job of destroying good will than any contention over a single topic ever will. --The Cunctator

--- What is an Edit War? Ilyanep

Islam page verses Christianity page and no Christian page
I hope I put this in the right place; I've been trying to find an appropriate place to ask this question and discuss my view. I have posted some remarks on the Talk pages.

I am a very offended and upset Christian. I went to the Christian page and got "redirected" to a Christianity page that is filled with practically a debate on what Christianity is. There are comments galore from apparently non Christians on the page. I then went to the Islam page and there's a generic practically glowing idealistic definition of the religion of Islam.

Why is there this difference? It would seem to me that a definition of a religion should be just that. If on the Islam definition page someone is allowed to present a glowing, undebated,idealistic version and definition of the religion, why isn't the same courtesy being extended to the Christianity page"?

 * try copying this to Talk:Christianity --Jiang

 * I do not see anything anti-Christian in the Christianity page, but since I am not a Christian I admit I may be insensitive. But I have no idea how to respond to your comment, unless you can point (preferaby on the Christianity talk page) to some specific sentences or pasages and explain to this general reader in what way they are inaccurate or inflamatory.  Thanks, Slrubenstein

Sanacja
So, what happens now? Andy Mabbett 17:45, 22 Nov 2003 (UTC)

Wikipedia:Requests for comment
See Wikipedia talk:Conflict resolution for a possible way to better handle user and article disputes. --mav 19:03, 24 Jan 2004 (PST)

Requests for comment has been created. I would therefore like to start the process of slowly depreciating this page by directly new dispute requests to RfC. If there are no objections I'll leave such a note at the top of this page. The policy statements may be eventually ported over as well. --mav

[Removed incorrectly formed request - UtherSRG 17:51, 25 Feb 2004 (UTC)]

Deprecating the page
Based on the discussion above, as well as at Wikipedia talk:Dispute resolution, this page is now considered deprecated. It will be converted into a redirect to RfC in one week, unless significant objections are registered on this talk page before then. --Michael Snow 00:32, 5 Mar 2004 (UTC)


text:
Talk:Mary Baker Eddy

British Israelism
Hello, I’m an employee of The First Church of Christ, Scientist. British Israelism was not an influence on Eddy’s work nor did she teach it. See Peel, Robert (1977), Mary Baker Eddy: The Years of Authority, Holt, Rinehart and Winston, pp. 114-119). Would you please consider correcting this? FirsthandPOV-CCS (talk) 21:41, 8 July 2024 (UTC)

 * After reading Peel, Bukan, and Miller (the two sources cited and one proposed), I think the current section should be rewritten, but not entirely removed. There appears to be a difference of opinion amongst historians about Eddy's relationship with British Israelism (even Peel on pg. 118 acknowledges Eddy was "intrigued" by the theory "... the Anglo-Israel issue gradually drifted into the background of Mrs. Eddy's thinking. Although she continued to be intrigued by the theory for several years, she kept it resolultely out of her work and her writing on Christian Science.") and we should explain the different opinions instead of cutting content entirely. TulsaPoliticsFan (talk) 00:16, 9 July 2024 (UTC)
 * @FirsthandPOV-CCS, just checking -- is your proposed change to remove the current section entirely, or some other edit? Thanks! Rusalkii  (talk) 22:27, 11 July 2024 (UTC)
 * Rusalkii, my primary focus was that British Israelism is included as an influence or teaching. It was neither an influence on Eddy’s work nor did she teach it. FirsthandPOV-CCS (talk) 21:43, 16 July 2024 (UTC)

title: Talk:Mary Baker Eddy