Question:
Typically mobile devices that have a mains-powered supply will accept voltage that is multiple of some single battery voltage. For example, 4.5 volts is 1.5 volts (AA primary battery) 3 times and 36 volts is 3.6 volts (Li-Ion battery) 10 times.
Now there're laptops that use external power supplies rated at exactly 19 volts. That isn't a multiple of anything suitable. Puzzles me a lot.
Where does this voltage originate from?

Now there're laptops that use external power supplies rated at exactly 19 volts. That isn't a multiple of anything suitable. Puzzles me a lot.

This is not a design question as posed, but it has relevance to design of battery charging systems.
Summary:

The voltage is slightly more than a multiple of the fully charged voltage of a Lithium Ion battery—the type used in almost every modern laptop.
Most laptops use Lithium Ion batteries.
19 V provides a voltage which is suitable for use for charging up to 4 x Lithium Ion cells in series using a buck converter to drop the excess voltage efficiently.
Various combinations of series and parallel cells can be accommodated.
Voltages slightly below 19 V can be used but 19 V is a useful standard voltage that will meet most eventualities.

Almost all modern laptops use Lithium Ion (LiIon) batteries. Each battery consists of at least a number of LiIon cells in a series 'string' and may consist of a number of parallel combinations of several series strings.
A Lithium Ion cell has a maximum charging voltage of 4.2 V (4.3 V for the brave and foolhardy). To charge a 4.2 V cell at least slightly more voltage is required to provide some “headroom” to allow charge control electronics to function. At the very least about 0.1 V extra might do but usually at least 0.5 V would be useful and more might be used.
One cell = 4.2 V
 Two cells = 8.4 V
 Three cells = 12.6 V
 Four cells = 16.8 V
 Five cells  = 21 V.
It is usual for a charger to use a switched mode power supply (SMPS) to convert the available voltage to required voltage. A SMPS can be a Boost converter (steps voltage up) or Buck converter (steps voltage down) or swap from one to the other as required. In many cases a buck converter can be made more efficient than a boost converter. In this case, using a buck converter it would be possible to charge up to 4 cells in series.
I have seen laptop batteries with
3 cells in series (3S),
 4 cells in series (4S),
 6 cells in 2 parallel strings of 3 (2P3S),
 8 cells in 2 parallel strings of 4 (2P4S)
and with a source voltage of 19 V it would be possible to charge 1, 2, 3 or 4 LiIon cells in series and any number of parallel strings of these.
For cells at 16.8 V leave a headroom of (19−16.8) = 2.4 volt  for the electronics. Most of this is not needed and the difference is accommodated by the buck converter, which acts as an “electronic gearbox”, taking in energy at one voltage and outputting it at a lower voltage and appropriately higher current.
With say 0.7 V of headroom it would notionally be possible to use say 16.8 V + 0.5 V = 17.5 V from the power supply—but using 19 V ensures that there is enough for any eventuality and the excess is not wasted as the buck converter converts the voltage down as required. Voltage drop other than in the battery can occur in SMPS switch (usually a MOSFET), SMPS diodes (or synchronous rectifier), wiring, connectors, resistive current sense elements and protection circuitry. As little drop as possible is desirable to minimise energy wastage.
When a Lithium Ion cell is close to fully discharged it's terminal voltage is about 3 V. How low they are allowed to discharge to is subject to technical considerations related to longevity and capacity.  At 3 V/cell 1/2/3/4 cells have a terminal voltage of 3/6/9/12 volt. The buck converter accommodates this reduced voltage to maintain charging efficiency. A good buck converter design can exceed 95 % efficient and in this sort of application should never be under 90 % efficient (although some may be).

I recently replaced a netbook battery with 4 cells with an extended capacity version with 6 cells. The 4 cells version operated in 4S configuration and the 6 cell version in 2P3S. Despite the lower voltage of the new battery the charging circuitry accommodated the change, recognising the battery and adjusting accordingly. Making this sort of change in a system NOT designed to accommodate a lower voltage battery could be injurious to the health of the battery, the equipment and the user.


Question: I don't want to deal with virtualenv for a local Python installation, I just want to install a few packages locally without dealing with the PYTHONPATH environment variable, how do I do that?

Python (as of 2.6 and 3.0) now searches in the ~/.local directory for local installs, which do not require administrative privileges to install, so you just need to point your installer to that directory.
If you have already downloaded the package foo and would like to install it manually, type:
cd path/to/foo
python setup.py install --user

If you are using easy_install and would like the package downloaded and installed:
easy_install --prefix=$HOME/.local/ foo

Update by RafiK
pip install --user foo

The following answer is provided for historical purposes:
It's a little more work if you are using pip to download and install:
pip install --install-option="--prefix=$HOME/.local" foo


Question:
I'm sorry if this question goes against the meta for posting questions - I attached all the "beware, this is a soft-question" tags I could.
This is a question I've been asking myself now for some time. In most areas, there's a "cut off age" to be good at something. For example, you're not going to make the NHL if you start playing hockey at 20. It just won't happen.
So my question then, how late is too late to start studying math and make a career out of it? By "start studying math" I mean, to really try to understand and comprehend the material (as opposed to just being able to do well in a formal, intuitional environment).
I don't mean this from a "do what you love, its not too late" motivational perspective. I mean this from a purely biological perspective; at approximately what age has your brain's capacity to learn effectively and be influenced by your learning stop? When does the biological clock for learning new math run out?
My reasoning for asking this question is (for those who care): I love math. Really I do. But , having spent the first 21 years of my life in sports/video games/obtaining a degree in a scientific field which I care nothing of/etc, despite all my best attempts at trying to learn math, am I just too late starting to ever actually be good enough at it to make it a career? I've almost completed my second degree (in Math), but find that in many cases, despite how I look at a problem, I lack the intuition to comprehend it. I'm going to single him out (sorry), only as an example, but Qiaochu Yuan is my age.
Note 1: If this question isn't a suitable post, I won't be offended at all if you vote to close - I know this question borders what's acceptable to ask.
Note 2: Thanks to everyone for reading and taking the time for the great responses. Really appreciate it!

Karl Weierstrass was in his 40's when he got his PHD. There are a dozen other counterexamples, a number fairly recent. A good set of examples can be found in the thread on MO here.This myth of "science is a game for the young" is one of the falsest and most destructive canards in modern society. Don't listen to it. You only get one life and when it's over, that's it. When you're dead a hundred million years, you'll be dead the tiniest most infinitesimal fraction of all the time you'll ever be dead. So stop listening to career advice from teenagers, grab a calculus book and get to work. That's my advice.


Question:
I have a pipeline for generating a BigWig file from a BAM file:
BAM -> BedGraph -> BigWig

Which uses bedtools genomecov for the BAM -> BedGraph part and bedGraphToBigWig for the BedGraph -> BigWig part.
The use of bedGraphToBigWig to create the BigWig file requires a BedGraph file to reside on disk in uncompressed form as it performs seeks. This is problematic for large genomes and variable coverage BAM files when there are more step changes/lines in the BedGraph file. My BedGraph files are in the order of 50 Gbytes in size and all that IO for 10-20 BAM files seems unnecessary.
Are there any tools capable generate BigWig without having to use an uncompressed BedGraph file on disk? I'd like this conversion to hapen as quickly as possible.
I have tried the following tools, but they still create/use a BedGraph intermediary file:

deepTools

Some Benchmarks, Ignoring IO
Here are some timings I get for creating a BigWig file from a BAM file using 3 different pipelines. All files reside on a tmpfs i.e. in memory.
BEDTools and Kent Utils
This is the approach taken by most.
time $(bedtools genomecov -bg -ibam test.bam -split -scale 1.0 > test.bedgraph \
  && bedGraphToBigWig test.bedgraph test.fasta.chrom.sizes kent.bw \
  && rm test.bedgraph)

real    1m20.015s
user    0m56.608s
sys     0m27.271s

SAMtools and Kent Utils
Replacing bedtools genomecov with samtools depth and a custom awk script (depth2bedgraph.awk) to output bedgraph format has a significant performance improvement:
time $(samtools depth -Q 1 --reference test.fasta test.bam \
  | mawk -f depth2bedgraph.awk \
  > test.bedgraph \
  && bedGraphToBigWig test.bedgraph test.fasta.chrom.sizes kent.bw \
  && rm test.bedgraph)

real    0m28.765s
user    0m44.999s
sys     0m1.166s

Although it is has less features, we used mawk here as it's faster than gawk (we don't need those extra features here).
Parallelising with xargs
If you want to have a BigWig file per chromosome, you can easily parallelise this across chromosome/reference sequences. We can use xargs to run 5 parallel BAM->BedGraph->BigWig pipelines, each using the tmpfs mounted /dev/shm for the intermediary BedGraph files.
cut -f1 test.fasta.chrom.sizes \
  | xargs -I{} -P 5  bash -c 'mkdir /dev/shm/${1} \
  && samtools depth -Q 1 --reference test.fasta -r "${1}" test.bam \
  | mawk -f scripts/depth2bedgraph.awk \
  > "/dev/shm/${1}/test.bam.bedgraph" \
  && mkdir "./${1}" \
  && bedGraphToBigWig \
    "/dev/shm/${1}/test.bam.bedgraph" \
    test.fasta.chrom.sizes \
    "./${1}/test.bam.bw" \
  && rm "/dev/shm/${1}/test.bam.bedgraph"' -- {}

deepTools
Let's see how deepTools performs.
time bamCoverage --numberOfProcessors max \
  --minMappingQuality 1 \
  --bam test.bam --binSize 1 --skipNonCoveredRegions \
  --outFileName deeptools.bw

real    0m40.077s
user    3m56.032s
sys     0m9.276s

This can be done in R very easily from an indexed .bam file.
Given single-end file for sample1.
library(GenomicAlignments)
library(rtracklayer)

## read in BAM file (use readGAlignmentPairs for paired-end files)
gr <- readGAlignments('sample1.bam')

## convert to coverages
gr.cov <- coverage(gr)

## export as bigWig
export.bw(gr.cov,'sample1.bigwig')

Be aware that this method doesn't include normalization steps (such as normalizing to total coverage). Most of these additional steps can be added if necessary.


Question:
At the voltage levels of typical overhead transmission lines in the US, a bird can land on one and be just fine (as long as it doesn't do something like spread its wings and touch a tree or something else at lower electric potential).
However, what about a hypothetical powerline at much higher voltage (as in tens of megavolts). Could landing on such a powerline fatally-shock the bird even though it does not complete a circuit for sustained current? (Assume that the distance is long enough that electrical arc'ing is impossible.)
NOTE: My understanding of what happens when a bird flies from an earth object to a powerline (please correct me if I'm wrong) is that - upon contacting the wire - its electric potential changes from earth-potential to the powerline's potential. In order for this to happen, there is an initial transfer of electrical energy (i.e. flow of charge i.e. current) from the powerline to the bird which "equalizes" their electric potential, which happens nearly instantaneously. If this is correct, then my question can be restated more generally as "Can an 'equalization charge' such as this result in a fatal shock, if the potential difference that it's equalizing is high enough?"

Assuming the bird still is at earth potential when entering in contact with the wire (say, it jumped right on it from the pole).
There are lots of unknowns in this problem but let's try to fill some gaps with data we kind of know in humans. So until an EE stackexchanger who is an ornithologist shows up with interesting data, let's assume humans can fly and like to chill out hanging from a high voltage cable.
All objects and living things have an equivalent electrical capacity. The Human Body Model is a convention which dictates humans are equivalent on that aspect to a 100pF capacitor (let's assume it doesn't reduce much from the ground to 23meters high, and call it a worst case scenario). Now, let's assume the contact resistance between the cable and wherever the geometric center of that capacitor is, is 3000Ohm - taken from the "Hand holding wire" case of the table in another thread - divided by two for a two hands contact. Then the total duration of the equilibrium current, taken as 5 times the time constant of the equivalent RC, is 0.75 microseconds.
Effects of currents through living things depend on the magnitude of the current and the duration. I have never seen any study showing any data below 10ms (e.g. the same study cited above), which is not surprising as apparently the response time of the cardiac tissue is 3ms. For 10ms, the current that generates irreversible effects is 0.5A, and it seems to have settled at that point (little dependent on the duration), certainly down to 3ms. Let's assume that past that point, the cardiac tissue behaves like an ineffective first order system, attenuating 20dB/decade. The required current for similar effects would be 20*4.25=90dB higher, or 15811A. For a contact resistance of 1500Ohms as used above, it means the voltage of the cable needs to be 23GV!
Burns solely depend on the energy transferred, so theoretically a high voltage could burn for such a small time. But how high? Well, "Electrical injuries: engineering, medical, and legal aspects", page 72, states:

The estimated lowest current that can produce noticeable first or second degree burns in a small area of the skin is 100A for 1s

Edit: Note that 100A is quite high, it is unclear how the author defines "first degree burns on small area of skin", but I would guess it would be for an area bigger than an inch, burning all epidermis and some of the dermis cells such that they peel away.
So for 750nanoseconds, that's 133MA required! If we use again the 1500Ohms resistance from above, that means the wire would need to be at 199GV, which is insane. Chances are there will be other nasty effects before those burns appear, but neither 23GV nor 199GV sound likely in the near future. Side note, as J... raised in the comments, a 23GV cable would spontaneously arc with anything at Earth potential within 7.6km and therefore would require an incredible amount of isolation.
As if it wasn't enough, you may have noticed that the above assume the maximum current is applied for the entire duration of the equilibrium current whereas in fact it is a decaying exponential... The average current over this duration is in fact 0.2 times the maximum, so these values should really be 115GV and 995GV!
Warning: This does not mean it is safe to jump on and hang from high voltage lines, this is a quick analysis with rough data estimates and modelling and shall not be considered a justification for your actions.


Question:
The Human Genome Project was the project of 'determining the sequence of nucleotide base pairs that make up human DNA, and of identifying and mapping all of the genes of the human genome'. It was declared complete in 2003, i.e. 99% of the euchromatic human genome completed with 99.99% accuracy.
Are the datasets provided by HGP still accurate, or as accurate as was claimed in 2003?
Given the technology in the past (such as using old techniques), or any other reason (newer research studies), is it possible that the datasets are not as accurate as originally expected?

The HGP developed the first "reference" human genome - a genome that other genomes could be compared to, and was actually a composite of multiple human genome sequences.
The standard human reference genome is actually continually updated with major and minor revisions, a bit like software. The latest major version is called GRCh38, was released in 2013, and has since had a number of minor updates.

Are the datasets provided by HGP still accurate?

Yes, in a sense, but we certainly have better information now. One way to measure the quality of the assembly is that the initial release from the HGP had hundreds of thousands of gaps - sequences that could not be resolved (this often occurs because of repetitive sequences). The newest reference genome has less than 500 gaps.


Question:
It seems kind of anti-productive in terms of survival for a plant to produce an addictive chemical as that plant will constantly be sought after by animals that ingest it. In this instance, I'm looking for a possible general & inclusive answer here that would describe most plants that make this. Not a specific instance (although if provided as an example would be a plus).
To appreciate the scope of this is terms of number of plants producing potentially addictive compounds - see this compendium:
compendium of botanicals reported to produce toxic, physchoactive or addictive compounds

It's a matter of perspective. Most of the chemicals that are addictive to us humans (particularly alkaloids), and may be addictive for some other animals as well, are also insecticides. Lots of plants that we consider poisonous are good food for other species, and lots of plants that insects would consider poisonous are treats for us.
This is a great example of the aimless nature of evolution. The plants that could successfully defend themselves against insects stabilize on a solution that happens to be bad for them in certain ways. Although, you would be hard pressed to find a better way to guarantee reproduction than being addictive to humans.
Background reference

Plant-insect coevolution and inhibition of acetylcholinesterase
The defensive role of alkaloids in insects and plants
Exploration of nature's chemodiversity: the role of secondary metabolites as leads in drug development

Also of interest

Bees prefer foods containing neonicotinoid pesticides


Question:
Could someone provide me with a good explanation of why $0^0=1$?
My train of thought:
$$x>0\\
0^x=0^{x-0}=\frac{0^x}{0^0}$$
so
$$0^0=\frac{0^x}{0^x}=\,?$$
Possible answers:

$0^0\cdot0^x=1\cdot0^0$, so $0^0=1$
$0^0=\frac{0^x}{0^x}=\frac00$, which is undefined

PS. I've read the explanation on mathforum.org, but it isn't clear to me.

In general, there is no good answer as to what $0^0$ "should" be, so it is usually left undefined.
Basically, if you consider $x^y$ as a function of two variables, then there is no limit as $(x,y)\to(0,0)$ (with $x\geq 0$): if you approach along the line $y=0$, then you get $\lim\limits_{x\to 0^+} x^0 = \lim\limits_{x\to 0^+} 1 = 1$; so perhaps we should define $0^0=1$? Well, the problem is that if you approach along the line $x=0$, then you get $\lim\limits_{y\to 0^+}0^y = \lim\limits_{y\to 0^+} 0 = 0$. So should we define it $0^0=0$?
Well, if you approach along other curves, you'll get other answers. Since $x^y = e^{y\ln(x)}$, if you approach along the curve $y=\frac{1}{\ln(x)}$, then you'll get a limit of $e$; if you approach along the curve $y=\frac{\ln(7)}{\ln(x)}$, then you get a limit of $7$. And so on. There is just no good answer from the analytic point of view. So, for calculus and algebra, we just don't want to give it any value, we just declare it undefined.
However, from a set-theory point of view, there actually is one and only one sensible answer to what $0^0$ should be! In set theory, $A^B$ is the set of all functions from $B$ to $A$; and when $A$ and $B$ denote "size" (cardinalities), then the "$A^B$" is defined to be the size of the set of all functions from $A$ to $B$. In this context, $0$ is the empty set, so $0^0$ is the collection of all functions from the empty set to the empty set. And, as it turns out, there is one (and only one) function from the empty set to the empty set: the empty function. So the set $0^0$ has one and only one element, and therefore we must define $0^0$ as $1$. So if we are talking about cardinal exponentiation, then the only possible definition is $0^0=1$, and we define it that way, period.
Added 2: the same holds in Discrete Mathematics, when we are mostly interested in "counting" things. In Discrete Mathematics, $n^m$ represents the number of ways in which you can make $m$ selections out of $n$ possibilities, when repetitions are allowed and the order matters. (This is really the same thing as "maps from $\{1,2,\ldots,m\}$ to $\\{1,2,\ldots,n\\}$" when interpreted appropriately, so it is again the same thing as in set theory).
So what should $0^0$ be? It should be the number of ways in which you can make no selections when you have no things to choose from. Well, there is exactly one way of doing that: just sit and do nothing! So we  make $0^0$ equal to $1$, because that is the correct number of ways in which we can do the thing that $0^0$ represents. (This, as opposed to $0^1$, say, where you are required to make $1$ choice with nothing to choose from; in that case, you cannot do it, so the answer is that $0^1=0$).
Your "train of thoughts" don't really work: If $x\neq 0$, then $0^x$ means "the number of ways to make $x$ choices from $0$ possibilities". This number is $0$. So for any number $k$, you have $k\cdot 0^x = 0 = 0^x$, hence you cannot say that the equation $0^0\cdot 0^x = 0^x$ suggests that $0^0$ "should" be $1$. The second argument also doesn't work because you cannot divide by $0$, which is what you get with $0^x$ when $x\neq 0$. So it really comes down to what you want $a^b$ to mean, and in discrete mathematics, when $a$ and $b$ are nonnegative integers, it's a count: it's the number of distinct ways in which you can do a certain thing (described above), and that leads necessarily to the definition that makes $0^0$ equal to $1$: because $1$
is the number of ways of making no selections from no choices.
Coda. In the end, it is a matter of definition and utility. In Calculus and  algebra, there is no reasonable definition (the closest you can come up with is trying to justify it via the binomial theorem or via power series, which I personally think is a bit weak), and it is far more useful to leave it undefined or indeterminate, since otherwise it would lead to all sorts of exceptions when dealing with the limit laws. In set theory, in discrete mathematics, etc., the definition $0^0=1$ is both useful and natural, so we define it that way in that context. For other contexts (such as the one mentioned in mathforum, when you are dealing exclusively with analytic functions where the problems with limits do not arise) there may be both natural and useful definitions.
We basically define it (or fail to define it) in whichever way it is most useful and natural to do so for the context in question. For Discrete Mathematics, there is no question what that "useful and natural" way should be, so we define it that way.


Question:
It is well known that quantum mechanics and (general) relativity do not fit well. I am wondering whether it is possible to make a list of contradictions or problems between them?
E.g. relativity theory uses a space-time continuum, while quantum theory uses discrete states.
I am not merely looking for a solution or rebuttal of such opposites, more for a survey of the field out of interest.

There are zero contradictions between quantum mechanics and special relativity; quantum field theory is the framework that unifies them.
General relativity also works perfectly well as a low-energy effective quantum field theory. For questions like the low-energy scattering of photons and gravitons, for instance, the Standard Model coupled to general relativity is a perfectly good theory. It only breaks down when you ask questions involving invariants of order the Planck scale, where it fails to be predictive; this is the problem of "nonrenormalizability."
Nonrenormalizability itself is no big deal; the Fermi theory of weak interactions was nonrenormalizable, but now we know how to complete it into a quantum theory involving W and Z bosons that is consistent at higher energies. So nonrenormalizability doesn't necessarily point to a contradiction in the theory; it merely means the theory is incomplete.
Gravity is more subtle, though: the real problem is not so much nonrenormalizability as  high-energy behavior inconsistent with local quantum field theory. In quantum mechanics, if you want to probe physics at short distances, you can scatter particles at high energies. (You can think of this as being due to Heisenberg's uncertainty principle, if you like, or just about properties of Fourier transforms where making localized wave packets requires the use of high frequencies.) By doing ever-higher-energy scattering experiments, you learn about physics at ever-shorter-length scales. (This is why we build the LHC to study physics at the attometer length scale.)
With gravity, this high-energy/short-distance correspondence breaks down. If you could collide two particles with center-of-mass energy much larger than the Planck scale, then when they collide their wave packets would contain more than the Planck energy localized in a Planck-length-sized region. This creates a black hole. If you scatter them at even higher energy, you would make an even bigger black hole, because the Schwarzschild radius grows with mass. So the harder you try to study shorter distances, the worse off you are: you make black holes that are bigger and bigger and swallow up ever-larger distances. No matter what completes general relativity to solve the renormalizability problem, the physics of large black holes will be dominated by the Einstein action, so we can make this statement even without knowing the full details of quantum gravity.
This tells us that quantum gravity, at very high energies, is not a quantum field theory in the traditional sense. It's a stranger theory, which probably involves a subtle sort of nonlocality that is relevant for situations like black hole horizons.
None of this is really a contradiction between general relativity and quantum mechanics. For instance, string theory is a quantum mechanical theory that includes general relativity as a low-energy limit. What it does mean is that quantum field theory, the framework we use to understand all non-gravitational forces, is not sufficient for understanding gravity. Black holes lead to subtle issues that are still not fully understood.


Question:
This question is about why we have a universal speed limit (the speed of light in vacuum). Is there a more fundamental law that tells us why this is?
I'm not asking why the speed limit is equal to $c$ and not something else, but why there is a limit at all.
EDIT: Answers like "if it was not.." and answers explaining the consequences of having or not having a speed limit are not -in my opinion- giving an answer specifically to whether there is a more fundamental way to derive and explain the existence of the limit.

Imagine a person who prefers to measure the amount of money in his bank account with the value $V$. The equation is $V = C\tanh N$, where $N$ is the actual amount of money in dollars. This person will also be confused:

Why is there a limit ($C$) on the amount of money that I can have? Is there any law that says the value of my money, $V$, cannot be more than $C$?

The answer is that he is just using a "wrong" variable to measure his assets. $V$ is not additive — it is a transform of an additive variable, $N$, which he has to use for everything to make sense. And there is no "law of the universe" -- that limits the value of $V$ — such a limit is just a product of his stubbornness.
The same thing applies to measuring speed — it is the "wrong" variable to describe the rate of motion; speed is not additive. The "correct" variable is called "rapidity" — it is additive, and there is no limit on it.


Question:
You are given an array of $2n$ elements
$$a_1, a_2, \dots, a_n, b_1, b_2, \dots b_n$$
The task is to interleave the array, using an in-place algorithm such that the resulting array looks like
$$b_1, a_1, b_2, a_2, \dots , b_n, a_n$$
If the in-place requirement wasn't there, we could easily create a new array and copy elements giving an $\mathcal{O}(n)$ time algorithm.
With the in-place requirement, a divide and conquer algorithm bumps up the algorithm to be $\theta(n \log n)$.
So the question is:

Is there an $\mathcal{O}(n)$ time algorithm, which is also in-place?

(Note: You can assume the uniform cost WORD RAM model, so in-place translates to $\mathcal{O}(1)$ space restriction).

Here is the answer which elaborates upon the algorithm from the paper linked by Joe:
First let us consider a $\Theta(n \log n)$ algorithm which uses divide and conquer.
1) Divide and Conquer
We are given
$$a_1, a_2, \dots , b_1, b_2, \dots b_n$$
Now to use divide and conquer, for some $m = \Theta(n)$, we try to get the array
$$ [a_1, a_2, \dots , a_m, b_1, b_2, \dots, b_m], [a_{m+1}, \dots, a_n, b_{m+1}, \dots b_n]$$
and recurse.
Notice that the portion $$ b_1 , b_2, \dots b_m, a_{m+1}, \dots a_n$$ is a cyclic shift of
$$ a_{m+1}, \dots a_n, b_1 , \dots b_m$$
by $m$ places.
This is a classic and can be done in-place by three reversals and in $\mathcal{O}(n)$ time.
Thus the divide and conquer gives you a $\Theta(n \log n)$ algorithm, with a recursion similar to $T(n) = 2T(n/2) + \Theta(n)$.
2) Permutation Cycles
Now, another approach to the problem is the consider the permutation as a set of disjoint cycles.
The permutation is given by (assuming starting at $1$)
$$ j \mapsto 2j \mod 2n+1$$
If we somehow knew exactly what the cycles were, using constant extra space, we could realize the permutation by picking an element $A$, determine where that element goes (using the above formula), put the element in the target location into temporary space, put the element $A$ into that target location and continue along the cycle. Once we are done with one cycle we move onto an element of the next cycle and follow that cycle and so on.
This would give us an $\mathcal{O}(n)$ time algorithm, but it assumes that we "somehow knew what the exact cycles were" and trying to do this book-keeping within the $\mathcal{O}(1)$ space limitation is what makes this problem hard.
This is where the paper uses number theory.
It can be shown that, in the case when $2n + 1 = 3^k$, the elements at positions $1$, $3, 3^2, \dots, 3^{k-1}$ are in different cycles and every cycle contains an element at the position $3^m, m \ge 0$.
This uses the fact that $2$ is a generator of $(\mathbb{Z}/3^k)^*$.
Thus when $2n+1 = 3^k$, the follow the cycle approach gives us an $\mathcal{O}(n)$ time algorithm, as for each cycle, we know exactly where to begin: powers of $3$ (including $1$) (those can be computed in $\mathcal{O}(1)$ space).
3) Final Algorithm
Now we combine the above two: Divide and Conquer + Permutation Cycles.
We do a divide and conquer, but pick $m$ so that $2m+1$ is a power of $3$ and $m = \Theta(n)$.
So instead on recursing on both "halves", we recurse on only one and do $\Theta(n)$ extra work.
This gives us the recurrence $T(n) = T(cn) + \Theta(n)$ (for some $0 \lt c \lt 1$) and thus gives us an $\mathcal{O}(n)$ time, $\mathcal{O}(1)$ space algorithm!


Question:
Having two different size of sets of points (2D for simplicity) dispersed within two different size squares the question are that:
1- how to find any occurrence of the the small one through the large one?
2- Any idea on how to rank the occurrences as shown on the following figure?
Here is a simple demonstration of the question and a desired solution:

Update 1:
The following figure shows a bit more realistic view of the problem being investigated.

Regarding the comments the following properties apply:

exact location of points are available
exact size of points are available

size can be zero(~1) = only a point

all points are black on a white background
there is no gray-scale/anti-aliasing effect

Here is my implementation of the method presented by endolith with some small changes (I rotated target instead of source since it is smaller and faster in rotation). I accepted 'endolith's answer because I was thinking about that before. About RANSAC I have no experience so far. Furthermore the implementation of RANSAC requires lots of code.

From a computer vision perspective: the basic problem is estimating a homography between your target point set and a subset of points in the large set. In your case, with rotation only, it will be an affine homography. You should look into the RANSAC method. It is designed to find a match in a set with many outliers.  So, you are armed with two important keywords, homography and RANSAC.
OpenCV offers tools for computing these solutions, but you can also use MATLAB. Here is a RANSAC example using OpenCV. And another complete implementation.
A typical application might be to find a book cover in a picture.  You have a picture of the book cover, and a photo of the book on a table.  The approach is not to do template matching, but to find salient corners in each image, and compare those point sets.  Your problem looks like the second half of this process - finding the point set in a big cloud. RANSAC was designed to do this robustly.

I guess cross-correlation methods can also work for you since the data is so clean. The problem is, you add another degree of freedom with rotation, and the method becomes very slow.


Question:
I was wondering what the difference between the variance and the standard deviation is.
If you calculate the two values, it is clear that you get the standard deviation out of the variance, but what does that mean in terms of the distribution you are observing?
Furthermore, why do you really need a standard deviation?

The standard deviation is the square root of the variance.
The standard deviation is expressed in the same units as the mean is, whereas the variance is expressed in squared units, but for looking at a distribution, you can use either just so long as you are clear about what you are using. For example, a Normal distribution with mean = 10 and sd = 3 is exactly the same thing as a Normal distribution with mean = 10 and variance = 9.


Question:
Here is a funny exercise
$$\sin(x - y) \sin(x + y) = (\sin x - \sin y)(\sin x + \sin y).$$
(If you prove it don't publish it here please).
Do you have similar examples?

$$\int_0^1\frac{\mathrm{d}x}{x^x}=\sum_{k=1}^\infty \frac1{k^k}$$


Question:
Could somebody explain the difference between dependent types and refinement types? As I understand it, a refinement type contains all values of a type fulfilling a predicate. Is there a feature of dependent types which distinguishes them?
If it helps, I came across Refined types via the Liquid Haskell project, and dependent types via Coq and Agda. That said, I'm looking for an explanation of how the theories differ.

The main differences are along two dimensions -- in the underlying theory,
and in how they can be used. Lets just focus on the latter.
As a user, the "logic" of specifications in LiquidHaskell and refinement type systems generally, is restricted to decidable fragments
so that verification (and inference) is completely automatic, meaning one does not require "proof terms" of the sort needed in the full dependent setting. This leads to significant automation. For example, compare insertion sort in LH:

vs. in Idris

However, the automation comes at a price. One cannot use arbitrary functions as specifications as one can in the fully dependent world,
which restricts the class of properties one can write.
Thus, one goal of refinement systems is to extend the class of what
can be specified, while that of fully dependent systems is to automate
what can be proved. Perhaps there is a happy meeting ground where we can
get the best of both worlds!


Question: What exactly is meant by "stochastic sampling" and is it profoundly different from the regular Nyquist-Shannon sampling theorem? Is it related to sampling a stochastic process?

Stochastic sampling doesn't have anything to do with sampling stochastic waveforms. It simply means that instead of sampling at regular intervals, the waveform is sampled randomly.
Recall that in a sampling scheme per the Nyquist-Shannon sampling theorem, a continuous signal $x(t)$ on $\mathbb{R}$ is sampled as $x[n]=x(nT),\ n\in\mathbb{Z}$, where $T$ is the sampling interval and $f_s=1/T$ is the sampling frequency. If the maximum frequency in the signal is $f_{max}$, then $f_s$ must be such that $f_s\geq 2f_{max}$ so as to avoid aliasing. For ease of comparison with stochastic sampling later on in the answer, let me redefine the sampling in a slightly different form than usual as
$$
\begin{align}
s(t)&=\sum_{n=0}^{f_s\tau -1}\delta(t-nT)\\
x[n]&=x(t)\cdot s(t)
\end{align}
$$
where $\delta(t)$ is the Dirac delta function and $x(t)$ is only sampled on the interval $[0,\tau]$.
If you actually think about it, regular sampling is pretty limiting in practice. Aliasing crops up in several places, and probably a well known and visible effect is the Moiré patterns which can be reproduced at home by taking a photo of regular patterns displayed on a television (examples below).

However, this is always a problem with cameras, but never with your eyes if you were to see the pattern directly! The reason is because the photoreceptors in your retina are not laid out in a regular pattern unlike the CCD in a camera. The idea behind (not necessarily the idea that led to its development) stochastic sampling is very similar to the non-regular layout of photoreceptors in the eye. It is an anti-aliasing technique which works by breaking up the regularity in the sampling.
In stochastic sampling, every point in the signal has a non-zero probability of being sampled (unlike regular sampling where certain sections will never be sampled). A simple uniform stochastic sampling scheme can be implemented over the same interval $[0,\tau]$ as
$$
\begin{align}
s(t)&=\sum_{n=0}^{f_s \tau -1}\delta(t-t_n),\quad t_n\sim \mathcal{U}(0,\tau)\\
x[n]&=x(t)\cdot s(t)
\end{align}
$$
where $\mathcal{U}(0,\tau)$ is the uniform distribution on the interval $[0,\tau]$.
By sampling stochastically, there is no "Nyquist frequency" to talk about, so aliasing will no longer be a problem as before. However, this comes at a price. What you gain in anti-aliasing, you lose by noise in the system. The stochastic sampling introduces high-frequency noise, although for several applications (especially in imaging), aliasing is a much stronger nuisance than noise (e.g., you can see the Moiré patterns easily in the above images, but to a lesser extent the speckle noise).
As far as I know, stochastic sampling schemes are almost always used in spatial sampling (in image processing, computer graphics, array processing, etc.) and sampling in the time domain is still predominantly regular (I'm not sure if people even bother with stochastic sampling in the time domain). There are several different stochastic sampling schemes such as Poisson sampling, jittered sampling, etc., which you can look up if you're interested. For a general, low key introduction to the topic, see

M. A. Z. Dippé and E. H. Wold, "Antialiasing Through Stochastic Sampling", SIGGRAPH, Vol. 19, No. 5, pp. 69-78, 1985.


Question:
I begin this post with a plea: please don't be too harsh with this post for being off topic or vague. It's a question about something I find myself doing as a mathematician, and wonder whether others do it as well. It is a soft question about recreational mathematics - in reality, I'm shooting for more of a conversation.
I know that a lot of users on this site (e.g. Cleo, Jack D'Aurizio, and so on) are really good at figuring out crafty ways of solving recreational definite integrals, like
$$\int_{\pi/2}^{\pi} \frac{x\sin(x)}{5-4\cos(x)} \, dx$$
or
$$\int_0^\infty \bigg(\frac{x-1}{\ln^2(x)}-\frac{1}{\ln(x)}\bigg)\frac{dx}{x^2+1}$$
When questions like this pop up on MSE, the OP provides an integral to evaluate, and the answerers can evaluate it using awesome tricks including (but certainly not limited to):

Clever substitution
Exploitation of symmetry in the integrand
Integration by parts
Expanding the integrand as a series
Differentiating a well-know integral-defined function, like the Gamma or Beta functions
Taking Laplace and Inverse Laplace transforms

But when I play around with integrals on my own, I don't always have a particular problem to work on. Instead, I start with a known integral, like
$$\int_0^\pi \cos(mx)\cos(nx) \, dx=\frac{\pi}{2}\delta_{mn},\space\space \forall m,n\in
\mathbb Z^+$$
and "milk" it, for lack of a better word, to see how many other obscure, rare, or aesthetically pleasing integrals I can derive from it using some of the above techniques. For example, using the above integral, one might divide both sides by $m$, getting
$$\int_0^\pi \frac{\cos(mx)}{m}\cos(nx) \, dx=\frac{\pi}{2m}\delta_{mn},\space\space \forall m,n,k\in
\mathbb Z^+$$
Then, summing both sides from $m=1$ to $\infty$, and exploiting a well-known Fourier Series, obtain
$$\int_0^\pi \cos(nx)\ln(2-2\cos(x)) \, dx=-\frac{\pi}{n},\space\space \forall n\in
\mathbb Z^+$$
or, after a bit of algebra, the aesthetically pleasing result
$$\int_0^{\pi/2} \cos(2nx)\ln(\sin(x)) \, dx=-\frac{\pi}{4n},\space\space \forall n\in
\mathbb Z^+$$
After pulling a trick like this, I look through all of my notebooks and integral tables for other known integrals on which I can get away with the same trick, just to see what integrals I can "milk" out of them in the same way. This is just an example - even using the same starting integral, countless others can be obtained by using other Fourier Series, Power Series, integral identities, etc. For example, some integrals derived from the very same starting integral include
$$\int_0^\pi \frac{\cos(nx)}{q-\cos(x)} \, dx=\frac{\pi(q-\sqrt{q^2-1})^{n+1}}{1-q^2+q\sqrt{q^2-1}}$$
$$\int_0^\pi \frac{dx}{(1+a^2-2a\cos(x))(1+b^2-2b\cos(mx))}=\frac{\pi(1+a^m b)}{(1-a^2)(1-b^2)(1-a^m b)}$$
and the astounding identity
$$\int_0^{\pi/2}\ln{\lvert\sin(mx)\rvert}\cdot \ln{\lvert\sin(nx)\rvert}\, dx=\frac{\pi^3}{24}\frac{\gcd^2(m,n)}{mn}+\frac{\pi\ln^2(2)}{2}$$
Everyone seems to be curious about the proof of this last identity. A proof can be found in my answer here.
I just pick a starting integral, and using every technique I know as many times as possible, try to come up with the most exotic integrals as I can, rather than picking a specific integral and trying to solve it.
Of course, integrals generated this way would be poor (or at least extremely difficult) candidates for contest problems or puzzles to evaluate given the integral, since they are derived "backwards," and determining the derivation given the integral is likely much harder than pursuing the vague goal of a "nice-looking integral" with no objective objective (ha ha).
QUESTION: Do you (residents of MSE who regularly answer/pose recreational definite integral questions) do this same activity, in which you try to generate, rather than solve, cool integrals? If so, what are some  integrals you have come up with in this way? What strategies do you use? Does anyone care to opine on the value (or perhaps lack of value) of seeking integrals in this way?
Cheers!

Yes, definitely. For example, I found that
$$ m\int_0^{\infty} y^{\alpha} e^{-y}(1-e^{-y})^{m-1} \, dy = \Gamma(\alpha+1) \sum_{k \geq 1} (-1)^{k-1} \binom{m}{k} \frac{1}{k^{\alpha}} $$
(and related results for particular values of $\alpha$) while mucking about with some integrals. Months later, I was reading a paper about a particular regularisation scheme (loop regularisation) useful in particle physics, and was rather surprised to recognise the sum on the right! I was then able to use the integral to prove that such sums have a particular asymptotic that was required for the theory to actually work as intended, which the original author had verified numerically but not proved. The resulting paper's on arXiv here.
Never let it be said that mucking about with integrals is a pointless pursuit!


Question:
At work we were discussing this as my boss has never heard of normalization. In Linear Algebra, Normalization seems to refer to the dividing of a vector by its length. And in statistics, Standardization seems to refer to the subtraction of a mean then dividing by its SD. But they seem interchangeable with other possibilities as well.
When creating some kind of universal score, that makes up $2$ different metrics, which have different means and different SD's, would you Normalize, Standardize, or something else? One person told me it's just a matter of taking each metric and dividing them by their SD, individually. Then summing the two. And that will result in a universal score that can be used to judge both metrics.
For instance, say you had the number of people who take the subway to work (in NYC) and the number of people who drove to work (in NYC).
$$\text{Train} \longrightarrow x$$
$$\text{Car} \longrightarrow y$$
If you wanted to create a universal score to quickly report traffic fluctuations, you can't just add $\text{mean}(x)$ and $\text{mean}(y)$ because there will be a LOT more people who ride the train. There's 8 million people living in NYC, plus tourists. That's millions of people taking the train everyday verse hundreds of thousands of people in cars. So they need to be transformed to a similar scale in order to be compared.
If $\text{mean}(x) = 8,000,000$
and $\text{mean}(y) = 800,000$
Would you normalize $x$ & $y$ then sum? Would you standardize $x$ & $y$ then sum? Or would you divide each by their respective SD then sum?  In order to get to a number that when fluctuates, represents total traffic fluctuations.
Any article or chapters of books for reference would be much appreciated. THANKS!
Also here's another example of what I'm trying to do.
Imagine you're a college dean, and you're discussing admission requirements. You may want students with at least a certain GPA and a certain test score. It'd be nice if they were both on the same scale because then you could just add the two together and say, "anyone with at least a 7.0 can get admitted." That way, if a prospective student has a 4.0 GPA, they could get as low as a 3.0 test score and still get admitted.  Inversely, if someone had a 3.0 GPA, they could still get admitted with a 4.0 test score.
But it's not like that. The ACT is on a 36 point scale and most GPA's are on 4.0 (some are 4.3, yes annoying). Since I can't just add an ACT and GPA to get some kind of universal score, how can I transform them so they can be added, thus creating a universal admission score.  And then as a Dean, I could just automatically accept anyone with a score above a certain threshold.  Or even automatically accept everyone whose score is within the top 95%.... those sorts of things.
Would that be normalization? standardization? or just dividing each by their SD then summing?

Normalization rescales the values into a range of [0,1].  This might be useful in some cases where all parameters need to have the same positive scale. However, the outliers from the data set are lost.
$$ X_{changed} = \frac{X - X_{min}}{X_{max}-X_{min}} $$
Standardization rescales data to have a mean ($\mu$) of 0 and standard deviation ($\sigma$) of 1 (unit variance).
$$ X_{changed} = \frac{X - \mu}{\sigma} $$
For most applications standardization is recommended.


Question:
If you have a variable which perfectly separates zeroes and ones in target variable, R will yield the following "perfect or quasi perfect separation" warning message:
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred

We still get the model but the coefficient estimates are inflated.
How do you deal with this in practice?

You've several options:

Remove some of the bias.
(a) By penalizing the likelihood as per @Nick's suggestion. Package logistf in R or the FIRTH option in SAS's PROC LOGISTIC implement the method proposed in Firth (1993), "Bias reduction of maximum likelihood estimates", Biometrika, 80,1.; which removes the first-order bias from maximum likelihood estimates. (Here @Gavin recommends the brglm package, which I'm not familiar with, but I gather it implements a similar approach for non-canonical link functions e.g. probit.)
(b) By using median-unbiased estimates in exact conditional logistic regression. Package elrm or logistiX in R, or  the EXACT statement in SAS's PROC LOGISTIC.
Exclude cases where the predictor category or value causing separation occurs. These may well be outside your scope; or worthy of further, focused investigation. (The R package safeBinaryRegression is handy for finding them.)
Re-cast the model. Typically this is something you'd have done beforehand if you'd thought about it, because it's too complex for your sample size.
(a) Remove the predictor from the model. Dicey, for the reasons given by @Simon: "You're removing the predictor that best explains the response".
(b) By collapsing predictor categories / binning the predictor values. Only if this makes sense.
(c) Re-expressing the predictor as two (or more) crossed factors without interaction. Only if this makes sense.
Use a Bayesian analysis as per @Manoel's suggestion. Though it seems unlikely you'd want to just because of separation, worth considering on its other merits.The paper he recommends is Gelman et al (2008), "A weakly informative default prior distribution for logistic & other regression models", Ann. Appl. Stat., 2, 4: the default in question is an independent Cauchy prior for each coefficient, with a mean of zero & a scale of $\frac{5}{2}$; to be used after standardizing all continuous predictors to have a mean of zero & a standard deviation of $\frac{1}{2}$. If you can elucidate strongly informative priors, so much the better.
Do nothing. (But calculate confidence intervals based on profile likelihoods, as the Wald estimates of standard error will be badly wrong.) An often over-looked option. If the purpose of the model is just to describe what you've learnt about the relationships between predictors & response, there's no shame in quoting a confidence interval for an odds ratio of, say, 2.3 upwards. (Indeed it could seem fishy to quote confidence intervals based on unbiased estimates that exclude the odds ratios best supported by the data.) Problems come when you're trying to predict using point estimates, & the predictor on which separation occurs swamps the others.
Use a hidden logistic regression model, as described in Rousseeuw & Christmann (2003),"Robustness against separation and outliers in logistic regression", Computational Statistics & Data Analysis, 43, 3, and implemented in the R package hlr. (@user603 suggests this.) I haven't read the paper, but they say in the abstract "a slightly more general model is proposed under which the observed response is strongly related but not equal to the unobservable true response", which suggests to me it mightn't be a good idea to use the method unless that sounds plausible.
"Change a few randomly selected observations from 1 to 0 or 0 to 1 among variables exhibiting complete separation": @RobertF's comment. This suggestion seems to arise from regarding separation as a problem per se rather than as a symptom of a paucity of information in the data which might lead you to prefer other methods to maximum-likelihood estimation, or to limit inferences to those you can make with reasonable precision—approaches which have their own merits & are not just "fixes" for separation. (Aside from its being unabashedly ad hoc, it's unpalatable to most that analysts asking the same question of the same data, making the same assumptions, should give different answers owing to the result of a coin toss or whatever.)


Question:
In languages like C, the programmer is expected to insert calls to free. Why doesn't the compiler do this automatically? Humans do it in a reasonable amount of time(ignoring bugs), so it is not impossible.
EDIT: For future reference, here is another discussion that has an interesting example.

Because it's undecidable whether the program will use the memory again. This means that no algorithm can correctly determine when to call free() in all cases, which means that any compiler that tried to do this would necessarily produce some programs with memory leaks and/or some programs that continued to use memory that had been freed.  Even if you ensured that your compiler never did the second one and allowed the programmer to insert calls to free() to fix those bugs, knowing when to call free() for that compiler would be even harder than knowing when to call free() when using a compiler that didn't try to help.


Question:
The bit that makes sense – tidal forces
My physics teacher explained that most tidal effect is caused by the Moon rotating around the Earth, and some also by the Sun.
They said that in the Earth - Moon system, the bodies are in free-fall about each other. But that points on the surface of Earth, not being at Earth's centre of gravity, experience slightly different pulls towards the Moon.
The pull is a little greater if they are on the Moon's side, and a little less on the side away from the Moon. Once free-fall is removed, on the Moon side this feels like a pull towards the Moon and on the the opposite side it feels like a repulsion from the Moon.
This makes sense to me, and is backed up by other questions and answers here, like this and also this Phys.SE question.
The bit that doesn't make sense – tidal bulges
They also said that there are "tidal bulges" on opposite sides of the Earth caused by these forces. The bulges are stationary relative to the Moon, and the Earth rotating through the bulges explains why we get two tides a day. They drew a picture like this one…

An image search for tidal bulges finds hundreds of similar examples, and here's an animation from a scientist on Twitter.
…But, if there is a tidal bulge on both sides of Earth, like a big wave with two peaks going round and around, how can an island, like Great Britain where I live, simultaneously have a high tide on one side and a low tide on the other?
For example:

Holyhead tide times on the West coast
Whitby tide times on the East

Two ports with tides 6 hours, or 180º apart. It's high tide at one while low tide at the other. But they are only 240 miles distant by road.
Great Britain is much smaller than Earth. It's probably not even as big as the letter "A" in the word "TIDAL" in that picture.

To prove this isn't just Britain being a crazy anomaly, here is another example from New Zealand:

WESTPORT, New Zealand South Island
Kaikoura Peninsula, New Zealand South Island

Two ports that are 180º (6 hours) apart, but separated by just 200 delightful miles through a national park. New Zealand, unlike the UK, is in fairly open ocean.

There is no tidal bulge.
This was one of Newton's few mistakes. Newton did get the tidal forcing function correct, but the response to that forcing in the oceans: completely wrong.
Newton's equilibrium theory of the tides with its two tidal bulges is falsified by observation. If this hypothesis was correct, high tide would occur when the Moon is at zenith and at nadir. Most places on the Earth's oceans do have a high tide every 12.421 hours, but whether those high tides occur at zenith and nadir is sheer luck. In most places, there's a predictable offset from the Moon's zenith/nadir and the time of high tide, and that offset is not zero.
One of the most confounding places with regard to the tides is Newton's back yard. If Newton's equilibrium theory was correct, high tide would occur at more or less the same time across the North Sea. That is not what is observed. At any time of day, one can always find a place in the North Sea that is experiencing high tide, and another that is simultaneously experiencing low tide.
Why isn't there a bulge?
Beyond the evidence, there are a number of reasons a tidal bulge cannot exist in the oceans.
The tidal bulge cannot exist because the way water waves propagate. If the tidal bulge did exist, it would form a wave with a wavelength of half the Earth's circumference. That wavelength is much greater than the depth of the ocean, which means the wave would be a shallow wave. The speed of a shallow wave at some location is approximately $\sqrt{gd}$, where $d$ is the depth of the ocean at that location. This tidal wave could only move at 330 m/s over even the deepest oceanic trench, 205 m/s over the mean depth of 4267 m, and less than that in shallow waters. Compare with the 465 m/s rotational velocity at the equator. The shallow tidal wave cannot keep up with the Earth's rotation.
The tidal bulge cannot exist because the Earth isn't completely covered by water. There are two huge north-south barriers to Newton's tidal bulge, the Americas in the western hemisphere and Afro-Eurasia in the eastern hemisphere. The tides on the Panama's Pacific coast are very, very different from the tides just 100 kilometers away on Panama's Caribbean coast.
A third reason the tidal bulge cannot exist is the Coriolis effect. That the Earth is rotating at a rate different from the Moon's orbital rate means that the Coriolis effect would act to sheer the tidal wave apart even if the Earth was completely covered by a very deep ocean.
What is the right model?
What Newton got wrong, Laplace got right.
Laplace's dynamic theory of the tides accounts for the problems mentioned above. It explains why it's always high tide somewhere in the North Sea (and Patagonia, and the coast of New Zealand, and a few other places on the Earth where tides are just completely whacko). The tidal forcing functions combined with oceanic basin depths and outlines results in amphidromic systems. There are points on the surface, "amphidromic points", that experience no tides, at least with respect to one of the many forcing functions of the tides. The tidal responses rotate about these amphidromic points.
There are a large number of frequency responses to the overall tidal forcing functions. The Moon is the dominant force with regard to the tides. It helps to look at things from the perspective of the frequency domain. From this perspective, the dominant frequency on most places on the Earth is 1 cycle per 12.421 hours, the M2 tidal frequency. The second largest is the 1 cycle per 12 hours due to the Sun, the S2 tidal frequency. Since the forcing function is not quite symmetric, there are also 1 cycle per 24.841 hours responses (the M1 tidal frequency), 1 cycle per 24 hours responses (the S1 tidal frequency), and a slew of others. Each of these has its own amphidromic system.
With regard to the North Sea, there are three M2 tidal amphidromic points in the neighborhood of the North Sea. This nicely explains why the tides are so very goofy in the North Sea.
Images
For those who like imagery, here are a few key images. I'm hoping that the owners of these images won't rearrange their websites.
The tidal force

Source:
This is what Newton did get right. The tidal force is away from the center of the Earth when the Moon (or Sun) is at zenith or nadir, inward when the Moon (or Sun) is on the horizon. The vertical component is the driving force behind the response of the Earth as a whole to these tidal forces. This question isn't about the Earth tides. The question is about the oceanic tides, and there it's the horizontal component that is the driving force.
The global M2 tidal response

Source:

Source:  link, not archived]
The M2 constituent of the tides is the roughly twice per day response to the tidal forcing function that results from the Moon. This is the dominant component of the tides in many parts of the world. The first image shows the M2 amphidromic points, points where there is no M2 component of the tides. Even though these points have zero response to this component, these amphidromic points are nonetheless critical in modeling the tidal response. The second image, an animated gif, shows the response over time.
The M2 tidal response in the North Sea

Archived source:
I mentioned the North Sea multiple times in my response. The North Atlantic is where 40% of the M2 tidal dissipation occurs, and the North Sea is the hub of this dissipation.
Energy flow of the semi-diurnal, lunar tidal wave (M2)

Archived source:  (
The above image displays transfer of energy from places where tidal energy is created to places where it is dissipated. This energy transfer explains the weird tides in Patagonia, one of the places on the Earth where tides are highest and most counterintuitive. Those Patagonian tides are largely a result of energy transfer from the Pacific to the Atlantic. It also shows the huge transfer of energy to the North Atlantic, which is where 40% of the M2 tidal dissipation occurs.
Note that this energy transfer is generally eastward. You can think of this as a representing "net tidal bulge." Or not. I prefer "or not."
Extended discussions based on comments
(... because we delete comments here)

Isn't a Tsunami a shallow water wave as well as compared to the ocean basins? I know the wavelength is smaller but it is still a shallow water wave and hence would propagate at the same speed. Why don't they suffer from what you mentioned regarding the rotational velocity of the earth.

Firstly, there's a big difference between a tsunami and the tides. A tsunami is the the result of a non-linear damped harmonic oscillator (the Earth's oceans) to an impulse (an earthquake). The tides are the response to a cyclical driving force. That said,

As is the case with any harmonic oscillator, the impulse response is informative of the response to a cyclical driving force.
Tsunamis are subject to the Coriolis effect. The effect is small, but present. The reason it is small is because tsunami are, for the most part, short term events relative to the Earth's rotation rate. The Coriolis effect becomes apparent in the long-term response of the oceans to a tsunami. Topography is much more important for a tsunami.

The link that follows provides an animation of the 2004 Indonesian earthquake tsunami.
References for the above:
Dao, M. H., & Tkalich, P. (2007). Tsunami propagation modelling? a sensitivity study. Natural Hazards and Earth System Science, 7(6), 741-754.
Eze, C. L., Uko, D. E., Gobo, A. E., Sigalo, F. B., & Israel-Cookey, C. (2009). Mathematical Modelling of Tsunami Propagation. Journal of Applied Sciences and Environmental Management, 13(3).
Kowalik, Z., Knight, W., Logan, T., & Whitmore, P. (2005). Numerical modeling of the global tsunami: Indonesian tsunami of 26 December 2004. Science of Tsunami Hazards, 23(1), 40-56.

This is an interesting answer full of cool facts and diagrams, but I think it's a little overstated. Newton's explanation wasn't wrong, it was an approximation. He knew it was an approximation -- obviously he was aware that the earth had land as well as water, that tides were of different heights in different places, and so on. I don't think it's a coincidence that the height of the bulge in the equipotential is of very nearly the right size to explain the observed heights of the tides.

Newton's analysis was a good start. Newton certainly did describe the tidal force properly. He didn't have the mathematical tools to do any better than what he did. Fourier analysis, proper treatment of non-inertial frames, and fluid dynamics all post-date Newton by about a century.
Besides the issues cited above, Newton ignored the horizontal component of the tidal force and only looked at the vertical component. The horizontal component wouldn't be important if the Earth was tidally locked to the Moon. The dynamical theory of the tides essentially ignores the vertical component and only looks at the horizontal component. This gives a very different picture of the tides.
I'm far from alone in saying the tidal bulge doesn't exist. For example, from this lecture,[archive link] the page on dynamic tides[archive link] rhetorically asks "But how can water confined to a basin engage in wave motion at all like the “tidal bulges” that supposedly sweep around the globe as depicted in equilibrium theory?" and immediately responds (emphasis mine) "The answer is – it can’t."
In Affholder, M., & Valiron, F. (2001). Descriptive Physical Oceanography. CRC Press, the authors introduce Newton's equilibrium tide but then write (emphasis mine) "For the tidal wave to move at this enormous speed of 1600 km/h, the ideal ocean depth would have to be 22 km. Taking the average depth of the ocean as 3.9 km, the speed of the tidal elevations can only be 700 km/h. Therefore the equilibrium position at any instant required by this theory cannot be established."
Oceanographers still teach Newton's equilibrium tide theory for a number of reasons.  It does give a proper picture of the tidal forcing function. Moreover, many students do not understand how many places can have two tides a day. For that matter, most oceanography instructors and textbook authors don't understand! Many oceanographers and their texts still hold that the inner bulge is a consequence of gravity but the other bulge is a consequence of a so-called centrifugal force. This drives geophysicists and geodocists absolutely nuts. That's starting to change; in the last ten years or so, some oceanography texts have finally started teaching that the only force that is needed to explain the tides is gravitation.


Question:
Say I have some historical data e.g., past stock prices, airline ticket price fluctuations, past financial data of the company...
Now someone (or some formula) comes along and says "let's take/use the log of the distribution" and here's where I go WHY?
Questions:

WHY should one take the log of the distribution in the first place?
WHAT does the log of the distribution 'give/simplify' that the original distribution couldn't/didn't?
Is the log transformation 'lossless'? I.e., when transforming to log-space and analyzing the data, do the same conclusions hold for the original distribution? How come?
And lastly WHEN to take the log of the distribution? Under what conditions does one decide to do this?

I've really wanted to understand log-based distributions (for example lognormal) but I never understood the when/why aspects - i.e., the log of the distribution is a normal distribution, so what? What does that even tell and me and why bother? Hence the question!
UPDATE: As per @whuber's comment I looked at the posts and for some reason I do understand the use of log transforms and their application in linear regression, since you can draw a relation between the independent variable and the log of the dependent variable. However, my question is generic in the sense of analyzing the distribution itself - there is no relation per se that I can conclude to help understand the reason of taking logs to analyze a distribution. I hope I'm making sense :-/
In regression analysis you do have constraints on the type/fit/distribution of the data and you can transform it and define a relation between the independent and (not transformed) dependent variable. But when/why would one do that for a distribution in isolation where constraints of type/fit/distribution are not necessarily applicable in a framework (like regression). I hope the clarification makes things more clear than confusing :)
This question deserves a clear answer as to "WHY and WHEN"

Log-scale informs on relative changes (multiplicative), while linear-scale informs on absolute changes (additive). When do you use each? When you care about relative changes, use the log-scale; when you care about absolute changes, use linear-scale. This is true for distributions, but also for any quantity or changes in quantities.
Note, I use the word "care" here very specifically and intentionally. Without a model or a goal, your question cannot be answered; the model or goal defines which scale is important. If you're trying to model something, and the mechanism acts via a relative change, log-scale is critical to capturing the behavior seen in your data. But if the underlying model's mechanism is additive, you'll want to use linear-scale.
Example. Stock market.  Stock A on day 1: $\$$100. On day 2, $\$$101. Every stock tracking service in the world reports this change in two ways! (1) +$\$$1. (2) +1%. The first is a measure of absolute, additive change; the second a measure of relative change.
Illustration of relative change vs absolute: Relative change is the same, absolute change is different
Stock A goes from $\$$1 to $\$$1.10.
Stock B goes from $\$$100 to $\$$110.
Stock A gained 10%, stock B gained 10% (relative scale, equal)
...but stock A gained 10 cents, while stock B gained $\$$10 (B gained more absolute dollar amount)
If we convert to log space, relative changes appear as absolute changes.
Stock A goes from $\log_{10}(\$1)$ to $\log_{10}(\$1.10)$ = 0 to .0413
Stock B goes from $\log_{10}(\$100)$ to $\log_{10}(\$110)$ = 2 to 2.0413
Now, taking the absolute difference in log space, we find that both changed by .0413.
Both of these measures of change are important, and which one is important to you depends solely on your model of investing. There are two models. (1) Investing a fixed amount of principal, or (2) investing in a fixed number of shares.
Model 1: Investing with a fixed amount of principal.
Say yesterday stock A cost $\$$1 per share, and stock B costs $\$$100 a share. Today they both went up by one dollar to $\$$2 and $\$$101 respectively. Their absolute change is identical ($\$$1), but their relative change is dramatically different (100% for A, 1% for B). Given that you have a fixed amount of principal to invest, say $\$$100, you can only afford 1 share of B or 100 shares of A. If you invested yesterday you'd have $\$$200 with A, or $\$$101 with B. So here you "care" about the relative gains, specifically because you have a finite amount of principal.
Model 2: fixed number of shares.
In a different scenario, suppose your bank only lets you buy in blocks of 100 shares, and you've decided to invest in 100 shares of A or B. In the previous case, whether you buy A or B your gains will be the same ($\$$100 - i.e. $1 for each share).
Now suppose we think of a stock value as a random variable fluctuating over time, and we want to come up with a model that reflects generally how stocks behave. And let's say we want to use this model to maximize profit. We compute a probability distribution whose x-values are in units of 'share price', and y-values in probability of observing a given share price. We do this for stock A, and stock B. If you subscribe to the first scenario, where you have a fixed amount of principal you want to invest, then taking the log of these distributions will be informative. Why? What you care about is the shape of the distribution in relative space. Whether a stock goes from 1 to 10, or 10 to 100 doesn't matter to you, right? Both cases are a 10-fold relative gain. This appears naturally in a log-scale distribution in that unit gains correspond to fold gains directly. For two stocks whose mean value is different but whose relative change is identically distributed (they have the same distribution of daily percent changes), their log distributions will be identical in shape just shifted. Conversely, their linear distributions will not be identical in shape, with the higher valued distribution having a higher variance.
If you were to look at these same distributions in linear, or absolute space, you would think that higher-valued share prices correspond to greater fluctuations. For your investing purposes though, where only relative gains matter, this is not necessarily true.
Example 2. Chemical reactions.
Suppose we have two molecules A and B that undergo a reversible reaction.
$A\Leftrightarrow B$
which is defined by the individual rate constants
($k_{ab}$) $A\Rightarrow B$
($k_{ba}$) $B\Rightarrow A$
Their equilibrium is defined by the relationship:
$K=\frac{k_{ab}}{k_{ba}}=\frac{[A]}{[B]}$
Two points here. (1) This is a multiplicative relationship between the concentrations of $A$ and $B$. (2) This relationship isn't arbitrary, but rather arises directly from the fundamental physical-chemical properties that govern molecules bumping into each other and reacting.
Now suppose we have some distribution of A or B's concentration. The appropriate scale of that distribution is in log-space, because the model of how either concentration changes is defined multiplicatively (the product of A's concentration with the inverse of B's concentration). In some alternate universe where $K^*=k_{ab}-k_{ba}=[A]-[B]$, we might look at this concentration distribution in absolute, linear space.
That said, if you have a model, be it for stock market prediction or chemical kinetics, you can always interconvert 'losslessly' between linear and log space, so long as your range of values is $(0,\inf)$. Whether you choose to look at the linear or log-scale distribution depends on what you're trying to obtain from the data.
EDIT. An interesting parallel that helped me build intuition is the example of arithmetic means vs geometric means. An arithmetic (vanilla) mean computes the average of numbers assuming a hidden model where absolute differences are what matter. Example. The arithmetic mean of 1 and 100 is 50.5. Suppose we're talking about concentrations though, where the chemical relationship between concentrations is multiplicative. Then the average concentration should really be computed on the log scale. This is called the geometric average. The geometric average of 1 and 100 is 10! In terms of relative differences, this makes sense: 10/1 = 10, and 100/10 = 10, ie., the relative change between the average and two values is the same. Additively we find the same thing; 50.5-1= 49.5, and 100-50.5 = 49.5.


Question:
I was surprised to learn that worker ants in some species live many years. I would have expected a lifespan of a few weeks or months (which is apparently the case for many species).
What factors might account for the length (and/or variation) in ants' lifespans?   (ie, is there some evolutionary preference? Some fundamental limit on the reproductive capacity of the queen?) Is there any relationship between these lifespans and different structures of ant communities?

There will always be a tradeoff in terms of resource allocation between reproduction and self maintenance. Since worker ants forego reproduction to perform other roles (gathering resources, caring for young etc.) within the colony, it makes sense that this would favour a longer lifespan. This idea works for most animals (i.e. higher reproduction = lower lifespan across species in general) and is well documented (Partridge et al. 1987, Gems & Riddle 1996 (PDF link), Westendorp & Kirkwood 1998 - to name a few). However the relationship is reversed in eusocial animals: the queens of ants, some bees and naked mole rats (which are all eusocial) tend to be longer lived than their sterile workers (Hartmann & Heinze 2003). Aging patterns within ants and other eusocial organisms are a very popular research topic at the moment, but the mechanisms causing differences between social castes are not fully understood.
Eusociality is strongly associated with increased lifespan, indeed many studies on the evolution of aging have focussed on eusocial animals which have appeared to overcome aging effects to an extent (Keller & Genoud, 1999, Buffenstein 2005). The naked mole rat is one of very few species of eusocial mammals and the relationship between its lifespan and body mass is very dissimilar to that of other rodents (ignore the bat points):

Image from Buffenstein & Pinto (2009).
If a queen has a longer reproductive lifespan then over the course of its life it will create a higher number of offspring. This will cause their increased longevity genes to be more prevalent in the gene pool over time - as long as they are able to reach the limit of their reproductive lifespan and are not killed by externalities (accident or attack) in the meantime. Therefore this trait (longer reproductive lifespan) will be selected for as long as the queen is protected.
Within eusocial colonies, there is often a protective environment (Buffenstein & Jarvis 2002): there is usually a physical structure (nest or burrow); symbiotic bacteria and/or fungi creating a more hygienic microflora; and queens are also protected by other castes. This gives queens a lower incidence of death due to accident or attack which (from the reasoning in the previous paragraph) supports the selection of a longer reproductive life. This is likely to lead to longer lived workers since they share the same genes.
However queens do tend to live much longer than their workers (O'Donnell & Jeanne 1995). This is probably due to their reproductive role. All the ants in the colony are investing in reproduction (whether by physically giving birth to young or by providing it with food and protection) therefore the normal relationship (reproduction and lifespan tradeoff) mentioned at the start is not relevant, but since the queen is the only individual reproducing, it will be the only one for whom lengthened lifespan is beneficial evolutionarily.
A mean lifespan of 20 years has been observed in Formica exsecta, and a maximum lifespan of 28.5 years observed in Lasius niger. Pogonomyrmex owyheei has an observed maximum of 30 years, and mean of 17 years. These (and many more) figures were obtained from a review by Keller (1998).
Other references on this subject include (Svensson & Sheldon 1998), (Keller & Genoud 1997) (PDF link), (Calabi & Porter 1989), and (Amdam & Omholt 2002).
References

Amdam, G.V. & Omholt, S.W. (2002) The Regulatory Anatomy of Honeybee Lifespan. Journal of Theoretical Biology, 216, 209–228.

Buffenstein, R. (2005) The naked mole-rat: a new long-living model for human aging research. The Journals of Gerontology Series A: Biological Sciences and Medical Sciences, 60, 1369–1377.

Buffenstein, R. & Jarvis, J.U.M. (2002) The Naked Mole Rat--A New Record for the Oldest Living Rodent. Sci. Aging Knowl. Environ., 2002, pe7.

Buffenstein, R. & Pinto, M. (2009) Endocrine function in naturally long-living small mammals. Molecular and cellular endocrinology, 299, 101–111.

Calabi, P. & Porter, S.D. (1989) Worker longevity in the fire ant Solenopsis invicta: Ergonomic considerations of correlations between temperature, size and metabolic rates. Journal of Insect Physiology, 35, 643–649.

Hartmann, A. & Heinze, J. (2003) Lay eggs, live longer: division of labor and life span in a clonal ant species. Evolution, 57, 2424–2429.

Keller, L. (1998) Queen lifespan and colony characteristics in ants and termites. Insectes Sociaux, 45, 235–246.

Keller, L. & Genoud, M. (1997) Extraordinary lifespans in ants: a test of evolutionary theories of ageing. Nature, 389, 958–960.

Keller, L. & Genoud, M. (1999) Evolutionary Theories of Aging. Gerontology, 45, 336–338.

O’Donnell, S. & Jeanne, R.L. (1995) Implications of senescence patterns for the evolution of age polyethism in eusocial insects. Behavioral Ecology, 6, 269–273.

Svensson, E. & Sheldon, B.C. (1998) The social context of life evolution history. Oikos, 83, 466–477.


Question:
I have a high-level understanding of the $P=NP$ problem and I understand that if it were absolutely "proven" to be true with a provided solution, it would open the door for solving numerous problems within the realm of computer science.
My question is, if someone were to publish a indisputable, constructive proof of $P=NP$, what are some of the immediate effects that we would see of such a discovery?
I'm not asking for opinionated views of what the world would look like in 5-10 years.  Instead, it is my understanding that this is such a fundamentally unsolvable problem that it could radically change the way we compute... many things (yeah, this is where my ignorance is showing...) that we can't easily calculate today.
What kind of near-immediate effect would a thorough, accurate, and constructive proof of $P=NP$ have on the practical world?

We won't necessarily see any effects. Suppose that somebody finds an algorithm that solves 3SAT on $n$ variables in $2^{100} n$ basic operations. You won't be able to run this algorithm on any instance, since it takes too long. Or suppose that she finds an algorithm running in $n^{100}$ basic operations. We will only be able to use it on 3SAT instances on a single variable, since for more variables it takes too long.
On the other hand, suppose that P$\neq$NP, and that even the stronger exponential time hypothesis holds. Then in general, 3SAT should be untractable. Yet SAT solvers seem to be doing well on certain problems.
What's happening here? There are several problems with the P vs. NP question:

It only concerns the worst case.
It is only asymptotic.
All polynomial time bounds are the same.

These problems cast doubt on its relevance to the real world. Now it could happen that some really fast algorithm is found for 3SAT, so fast that even symmetric encryption would become breakable. But I consider this highly unlikely. On the other hand, it is perfectly consistent for P to be different from NP while factoring being practical; that would break certain public key encryption schemes. This is a likely situation which would have repercussions, but it is unrelated to the P vs. NP question.
The P vs. NP question might be natural from a mathematical point of view, but its practical relevance is doubtful, in my view. Research on the question, on the other hand, might or might not have practical repercussions; it is not guided by this aspect.


Question:
Why is the recipe for Coca-Cola still a secret?
I think that given the current state of technology, it should be proficient enough to find any of the secret ingredients in Coca Cola.
Any thoughts?
Can we make a 100% identical clone of Coca-Cola next week?

There are different angles this question can be answered:
Chemical point of view:
A full analysis of a totally unknown mixture is painful and extremely costly. It is always helpful to know how many components you are looking for; what types etc. In this case, it is not enough to analyse the elemental composition or some pure elements, but Coke contains a lot of natural products and mixtures like caramel. Imagine how you identify (and correctly describe the production parameters) caramel in a dilute solution...  Also, liquids with extremely high concentrations of sugar and different acids are unpleasant for analysis, as you often have to separate these main component, so you can identify only small components.
That being said, it is not an impossible task; there are many methods to identify e.g. natural products based on DNA traces. But consider another factor:
Business point of view:
The recipe of Coca Cola itself worth nothing.
Most probably any competent soda maker can make a drink that 99% of the consumers cannot distinguish from Coke by the taste (and could do that decades before). However they don't do because no one would buy a drink that tastes like Coca Cola, but made by others.
The value is in the brand. People buy a fake Rolex if they cannot afford a real. But anyone can afford a Coke- why would buy a fake? If you are in beverage business, it is an imperative to make a drink that is somehow DIFFERENT than the other ones!


Question:
I'm looking at a genome sequence for 2019-nCoV on NCBI. The FASTA sequence looks like this:
>MN988713.1 Wuhan seafood market pneumonia virus isolate 2019-nCoV/USA-IL1/2020, complete genome
ATTAAAGGTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAA
CGAACTTTAAAATCTGTGTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAAC
TAATTACTGTCGTTGACAGGACACGAGTAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTG
...
...
TTAATCAGTGTGTAACATTAGGGAGGACTTGAAAGAGCCACCACATTTTCACCGAGGCCACGCGGAGTAC
GATCGAGTGTACAGTGAACAATGCTAGGGAGAGCTGCCTATATGGAAGAGCCCTAATGTGTAAAATTAAT
TTTAGTAGTGCTATCCCCATGTGATTTTAATAGCTTCTTAGGAGAATGACAAAAAAAAAAAA

Coronavirus is an RNA virus, so I was expecting the sequence to consist of AUGC characters. But the letters here are ATGC, which looks like DNA!
I found a possible answer, that this is the sequence of a "complementary DNA". I read that

The term cDNA is also used, typically in a bioinformatics context, to refer to an mRNA transcript's sequence, expressed as DNA bases (GCAT) rather than RNA bases (GCAU).

However, I don't believe this theory that I'm looking at a cDNA. If this were true, the end of the true mRNA sequence would be ...UCUUACUGUUUUUUUUUUUU, or a "poly(U)" tail. But I believe the coronavirus has a poly(A) tail.
I also found that the start of all highlighted genes begin with the sequence ATG. This is the DNA equivalent of the RNA start codon AUG.
So, I believe what I'm looking at is the true mRNA, in 5'→3' direction, but with all U converted to T.
So, is this really what I'm looking at? Is this some formatting/representation issue? Or does 2019-nCoV really contain DNA, rather than RNA?

That is the correct sequence for 2019-nCov. Coronavirus is of course an RNA virus and in fact, to my knowledge, every RNA virus in Genbank is present as cDNA (AGCT, i.e. thydmine) and not RNA (AGCU, i.e. uracil).
The reason is simple, we never sequence directly from RNA because RNA is too unstable and easily degraded by RNase. Instead the genome is reverse transcribed, either by targeted reverse transcription or random amplification and thus converted to cDNA. cDNA is stable and is essentially reverse transcribed RNA.
The cDNA is either sequenced directly or further amplified by PCR and then sequenced. Hence the sequence we observe is the cDNA rather than RNA, thus we observe thymine rather than uracil and that is how it is reported.


Question:
I want to focus on transcriptome analysis. We know it's possible to analyze RNA-Seq experiment based on alignment or k-mers.
Possible alignment workflow:

Align sequence reads with TopHat2
Quantify the gene expression with Cufflinks

Possible reference-free workflow:

Quantify sequence reads with Kallisto reference-free index

Both strategy generate gene expression table.
Q: What are pros and cons for each of the approach? Can you give guideline?

First of all, I would emphasize that "alignment-free" quantification tools like Salmon and Kallisto are not reference-free. The basic difference between them and more traditional aligners is that they do not report a specific position (either in a genome or transcriptome) to which a read maps. However, their overall purpose is still to quantify the expression levels (or differences) of a known set of transcripts; hence, they require a reference (which could be arbitrarily defined).
The most important criterion for deciding which approach to use (and this is true of almost everything in genomics) is exactly what question you would like to answer. If you are primarily interested in quantifying and comparing expression of mature mRNA from known transcripts, then a transcriptome-based alignment may be fastest and best. However, you may miss potentially interesting features outside of those known transcripts, such as new isoforms, non-coding RNAs, or information about pre-mRNA levels, which can often be gleaned from intronic reads (see the EISA method).
This paper also has some good considerations about which tools may work best depending on the question you want to answer.
Finally, another fast and flexible aligner (which can be used with or without a reference transcriptome) is STAR.


Question:
Just a general electronics question: What is negative voltage, like -5 Volt?
From my basic knowledge, power is generated by electrons wandering from the minus to the plus side of the power source (assuming DC power here). Is negative voltage when electrons wander from + to -?
Why do some devices even need it, what is so special about it?

Someone may have better words to explain this than me, but the big thing you have to remember is voltage is a potential difference. In most cases the "difference" part is a difference between some potential and ground potential. When someone says -5v, they're saying that you are below ground.
You also need to keep in mind that voltage is relative. So like I mentioned before, most people reference to "ground"; but what is ground? You can say ground is earth ground, but what about the case when you have a battery powered device that has no contact to ground. In this situation we have to treat some arbitrary point as "ground". Usually the negative terminal on the battery is what we consider from this reference.
Now consider the case that you have 2 batteries in series. If both were 5 volts, then you would say you would have 10 volts total.
But the assumption that you get 0/+10 is based off of "ground" as being the negative terminal on the battery that isn't touching the other battery and then 10V as being the location of the positive terminal that isn't touching the other battery. In this situation we can make the decision that we want to make the connection between the 2 batteries be our "ground" reference. This would then result in +5v on one end and -5v on the other end.
Here is what I was trying to explain:
+10v   +++   +5v
       | |
       | | < Battery
       | |
+5v    ---   0v
       +++
       | |
       | | < Another Battery
       | |
0v     ---   -5v


Question:
What is the difference between "forward" and "reverse" voltages when working with diodes and LEDs?
I realize this question is answered elsewhere on the interwebs such as wikipedia, but I am looking for a short summary that is less of a technical discussion and more a useful tip to someone using diodes in a hobby circuit.

The forward voltage is the voltage drop across the diode if the voltage at the anode is more positive than the voltage at the cathode (if you connect + to the anode).
You will be using this value to calculate the power dissipation of the diode and the voltage after the diode.
The reverse voltage is the voltage drop across the diode if the voltage at the cathode is more positive than the voltage at the anode (if you connect + to the cathode).
This is usually much higher than the forward voltage. As with forward voltage, a current will flow if the connected voltage exceeds this value. This is called a "breakdown". Common diodes are usually destroyed but with Z and Zener diodes this effect is used deliberately.


Question:
$A$ and $B$ are $n \times n$ matrices and $v$ is a vector with $n$ elements. $Av$ has $\approx 2n^2$ flops and $A+B$ has $n^2$ flops. Following this logic, $(A+B)v$ should be faster than $Av+Bv$.
Yet, when I run the following code in matlab
A = rand(2000,2000);
B = rand(2000,2000);
v = rand(2000,1);
tic
D=zeros(size(A));
D = A;
for i =1:100
    D = A + B;
    (D)*v;
end
toc
tic
for i =1:100
    (A*v+B*v);
end
toc

The opposite is true. Av+Bv is over twice as fast. Any explanations?

Except for code which does a significant number of floating-point operations on data that are held in cache, most floating-point intensive code is performance limited by memory bandwidth and cache capacity rather than by flops.
$v$ and the products $Av$ and $Bv$ are all vectors of length 2000 (16K bytes in double precision), which will easily fit into a level 1 cache.  The matrices $A$ and $B$ are 2000 by 2000 or about 32 megabytes in size.  Your level 3 cache might be large enough to store one of these matrices if you've got a really good processor.
Computing $Av$ requires reading 32 megabytes (for $A$) in from memory, reading in 16K bytes (for $v$) storing intermediate results in the L1 cache and eventually writing 16K bytes out to memory. Multiplying $Bv$ takes the same amount of work. Adding the two intermediate results to get the final result requires a trivial amount of work.  That's a total of roughly 64 megabytes of reads and an insignificant number of writes.
Computing $(A+B)$ requires reading 32 megabytes (for A) plus 32 megabytes (for B) from memory and writing 32 megabytes (for A+B) out.  Then you have to do a single matrix-vector multiplication as above which involves reading 32 megabytes from memory (if you've got a big L3 cache, then perhaps this 32 megabytes is in that L3 cache.)  That's a total of 96 megabytes of reads and 32 megabytes of writes.
Thus there's twice as much memory traffic involved in computing this as $(A+B)v$ instead of $Av+Bv$.
Note that if you have to do many of these multiplications with different vectors $v$ but the same $A$ and $B$, then it will become more efficient to compute $A+B$ once and reuse that matrix for the matrix-vector multiplications.


Question:
I am trying to figure out the difference between crystals, oscillators, and resonators.  I'm starting to grasp it but I still have some questions.
From my understanding, an oscillator is built from a crystal and two capacitors.  What is a resonator then?  Is it a difference in terminology?
If an oscillator and a resonator are similar, why do these two items:

have two pins out and no ground.  Whereas this one

has three pins one of which is a ground?
Will any of these three devices work as an external clock for a microcontroller?
PS:  Bonus points for an explanation of how the capacitors help the crystal work properly. :)

Both ceramic resonators and quartz crystals work on the same principle: the vibrate mechanically when an AC signal is applied to them. Quartz crystals are more accurate and temperature stable than ceramic resonators. The resonator or crystal itself has two connections. On the left the crystal, right the ceramic resonator.

Like you say the oscillator needs extra components, the two capacitors. The active part which makes the oscillator work is an amplifier which supplies the energy to keep the oscillation going.

Some microcontrollers have a low-frequency oscillator for a 32.768 kHz crystal, which often has the capacitors built-in, so that you only need two connections for the crystal (left). Most oscillators, however, need the capacitors externally, and then you have thee connections: input from the amplifier, output to the amplifier, and ground for the capacitors. A resonator with three pins has the capacitors integrated.
The function of the capacitors: in order to oscillate the closed loop amplifier-crystal must have a total phase shift of 360°. The amplifier is inverting, so that's 180°. Together with the capacitors the crystal takes care of the other 180°.
edit
When you switch a crystal oscillator on it's just an amplifier, you don't get the desired frequency yet. The only thing that's there is a low-level noise over a wide bandwidth. The oscillator will amplify that noise and pass it through the crystal, upon which it enters the oscillator again which amplifies it again and so on. Shouldn't that get you just very much noise? No, the crystal's properties are such that it will pass only a very small amount of the noise, around its resonance frequency. All the rest will be attenuated. So in the end it's only that resonance frequency which is left, and then we're oscillating.
You can compare it with a trampoline. Imagine a bunch of kids jumping on it randomly. The trampoline doesn't move much and the kids have to make a lot of effort to jump just 20cm up. But after some time they will start to synchronize and the trampoline will follow the jumping. The kids will jump higher and higher with less effort. The trampoline will oscillate at its resonance frequency (about 1Hz) and it will be hard to jump faster or slower. That's the frequencies that will be filtered out.
The kid jumping on the trampoline is the amplifier, she supplies the energy to keep the oscillation going.
Further reading
MSP430 32 kHz crystal oscillators


Question:
I have often downloaded datasets from the SRA where the authors failed to mention which adapters were trimmed during the processing.
Local alignments tend to overcome this obstacle, but it feels a bit barbaric.
fastQC works occasionally to pick them up, but sometimes fails to find the actual adapter sequences.
Usually, I ended up looking up the kits they used and trying to grep for all the possible barcodes.
Is there a more robust/efficient way to do this?

You mention that FastQC "fails to find the actual adapter sequences" - I guess you mean in the Adapter Sequence Contamination plot. However, the kmer and Sequence Content Plots are often useful even when the former fails. I've used these in the past - you can sometimes just read off the adapter sequence from the start of the Sequence Content Plot (or at least see how many bases to trim).


Question:
Engineers often insist on using locally conservative methods such as finite volume, conservative finite difference, or discontinuous Galerkin methods for solving PDEs.
What can go wrong when using a method that is not locally conservative?
Okay, so local conservation is important for hyperbolic PDEs, what about elliptic PDEs?

In the solution of nonlinear hyperbolic PDEs, discontinuities ("shocks") appear even when the initial condition is smooth.  In the presence of discontinuities, the notion of solution can only be defined in the weak sense.  The numerical velocity of a shock depends on the correct Rankine-Hugoniot conditions being imposed, which in turn depends on numerically satisfying the integral conservation law locally.  The Lax-Wendroff theorem guarantees that a convergent numerical method will converge to a weak solution of the hyperbolic conservation law only if the method is conservative.
Not only do you need to use a conservative method, in fact you need to use a method that conserves the right quantities.  There's a nice example that explains this in LeVeque's "Finite Volume Methods for Hyperbolic Problems", Section 11.12 and Section 12.9.  If you discretize Burgers' equation
$$u_t + 1/2 (u^2)_x = 0$$
via the consistent discretization
$$U^{n+1}_i = U^n_i  - \frac{\Delta t}{\Delta x} U^n_i (U^n_i-U^n_{i-1})$$
you will observe that shocks move at the wrong speed, no matter how much you refine the grid.  That is, the numerical solution will not converge to the true solution.  If you instead use the conservative discretization
$$U^{n+1}_i = U^n_i  - \frac{\Delta t}{2\Delta x} ( (U^n_i)^2-(U^n_{i-1})^2)$$
based on flux-differencing, shocks will move at the correct speed (which is the average of the states to the left and the right of the shock, for this equation).  This example is illustrated in this IPython notebook I wrote.
For linear hyperbolic PDEs, and for other types of PDEs which typically have smooth solutions, local conservation is not a necessary ingredient for convergence.  However, it may be important for other reasons (e.g., if the total mass is a quantity of interest).