Question:
The situation
Some researchers would like to put you to sleep.  Depending on the secret toss of a fair coin, they will briefly awaken you either once (Heads) or twice (Tails).  After each waking, they will put you back to sleep with a drug that makes you forget that awakening.  When you are awakened, to what degree should you believe that the outcome of the coin toss was Heads?
(OK, maybe you don’t want to be the subject of this experiment!  Suppose instead that Sleeping Beauty (SB) agrees to it (with the full approval of the Magic Kingdom’s Institutional Review Board, of course).  She’s about to go to sleep for one hundred years, so what are one or two more days, anyway?)

[Detail of a Maxfield Parrish illustration.]
Are you a Halfer or a Thirder?
The Halfer position.  Simple! The coin is fair--and SB knows it--so she should believe there's a one-half chance of heads.
The Thirder position. Were this experiment to be repeated many times, then the coin will be heads only one third of the time SB is awakened.  Her probability for heads will be one third.
Thirders have a problem
Most, but not all, people who have written about this are thirders.  But:

On Sunday evening, just before SB falls asleep, she must believe the chance of heads is one-half: that’s what it means to be a fair coin.

Whenever SB awakens, she has learned absolutely nothing she did not know Sunday night.  What rational argument can she give, then, for stating that her belief in heads is now one-third and not one-half?

Some attempted explanations

SB would necessarily lose money if she were to bet on heads with any odds other than 1/3.  (Vineberg, inter alios)

One-half really is correct: just use the Everettian “many-worlds” interpretation of Quantum Mechanics!  (Lewis).

SB updates her belief based on self-perception of her “temporal location” in the world.  (Elga, i.a.)

SB is confused: “[It] seems more plausible to say that her epistemic state upon waking up should not include a definite degree of belief in heads. … The real issue is how one deals with known, unavoidable, cognitive malfunction.”  [Arntzenius]

The question
Accounting for what has already been written on this subject (see the references as well as a previous post), how can this paradox be resolved in a statistically rigorous way?  Is this even possible?

References
Arntzenius, Frank (2002).  Reflections on Sleeping Beauty Analysis 62.1 pp 53-62.
Bradley, DJ (2010).  Confirmation in a Branching World: The Everett Interpretation and Sleeping Beauty.  Brit. J. Phil. Sci. 0 (2010), 1–21.
Elga, Adam (2000).  Self-locating belief and the Sleeping Beauty Problem.  Analysis 60 pp 143-7.
Franceschi, Paul (2005).  Sleeping Beauty and the Problem of World Reduction.  Preprint.
Groisman, Berry (2007).  The end of Sleeping Beauty’s nightmare.  Preprint.
Lewis, D (2001).  Sleeping Beauty: reply to Elga.  Analysis 61.3 pp 171-6.
Papineau, David and Victor Dura-Vila (2008).  A Thirder and an Everettian: a reply to Lewis’s ‘Quantum Sleeping Beauty’.
Pust, Joel (2008).  Horgan on Sleeping Beauty.  Synthese 160 pp 97-101.
Vineberg, Susan (undated, perhaps 2003).  Beauty’s Cautionary Tale.

Strategy
I would like to apply rational decision theory to the analysis, because that is one well-established way to attain rigor in solving a statistical decision problem.  In trying to do so, one difficulty emerges as special: the alteration of SB’s consciousness.

Rational decision theory has no mechanism to handle altered mental states.

In asking SB for her credence in the coin flip, we are simultaneously treating her in a somewhat self-referential manner both as subject (of the SB experiment) and experimenter (concerning the coin flip).

Let’s alter the experiment in an inessential way: instead of administering the memory-erasure drug, prepare a stable of Sleeping Beauty clones just before the experiment begins.  (This is the key idea, because it helps us resist distracting--but ultimately irrelevant and misleading--philosophical issues.)

The clones are like her in all respects, including memory and thought.

SB is fully aware this will happen.

We can clone, in principle.  E. T. Jaynes replaces the question "how can we build a mathematical model of human common sense"--something we need in order to think through the Sleeping Beauty problem--by "How could we build a machine which would carry out useful plausible reasoning, following clearly defined principles expressing an idealized common sense?"  Thus, if you like, replace SB by Jaynes' thinking robot, and clone that.
(There have been, and still are, controversies about "thinking" machines.

"They will never make a machine to replace the human mind—it does many things which no machine could ever do."

You insist that there is something a machine cannot do.  If you will tell me precisely what it is that a machine cannot do, then I can always make a machine which will do just that!”

--J. von Neumann, 1948.  Quoted by E. T. Jaynes in Probability Theory: The Logic of Science, p. 4.)

--Rube Goldberg
The Sleeping Beauty experiment restated
Prepare $n \ge 2$ identical copies of SB (including SB herself) on Sunday evening.  They all go to sleep at the same time, potentially for 100 years. Whenever you need to awaken SB during the experiment, randomly select a clone who has not yet been awakened. Any awakenings will occur on Monday and, if needed, on Tuesday.
I claim that this version of the experiment creates exactly the same set of possible results, right down to SB's mental states and awareness, with exactly the same probabilities.  This potentially is one key point where philosophers might choose to attack my solution.  I claim it's the last point at which they can attack it, because the remaining analysis is routine and rigorous.
Now we apply the usual statistical machinery.  Let's begin with the sample space (of possible experimental outcomes).  Let $M$ mean "awakens Monday" and $T$ mean "awakens Tuesday."  Similarly, let $h$ mean "heads" and $t$ mean "tails".  Subscript the clones with integers $1, 2, \ldots, n$.  Then the possible experimental outcomes can be written (in what I hope is a transparent, self-evident notation) as the set
$$\eqalign{
\{&hM_1, hM_2, \ldots, hM_n, \\
&(tM_1, tT_2), (tM_1, tT_3), \ldots, (tM_1, tT_n), \\
&(tM_2, tT_1), (tM_2, tT_3), \ldots, (tM_2, tT_n), \\
&\cdots, \\
&(tM_n, tT_1), (tM_n, tT_2), \ldots, (tM_n, tT_{n-1}) & \}.
}$$
Monday probabilities
As one of the SB clones, you figure your chance of being awakened on Monday during a heads-up experiment is ($1/2$ chance of heads) times ($1/n$ chance I’m picked to be the clone who is awakened).  In more technical terms:

The set of heads outcomes is $h = \{hM_j, j=1,2, \ldots,n\}$.  There are $n$ of them.

The event where you are awakened with heads is $h(i) = \{hM_i\}$.

The chance of any particular SB clone $i$ being awakened with the coin showing heads equals $$\Pr[h(i)] = \Pr[h] \times \Pr[h(i)|h] = \frac{1}{2} \times
\frac{1}{n} = \frac{1}{2n}.$$

Tuesday probabilities

The set of tails outcomes is $t = \{(tM_j, tT_k): j \ne k\}$.  There are $n(n-1)$ of them.  All are equally likely, by design.

You, clone $i$, are awakened in $(n-1) + (n-1) = 2(n-1)$ of these cases; namely, the $n-1$ ways you can be awakened on Monday (there are $n-1$ remaining clones to be awakened Tuesday) plus the $n-1$ ways you can be awakened on Tuesday (there are $n-1$ possible Monday clones).  Call this event $t(i)$.

Your chance of being awakened during a tails-up experiment equals $$\Pr[t(i)] = \Pr[t] \times P[t(i)|t] = \frac{1}{2} \times  \frac{2(n-1)}{n(n-1)}  = \frac{1}{n}.$$

Bayes' Theorem
Now that we have come this far, Bayes' Theorem--a mathematical tautology beyond dispute--finishes the work.  Any clone's chance of heads is therefore $$\Pr[h | t(i) \cup h(i)] = \frac{\Pr[h]\Pr[h(i)|h]}{\Pr[h]\Pr[h(i)|h] + \Pr[t]\Pr[t(i)|t]} = \frac{1/(2n)}{1/n + 1/(2n)} = \frac{1}{3}.$$
Because SB is indistinguishable from her clones--even to herself!--this is the answer she should give when asked for her degree of belief in heads.
Interpretations
The question "what is the probability of heads" has two reasonable interpretations for this experiment: it can ask for the chance a fair coin lands heads, which is $\Pr[h] = 1/2$ (the Halfer answer), or it can ask for the chance the coin lands heads, conditioned on the fact that you were the clone awakened.  This is $\Pr[h|t(i) \cup h(i)] = 1/3$ (the Thirder answer).
In the situation in which SB (or rather any one of a set of identically prepared Jaynes thinking machines) finds herself, this analysis--which many others have performed (but I think less convincingly, because they did not so clearly remove the philosophical distractions in the experimental descriptions)--supports the Thirder answer.
The Halfer answer is correct, but uninteresting, because it is not relevant to the situation in which SB finds herself.  This resolves the paradox.
This solution is developed within the context of a single well-defined experimental setup.  Clarifying the experiment clarifies the question.  A clear question leads to a clear answer.
Comments
I guess that, following Elga (2000), you could legitimately characterize our conditional answer as "count[ing] your own temporal location as relevant to the truth of h," but that characterization adds no insight to the problem: it only detracts from the mathematical facts in evidence.  To me it appears to be just an obscure way of asserting that the "clones" interpretation of the probability question is the correct one.
This analysis suggests that the underlying philosophical issue is one of identity: What happens to the clones who are not awakened?  What cognitive and noetic relationships hold among the clones?--but that discussion is not a matter of statistical analysis; it belongs on a different forum.


Question: I found two of these objects near a creek in Missouri. They feel like they are made out of bone but they do not look like any bone I have seen before. They also appear as though the could be some sort of plant part. I am having a very difficult time identifying them and any help would be appreciated.

Those are isolated turtle bones:

Specifically, they are part of the carapace, or upper shell. The projections would articulate with the backbone. The "toothlike" structure at the other end projects down toward the margin of the shell.
Based on the size, and the fact that you are in Missouri, I'm guessing they are snapping turtle bones. Here's a photo of the inside of a snapping turtle shell:

They are a little hard to make out, but you can faintly see the marginal projections.


Question:
In computer science, we have often have to solve recurrence relations, that is find a closed form for a recursively defined sequence of numbers. When considering runtimes, we are often interested mainly in the sequence's asymptotic growth.
Examples are

The runtime of a tail-recursive function stepping downwards to $0$ from $n$ whose body takes time $f(n)$:
$\qquad \begin{align}
  T(0) &= 0 \\
  T(n+1) &= T(n) + f(n)
 \end{align}$
The Fibonacci sequence:
$\qquad \begin{align}
  F_0 &= 0 \\
  F_1 &= 1 \\
  F_{n+2} &= F_n + F_{n+1}
 \end{align}$
The number of Dyck words with $n$ parenthesis pairs:
$\qquad\begin{align}
    C_0 &= 1 \\
    C_{n+1}&=\sum_{i=0}^{n}C_i\,C_{n-i}
  \end{align}$
The mergesort runtime recurrence on lists of length $n$:
$\qquad \begin{align}
  T(1) &= T(0) = 0 \\
  T(n) &= T(\lfloor n/2\rfloor) + T(\lceil n/2\rceil) + n-1
 \end{align}$

What are methods to solve recurrence relations? We are looking for

general methods and
methods for a significant subclass

as well as

methods that yield precise solutions and
methods that provide (bounds on) asymptotic growth.

This is supposed to become a reference question. Please post one answer per method and provide a general description as well as an illustrative example.

Converting Full History to Limited History
This is a first step in solving recurrences where the value at any integer depends on the values at all smaller integers.  Consider, for example, the recurrence
$$
T(n) = n + \frac{1}{n}\sum_{k=1}^n \big(T(k-1) + T(n-k)\big)
$$
which arises in the analysis of randomized quicksort.  (Here, $k$ is the rank of the randomly chosen pivot.)  For any integer $n$, the value of $T(n)$ depends on all $T(k)$ with $k<n$.  Recurrences of this form are called full history recurrences.
To solve this recurrence, we can transform it into a limited history recurrence, where $T(n)$ depends on only a constant number of previous values.  But first, it helps to simplify the recurrence a bit, to collect common terms and eliminate pesky fractions.
\begin{align*}
n T(n) &= n^2 + 2\sum_{k=1}^{n-1} T(k)
\end{align*}
Now to convert to a limited-history recurrence, we write down the recurrence for $T(n-1)$, subtract, and regather terms:
\begin{align*}
(n-1) T(n-1) &= (n-1)^2 + 2\sum_{k=1}^{n-2} T(k)
\\
\implies
nT(n) - (n-1)T(n-1) &= (2n-1) + 2T(n-1)
\\[1ex]
\implies
n T(n) &= (2n-1) + (n+1) T(n-1)
\\[1ex]
\implies
\frac{T(n)}{n+1} &= \frac{2n-1}{n(n+1)} + \frac{T(n-1)}{n}
\end{align*}
Now if we define $t(n) = T(n)/(n+1)$ and replace the fraction $\frac{2n-1}{n(n+1)}$ with the simpler asymptotic form $\Theta(1/n)$, we obtain the much simpler recurrence
$$
t(n) = \Theta(1/n) + t(n-1).
$$
Expanding this recurrence into a summation immediately gives us $t(n) = \Theta(H_n) = \Theta(\log n)$, where $H_n$ is the $n$th harmonic number.  We conclude that $\boldsymbol{T(n) = \Theta(n\log n)}$.


Question:
Need to understand the working of 'Embedding' layer in Keras library. I execute the following code in Python
import numpy as np
from keras.models import Sequential
from keras.layers import Embedding

model = Sequential()
model.add(Embedding(5, 2, input_length=5))

input_array = np.random.randint(5, size=(1, 5))

model.compile('rmsprop', 'mse')
output_array = model.predict(input_array)

which gives the following output
input_array = [[4 1 3 3 3]]
output_array =
[[[ 0.03126476  0.00527241]
  [-0.02369716 -0.02856163]
  [ 0.0055749   0.01492429]
  [ 0.0055749   0.01492429]
  [ 0.0055749   0.01492429]]]

I understand that each value in the input_array is mapped to 2 element vector in the output_array, so a 1 X 4 vector gives 1 X 4 X 2 vectors. But how are the mapped values computed?

In fact, the output vectors are not computed from the input using any mathematical operation. Instead, each input integer is used as the index to access a table that contains all possible vectors. That is the reason why you need to specify the size of the vocabulary as the first argument (so the table can be initialized).
The most common application of this layer is for text processing. Let's see a simple example. Our training set consists only of two phrases:
Hope to see you soon
Nice to see you again
So we can encode these phrases by assigning each word a unique integer number (by order of appearance in our training dataset for example). Then our phrases could be rewritten as:
[0, 1, 2, 3, 4]

[5, 1, 2, 3, 6]

Now imagine we want to train a network whose first layer is an embedding layer. In this case, we should initialize it as follows:
Embedding(7, 2, input_length=5)

The first argument (7) is the number of distinct words in the training set. The second argument (2) indicates the size of the embedding vectors. The input_length argument, of course, determines the size of each input sequence.
Once the network has been trained, we can get the weights of the embedding layer, which in this case will be of size (7, 2) and can be thought as the table used to map integers to embedding vectors:
+------------+------------+
|   index    |  Embedding |
+------------+------------+
|     0      | [1.2, 3.1] |
|     1      | [0.1, 4.2] |
|     2      | [1.0, 3.1] |
|     3      | [0.3, 2.1] |
|     4      | [2.2, 1.4] |
|     5      | [0.7, 1.7] |
|     6      | [4.1, 2.0] |
+------------+------------+

So according to these embeddings, our second training phrase will be represented as:
[[0.7, 1.7], [0.1, 4.2], [1.0, 3.1], [0.3, 2.1], [4.1, 2.0]]

It might seem counterintuitive at first, but the underlying automatic differentiation engines (e.g., Tensorflow or Theano) manage to optimize these vectors associated with each input integer just like any other parameter of your model.
For an intuition of how this table lookup is implemented as a mathematical operation which can be handled by the automatic differentiation engines, consider the embeddings table from the example as a (7, 2) matrix. Then, for a given word, you create a one-hot vector based on its index and multiply it by the embeddings matrix, effectively replicating a lookup. For instance, for the word "soon" the index is 4, and the one-hot vector is [0, 0, 0, 0, 1, 0, 0]. If you multiply this (1, 7) matrix by the (7, 2) embeddings matrix you get the desired two-dimensional embedding, which in this case is [2.2, 1.4].
It is also interesting to use the embeddings learned by other methods/people in different domains (see  as done in [1].
[1] López-Sánchez, D., Herrero, J. R., Arrieta, A. G., & Corchado, J. M. Hybridizing metric learning and case-based reasoning for adaptable clickbait detection. Applied Intelligence, 1-16.


Question:
What is the difference between the three terms below?

percentile
quantile
quartile

0 quartile = 0 quantile = 0 percentile
1 quartile = 0.25 quantile = 25 percentile
2 quartile = .5 quantile = 50 percentile (median)
3 quartile = .75 quantile = 75 percentile
4 quartile = 1 quantile = 100 percentile


Question:
I spotted these two in my garden.  What is this insect?  He had firm control over the wasp and was just hanging on by one leg.  He appeared to hold on until the wasp stopped moving and then flew away with it.
I live in Ohio (USA). The wasp was a bit less than 2cm long while the other insect was about 2.5cm long.

Given the large eyes, the almost non-existent antennae, the humped back, elongated abdomen and the wings, I'd say it is a robber fly.

It is one of many insects known to prey on wasps.
Note the description on the linked page:

This spindly piece of nastiness is a Robber Fly in the genus Diogmites. It seems that it's members of this particular genus that are adorned with the name Hanging Thief. You may remember that this was to denote their habit of dangling from a leg or two while the other limbs held onto prey, stabbed it to death with venom and then sucked out the insides. [Emphasis mine.]


Question: I have seen it mentioned that dependent type systems are not inferable, but are checkable. I was wondering if there is a simple explanation of why that is so, and whether or not there is there a limit of "dependency" where types can be indexed by values, below which type inference is possible and above which it is not?

For a rather simple version of dependent type theory, Gilles Dowek gave a proof of undecidability of typability in a non-empty context:
Gilles Dowek, The undecidability of typability in the $\lambda\Pi$-calculus
Which can be found here.
First let me clarify what is proven in that paper: he shows that in a dependent calculus without annotations on the abstractions, it is undecidable to show typeability of a term in a non-empty context. Both of those hypotheses are necessary: in the empty context, typability reduces to that of the simply-typed $\lambda$-calculus (decidable by Hindley-Milner) and with the annotations on the abstractions, the usual type-directed algorithm applies.
The idea is to encode a Post correspondence problem as a type conversion problem, and then carefully construct a term which is typeable iff the two specific types are convertible. This uses knowledge of the shape of normal forms, which always exist in this calculus. The article is short and well-written, so I won't go into more detail here.
Now in polymorphic calculi like system-F, it would be nice to be able to infer the type abstractions and applications, and omit the annotations on $\lambda$s as above. This is also undecidable, but the proof is much harder and the question was open for quite some time. The matter was resolved by Wells:
J. B. Wells, Typability and type checking in System F are equivalent and undecidable.
This can be found here. All I know about it is that it reduces the problem of semi-unification (which is unification modulo instantiation of universal quantifiers, and is undecidable) to type checking in System F.
Finally it is quite easy to show that inhabitation of dependent families is undecidable: simply encode a Post problem into the constructor indices. Here are some slides by Nicolas Oury that sketch the argument.
As to whether there is a "limit", it much depends on what you are trying to do with your dependent types, and there are many approximations which try to be either decidable, or at least close enough to be usable. These questions are still very much part of active research though.
One possible avenue is the field of "refinement types" where the language of expression of type dependencies is restricted to allow for decidable checking see, e.g. Liquid Types. It's rare that full type inference is decidable even in these systems though.


Question: Are there some good sites or blogs where I can keep myself updated on the latest news and papers about image and signal processing research, or I should just check out "classical" providers like IEEE Transactions, Elsevier, etc?

There are many for different subjects -

Efg's algorithm collection :
DSP Forum :
Data compression -
About rendering -
For all research papers -
Resources on Mp3 and Audio -
Steve on Image Processing -
Image Processing and Retrieval
Accelerated Image Processing -
The Digital Signal Processing Blog -
Noise & Vibration Measurement Blog -
Image Processing with Matlab, Open Blog -


Question:
The state of the art of non-linearity is to use rectified linear units (ReLU) instead of sigmoid function in deep neural network. What are the advantages?
I know that training a network when ReLU is used would be faster, and it is more biological inspired, what are the other advantages? (That is, any disadvantages of using sigmoid)?

Two additional major benefits of ReLUs are sparsity and a reduced likelihood of vanishing gradient. But first recall the definition of a ReLU is $h = \max(0, a)$ where $a = Wx + b$.
One major benefit is the reduced likelihood of the gradient to vanish. This arises when $a > 0$. In this regime the gradient has a constant value. In contrast, the gradient of sigmoids becomes increasingly small as the absolute value of x increases. The constant gradient of ReLUs results in faster learning.
The other benefit of ReLUs is sparsity. Sparsity arises when $a \le 0$. The more such units that exist in a layer the more sparse the resulting representation. Sigmoids on the other hand are always likely to generate some non-zero value resulting in dense representations. Sparse representations seem to be more beneficial than dense representations.


Question: I am doing a research project involving calculating k-mer frequencies and I am wondering if there is any standard file format for storing k-mer counts.

Not as far as I am aware. The Ray assembler used to (and possibly still does) store the kmers as FASTA files where the header was the count of the sequence, which I thought was a pretty neat bastardisation of the FASTA file format. It looks like this format is also used by Jellyfish when reporting kmer frequencies by the dump command (but its default output format is a custom binary format):

The dump subcommand outputs a list of all the k-mers in the file associated with their count. By default, the output is in FASTA format, where the header line contains the count of the k-mer and the sequence part is the sequence of the k-mer. This format has the advantage that the output contains the sequence of k-mers and can be directly fed into another program expecting the very common FASTA format. A more convenient column format (for human beings) is selected with the -c  switch.

Jellyfish changed their internal format between v1 and v2 (both not FASTA), because they changed to doing counts based on bloom filters. Jellyfish2 has an optional two-pass method that sets up a bloom filter intermediate file to record kmers, and multiple different final reporting formats.
Khmer also uses bloom filters, but in a slightly different way. It also has been extended to be useful for partitioning and comparing datasets.


Question:
There are a number of different libraries out there that solve a sparse linear system of equations, however I'm finding it difficult to figure out what the differences are.
As far as I can tell there are three major packages:  Trilinos, PETSc, and Intel MKL.  They can all do sparse matrix solves, they are all fast (as far as I can tell, I haven't been able to find solid benchmarks on any of them), and they are all parallelizable.  What I can't find is the differences.
So, what are the differences between the different sparse linear system solvers out there?

There are many more out there, all with different goals and views of the problems.  It really depends on what you are trying to solve.  Here is an incomplete list of packages out there.  Feel free to add more details.
Large Distributed Iterative Solver Packages

PETSc — packages focused around Krylov subspace methods and easy switching between linear solvers.  Much lighter weight than others in this category.
Trilinos — a large set of packages aimed at FEM applications
Hypre — similar to the two above. Notable because of its very good multigrid solvers (which can be downloaded by PETSc).

Parallel Direct Solver Packages

MUMPS
SuperLU

Serial Direct Solver Packages

SuiteSparse — UMFPACK is a really good solver, but many other special purpose solvers exist here.
Intel Math Kernel Library — High-quality library from Intel; also has a Parallel Iterative Solver (but nothing massively parallel).
Matrix Template Library — Generics can sometimes make the code much faster.

Interactive Environments (more for very small systems)

MATLAB — industry standard
SciPy.Sparse — if you like Python
Mathematica — supports the manipulation of SparseArray[] objects.

Other Lists

Jack Dongarra's list of Freely Available Software for Linear Algebra.


Question:
From my layman understanding, animals that inject venom into the bloodstream by biting or poking are venomous. And ones that harm you when you eat them are poisonous.
Are there any animals (or plants) that fit both descriptions?
I'm guessing eating a venomous rattlesnake will give you an upset stomach but not cause enough damage to be classified as poisonous. And I'm pretty sure poisonous tree frogs don't bite into their prey and inject them with anything.

That is certainly an interesting question!
First, to clarify definitions:
To be considered venomous the toxic substance must be produced in specialized glands or tissue. Often these are associated with some delivery apparatus (fangs, stinger, etc.), but not necessarily.
To be poisonous, the toxins must be produced in non-specialized tissues and are only toxic after ingestion.
Interestingly, many venoms are not poisonous if ingested.[1]
I know of at least three species that produce both poison and venom. One is a snake (although not a rattlesnake, which are, in fact, edible): Rhabdophis tigrinus, which accumulates toxins in its tissues, but also delivers venom via fangs.[2] The other two are frogs: Corythomantis greeningi and Aparasphenodon brunoi, which have spines on their snout that they use to deliver the venom.[3]

[1] Meier and White (eds.). 1995. Handbook of clinical toxicology of animal venoms and poisons. Boca Raton, Fla.: CRC Press, 477p.
[2] Hutchinson et al. 2007. Dietary sequestration of defensive steroids in nuchal glands of the Asian snake Rhabdophis tigrinus. PNAS 104(7): 2265-2270.
[3] Jared et al. 2015. Venomous frogs use heads as weapons. Current Biology 25, 2166-2170.


Question:
What is the impact of mental activity on the energy consumption of the human brain?
I am most interested in intellectually demanding tasks (e.g., chess matches, solving a puzzle, taking a difficult exam) versus tasks with a similar posture but less demanding (e.g., reading a newspaper, watching TV).
I heard that energy consumption stays remarkably constant regardless of the mental activity (and energy consumption can be explained by elevated heart rate due to stress). However, it seems to contradict techniques such as fMRI, where the change in metabolism is measured (unless the relative change is really small).

The energy consumption doesn't vary that much between resting and performing tasks, as discussed in a review by Marcus Raichle and Mark A. Mintun:

In the average adult human, the brain represents approximately 2% of
the total body weight but approximately 20% of the energy consumed
(Clark & Sokoloff 1999), 10 times that predicted by its weight alone.
Relative to this high rate of ongoing or “basal” metabolism (usually
measured while resting quietly awake with eyes closed), the amount
dedicated to task-evoked regional imaging signals is remarkably small.
The regional increases in absolute blood flow associated with imaging
signals as measured with PET are rarely more than 5%–10% of the
resting blood flow of the brain. These are modest modulations in
ongoing circulatory activity that rarely affect the overall rate of
brain blood flow during even the most arousing perceptual and vigorous
motor activity (Fox et al. 1987, Friston et al. 1990, Lennox 1931,
Madsen et al. 1995, Roland et al. 1987, Sokoloff et al. 1955).
[...]
From knowledge of these relationships, one can estimate that if blood flow and glucose utilization increase by 10%, but oxygen consumption does not, the local energy consumption increase owing to a typical task-related response could be as little as 1%. It becomes clear, then, that the brain continuously expends a considerable amount of energy even in the absence of a particular task (i.e., when a subject is awake and at rest).

Techniques like fMRI measure relatively small differences, their existence does not contradict the claim that the energy consumption of the brain doesn't change a lot between the resting state and performing an activity.

1. Raichle ME, Mintun MA. BRAIN WORK AND BRAIN IMAGING. Annual Review of Neuroscience 2006 Jul;29(1):449-476.


Question:
This has been one of the holes in my cheddar cheese block of understanding DSP, so what is the physical interpretation of having a negative frequency?
If you have a physical tone at some frequency and it is DFT'd, you get a result in both the positive and negative frequencies - why and how does this occur? What does it mean?
Edit: Oct 18th 2011. I have provided my own answer, but expanded the question to include the roots of why negative frequencies MUST exist.

Negative frequency doesn't make much sense for sinusoids, but the Fourier transform doesn't break up a signal into sinusoids, it breaks it up into complex exponentials (also called "complex sinusoids" or "cisoids"):
$$F(\omega) = \int_{-\infty}^{\infty} f(t) \color{Red}{e^{- j\omega t}}\,dt$$
These are actually spirals, spinning around in the complex plane:

(Source: Richard Lyons)
Spirals can be either left-handed or right-handed (rotating clockwise or counterclockwise), which is where the concept of negative frequency comes from.  You can also think of it as the phase angle going forward or backward in time.
In the case of real signals, there are always two equal-amplitude complex exponentials, rotating in opposite directions, so that their real parts combine and imaginary parts cancel out, leaving only a real sinusoid as the result.  This is why the spectrum of a sine wave always has 2 spikes, one positive frequency and one negative.  Depending on the phase of the two spirals, they could cancel out, leaving a purely real sine wave, or a real cosine wave, or a purely imaginary sine wave, etc.
The negative and positive frequency components are both necessary to produce the real signal, but if you already know that it's a real signal, the other side of the spectrum doesn't provide any extra information, so it's often hand-waved and ignored.  For the general case of complex signals, you need to know both sides of the frequency spectrum.


Question:
I am wondering how to choose a predictive model after doing K-fold cross-validation.
This may be awkwardly phrased, so let me explain in more detail: whenever I run K-fold cross-validation, I use K subsets of the training data, and end up with K different models.
I would like to know how to pick one of the K models, so that I can present it to someone and say "this is the best model that we can produce."
Is it OK to pick any one of the K models? Or is there some kind of best practice that is involved, such as picking the model that achieves the median test error?

I think that you are missing something still in your understanding of the purpose of cross-validation.
Let's get some terminology straight, generally when we say 'a model' we refer to a particular method for describing how some input data relates to what we are trying to predict. We don't generally refer to particular instances of that method as different models. So you might say 'I have a linear regression model' but you wouldn't call two different sets of the trained coefficients different models. At least not in the context of model selection.
So, when you do K-fold cross validation, you are testing how well your model is able to get trained by some data and then predict data it hasn't seen. We use cross validation for this because if you train using all the data you have, you have none left for testing. You could do this once, say by using 80% of the data to train and 20% to test, but what if the 20% you happened to pick to test happens to contain a bunch of points that are particularly easy (or particularly hard) to predict? We will not have come up with the best estimate possible of the models ability to learn and predict.
We want to use all of the data. So to continue the above example of an 80/20 split, we would do 5-fold cross validation by training the model 5 times on 80% of the data and testing on 20%. We ensure that each data point ends up in the 20% test set exactly once. We've therefore used every data point we have to contribute to an understanding of how well our model performs the task of learning from some data and predicting some new data.
But the purpose of cross-validation is not to come up with our final model. We don't use these 5 instances of our trained model to do any real prediction. For that we want to use all the data we have to come up with the best model possible. The purpose of cross-validation is model checking, not model building.
Now, say we have two models, say a linear regression model and a neural network. How can we say which model is better? We can do K-fold cross-validation and see which one proves better at predicting the test set points. But once we have used cross-validation to select the better performing model, we train that model (whether it be the linear regression or the neural network) on all the data. We don't use the actual model instances we trained during cross-validation for our final predictive model.
Note that there is a technique called bootstrap aggregation (usually shortened to 'bagging') that does in a way use model instances produced in a way similar to cross-validation to build up an ensemble model, but that is an advanced technique beyond the scope of your question here.


Question:
Right now I stuck with a problem. It seems to be really trivial one, but still it is hard for me to find an appropriate solution. The problem is:
One has two intervals and are to find the intersection of them.
For instance:

Intersection of [0, 3]&[2, 4] is [2, 3]
Intersection of [-1, 34]&[0, 4] is [0, 4]
Intersection of [0, 3]&[4, 4] is empty set

It is pretty clear that the problem can be solved by using tests of all possible cases, but it will take a lot of time and is very prone to mistakes. Are there any easier way to tackle the problem? If you know the solution help me, please. Will be very grateful.

We can define a solution to this problem in the following way. Assume the input intervals can be defined as $I_{a} = [a_s, a_e]$ and $I_{b} = [b_s, b_e]$, while the output interval is defined as $I_{o} = [o_s, o_e]$. We can find the intersection $I_{o} = I_{a} \bigcap I_{b}$ doing the following:
if ( $b_s \gt a_e$ or $a_s \gt b_e$ ) {
return $\emptyset$ }
else {
$o_s = \max (a_s,b_s)$
$o_e = \min (a_e,b_e)$
return $[o_s,o_e]$
}


Question:
I'm studying some DSP and I'm having trouble understanding the difference between phase delay and group delay.
It seems to me that they both measure the delay time of sinusoids passed through a filter.

Am I correct in thinking this?
If so, how do the two measurements differ?
Could someone give an example of a situation in which one measurement would be more useful than the other?

UPDATE
Reading ahead in Julius Smith's Introduction to Digital Filters, I've found a situation where the two measurements at least give different results: affine-phase filters. That's a partial answer to my question, I guess.

First of all the definitions are different:

Phase delay: (the negative of) Phase divided by frequency
Group delay: (the negative of) First derivative of phase vs frequency

In words that means:

Phase delay: Phase angle at this point in frequency
Group delay: Rate of change of the phase around this point in frequency.

When to use one or the other really depends on your application. The classical application for group delay is modulated sine waves, for example AM radio. The time that it takes for the modulation signal to get through the system is given by the group delay not by the phase delay. Another audio example could be a kick drum: This is mostly a modulated sine wave so if you want to determine how much the kick drum will be delayed (and potentially smeared out in time) the group delay is the way to look at it.


Question:
ERCC spike-in is a set of synthetic controls developed for RNA-Seq. I'm interested in using it to normalize my RNA-Seq samples. In particular, I'd like to use the spike-ins to remove technical bias and any variation that should not be part of my analysis.
The site doesn't give any details on how I can do that.
Q: What are the possible normalization strategies? Can you briefly describe them?

You may consider using RUVSeq. Here is an excerpt from the 2013 Nature Biotechnology publication:

We evaluate the performance of the External RNA Control Consortium (ERCC) spike-in controls and investigate the possibility of using them directly for normalization. We show that the spike-ins are not reliable enough to be used in standard global-scaling or regression-based normalization procedures. We propose a normalization strategy, called remove unwanted variation (RUV), that adjusts for nuisance technical effects by performing factor analysis on suitable sets of control genes (e.g., ERCC spike-ins) or samples (e.g., replicate libraries).

RUVSeq essentially fits a generalized linear model (GLM) to the expression data, where your expression matrix $Y$ is a $m$ by $n$ matrix, where $m$ is the number of samples and $n$ the number of genes. The model boils down to
$Y = X*\beta + Z*\gamma + W*\alpha + \epsilon$
where $X$ describes the conditions of interest (e.g., treatment vs. control), $Z$ describes observed covariates (e.g., gender) and $W$ describes unobserved covariates (e.g., batch, temperature, lab). $\beta$, $\gamma$ and $\alpha$ are parameter matrices which record the contribution of $X$, $Z$ and $W$, and $\epsilon$ is random noise. For subset of carefully selected genes (e.g., ERCC spike-ins, housekeeping genes, or technical replicates) we can assume that $X$ and $Z$ are zero, and find $W$ - the "unwanted variation" in your sample.


Question:
Normally in algorithms we do not care about comparison, addition, or subtraction of numbers -- we assume they run in time $O(1)$.  For example, we assume this when we say that comparison-based sorting is $O(n\log n)$, but when numbers are too big to fit into registers, we normally represent them as arrays so basic operations require extra calculations per element.
Is there a proof showing that comparison of two numbers (or other primitive arithmetic functions) can be done in $O(1)$? If not why are we saying that comparison based sorting is $O(n\log n)$?

I encountered this problem when I answered a SO question and I realized that my algorithm is not $O(n)$ because sooner or later I should deal with big-int, also it wasn't pseudo polynomial time algorithm, it was $P$.

For people like me who study algorithms for a living, the 21st-century standard model of computation is the integer RAM.  The model is intended to reflect the behavior of real computers more accurately than the Turing machine model.  Real-world computers process multiple-bit integers in constant time using parallel hardware; not arbitrary integers, but (because word sizes grow steadily over time) not fixed size integers, either.
The model depends on a single parameter $w$, called the word size.  Each memory address holds a single $w$-bit integer, or word.  In this model, the input size $n$ is the number of words in the input, and the running time of an algorithm is the number of operations on words.  Standard arithmetic operations (addition, subtraction, multiplication, integer division, remainder, comparison) and boolean operations (bitwise and, or, xor, shift, rotate) on words require $O(1)$ time by definition.
Formally, the word size $w$ is NOT a constant for purposes of analyzing algorithms in this model.  To make the model consistent with intuition, we require $w \ge \log_2 n$, since otherwise we cannot even store the integer $n$ in a single word.   Nevertheless, for most non-numerical algorithms, the running time is actually independent of $w$, because those algorithms don't care about the underlying binary representation of their input.  Mergesort and heapsort both run in $O(n\log n)$ time; median-of-3-quicksort runs in $O(n^2)$ time in the worst case.  One notable exception is binary radix sort, which runs in $O(nw)$ time.
Setting $w = \Theta(\log n)$ gives us the traditional logarithmic-cost RAM model.  But some integer RAM algorithms are designed for larger word sizes, like the linear-time integer sorting algorithm of Andersson et al., which requires $w = \Omega(\log^{2+\varepsilon} n)$.
For many algorithms that arise in practice, the word size $w$ is simply not an issue, and we can (and do) fall back on the far simpler uniform-cost RAM model.  The only serious difficulty comes from nested multiplication, which can be used to build very large integers very quickly.  If we could perform arithmetic on arbitrary integers in constant time, we could solve any problem in PSPACE in polynomial time.
Update: I should also mention that there are exceptions to the "standard model", like Fürer's integer multiplication algorithm, which uses multitape Turing machines (or equivalently, the "bit RAM"), and most geometric algorithms, which are analyzed in a theoretically clean but idealized "real RAM" model.
Yes, this is a can of worms.


Question:
Self driving cars rely on cameras, radar, and lidar to recognize the environment around them.  Cameras of course don't interfere with each other, since they are passive sensors.  Since a signal received directly from another transmitter is much stronger than a reflected signal from your own transmitter, what stops the transmitted signals from one radar/lidar interfering with the receiver of another?
Will radar/lidar still work when all cars are equipped with them?  Assuming that they will, how will this be accomplished?

You'd be surprised.
This is actually topic of ongoing research, and of several PhD dissertations.
The question which radar waveforms and algorithms can be used to mitigate interference is a long-fought over one; in essence, however, this breaks down to the same problem that any ad-hoc communication system has.
Different systems solve that differently; you can do coded radars, where you basically do the same as in CDMA systems and divide your spectrum by giving each car a collision-free code sequence. The trick is coordinating these codes, but an observation phase and collision detection might be sufficient here.
More likely to succeed is collision detection and avoidance in time: simply observe the spectrum for radar bursts of your neighbors, and (assuming some regularity), extrapolate when they won't be transmitting. Use that time.
Notice that wifi solves this problem inherently, much like described above, in a temporal fashion. In fact, you can double-use your Wifi packets as radar signals and do a radar estimation on their reflection. And since automotive radar (802.11p) is a thing, and the data you'd send is known to you and also unique, you could benefit from the orthogonal correlation properties of a coded radar and the higher spectral density and thus increased estimate quality of time-exclusive transmission.
There's a dissertation which IMHO aged well on that, and it's Martin Braun: OFDM Radar Algorithms in Mobile Communication Networks, 2014.


Question:
This morning I found a really strange ice formation in my garden. I can't figure out how it appeared, because there was nothing above. The night was particularly cold (Belgium).
To give an idea, it has the size of a common mouse (5 cm of Height and 2 cm for the base of the inverted pyramid).

Congratulations, you found an inverted pyramid ice spike, sometimes called an ice vase!
The Bally-Dorsey model of how it happens is that first the surface of the water freezes, sealing off the water below except for a small opening. If the freezing rate is high enough the expansion of ice under the surface will increase pressure (since the ice is less dense than the water and displaces more volume), and this forces water up through the opening, where it will freeze around the rim. As the process goes on a spike emerges.
If the initial opening or the crystal planes near it are aligned in the right way the result is a pyramid rather than a cylinder/spike.
The process is affected by impurities, the water has to be fairly clean. It also requires fairly low temperatures so freezing is fast enough (but not too fast).


Question:
The Journal of Computational Physics has been an important outlet for computational science in the past, and I have published there before.  For the benefit of those (like me) who have signed the Elsevier boycott, what non-Elsevier journals would be appropriate places to publish articles that could have been submitted to the Journal of Computational Physics?
A good alternative should:

Overlap (at least partially) in subject matter with JCP
Have a good reputation
Not be published by Elsevier

Note: When I say "reputation", I don't mean impact factor.  Please see this article that demonstrates that the two are not well-correlated in this field.

The SIAM Journals, especially SISC (Scientific Computing) and MMS (Multiscale Modeling and Simulation) are obvious established and high-quality choices.


Question: Why draw blood from veins rather than arteries? Is it more convenient or safer?

Veins have several advantages over arteries. From a purely practical standpoint, veins are easier to access due to their superficial location compared to the arteries which are located deeper under the skin. They have thinner walls (much less smooth muscle surrounding them) than arteries, and have less innervation, so piercing them with a needle requires less force and doesn't hurt as much. Venous pressure is also lower than arterial pressure, so there is less of a chance of blood seeping back out through the puncture point before it heals. Because of their thinner walls, veins tend to be larger than the corresponding artery in the area, so they hold more blood, making collection easier and faster.
Finally, it is somewhat safer if a small embolism (bubble in the blood) is introduced into a vein rather than an artery. Blood flow in veins always goes to larger and larger vessels, so there is very little chance of a vessel being blocked by the embolism before the bubble reaches the heart/lungs and is hopefully destroyed. Blood flow in an artery, on the other hand, always moves into smaller and smaller vessels, eventually ending in capilllaries, and there is a chance that a bubble introduced by a blood draw (generally rare) or more commonly an intravenous line (IV) could block a small blood vessel, potentially leading to hypoxia in the affected tissues.


Question: It seems that a number of the statistical packages that I use wrap these two concepts together. However, I'm wondering if there are different assumptions or data 'formalities' that must be true to use one over the other. A real example would be incredibly useful.

Principal component analysis involves extracting linear composites of observed variables.
Factor analysis is based on a formal model predicting observed variables from theoretical latent factors.
In psychology these two techniques are often applied in the construction of multi-scale tests
 to determine which items load on which scales.
They typically yield similar substantive conclusions (for a discussion see Comrey (1988) Factor-Analytic Methods of Scale Development in Personality and Clinical Psychology).
This helps to explain why some statistics packages seem to bundle them together.
I have also seen situations where "principal component analysis" is incorrectly labelled "factor analysis".
In terms of a simple rule of thumb, I'd suggest that you:

Run factor analysis if you  assume or wish to test a theoretical model of latent factors causing observed variables.
Run principal component analysis If you want to simply reduce your correlated observed variables to a smaller set of important independent composite variables.


Question: Hydrogen is flammable, and for any fire to burn it needs oxygen. Why does a compound made of hydrogen and oxygen put out fires instead of catalyzing them? I understand that hydrogen and water are chemically different compounds, but what causes water to be non-flammable?

You can think of water as the ash from burning hydrogen: it's already given off as much energy as possible from reacting hydrogen with oxygen.
You can, however, still burn it.  You just need an even stronger oxidizer than oxygen.  There aren't many of them, but fluorine will work,
$$
\ce{2F2 + 2H2O -> 4HF + O2}
$$
as will chlorine trifluoride:
$$
\ce{ClF3 + 2H2O -> 3HF + HCl + O2}
$$


Question:
The Fast Fourier Transform algorithm computes a Fourier decomposition under the assumption that its input points are equally spaced in the time domain, $t_k = kT$. What if they're not? Is there another algorithm I could use, or some way I could modify the FFT, to account for what is effectively a variable sampling rate?
If the solution depends on how the samples are distributed, there are two particular situations I'm most interested in:

Constant sampling rate with jitter: $t_k = kT + \delta t_k$ where $\delta t_k$ is a randomly distributed variable. Suppose it's safe to say $|\delta t_k| < T/2$.
Dropped samples from an otherwise constant sampling rate: $t_k = n_k T$ where $n_k \in\mathbb{Z}\ge k$

Motivation: first of all, this was one of the higher voted questions on the proposal for this site. But in addition, a while ago I got involved in a discussion about FFT usage (prompted by a question on Stack Overflow) in which some input data with unevenly sampled points came up. It turned out that the timestamps on the data were wrong, but it got me thinking about how one could tackle this problem.

There is a wide variety of techniques for non-uniform FFT, and the most efficient ones are all meant for exactly your case: quasi-uniform samples. The basic idea is to smear the unevenly sampled sources onto a slightly finer ("oversampled") uniform grid though local convolutions against Gaussians. A standard FFT can then be run on the oversampled uniform grid, and then the convolution against the Gaussians can be undone. Good implementations are something like $C^d$ times more expensive than a standard FFT in $d$ dimensions, where $C$ is something close to 4 or 5.
I recommend reading Accelerating the Nonuniform Fast Fourier Transform by Greengard and Lee.
There also exist fast, i.e., $O(N^d \log N)$ or faster, techniques when the sources and/or evaluation points are sparse, and there are also generalizations to more general integral operators, e.g., Fourier Integral Operators. If you are interested in these techniques, I recommend Sparse Fourier transform via butterfly algorithm and A fast butterfly algorithm for the computation of Fourier Integral Operators. The price paid in these techniques versus standard FFT's is a much higher coefficient. Disclaimer: My advisor wrote/cowrote those two papers, and I have spent a decent amount of time parallelizing those techniques.
An important point is that all of the above techniques are approximations that can be made arbitrarily accurate at the expense of longer runtimes, whereas the standard FFT algorithm is exact.


Question: In non-relativistic QM, the $\Delta E$ in the time-energy uncertainty principle is the limiting standard deviation of the set of energy measurements of $n$ identically prepared systems as $n$ goes to infinity. What does the $\Delta t$ mean, since $t$ is not even an observable?

Let a quantum system with Hamiltonian $H$ be given.  Suppose the system occupies a pure state $|\psi(t)\rangle$ determined by the Hamiltonian evolution.  For any observable $\Omega$ we use the shorthand
$$
  \langle \Omega \rangle = \langle \psi(t)|\Omega|\psi(t)\rangle.
$$
One can show that (see eq. 3.72 in Griffiths QM)
$$
  \sigma_H\sigma_\Omega\geq\frac{\hbar}{2}\left|\frac{d\langle \Omega\rangle}{dt}\right|
$$
where $\sigma_H$ and $\sigma_\Omega$ are standard deviations
$$
  \sigma_H^2 = \langle H^2\rangle-\langle H\rangle^2, \qquad \sigma_\Omega^2 = \langle \Omega^2\rangle-\langle \Omega\rangle^2
$$
and angled brackets mean expectation in $|\psi(t)\rangle$.  It follows that if we define
$$
  \Delta E = \sigma_H, \qquad \Delta t = \frac{\sigma_\Omega}{|d\langle\Omega\rangle/dt|}
$$
then we obtain the desired uncertainty relation
$$
  \Delta E \Delta t \geq \frac{\hbar}{2}
$$
It remains to interpret the quantity $\Delta t$.  It tells you the approximate amount of time it takes for the expectation value of an observable to change by a standard deviation provided the system is in a pure state.  To see this, note that if $\Delta t$ is small, then in a time $\Delta t$ we have
$$
  |\Delta\langle\Omega\rangle| =\left|\int_t^{t+\Delta t} \frac{d\langle \Omega\rangle}{dt}\,dt\right| \approx \left|\frac{d\langle \Omega\rangle}{dt}\Delta t\right| = \left|\frac{d\langle \Omega\rangle}{dt}\right|\Delta t = \sigma_\Omega
$$


Question:
One can imagine that a particular organism would be improved if it were to acquire certain traits — perhaps those found in a different organism (e.g. flight, photosynthesis, nitrogen fixation). Or alternatively one might consider that the solutions certain organisms have evolved to problems they face are inferior to others one could envisage (e.g. in energy efficiency). Why haven’t these improvements or better solutions evolved?
Indeed, there are even traits that have become established that have deleterious effects (e.g. certain anaemias). Why haven’t these been eliminated by evolution?
In other words: “Why isn’t evolution operating towards ‘perfection’?”

This is a general question that would be applicable for any kind of trait. Please keep the answers precise and scientific.
Read this meta post for more information: Questions asking for evolutionary reasons

During the process of selection, individuals having disadvantageous traits are weeded out. If the selection pressure isn't strong enough then mildly disadvantageous traits will continue to persist in the population.
So the reasons for why a trait is not evolved even though it may be advantageous to the organism, are:

There is no strong pressure against the individuals not having that trait. In other words lack of the trait is not strongly disadvantageous.
The trait might have a tradeoff which essentially makes no change to the overall fitness.
Not enough time has elapsed for an advantageous mutation to get fixed. This doesn't mean that the mutation had not happened yet. It means that the situation that rendered the mutation advantageous had arisen quite recently. Consider the example of a mutation that confers resistance against a disease. The mutation wouldn't be advantageous if there was no disease. When a population encounters the disease for the first time, then the mutation would gain advantage but it will take some time to establish itself in the population.
The rate for that specific mutation is low and therefore it has not yet happened. Mutation rates are not uniform across the genome and certain regions acquire mutations faster than the others. Irrespective of that, if the overall mutation rate is low then it would take a lot of time for a mutation to arise and until then its effects cannot be seen.
The specific trait is too genetically distant: it cannot be the result of a mutation in a single generation. It might, conceivably, develop after successive generations, each mutating farther, but if the intervening mutations are at too much of a disadvantage, they will not survive to reproduce and allow a new generation to mutate further away from the original population.
The disadvantage from not having the trait normally arises only after the reproductive stage of the individual's lifecycle is mostly over.  This is a special case of "no strong pressure", because evolution selects genes, not the organism. In other words the beneficial mutation does not alter the reproductive fitness.
Koinophillia resulted in the trait being unattractive to females. Since most mutations are detrimental females don't want to mate with anyone with an obvious mutation, since there is a high chance it will be harmful to their child.  Thus females instinctually find any obvious physical difference unattractive, even if it would have been beneficial.  This tends to limit the rate or ability for physical differences to appear in a large & stable mating community.

Evolution is not a directed process and it does not actively try to look for an optimum. The fitness of an individual does not have any meaning in the absence of the selection pressure.

*If you have a relevant addition then please feel free to edit this answer.*


Question:
Towels (and coats) are often stored on hooks, like this:

To the untrained eye, it looks like the towel will slide off from its own weight. The hook usually angles upwards slightly, but a towel does not have any "handle" to string around and hang on to the hook -- this makes it seem like it will simply slide off.
Yet these hooks hold towels well, even heavy bath towels. Why?

I have three ideas:

There is sufficient friction between the towel and the hook to counteract the force of the towel pulling down.
The hook is angled such that the force is directed into the hook, not directed to slide the towel off of it.
The center of mass of the towel ends up below the hook, since the towel is hanging against the wall.

Which of these ideas are likely correct? I am also happy with an answer based purely on theoretical analysis of the forces involved.

Since this is PhysicsSE, I am happy with an answer based purely on theoretical analysis of the forces involved.

Oh boy, time to spend way too much time on a response.
Lets assume the simple model of a peg that makes an angle $\alpha$ with the wall and ends in a circular cap of radius $R$. Then a towel of total length $L$ and linear mass density $\rho$ has three parts: one part that hangs vertically, one that curves over the circular cap, and one that rests on the inclined portion like drawn. This is very simplistic, but it does encapsulate the basic physics. Also, we ignore the folds of the towel.

Let $s$ be the length of the towel on the inclined portion of the peg. I will choose a generalized $x$-axis that follows the curve of the peg. Note this model works for both the front-back direction and side-side direction of the peg. In the side-side (denoted $z$) $\alpha$ is simply zero (totally vertical):

Where $\eta$ is the fraction of the towel on the right side of the picture. Then the total gravitational force $F_{g,x}$ will be:
$$ F_{g,x} = \rho g (L - R(\pi - \alpha) - s(1 + \cos(\alpha)) - \int^{\pi/2 - \alpha}_{-\pi/2} \rho g R \sin(\theta)\,\mathrm d\theta $$
$$ F_{g,x} = \rho g (L + R(\sin(\alpha) - \pi + \alpha) - s(1 + \cos(\alpha)) $$
The infinitesimal static frictional force will be $\mathrm df_{s,x} = -\mu_s\,\mathrm dN$. $N$ is constant on the inclined part and varies with $\theta$ over the circular cap as $\mathrm dN = \rho g R \cos(\theta)\,\mathrm d\theta$. Then:
$$ f_s = -\mu_s \rho g s \sin(\alpha) - \int^{\pi/2-\alpha}_{-\pi/2} \mu_s \rho g R \cos(\theta)\,\mathrm d\theta$$
$$ f_s = -\mu_s \rho g ( s \sin(\alpha) + R(\cos(\alpha)+1) )$$
Now we can set the frictional force equal to the gravitational force and solve for what values of $\mu_s$ will satisfy static equilibrium. You get:
$$\mu_s = \frac{L + R(\sin(\alpha) +\alpha - \pi) - s(\cos(\alpha)+1)}{R(\cos(\alpha) + 1) + s\sin(\alpha)} $$
$$\mu_s = \frac{1 + \gamma(\sin(\alpha) +\alpha - \pi) - \eta(\cos(\alpha)+1)}{\gamma(\cos(\alpha) + 1) + \eta\sin(\alpha)} $$
where the second line $\gamma = R/L$ and $\eta = s/L$, the fraction of the towel on the peg's cap and incline, respectively. Thus $\mu_s$ depends on three factors:

The angle of the peg, $\alpha$
The fraction of the towel past the cap of the peg, $\eta$.
The fraction of the towel on the circular cap, $\gamma$.

Lets make some graphs:

The above graph shows what $\mu_s$ would have to be with a $\gamma = 0$ (no end cap, just a 1D stick).

The above graph shows what $\mu_s$ would have to be with a $\eta = 0$ (no stick, just a circular cap that the towel drapes over.

The above graph shows what $\mu_s$ would have to be when the angle is fixed $\alpha = \pi/4$ and the length of the peg ($\eta$) is varied.
summary
What all the graphs above should show you is that the coefficient of static friction has to be enormous ($\mu_s > 50$ -- most $\mu_s$ are close to 1) unless the fraction of the towel on the peg ($\eta$ and $\gamma$) is large, like over 50 % combined.  The large values for $\eta$ can only be accomplished when you put the towel at approximately position $\mathbf{A}$, whereas its very difficult to hang a towel from position $\mathbf{B}$ because it reduces $\eta$ in both the $z$ and $x$-directions.
3) the towel has a center of mass below the peg
This isn't a sufficient condition for static equilibrium; a towel isn't a rigid object. As a counter-example, see an Atwood's machine. The block-rope system has a center of mass below the pulley, but that doesn't prevent motion of the blocks.


Question:
I've read many years ago in books, that the brain has no nerves on it, and if someone was touching your brain, you couldn't feel a thing.
Just two days before now, I had a very bad migraine, due to a cold. It's become better now, but when I had it I felt my head was going to literally split in half, as the pain was literally coming from my brain.
So it lead me to the question: How come people can get headaches if the brain has no nerves?

Brain, indeed, cannot feel pain, as it lacks pain receptors (nociceptors). However, what you feel when you have a headache is not your brain hurting -- there are plenty of other areas in your head and neck that do have nociceptors which can perceive pain, and they literally cause the headaches.
In especially, many types of headaches are generally thought to have a neurovascular background, and the responsible pain receptors are associated with blood vessels. However, the pathophysiology of migraines and headaches is still poorly understood.


Question:
I've been reading about Lambda calculus recently but strangely I can't find an explanation for why it is called "Lambda" or where the expression comes from.
Can anyone explain the origins of the term?

An excerpt from History of Lambda-calculus and Combinatory Logic by F. Cardone and J.R. Hindley(2006):

By the way, why did Church choose the notation “$\lambda$”? In [Church, 1964, §2] he stated clearly that it came from the notation “$\hat{x}$” used for class-abstraction by Whitehead and Russell, by first modifying “$\hat{x}$” to “$\wedge x$” to distinguish function abstraction from class-abstraction, and then changing “$\wedge$” to “$\lambda$” for ease of printing. This origin was also reported in [Rosser, 1984, p.338]. On the other hand, in his later years Church told two enquirers that the choice was more accidental: a symbol was needed and “$\lambda$” just happened to be chosen.


Question:
In the definition of standard deviation, why do we have to square the difference from the mean to get the mean (E) and take the square root back at the end? Can't we just simply take the absolute value of the difference instead and get the expected value (mean) of those, and wouldn't that also show the variation of the data? The number is going to be different from square method (the absolute-value method will be smaller), but it should still show the spread of data. Anybody know why we take this square approach as a standard?
The definition of standard deviation:
$\sigma = \sqrt{E\left[\left(X - \mu\right)^2\right]}.$
Can't we just take the absolute value instead and still be a good measurement?
$\sigma = E\left[|X - \mu|\right]$

If the goal of the standard deviation is to summarise the spread of a symmetrical data set (i.e. in general how far each datum is from the mean), then we need a good method of defining how to measure that spread.
The benefits of squaring include:

Squaring always gives a non-negative value, so the sum will always be zero or higher.
Squaring emphasizes larger differences, a feature that turns out to be both good and bad (think of the effect outliers have).

Squaring however does have a problem as a measure of spread and that is that the units are all squared, whereas we might prefer the spread to be in the same units as the original data (think of squared pounds, squared dollars, or squared apples). Hence the square root allows us to return to the original units.
I suppose you could say that absolute difference assigns equal weight to the spread of data whereas squaring emphasises the extremes. Technically though, as others have pointed out, squaring makes the algebra much easier to work with and offers properties that the absolute method does not (for example, the variance is equal to the expected value of the square of the distribution minus the square of the mean of the distribution)
It is important to note however that there's no reason you couldn't take the absolute difference if that is your preference on how you wish to view 'spread' (sort of how some people see 5% as some magical threshold for $p$-values, when in fact it is situation dependent). Indeed, there are in fact several competing methods for measuring spread.
My view is to use the squared values because I like to think of how it relates to the Pythagorean Theorem of Statistics: $c = \sqrt{a^2 + b^2}$  …this also helps me remember that when working with independent random variables, variances add, standard deviations don't. But that's just my personal subjective preference which I mostly only use as a memory aid, feel free to ignore this paragraph.
An interesting analysis can be read here:

Revisiting a 90-year-old debate: the advantages of the mean deviation - Stephen Gorard (Department of Educational Studies, University of York); Paper presented at the British Educational Research Association Annual Conference, University of Manchester, 16-18 September 2004


Question:
I had this question from a graduate student yesterday, and I was stuck.
What should I say? Why use a CRAM instead of a BAM?

When is it a good idea to use a CRAM instead of a BAM?
When is it a bad idea?

Whenever you want to save space (this can be a substantial savings). Until quite recently (samtools/htslib 1.7), only CRAM supported long CIGAR strings.
If you need to guarantee that any random obscure downstream program will be able to handle it.

Uptake of CRAM has been pretty slow. Java programs using htsjdk (e.g., picard, IGV and GATK) have only relatively recently added support for CRAM. If you need to use an old version of those for some very odd reason then CRAM may not be supported.
There are a lot of programs written in python that use pysam to open BAM files and these should, theoretically, support CRAM. The issue is that some of the functions may fail and one can't assume that authors will have always written the code needed to handle this. I'll use deepTools as an example, since I'm one of its developers. One of the things about CRAM files is that they (by default) are made such that you require a reference genome in order to construct the sequence field in each alignment. This works fine if you're using a standard genome (htslib, via pysam, can fetch many standard genomes from the web automatically), but if you're not, then you need to specify a fasta file to use for decompression. Every tool, then, needs to add an option for this. With pysam 0.14 and htslib 1.7 this can be circumvented by not decompressing the sequence, but behavior has to be explicitly requested.
Another issue is that many tools will use features from the file index, such as the .mapped accessor, to get the number of mapped reads in a file. CRAM files contain very very little information, so this then fails. Consequently, tool authors need to check for CRAM files and both derive and propagate this information through their functions if it's needed. This can be a time-consuming task (e.g., it took me a couple days to get this implemented in deepTools). Relatedly, samtools idxstats is useless on CRAM files, since there are no statistics stored in the index.
That having been said, it's likely that CRAMs slowly gaining acceptance will eventually make it the standard. It's already a convenient archival format, it's just a matter of time before users can assume that most analysis programs are written to handle it.


Question:
If I have a list of key values from 1 to 100 and I want to organize them in an array of 11 buckets, I've been taught to form a mod function
$$ H = k \bmod \ 11$$
Now all the values will be placed one after another in 9 rows. For example, in the first bucket there will be $0, 11, 22 \dots$. In the second, there will be $1, 12, 23 \dots$ etc.
Let's say I decided to be a bad boy and use a non-prime as my hashing function - take 12.
Using the Hashing function
$$ H = k \bmod \ 12$$
would result in a hash table with values $0, 12, 24 \dots $ in the first bucket, $1, 13, 25 \dots$ etc. in the second and so on.
Essentially they are the same thing. I didn't reduce collisions and I didn't spread things out any better by using the prime number hash code and I can't see how it is ever beneficial.

Consider the set of keys $K=\{0,1,...,100\}$ and a hash table where the number of buckets is $m=12$. Since $3$ is a factor of $12$, the keys that are multiples of $3$ will be hashed to buckets that are multiples of $3$:

Keys $\{0,12,24,36,...\}$ will be hashed to bucket $0$.
Keys $\{3,15,27,39,...\}$ will be hashed to bucket $3$.
Keys $\{6,18,30,42,...\}$ will be hashed to bucket $6$.
Keys $\{9,21,33,45,...\}$ will be hashed to bucket $9$.

If $K$ is uniformly distributed (i.e., every key in $K$ is equally likely to occur), then the choice of $m$ is not so critical. But, what happens if $K$ is not uniformly distributed? Imagine that the keys that are most likely to occur are the multiples of $3$. In this case, all of the buckets that are not multiples of $3$ will be empty with high probability (which is really bad in terms of hash table performance).
This situation is more common that it may seem. Imagine, for instance, that you are keeping track of objects based on where they are stored in memory. If your computer's word size is four bytes, then you will be hashing keys that are multiples of $4$. Needless to say that choosing $m$ to be a multiple of $4$ would be a terrible choice: you would have $3m/4$ buckets completely empty, and all of your keys colliding in the remaining $m/4$ buckets.
In general:

Every key in $K$ that shares a common factor with the number of buckets $m$ will be hashed to a bucket that is a multiple of this factor.

Therefore, to minimize collisions, it is important to reduce the number of common factors between $m$ and the elements of $K$. How can this be achieved? By choosing $m$ to be a number that has very few factors: a prime number.


Question:
The SARS-Cov2 coronavirus's genome was released, and is now available on Genbank.  Looking at it...

    1 attaaaggtt tataccttcc caggtaacaa accaaccaac tttcgatctc ttgtagatct
   61 gttctctaaa cgaactttaa aatctgtgtg gctgtcactc ggctgcatgc ttagtgcact
  121 cacgcagtat aattaataac taattactgt cgttgacagg acacgagtaa ctcgtctatc
  ...
29761 acagtgaaca atgctaggga gagctgccta tatggaagag ccctaatgtg taaaattaat
29821 tttagtagtg ctatccccat gtgattttaa tagcttctta ggagaatgac aaaaaaaaaa
29881 aaaaaaaaaa aaaaaaaaaa aaa

Wuhan seafood market pneumonia virus isolate Wuhan-Hu-1, complete genome, Genbank

Geeze, that's a lot of a nucleotides---I don't think that's just random.  I would guess that it's either an artifact of the sequencing process, or there is some underlying biological reason.
Question: Why does the SARS-Cov2 coronavirus genome end in 33 a's?

Good observation! The 3' poly(A) tail is actually a very common feature of positive-strand RNA viruses, including coronaviruses and picornaviruses.
For coronaviruses in particular, we know that the poly(A) tail is required for replication, functioning in conjunction with the 3' untranslated region (UTR) as a cis-acting signal for negative strand synthesis and attachment to the ribosome during translation. Mutants lacking the poly(A) tail are severely compromised in replication. Jeannie Spagnolo and Brenda Hogue report:

The 3′ poly (A) tail plays an important, but as yet undefined role in Coronavirus genome replication. To further examine the requirement for the Coronavirus poly(A) tail, we created truncated poly(A) mutant defective interfering (DI) RNAs and observed the effects on replication. Bovine Coronavirus (BCV) and mouse hepatitis Coronavirus A59 (MHV-A59) DI RNAs with tails of 5 or 10 A residues were replicated, albeit at delayed kinetics as compared to DI RNAs with wild type tail lengths (>50 A residues). A BCV DI RNA lacking a poly(A) tail was unable to replicate; however, a MHV DI lacking a tail did replicate following multiple virus passages. Poly(A) tail extension/repair was concurrent with robust replication of the tail mutants. Binding of the host factor poly(A)- binding protein (PABP) appeared to correlate with the ability of DI RNAs to be replicated. Poly(A) tail mutants that were compromised for replication, or that were unable to replicate at all exhibited less in vitro PABP interaction. The data support the importance of the poly(A) tail in Coronavirus replication and further delineate the minimal requirements for viral genome propagation.
Spagnolo J.F., Hogue B.G. (2001) Requirement of the Poly(A) Tail in Coronavirus Genome Replication. In: Lavi E., Weiss S.R., Hingley S.T. (eds) The Nidoviruses. Advances in Experimental Medicine and Biology, vol 494. Springer, Boston, MA

Yu-Hui Peng et al. also report that the length of the poly(A) tail is regulated during infection:

Similar to eukaryotic mRNA, the positive-strand coronavirus genome of ~30 kilobases is 5’-capped and 3’-polyadenylated. It has been demonstrated that the length of the coronaviral poly(A) tail is not static but regulated during infection; however, little is known regarding the factors involved in coronaviral polyadenylation and its regulation. Here, we show that during infection, the level of coronavirus poly(A) tail lengthening depends on the initial length upon infection and that the minimum length to initiate lengthening may lie between 5 and 9 nucleotides. By mutagenesis analysis, it was found that (i) the hexamer AGUAAA and poly(A) tail are two important elements responsible for synthesis of the coronavirus poly(A) tail and may function in concert to accomplish polyadenylation and (ii) the function of the hexamer AGUAAA in coronaviral polyadenylation is position dependent. Based on these findings, we propose a process for how the coronaviral poly(A) tail is synthesized and undergoes variation. Our results provide the first genetic evidence to gain insight into coronaviral polyadenylation.
Peng Y-H, Lin C-H, Lin C-N, Lo C-Y, Tsai T-L, Wu H-Y (2016) Characterization of the Role of Hexamer AGUAAA and Poly(A) Tail in Coronavirus Polyadenylation. PLoS ONE 11(10): e0165077

This builds upon prior work by Hung-Yi Wu et al, which showed that the coronaviral 3' poly(A) tail is approximately 65 nucleotides in length in both genomic and sgmRNAs at peak viral RNA synthesis, and also observed that the precise length varied throughout infection. Most interestingly, they report:

Functional analyses of poly(A) tail length on specific viral RNA species, furthermore, revealed that translation, in vivo, of RNAs with the longer poly(A) tail was enhanced over those with the shorter poly(A). Although the mechanisms by which the tail lengths vary is unknown, experimental results together suggest that the length of the poly(A) and poly(U) tails is regulated. One potential function of regulated poly(A) tail length might be that for the coronavirus genome a longer poly(A) favors translation. The regulation of coronavirus translation by poly(A) tail length resembles that during embryonal development suggesting there may be mechanistic parallels.
Wu HY, Ke TY, Liao WY, Chang NY. Regulation of coronaviral poly(A) tail length during infection. PLoS One. 2013;8(7):e70548. Published 2013 Jul 29. doi:10.1371/journal.pone.0070548

It's also worth pointing out that poly(A) tails at the 3' end of RNA are not an unusual feature of viruses. Eukaryotic mRNA almost always contains poly(A) tails, which are added post-transcriptionally in a process known as polyadenylation. It should not therefore be surprising that positive-strand RNA viruses would have poly(A) tails as well. In eukaryotic mRNA, the central sequence motif for identifying a polyadenylation region is AAUAAA, identified way back in the 1970s, with more recent research confirming its ubiquity. Proudfoot 2011 is a nice review article on poly(A) signals in eukaryotic mRNA.


Question:
I'm having trouble understanding the simple "planetary" model of the atom that I'm being taught in my basic chemistry course.
In particular,

I can't see how a negatively charged electron can stay in "orbit" around a positively charged nucleus. Even if the electron actually orbits the nucleus, wouldn't that orbit eventually decay?
I can't reconcile the rapidly moving electrons required by the planetary model with the way atoms are described as forming bonds. If electrons are zooming around in orbits, how do they suddenly "stop" to form bonds.

I understand that certain aspects of quantum mechanics were created to address these problems, and that there are other models of atoms. My question here is whether the planetary model itself addresses these concerns in some way (that I'm missing) and whether I'm right to be uncomfortable with it.

You are right, the planetary model of the atom does not make sense when one considers the electromagnetic forces involved. The electron in an orbit is accelerating continuously and would thus radiate away its energy and fall into the nucleus.
One of the reasons for "inventing" quantum mechanics was exactly this conundrum.
The Bohr model was proposed to solve this, by stipulating that the orbits were closed and quantized and no energy could be lost while the electron was in orbit, thus creating the stability of the atom necessary to form solids and liquids. It also explained the lines observed in the spectra from excited atoms as transitions between orbits.
If you study further into physics you will learn about quantum mechanics  and the axioms and postulates that form the equations whose solutions give exact numbers for what was the first guess at a model of the atom.
Quantum mechanics is accepted as the underlying level of all physical forces at the microscopic level, and sometimes quantum mechanics can be seen macroscopically, as with superconductivity, for example. Macroscopic forces, like those due to classical electric and magnetic fields, are limiting cases of the real forces which reign microscopically.


Question:
I'm not running any parallel code right now, but I anticipate running parallel code in the future using a hybrid of OpenMP and MPI. Debuggers have been invaluable tools for me when running serial projects.
Can anyone recommend a parallel debugger (or multiple debuggers) to use for debugging parallel software? Free software would be preferable, but don't hesitate to mention effective commercial software.

There are basically two major, commercial choices out there: DDT from Allinea (which is what we use at TACC) and Totalview (as mentioned in the other comment). They have comparable features, are both actively developed, and are direct competitors.
Eclipse has their Parallel Tools Platform, which should include MPI and OpenMP programming support and a parallel debugger.


Question:
My Geiger counter measures a background radiation level in my home of 0.09–0.11 μSv/h.
When I stick it inside the dryer right after it finishes a cycle (while the clothes are still inside), it registers a radiation level of 0.16–0.18 μSv/h.
What happens during the dryer cycle that accounts for this reading? From what I understand it has something to do with trapping radon, but how exactly does this happen?

Uranium and thorium in heavy rocks have a decay chain which includes a three-day isotope of radon. If a building has materials with some chemically-insignificant mixture of uranium and thorium, such as concrete or granite, then the radon can diffuse out of the material into the air. This is part of your normal background radiation, unless you have accidentally built a concrete basement with granite countertops and poor air exchange with the outdoors, in which case the radon can accumulate.
When radon does decay, the decays leave behind ionized atoms of the heavy metals polonium, lead, and bismuth. These ions neutralize by reacting with the air. Here my chemistry is weak, but my assumption is that they are most likely to oxide, and I assume further that the oxide molecules are electrically polarized, like the water molecule (the stable oxide of hydrogen) is polarized.
Polarized or polarizable objects are attracted to strong electric fields, even when the polarized object is electrically neutral. Imagine a static electric field around a positive charge. A dipole nearby will feel a torque until its negative end points towards the static positive charge. But because the field gets weaker away from the static charge, there’s now more attractive force on the negative end of the dipole than there is repulsive force on the positive end, so the dipole accelerates towards the stronger field. If you used to have a cathode-ray television, you may remember the way the positively-charged screen would attract dust much more than other nearby surfaces.
Clothes dryers are very effective at making statically charged surfaces. (Dryer sheets help.)  So when radon and its temporary decay products are blown through the dryer, electrically-polarized molecules tend to be attracted to the charged surfaces. The decay chain is

isotope
half-life
decay mode

222-Rn
3.8 days
alpha

218-Po
3.1 minutes
alpha

214-Pb
27 minutes
beta

214-Bi
20 minutes
beta

214-Po
microseconds
alpha

210-Pb
years
irrelevant

If your Geiger counter is actually detecting radiation, it's almost certainly the half-hour lead and bismuth.  Constructing a decay curve would make a neat home experiment (but challenging given what you've told us here).
True story: I was once prevented from leaving a neutron-science facility at Los Alamos after the seat of my pants set off a radiation alarm on exit.  This was odd because the neutron beam had been off for weeks.  It was a Saturday, so the radiation safety technician on call didn't arrive for half an hour — at which point I was clean, so the detective questions began.  I had spent the day sitting on a plastic step stool.  The tech looked at it, said that radon's decay products are concentrated by static electricity, and told me that I needed to get a real chair.


Question:
Common saying. Diamond possesses:

ultra hardness, (10 on the Mohs scale; 10000 HV on Vicker's Hard Test (iron merely 30-80))
hyper thermal conductivity, ($2320~\mathrm{W\, m^{-1}\, K^{-1}}$, or over ten times better than the heatsink in your computer!)
extreme pressure resistance, (withstands a crushing 600 gigapascals; or around 2 times the pressure at the center of the earth, enough to snap carbon nano-tubes and graphene or create metallic oxygen or overcome copper's electron degeneracy pressure, making the maximum chamber pressure of a firing pistol seem literally like popping popcorn... I digress)
and excellent luster (what do you expect, it's a diamond) combine to make the gemstone coveted by all.

Diamonds are the stuff of awesome.
But do they really exist forever?
Wikipedia notes that,

Diamond is less stable than graphite, but the conversion rate from diamond
   to graphite is negligible at standard conditions.

Huh. But Wikipedia doesn't mention how long. So how long would it take for this super-material to convert to the stuff I scribble with?
(If you doubt the claims about diamond's seemingly unbelievable properties, check out the link on Wikipedia about diamond and this and this.)
Great point Joe made, that $10^{80}$ is just forever to us puny humans. Being a geek I can't resist the urge to compare the time length $10^{80}$:

Makes the entire lifespan of a red dwarf star seem like the Planck second.
Enough time for you to sift through all the atoms in the entire UNIVERSE at a rate of one atom per second.
Getting $67 worth of US quarters and flipping them, one per second, to get all heads-up.
Chance of macroscopic quantum tunneling!! (I don't know precisely how much, but quite large)

...and this is $10^{80}$ seconds I'm talking about...

how long would it take for this super-material to convert to the stuff
  I scribble with?

No, despite the fact that James Bond said "Diamonds are Forever", that is not exactly the case. Although Bond's statement is a fair approximation of reality it is not a scientifically accurate description of reality.
As we will soon see, even though diamond is slightly less stable than graphite (by ~ 2.5 kJ/mol), it is kinetically protected by a large activation energy.
Here is a comparative representation of the structures of diamond and graphite.

(image source: Satyanarayana T, Rai R. Nanotechnology: The future. J Interdiscip Dentistry 2011;1:93-100)

(image source)
Note that diamond is composed of cyclohexane rings and each carbon is bonded to 2 more carbons external to the cyclohexane ring. On the other hand, graphite is comprised of benzene rings and each carbon is bonded to only 1 carbon external to the benzene ring. That means we need to break 6 sigma bonds in diamond and make about 2 pi bonds (remember it's an extended array of rings, don't double count) in graphite per 6-membered ring in order to convert diamond to graphite.
A typical aliphatic C–C bond strength is ~340 kJ/mol and a typical pi bond strength is ~260 kJ/mol.  So to break 6 sigma bonds and make 2 pi bonds would require ~((6*340)-(2*260)) ~ 1500 kJ/mol. If the transition state were exactly midway between diamond and carbon (with roughly equal bond breaking and bond making), then we might approximate the activation energy as being half that value or ~750 kJ/mol.  Since graphite is a bit more stable than diamond, we can refine our model and realize that the transition state will occur a bit before the mid-point. So our refined model would suggest an activation energy something less than 750 kJ/mol. Had we attempted to incorporate the effect of aromaticity in graphite our estimate would be even lower.  In any case, this is an extremely large activation energy, so, as we anticipated the reaction would be very slow.
An estimate (see p. 171) of the activation energy puts the reverse reaction (graphite to diamond; but since, as noted above, the energy difference between the two is very small the activation energy for the forward reaction is almost the same) at 367 kJ/mol. So at least our rough approximation was in the right ballpark, off by about a factor of 2. However, it appears that the transition state is even further from the midpoint (closer to starting material) than we might have guessed.
This activation energy tells us that at 25 °C, it would take well over a billion years to convert one cubic centimeter of diamond to graphite.
Note 04/17/20: As mentioned in a comment, the original "estimate" link became  defunct and was replaced today with a new estimate link.  However the original article and estimate can can still be seen on the Wayback Machine and it estimates the activation energy to be 538.45 kJ/mol, reasonably close to our estimate.


Question:
As I understand it, there are two major categories of iterative methods for solving linear systems of equations:

Stationary Methods (Jacobi, Gauss-Seidel, SOR, Multigrid)
Krylov Subspace methods (Conjugate Gradient, GMRES, etc.)

I understand that most stationary methods work by iteratively relaxing (smoothing) the Fourier modes of the error.  As I understand it, the Conjugate Gradient method (Krylov subspace method) works by "stepping" through an optimal set of search directions from powers of the matrix applied to the $n$th residual.  Is this principle common to all Krylov subspace methods?  If not, how do we characterize the principle behind the convergence of Krylov subspace methods, in general?

In general, all Krylov methods essentially seek a polynomial that is small when evaluated on the spectrum of the matrix. In particular, the $n$th residual of a Krylov method (with zero initial guess) can be written in the form
$$ r_n = P_n (A) b $$
where $P_n$ is some monic polynomial of degree $n$ .
If $A$ is diagonalizable, with $A=V\Lambda V^{-1}$, we have
\begin{eqnarray*}
\|r_n\| &\leq& \|V\|\cdot  \|P_n(\Lambda)\|\cdot  \|V^{-1}\|\cdot  \|b\|\\
        &=&  \kappa(V) \cdot \|P_n(\Lambda)\| \cdot \|b\|.
\end{eqnarray*}
In the event that $A$ is normal (e.g., symmetric or unitary) we know that $\kappa(V) = 1.$ GMRES constructs such a polynomial through Arnoldi iteration, while CG constructs the polynomial using a different inner product (see this answer for details). Similarly, BiCG constructs its polynomial through the nonsymmetric Lanczos process, while Chebyshev iteration uses prior information on the spectrum (usually estimates of the largest and smallest eigenvalues for symmetric definite matrices).
As a cool example (motivated by Trefethen + Bau), consider a matrix whose spectrum is this:

In MATLAB, I constructed this with:
A = rand(200,200);
[Q R] = qr(A);
A = (1/2)*Q + eye(200,200);

If we consider GMRES, which constructs polynomials which actually minimize the residual over all monic polynomials of degree $n$, we can easily predict the residual history by looking at the candidate polynomial
$$P_n (z) = (1-z)^n $$
which in our case gives
$$ |P_n(z)| = \frac{1}{2^n} $$
for $z$ in the spectrum of $A$.
Now, if we run GMRES on a random RHS and compare the residual history with this polynomial, they ought to be quite similar (the candidate polynomial values are smaller than the GMRES residual because $\|b\|_2 > 1$):


Question:
I would like to know if there has been any work relating legal code to complexity. In particular, suppose we have the decision problem "Given this law book and this particular set of circumstances, is the defendant guilty?" What complexity class does it belong to?
There are results that have proven that the card game Magic: the Gathering is both NP and Turing-complete so shouldn't similar results exist for legal code?

It's undecidable because a law book can include arbitrary logic. A silly example censorship law would be "it is illegal to publicize any computer program that does not halt".
The reason results for MTG exist and are interesting is because it has a single fixed set of (mostly) unambiguous rules, unlike law which is ever changing, horribly localized and endlessly ambiguous.


Question:
There are many methods to prove that a language is not regular, but what do I need to do to prove that some language is regular?
For instance, if I am given that $L$ is regular,
how can I prove that the following $L'$ is regular, too?
$\qquad \displaystyle L' := \{w \in L: uv = w \text{ for } u \in \Sigma^* \setminus L \text{ and } v \in \Sigma^+ \}$
Can I draw a nondeterministic finite automaton to prove this?

Yes, if you can come up with any of the following:

deterministic finite automaton (DFA),
nondeterministic finite automaton (NFA),
regular expression (regexp of formal languages) or
regular grammar

for some language $L$, then $L$ is regular. There are more equivalent models, but the above are the most common.
There are also useful properties outside of the "computational" world. $L$ is also regular if

it is finite,
you can construct it by performing certain operations on regular languages, and those operations are closed for regular languages, such as

intersection,
complement,
homomorphism,
reversal,
left- or right-quotient,
regular transduction

and more, or
using Myhill–Nerode theorem if the number of equivalence classes for $L$ is finite.

In the given example, we have some (regular) langage $L$ as basis and want to say something about a language $L'$ derived from it. Following the first approach -- construct a suitable model for $L'$ -- we can assume whichever equivalent model for $L$ we so desire; it will remain abstract, of course, since $L$ is unknown. In the second approach, we can use $L$ directly and apply closure properties to it in order to arrive at a description for $L'$.


Question:
There are many applications where a pseudo random number generator is used.  So people implement one that they think is great only to find later that it's flawed.  Something like this happened with the Javascript random number generator recently.  RandU much earlier too.  There are also issues of inappropriate initial seeding for something like the Twister.
I cannot find examples of anyone combining two or more families of generators with the usual xor operator. If there is sufficient computer power to run things like java.SecureRandom or Twister implementations, why do people not combine them?  ISAAC xor XORShift xor RandU should be a fairly good example, and where you can see the weakness of a single generator being mitigated by the others.  It should also help with the distribution of numbers into higher dimensions as the intrinsic algorithms are totally different.  Is there some fundamental principle that they shouldn't be combined?
If you were to build a true random number generator, people would probably advise that you combine two or more sources of entropy.  Is my example different?
I'm excluding the common example of several linear feedback shift registers working together as they're from the same family.

Sure, you can combine PRNGs like this, if you want, assuming they are seeded independently.  However, it will be slower and it probably won't solve the most pressing problems that people have.
In practice, if you have a requirement for a very high-quality PRNG, you use a well-vetted cryptographic-strength PRNG and you seed it with true entropy.  If you do this, your most likely failure mode is not a problem with the PRNG algorithm itself; the most likely failure mode is lack of adequate entropy (or maybe implementation errors).  Xor-ing multiple PRNGs doesn't help with this failure mode.  So, if you want a very high-quality PRNG, there's probably little point in xor-ing them.
Alternatively, if you want a statistical PRNG that's good enough for simulation purposes, typically the #1 concern is either speed (generate pseudorandom numbers really fast) or simplicity (don't want to spend much development time on researching or implementing it).  Xor-ing slows down the PRNG and makes it more complex, so it doesn't address the primary needs in that context, either.
As long as you exhibit reasonable care and competence, standard PRNGs are more than good enough, so there's really no reason why we need anything fancier (no need for xor-ing).  If you don't have even minimal levels of care or competence, you're probably not going to choose something complex like xor-ing, and the best way to improve things is to focus on more care and competence in the selection of the PRNG rather than on xor-ing.
Bottom line: Basically, the xor trick doesn't solve the problems people usually actually have when using PRNGs.


Question:
I have an R package on github which uses multiple Bioconductor dependencies, 'myPackage'
If I include CRAN packages in the DESCRIPTION via Depends:, the packages will automatically install upon installation via devtools, i.e.
devtools::install_github('repoName/myPackage')

This is discussed in Section 1.1.3 Package Dependencies, in Writing R Extensions
Is there a way to streamline this such that packages from Bioconductor are automatically installed as well?
Normally, users install Bioconductor packages via BiocLite, e.g.
source("
biocLite("edgeR")

As suggested, here’s an example showing the relevant lines from a DESCRIPTION file from a CRAN/GitHub hosted project that has Bioconductor dependencies (truncated):
Depends:
    R (>= 3.3.0)
biocViews:
Imports:
    methods,
    snpStats,
    dplyr

The relevant bit is the empty biocViews: declaration, which allows the Bioconductor dependency {snpStats} to be automatically installed.