“If you have a really fancy method and give it garbage data, what you’ll get out is some really fancy garbage.”

]]>By contrast, numerical differentiation methods such as the 2-point, 3-point, and 5-point formulas are *unstable, *because these formulas involve division by the width of the step-size used. So at a certain point as , round-off error overtakes the increased accuracy of a small step-size and the approximations actually start to get worse.

The total runtime is .

]]>They differ only in the type of fringe used. Depth first uses a stack, breadth-first a queue, and both uniform cost and A* use a priority queue. (Uniform cost’s priority is based on the distance from the starting point to a given node, while that of A* is the sum of this distance and the node’s heuristic function.)

]]>

,

where

.

**Example: **where and we are given , the Lagrange polynomial approximating is

.

Examination of the polynomial should make it clear that it is, in a way, the simplest polynomial where at each .

]]>Suppose that is any set of formulas, are formulas, , and that . Then the **Craig Interpolation Theorem** states that there is an -formula , the *interpolant*, such that

and

.

]]>**Sketch of proof: **If itself is inconsistent, then it’s trivial that . Otherwise if is consistent, it’s clear that the problem with consistency is the addition of to , implying that .

.

The implication from right to left is obvious, and the converse can be proven by induction on formulas.

]]>- HashMap is implemented as an array of linked lists, and is the implementation of a hash table most people are probably most familiar with. It offers lookup and insertion, but doesn’t maintain any ordering of its keys.
- TreeMap is implemented as a red-black tree, and so offers lookup and insertion. However, its keys are ordered according to its keys’ implementation of the interface.
- LinkedHashMap is implemented as a linked list and like HashMap offers time, but in addition maintains ordering of its keys according to the order in which they were added to the map.

When to use which? If you need to retrieve keys ordered by their implementation of (perhaps when the keys are Integers or Strings), TreeMap can do that. If you need to retrieve keys ordered by their insertion time (as in a caching system), LinkedHashMap can do that. If neither of these orderings is needed, HashMap is the best go-to, being typically faster with less overhead than the other two options.

]]>Suppose is meromorphic (holomorphic except for on a set of isolated poles) on an open set which contains a closed curve and its interior, and that has no zeroes or poles on . Then

,

where is the number of zeroes of inside , and the number of poles.

]]>