t } + r _ 2 e ^ { i \ omega _ 2 t } $ $ we can then imagine three, four, or infinitely - many such circles being added. if we allow the circles to have every possible angular frequency, we can now write $ $ z ( t ) = \ int _ { - \ infty } ^ { \ infty } r ( \ omega ) e ^ { i \ omega t } \ mathrm { d } \ omega. $ $ the function $ r ( \ omega ) $ is the fourier transform of $ z ( t ) $. if you start by tracing any time - dependent path you want through two - dimensions, your path can be perfectly - emulated by infinitely many circles of different frequencies, all added up, and the radii of those circles is the fourier transform of your path. caveat : we must allow the circles to have complex radii. this isn't weird, though. it's the same thing as saying the circles have real radii, but they do not all have to start at the same place. at time zero, you can start however far you want around each circle. if your path closes on itself, as it does in the video, the fourier transform turns out to simplify to a fourier series. most frequencies are no longer necessary, and we can write $ $ z ( t ) = \ sum _ { k = - \ infty } ^ \ infty c _ k e ^ { ik \ omega _ 0 t } $ $ where $ \ omega _ 0 $ is the angular frequency associated with the entire thing repeating - the frequency of the slowest circle. the only circles we need are the slowest circle, then one twice as fast as that, then one three times as fast as the slowest one, etc. there are still infinitely - many circles if you want to reproduce a repeating path perfectly, but they are countably - infinite now. if you take the first twenty or so and drop the rest, you should get close to your desired answer. in this way, you can use fourier analysis to create your own epicycle video of your favorite cartoon character. that's what fourier analysis says. the questions that remain are how to do it, what it's for, and why it works. i think i will mostly leave those alone. how to do it - how to find $ r ( \ omega ) $ given $ z ( t ) $ is found in any introductory


treatment, and is fairly intuitive if you understand orthogonality. why it works is a rather deep question. it's a consequence of the spectral theorem. what it's for has a huge range. it's useful in analyzing the response of linear physical systems to an external input, such as an electrical circuit responding to the signal it picks up with an antenna or a mass on a spring responding to being pushed. it's useful in optics ; the interference pattern from light scattering from a diffraction grating is the fourier transform of the grating, and the image of a source at the focus of a lens is its fourier transform. it's useful in spectroscopy, and in the analysis of any sort of wave phenomena. it converts between position and momentum representations of a wavefunction in quantum mechanics. check out this question on physics. stackexchange for more detailed examples. fourier techniques are useful in signal analysis, image processing, and other digital applications. finally, they are of course useful mathematically, as many other posts here describe.


there are lots of modern finite element references, but i will just comment on a few books that i think are practical and relevant to applications, plus one containing more comprehensive analysis. wriggers nonlinear finite element methods ( 2008 ) is a good general reference, but will be most relevant to those concerned with applications in structural mechanics ( including contact, shells, and plasticity ). elman, silvester, and wathen finite elements and fast iterative solvers : with applications in incompressible fluid dynamics ( 2005 ) is less comprehensive on finite element discretization techniques, but has good content on incompressible flow and a certain class of iterative solvers. it also explains the ifiss package. donea and huerta finite element methods for flow problems ( 2003 ) covers similar material, but includes ale moving mesh methods and compressible gas dynamics. brenner and scott the mathematical theory of finite element methods ( 2008 revision ) contains a rigorous theoretical development of discretizations for linear elliptic problems, including associated multigrid and domain decomposition theory. it does not treat transport - dominated problems, " messy " nonlinearities like plasticity, or non - polynomial bases. these resources fail to cover topics such as discontinuous galerkin methods or $ h ( curl ) $ problems ( maxwell ). i think papers are currently a better resource than books for these topics, although hesthaven and warburton nodal discontinuous galerkin methods ( 2008 ) is certainly worthwhile. i also recommend reading the examples from open source finite element software packages such as fenics, libmesh, and deal. ii.


in 2010, dr. craig venter actually used a bacterial shell and wrote dna for it. scientists have created the world's first synthetic life form in a landmark experiment that paves the way for designer organisms that are built rather than evolved. ( snip ) the new organism is based on an existing bacterium that causes mastitis in goats, but at its core is an entirely synthetic genome that was constructed from chemicals in the laboratory. keep in mind, this is only a synthetic genome, not a truly unique organism created from scratch. although i am confident that the technology will become available in the future. as has been pointed out, the entire genome wasn't built de novo, but rather most of it was copied from a baseline which was built up from the base chemicals with no biological processes, and then the watermarks were added ( still damn impressive since they took inorganic matter and made a living cell function with it ). but they are working at building a totally unique genome from scratch ( pdf ). this is actually quite an emerging field, so much so that the mit press has set up an entire series of journalsfor this. as far as to the purpose of these artificial organisms, most research funded by companies are meant to be for specific purposes that biology hasn't solved yet ( such as a bacteria that eats a toxic waste or something ). although, a lot of people are concerned about scientists venturing into the domain of theology. in terms of abiogenesis, there are many resources to learn more about this. here is a list of 88 papers that discuss the natural mechanisms of abiogenesis ( this list is a little old, so i am sure that there are many, many more papers at this time ). i also found this list of links and resources for artificial life. i cannot verify the usefulness of this since the field is a bit outside my area of expertise. however, it does seem quite extensive. edit to add : now we have " xna " ( a totally synthetic genome ) on the way.


the initial mersenne - twister ( mt ) was regarded as good for some years, until it was found out to be pretty bad with the more advanced testu01 bigcrush tests and better prngs. this page lists the mersenne - twister features in detail : positive qualities produces 32 - bit or 64 - bit numbers ( thus usable as source of random bits ) passes most statistical tests neutral qualities inordinately huge period of $ 2 ^ { 19937 } - 1 $ 623 - dimensionally equidistributed period can be partitioned to emulate multiple streams negative qualities fails some statistical tests, with as few as 45, 000 numbers. fails linearcomp test of the testu01 crush and bigcrush batteries. predictable — after 624 outputs, we can completely predict its output. generator state occupies 2504 bytes of ram — in contrast, an extremely usable generator with a huger - than - anyone - can - ever - use period can fit in 8 bytes of ram. not particularly fast. not particularly space efficient. the generator uses 20000 bits to store its internal state ( 20032 bits on 64 - bit machines ), but has a period of only $ 2 ^ { 19937 } $, a factor of $ 2 ^ { 63 } $ ( or $ 2 ^ { 95 } $ ) fewer than an ideal generator of the same size. uneven in its output ; the generator can get into “ bad states ” that are slow to recover from. seedings that only differ slightly take a long time to diverge from each other ; seeding must be done carefully to avoid bad states. while jump - ahead is possible, algorithms to do so are slow to compute ( i. e., require several seconds ) and rarely provided by implementations. summary : mersenne twister is not good enough anymore, but most applications and libraries are not there yet.


ok, i'll try to answer your questions : q1 : the number of taps is not equal the to the filter order. in your example the filter length is 5, i. e. the filter extends over 5 input samples [ $ x ( n ), x ( n - 1 ), x ( n - 2 ), x ( n - 3 ), x ( n - 4 ) $ ]. the number of taps is the same as the filter length. in your case you have one tap equal to zero ( the coefficient for $ x ( n - 1 ) $ ), so you happen to have 4 non - zero taps. still, the filter length is 5. the order of an fir filter is filter length minus 1, i. e. the filter order in your example is 4. q2 : the $ n $ in the matlab function fir1 ( ) is the filter order, i. e. you get a vector with $ n + 1 $ elements as a result ( so $ n + 1 $ is your filter length = number of taps ). q3 : the filter order is again 4. you can see it from the maximum delay needed to implement your filter. it is indeed a recursive iir filter. if by number of taps you mean the number of filter coefficients, then for an $ n ^ { th } $ order iir filter you generally have $ 2 ( n + 1 ) $ coefficients, even though in your example several of them are zero. q4 : this is a slightly tricky one. let's start with the simple case : a non - recursive filter always has a finite impulse response, i. e. it is a fir filter. usually a recursive filter has an infinite impulse response, i. e. it is an iir filter, but there are degenerate cases where a finite impulse response is implemented using a recursive structure. but the latter case is the exception.


serial is an umbrella word for all that is " time division multiplexed ", to use an expensive term. it means that the data is sent spread over time, most often one single bit after another. all the protocols you're naming are serial protocols. uart, for universal asynchronous receiver transmitter, is one of the most used serial protocols. it's almost as old as i am, and very simple. most controllers have a hardware uart on board. it uses a single data line for transmitting and one for receiving data. most often 8 - bit data is transferred, as follows : 1 start bit ( low level ), 8 data bits and 1 stop bit ( high level ). the low level start bit and high level stop bit mean that there's always a high to low transition to start the communication. that's what describes uart. no voltage level, so you can have it at 3. 3 v or 5 v, whichever your microcontroller uses. note that the microcontrollers which want to communicate via uart have to agree on the transmission speed, the bit - rate, as they only have the start bits falling edge to synchronize. that's called asynchronous communication. for long distance communication ( that doesn't have to be hundreds of meters ) the 5 v uart is not very reliable, that's why it's converted to a higher voltage, typically + 12 v for a " 0 " and - 12 v for a " 1 ". the data format remains the same. then you have rs - 232 ( which you actually should call eia - 232, but nobody does. ) the timing dependency is one of the big drawbacks of uart, and the solution is usart, for universal synchronous / asynchronous receiver transmitter. this can do uart, but also a synchronous protocol. in synchronous there's not only data, but also a clock transmitted. with each bit a clock pulse tells the receiver it should latch that bit. synchronous protocols either need a higher bandwidth, like in the case of manchester encoding, or an extra wire for the clock, like spi and i2c. spi ( serial peripheral interface ) is another very simple serial protocol. a master sends a clock signal, and upon each clock pulse it shifts one bit out to the slave, and one bit in, coming from the slave. signal names are


therefore sck for clock, mosi for master out slave in, and miso for master in slave out. by using ss ( slave select ) signals the master can control more than one slave on the bus. there are two ways to connect multiple slave devices to one master, one is mentioned above i. e. using slave select, and other is daisy chaining, it uses fewer hardware pins ( select lines ), but software gets complicated. i2c ( inter - integrated circuit, pronounced " i squared c " ) is also a synchronous protocol, and it's the first we see which has some " intelligence " in it ; the other ones dumbly shifted bits in and out, and that was that. i2c uses only 2 wires, one for the clock ( scl ) and one for the data ( sda ). that means that master and slave send data over the same wire, again controlled by the master who creates the clock signal. i2c doesn't use separate slave selects to select a particular device, but has addressing. the first byte sent by the master holds a 7 bit address ( so that you can use 127 devices on the bus ) and a read / write bit, indicating whether the next byte ( s ) will also come from the master or should come from the slave. after each byte, the receiver must send a " 0 " to acknowledge the reception of the byte, which the master latches with a 9th clock pulse. if the master wants to write a byte, the same process repeats : the master puts bit after bit on the bus and each time gives a clock pulse to signal that the data is ready to be read. if the master wants to receive data it only generates the clock pulses. the slave has to take care that the next bit is ready when the clock pulse is given. this protocol is patented by nxp ( formerly phillips ), to save licensing cost, atmel using the word twi ( 2 - wire interface ) which exactly same as i2c, so any avr device will not have i2c but it will have twi. two or more signals on the same wire may cause conflicts, and you would have a problem if one device sends a " 1 " while the other sends a " 0 ". therefore the bus is wired - or'd : two resistors pull the bus to a high level, and the devices only send low levels. if they want to send a high level they simply release the bus. ttl


( transistor transistor logic ) is not a protocol. it's an older technology for digital logic, but the name is often used to refer to the 5 v supply voltage, often incorrectly referring to what should be called uart. about each of these you can write a book, and it looks i'm well on my way. this is just a very brief overview, let us know if some things need clarification.


there is a general historical trend. in the olden days, memories were small, and so programs were perforce small. also, compilers were not very smart, and many programs were written in assembler, so it was considered a good thing to be able to write a program using few instructions. instruction pipelines were simple, and processors grabbed one instruction at a time to execute it. the machinery inside the processor was quite complex anyway ; decoding instructions was not felt to be much of a burden. in the 1970s, cpu and compiler designers realized that having such complex instructions was not so helpful after all. it was difficult to design processors in which those instructions were really efficient, and it was difficult to design compilers that really took advantage of these instructions. chip area and compiler complexity was better spent on more generic pursuits such as more general - purpose registers. the wikipedia article on risc explains this in more detail. mips is the ultimate risc architecture, which is why it's taught so often. the x86 family is a bit different. it was originally a cisc architecture meant for systems with very small memory ( no room for large instructions ), and has undergone many successive versions. today's x86 instruction set is not only complicated because it's cisc, but because it's really a 8088 with a 80386 with a pentium possibly with an x86 _ 64 processor. in today's world, risc and cisc are no longer the black - and - white distinction they might have been once. most cpu architectures have evolved to different shades of grey. on the risc side, some modern mips variants have added multiplication and division instructions, with a non - uniform encoding. arm processors have become more complex : many of them have a 16 - bit instruction set called thumb in addition to the “ original ” 32 - bit instructions, not to mention jazelle to execute jvm instructions on the cpu. modern arm processors also have simd instructions for multimedia applications : some complex instructions do pay after all. on the cisc side, all recent processors are to some extent risc inside. they have microcode to define all these complex macro instructions. the sheer complexity of the processor makes the design of each model take several years, even with a risc design, what with the large number of components, with pipelining and predictive execution and whatnot. so why do the fastest processors remain cisc outside? part of it, in the case of the x86


( 32 - bit and 64 - bit ) family, is historical compatibility. but that's not the whole of it. in the early 2000s, intel tried pushing the itanium architecture. itanium is an extreme case of complex instructions ( not really cisc, though : its design has been dubbed epic ). it even does away with the old - fashioned idea of executing instructions in sequence : all instructions are executed in parallel until the next barrier. one of the reasons itanium didn't take is that nobody, whether at intel or elsewhere, could write a decent compiler for it. now a good old mostly - sequential processor like x86 _ 64, that's something we understand.


yes, there are theoretical machines which exceed the turing machines in computational power, such as oracle machines and infinite time turing machines. the buzzword that you should feed to google is hypercomputation.


myth : manufactures conspire to put internal diodes in discrete components so only ic designers can do neat things with 4 - terminal mosfets. truth : 4 - terminal mosfets aren't very useful. any p - n junction is a diode ( among other ways to make diodes ). a mosfet has two of them, right here : that big chunk of p - doped silicon is the body or the substrate. considering these diodes, one can see it's pretty important that the body is always at a lower voltage than the source or the drain. otherwise, you forward - bias the diodes, and that's probably not what you wanted. but wait, it gets worse! a bjt is a three layer sandwich of npn materials, right? a mosfet also contains a bjt : if the drain current is high, then the voltage across the channel between the source and the drain can also be high, because \ $ r _ { ds ( on ) } \ $ is non - zero. if it's high enough to forward - bias the body - source diode, you don't have a mosfet anymore : you have a bjt. that's also not what you wanted. in cmos devices, it gets even worse. in cmos, you have pnpn structures, which make a parasitic thyristor. this is what causes latchup. solution : short the body to the source. this shorts the base - emitter of the parasitic bjt, holding it firmly off. ideally you don't do this through external leads, because then the " short " would also have high parasitic inductance and resistance, making the " holding off " of the parasitic bjt not so strong. instead, you short them right at the die. this is why mosfets aren't symmetrical. it may be that some designs otherwise are symmetrical, but to make a mosfet that behaves reliably like a mosfet, you have to short one of those n regions to the body. to whichever one you do that, it's now the source, and the diode you didn't short out is the " body diode ". this isn't anything specific to discrete transistors, really. if you do have a 4 - terminal mosfet, then you need to make sure that the body is always at the lowest voltage ( or highest, for p - channel


devices ). in ics, the body is the substrate for the whole ic, and it's usually connected to ground. if the body is at a lower voltage than the source, then you must consider body effect. if you take a look at a cmos circuit where there's a source not connected to ground ( like the nand gate below ), it doesn't really matter, because if b is high, then the lower - most transistor is on, and the one above it actually does have its source connected to ground. or, b is low, and the output is high, and there isn't any current in the lower two transistors.


this is quite a broad question and it indeed is quite hard to pinpoint why exactly fourier transforms are important in signal processing. the simplest, hand waving answer one can provide is that it is an extremely powerful mathematical tool that allows you to view your signals in a different domain, inside which several difficult problems become very simple to analyze. its ubiquity in nearly every field of engineering and physical sciences, all for different reasons, makes it all the more harder to narrow down a reason. i hope that looking at some of its properties which led to its widespread adoption along with some practical examples and a dash of history might help one to understand its importance. history : to understand the importance of the fourier transform, it is important to step back a little and appreciate the power of the fourier series put forth by joseph fourier. in a nut - shell, any periodic function $ g ( x ) $ integrable on the domain $ \ mathcal { d } = [ - \ pi, \ pi ] $ can be written as an infinite sum of sines and cosines as $ $ g ( x ) = \ sum _ { k = - \ infty } ^ { \ infty } \ tau _ k e ^ { \ jmath k x } $ $ $ $ \ tau _ k = \ frac { 1 } { 2 \ pi } \ int _ { \ mathcal { d } } g ( x ) e ^ { - \ jmath k x } \ dx $ $ where $ e ^ { \ imath \ theta } = \ cos ( \ theta ) + \ jmath \ sin ( \ theta ) $. this idea that a function could be broken down into its constituent frequencies ( i. e., into sines and cosines of all frequencies ) was a powerful one and forms the backbone of the fourier transform. the fourier transform : the fourier transform can be viewed as an extension of the above fourier series to non - periodic functions. for completeness and for clarity, i'll define the fourier transform here. if $ x ( t ) $ is a continuous, integrable signal, then its fourier transform, $ x ( f ) $ is given by $ $ x ( f ) = \ int _ { \ mathbb { r } } x ( t ) e ^ { - \ jmath 2 \ pi f t } \ dt, \ quad \ forall f \ in \ mathbb { r } $ $ and the inverse transform


is given by $ $ x ( t ) = \ int _ { \ mathbb { r } } x ( f ) e ^ { \ jmath 2 \ pi f t } \ df, \ quad \ forall t \ in \ mathbb { r } $ $ importance in signal processing : first and foremost, a fourier transform of a signal tells you what frequencies are present in your signal and in what proportions. example : have you ever noticed that each of your phone's number buttons sounds different when you press during a call and that it sounds the same for every phone model? that's because they're each composed of two different sinusoids which can be used to uniquely identify the button. when you use your phone to punch in combinations to navigate a menu, the way that the other party knows what keys you pressed is by doing a fourier transform of the input and looking at the frequencies present. apart from some very useful elementary properties which make the mathematics involved simple, some of the other reasons why it has such a widespread importance in signal processing are : the magnitude square of the fourier transform, $ \ vert x ( f ) \ vert ^ 2 $ instantly tells us how much power the signal $ x ( t ) $ has at a particular frequency $ f $. from parseval's theorem ( more generally plancherel's theorem ), we have $ $ \ int _ \ mathbb { r } \ vert x ( t ) \ vert ^ 2 \ dt = \ int _ \ mathbb { r } \ vert x ( f ) \ vert ^ 2 \ df $ $ which means that the total energy in a signal across all time is equal to the total energy in the transform across all frequencies. thus, the transform is energy preserving. convolutions in the time domain are equivalent to multiplications in the frequency domain, i. e., given two signals $ x ( t ) $ and $ y ( t ) $, then if $ $ z ( t ) = x ( t ) \ star y ( t ) $ $ where $ \ star $ denotes convolution, then the fourier transform of $ z ( t ) $ is merely $ $ z ( f ) = x ( f ) \ cdot y ( f ) $ $ for discrete signals, with the development of efficient fft algorithms, almost always, it is faster to implement a convolution operation in the frequency domain than in the time domain. similar to


the convolution operation, cross - correlations are also easily implemented in the frequency domain as $ z ( f ) = x ( f ) ^ * y ( f ) $, where $ ^ * $ denotes complex conjugate. by being able to split signals into their constituent frequencies, one can easily block out certain frequencies selectively by nullifying their contributions. example : if you're a football ( soccer ) fan, you might've been annoyed at the constant drone of the vuvuzelas that pretty much drowned all the commentary during the 2010 world cup in south africa. however, the vuvuzela has a constant pitch of ~ 235hz which made it easy for broadcasters to implement a notch filter to cut - off the offending noise. [ 1 ] a shifted ( delayed ) signal in the time domain manifests as a phase change in the frequency domain. while this falls under the elementary property category, this is a widely used property in practice, especially in imaging and tomography applications, example : when a wave travels through a heterogenous medium, it slows down and speeds up according to changes in the speed of wave propagation in the medium. so by observing a change in phase from what's expected and what's measured, one can infer the excess time delay which in turn tells you how much the wave speed has changed in the medium. this is of course, a very simplified layman explanation, but forms the basis for tomography. derivatives of signals ( nth derivatives too ) can be easily calculated ( see 106 ) using fourier transforms. digital signal processing ( dsp ) vs. analog signal processing ( asp ) the theory of fourier transforms is applicable irrespective of whether the signal is continuous or discrete, as long as it is " nice " and absolutely integrable. so yes, asp uses fourier transforms as long as the signals satisfy this criterion. however, it is perhaps more common to talk about laplace transforms, which is a generalized fourier transform, in asp. the laplace transform is defined as $ $ x ( s ) = \ int _ { 0 } ^ { \ infty } x ( t ) e ^ { - st } \ dt, \ quad \ forall s \ in \ mathbb { c } $ $ the advantage is that one is not necessarily confined to " nice signals " as in the fourier transform, but the transform is valid only within a certain region of convergence. it is widely used in studying / analyzing


/ designing lc / rc / lcr circuits, which in turn are used in radios / electric guitars, wah - wah pedals, etc. this is pretty much all i could think of right now, but do note that no amount of writing / explanation can fully capture the true importance of fourier transforms in signal processing and in science / engineering


that is the work of a leaf miner. a leaf miner is the larval stage of an insect that feeds on the inside layer of leaves. notice how the galleries ( tunnels ) start small and then get larger as the larva matures? most leaf miners are moth larvae ( lepidoptera )


a general rule of thumb is that in order to improve the variance $ n $ times you need $ n ^ 2 $ neighbours. this is only applicable if you consider the $ n ^ 2 $ nearest neighbours of a cell to be biologically identical ( i. e. " similar enough " ) ; if your data includes 10 types of cells with 10 cells each, then using the 20 nearest neighbours for smoothing will obscure the data. as far as i know, there is no single best answer to this question. i would suggest trying different numbers and sticking to what agrees more with the biology of the dataset.


the main distinction you want to make is between the green function and the kernel. ( i prefer the terminology " green function " without the's. imagine a different name, say, feynman. people would definitely say the feynman function, not the feynman's function. but i digress... ) start with a differential operator, call it $ l $. e. g., in the case of laplace's equation, then $ l $ is the laplacian $ l = \ nabla ^ 2 $. then, the green function of $ l $ is the solution of the inhomogenous differential equation $ $ l _ x g ( x, x ^ \ prime ) = \ delta ( x - x ^ \ prime ) \,. $ $ we'll talk about its boundary conditions later on. the kernel is a solution of the homogeneous equation $ $ l _ x k ( x, x ^ \ prime ) = 0 \,, $ $ subject to a dirichlet boundary condition $ \ lim _ { x \ rightarrow x ^ \ prime } k ( x, x ^ \ prime ) = \ delta ( x - x ^ \ prime ) $, or neumann boundary condition $ \ lim _ { x \ rightarrow x ^ \ prime } \ partial k ( x, x ^ \ prime ) = \ delta ( x - x ^ \ prime ) $. so, how do we use them? the green function solves linear differential equations with driving terms. $ l _ x u ( x ) = \ rho ( x ) $ is solved by $ $ u ( x ) = \ int g ( x, x ^ \ prime ) \ rho ( x ^ \ prime ) dx ^ \ prime \,. $ $ whichever boundary conditions we what to impose on the solution $ u $ specify the boundary conditions we impose on $ g $. for example, a retarded green function propagates influence strictly forward in time, so that $ g ( x, x ^ \ prime ) = 0 $ whenever $ x ^ 0 < x ^ { \ prime \, 0 } $. ( the 0 here denotes the time coordinate. ) one would use this if the boundary condition on $ u $ was that $ u ( x ) = 0 $ far in the past, before the source term $ \ rho $ " turns on. " the kernel solves boundary value problems. say we're solving the equation $ l _


x u ( x ) = 0 $ on a manifold $ m $, and specify $ u $ on the boundary $ \ partial m $ to be $ v $. then, $ $ u ( x ) = \ int _ { \ partial m } k ( x, x ^ \ prime ) v ( x ^ \ prime ) dx ^ \ prime \,. $ $ in this case, we're using the kernel with dirichlet boundary conditions. for example, the heat kernel is the kernel of the heat equation, in which $ $ l = \ frac { \ partial } { \ partial t } - \ nabla _ { r ^ d } ^ 2 \,. $ $ we can see that $ $ k ( x, t ; x ^ \ prime, t ^ \ prime ) = \ frac { 1 } { [ 4 \ pi ( t - t ^ \ prime ) ] ^ { d / 2 } } \, e ^ { - | x - x ^ \ prime | ^ 2 / 4 ( t - t ^ \ prime ) }, $ $ solves $ l _ { x, t } k ( x, t ; x ^ \ prime, t ^ \ prime ) = 0 $ and moreover satisfies $ $ \ lim _ { t \ rightarrow t ^ \ prime } \, k ( x, t ; x ^ \ prime, t ^ \ prime ) = \ delta ^ { ( d ) } ( x - x ^ \ prime ) \,. $ $ ( we must be careful to consider only $ t > t ^ \ prime $ and hence also take a directional limit. ) say you're given some shape $ v ( x ) $ at time $ 0 $ and want to " melt " is according to the heat equation. then later on, this shape has become $ $ u ( x, t ) = \ int _ { r ^ d } k ( x, t ; x ^ \ prime, 0 ) v ( x ^ \ prime ) d ^ dx ^ \ prime \,. $ $ so in this case, the boundary was the time - slice at $ t ^ \ prime = 0 $. now for the rest of them. propagator is sometimes used to mean green function, sometimes used to mean kernel. the klein - gordon propagator is a green function, because it satisfies $ l _ x d ( x, x ^ \ prime ) = \ delta ( x - x ^ \ prime


) $ for $ l _ x = \ partial _ x ^ 2 + m ^ 2 $. the boundary conditions specify the difference between the retarded, advanced and feynman propagators. ( see? not feynman's propagator ) in the case of a klein - gordon field, the retarded propagator is defined as $ $ d _ r ( x, x ^ \ prime ) = \ theta ( x ^ 0 - x ^ { \ prime \, 0 } ) \, \ langle0 | \ varphi ( x ) \ varphi ( x ^ \ prime ) | 0 \ rangle \, $ $ where $ \ theta ( x ) = 1 $ for $ x > 0 $ and $ = 0 $ otherwise. the wightman function is defined as $ $ w ( x, x ^ \ prime ) = \ langle0 | \ varphi ( x ) \ varphi ( x ^ \ prime ) | 0 \ rangle \,, $ $ i. e. without the time ordering constraint. but guess what? it solves $ l _ x w ( x, x ^ \ prime ) = 0 $. it's a kernel. the difference is that $ \ theta $ out front, which becomes a dirac $ \ delta $ upon taking one time derivative. if one uses the kernel with neumann boundary conditions on a time - slice boundary, the relationship $ $ g _ r ( x, x ^ \ prime ) = \ theta ( x ^ 0 - x ^ { \ prime \, 0 } ) k ( x, x ^ \ prime ) $ $ is general. in quantum mechanics, the evolution operator $ $ u ( x, t ; x ^ \ prime, t ^ \ prime ) = \ langle x | e ^ { - i ( t - t ^ \ prime ) \ hat { h } } | x ^ \ prime \ rangle $ $ is a kernel. it solves the schroedinger equation and equals $ \ delta ( x - x ^ \ prime ) $ for $ t = t ^ \ prime $. people sometimes call it the propagator. it can also be written in path integral form. linear response and impulse response functions are green functions. these are all two - point correlation functions. " two - point " because they're all functions of two points in space ( time ). in quantum field theory, statistical field theory, etc. one can also consider correlation functions with more field


insertions / random variables. that's where the real work begins!


since this question is asked often enough, let me add a detailed solution. i'm not quite following arturo's outline, though. the main difference is that i'm not re - proving the cauchy - schwarz inequality ( step 4 in arturo's outline ) but rather use the fact that multiplication by scalars and addition of vectors as well as the norm are continuous, which is a bit easier to prove. so, assume that the norm $ \ | \ cdot \ | $ satisfies the parallelogram law $ $ 2 \ vert x \ vert ^ 2 + 2 \ vert y \ vert ^ 2 = \ vert x + y \ vert ^ 2 + \ vert x - y \ vert ^ 2 $ $ for all $ x, y \ in v $ and put $ $ \ langle x, y \ rangle = \ frac { 1 } { 4 } \ left ( \ vert x + y \ vert ^ 2 - \ vert x - y \ vert ^ 2 \ right ). $ $ we're dealing with real vector spaces and defer the treatment of the complex case to step 4 below. step 0. $ \ langle x, y \ rangle = \ langle y, x \ rangle $ and $ \ vert x \ vert = \ sqrt { \ langle x, x \ rangle } $. obvious. step 1. the function $ ( x, y ) \ mapsto \ langle x, y \ rangle $ is continuous with respect to $ \ vert \ cdot \ vert $. continuity with respect to the norm $ \ vert \ cdot \ vert $ follows from the fact that addition and negation are $ \ vert \ cdot \ vert $ - continuous, that the norm itself is continuous and that sums and compositions of continuous functions are continuous. remark. this continuity property of the ( putative ) scalar product will only be used at the very end of step 3. until then the solution consists of purely algebraic steps. step 2. we have $ \ langle x + y, z \ rangle = \ langle x, z \ rangle + \ langle y, z \ rangle $. by the parallelogram law we have $ $ 2 \ vert x + z \ vert ^ 2 + 2 \ vert y \ vert ^ 2 = \ vert x + y +


z \ vert ^ 2 + \ vert x - y + z \ vert ^ 2. $ $ this gives $ $ \ begin { align * } \ vert x + y + z \ vert ^ 2 & = 2 \ vert x + z \ vert ^ 2 + 2 \ vert y \ vert ^ 2 - \ vert x - y + z \ vert ^ 2 \ \ & = 2 \ vert y + z \ vert ^ 2 + 2 \ vert x \ vert ^ 2 - \ vert y - x + z \ vert ^ 2 \ end { align * } $ $ where the second formula follows from the first by exchanging $ x $ and $ y $. since $ a = b $ and $ a = c $ imply $ a = \ frac { 1 } { 2 } ( b + c ) $ we get $ $ \ vert x + y + z \ vert ^ 2 = \ vert x \ vert ^ 2 + \ vert y \ vert ^ 2 + \ vert x + z \ vert ^ 2 + \ vert y + z \ vert ^ 2 - \ frac { 1 } { 2 } \ vert x - y + z \ vert ^ 2 - \ frac { 1 } { 2 } \ vert y - x + z \ vert ^ 2. $ $ replacing $ z $ by $ - z $ in the last equation gives $ $ \ vert x + y - z \ vert ^ 2 = \ vert x \ vert ^ 2 + \ vert y \ vert ^ 2 + \ vert x - z \ vert ^ 2 + \ vert y - z \ vert ^ 2 - \ frac { 1 } { 2 } \ vert x - y - z \ vert ^ 2 - \ frac { 1 } { 2 } \ vert y - x - z \ vert ^ 2. $ $ applying $ \ vert w \ vert = \ vert - w \ vert $ to the two negative terms in the last equation we get $ $ \ begin { align * } \ langle x + y, z \ rangle & = \ frac { 1 } { 4 } \ left ( \ vert x + y + z \ vert ^ 2 - \ vert x + y - z \ vert ^ 2 \ right ) \ \ & =


\ frac { 1 } { 4 } \ left ( \ vert x + z \ vert ^ 2 - \ vert x - z \ vert ^ 2 \ right ) + \ frac { 1 } { 4 } \ left ( \ vert y + z \ vert ^ 2 - \ vert y - z \ vert ^ 2 \ right ) \ \ & = \ langle x, z \ rangle + \ langle y, z \ rangle \ end { align * } $ $ as desired. step 3. $ \ langle \ lambda x, y \ rangle = \ lambda \ langle x, y \ rangle $ for all $ \ lambda \ in \ mathbb { r } $. this clearly holds for $ \ lambda = - 1 $ and by step 2 and induction we have $ \ langle \ lambda x, y \ rangle = \ lambda \ langle x, y \ rangle $ for all $ \ lambda \ in \ mathbb { n } $, thus for all $ \ lambda \ in \ mathbb { z } $. if $ \ lambda = \ frac { p } { q } $ with $ p, q \ in \ mathbb { z }, q \ neq 0 $ we get with $ x'= \ dfrac { x } { q } $ that $ $ q \ langle \ lambda x, y \ rangle = q \ langle p x ', y \ rangle = p \ langle q x ', y \ rangle = p \ langle x, y \ rangle, $ $ so dividing this by $ q $ gives $ $ \ langle \ lambda x, y \ rangle = \ lambda \ langle x, y \ rangle \ qquad \ text { for all } \ lambda \ in \ mathbb { q }. $ $ we have just seen that for fixed $ x, y $ the continuous function $ \ displaystyle t \ mapsto \ frac { 1 } { t } \ langle t x, y \ rangle $ defined on $ \ mathbb { r } \ smallsetminus \ { 0 \ } $ is equal to $ \ langle x, y \ rangle $ for all $ t \ in \ mathbb { q } \ smallsetminus \ { 0 \ } $, thus equality holds for all $ t \ in \ mathbb { r } \ smallset


##minus \ { 0 \ } $. the case $ \ lambda = 0 $ being trivial, we're done. step 4. the complex case. define $ \ displaystyle \ langle x, y \ rangle = \ frac { 1 } { 4 } \ sum _ { k = 0 } ^ { 3 } i ^ { k } \ vert x + i ^ k y \ vert ^ 2 $, observe that $ \ langle ix, y \ rangle = i \ langle x, y \ rangle $ and $ \ langle x, y \ rangle = \ overline { \ langle y, x \ rangle } $ and apply the case of real scalars twice ( to the real and imaginary parts of $ \ langle \ cdot, \ cdot \ rangle $ ). addendum. in fact we can weaken requirements of jordan von neumann theorem to $ $ 2 \ vert x \ vert ^ 2 + 2 \ vert y \ vert ^ 2 \ leq \ vert x + y \ vert ^ 2 + \ vert x - y \ vert ^ 2 $ $ indeed after substitution $ x \ to \ frac { 1 } { 2 } ( x + y ) $, $ y \ to \ frac { 1 } { 2 } ( x - y ) $ and simplifications we get $ $ \ vert x + y \ vert ^ 2 + \ vert x - y \ vert ^ 2 \ leq 2 \ vert x \ vert ^ 2 + 2 \ vert y \ vert ^ 2 $ $ which together with previous inequality gives the equality.


from the reuter's article referenced : sarajevo, march 7 ( reuters ) - european power grid lobby entso - e urged serbia and kosovo to urgently resolve a dispute over their power grid, which has affected the broader european network, causing some digital clocks on the continent to lose time. figure 1. the entso - e system operations committee has 5 permanent regional groups based on the synchronous areas ( continental europe, nordic, baltic, great britain, and ireland - northern ireland ), and 2 voluntary regional groups ( northern europe and isolated systems ). source : entso - e. the european grid shares power across borders. ac grids have to be kept 100 % in - sync if ac connections are used. britain and ireland, for example, are connected to the european grid by dc interconnectors so each nations grid can run asynchronously with the rest of europe whilst sharing power. the grid shared by serbia and its former province kosovo is connected to europe ’ s synchronized high voltage power network. as explained above. entso - e, which represents european electricity transmission operators, said the continental network had lost 113 gigawatt - hours ( gwh ) of energy since mid - january because kosovo had been using more electricity than it generates. serbia, which is responsible for balancing kosovo ’ s grid, had failed to do so, entso - e said. the energy hasn't been lost. it was never produced. according to netzfrequenzmessung. de ( you might want to translate ) the 113 gwh shortfall averages out to about 80 mw continuous on a total of 60 gw capacity. that's a 0. 13 %. the scary thing is that we're actually maxed out and can't find an extra 0. 13 %! the loss [ sic ] of energy had meant that electric clocks that are steered by the frequency of the power system, rather than by a quartz crystal, to lag nearly six minutes behind, entso - e said. " steered " is probably a mistranslation. " regulated " would be better. many digital clocks, such as those in alarm clocks and in ovens or microwaves, use the frequency of the power grid to keep time. the problem emerges when the frequency drops over a sustained period of time. figure 2. an electro - mechanical timeswitch of the style popular with the utility companies. analogue, motorised clocks do too. the day / night


clock on my electricity meter is > 40 years old and it has a mains - powered clock with a self - rewinding clockwork ups to keep it ok during power cuts! entso - e said the european network ’ s frequency had deviated from its standard of 50 hertz ( hz ) to 49. 996 hz since mid - january, resulting in 113 gigawatt - hours ( gwh ) [ sic ] of lost energy, although it had appeared to be returning to normal on tuesday. the frequency is not held constant to three decimal places for months on end. that might be an average figure. here's the data for the last five minutes : figure 3. note that frequency deviation will be much wider over a longer time period. source : mainsfrequency. com. figure 4. network time deviation has increased from - 100 s to - 350 s in three weeks. source : mainsfrequency. com. figure 5. [ wow! ] in our previous measurement operation ( july 2011 to 2017 ), network time deviations of ± 160 seconds occurred ( june 2013 ). but since january 3, 2018, the network time deviation is continuously decreasing. changing the setpoint for the secondary control power on january 15 from 50, 000 hz to 50, 010 hz has not yet been able to reduce the mains time. source : mainsfrequency. com. secondary control power is activated when the system is affected for longer than 30 seconds or it is assumed that the system will be affected for a period longer than 30 seconds. prior to this, deviations in the system are only covered through primary control. source : apg. at. “ deviation stopped yesterday after kosovo took some steps but it will take some time to get the system back to normal, ” entso - e spokeswoman susanne nies told reuters. she said the risk could remain if there is no political solution to the problem. if they start generating and feeding into the grid it will speed up. the political dispute centres mainly on regulatory issues and a row between serbia and kosovo over grid operation. it is further complicated by the fact that belgrade still does not recognise kosovo. “ we will try to fix the technicalities by the end of this week but the question of who will compensate for this loss has to be answered, ” nies said. this doesn't make any sense to me. energy flow is metered and billed accordingly. each country pays for their imports. entso -


e urged european governments and policymakers to take swift action and exert pressure on kosovo and serbia to resolve the issue, which is also hampering integration of the western balkans energy market required by the european union. “ these actions need to address the political side of this issue, ” entso - e said in a statement. the grid operators in serbia and kosovo were not immediately available to comment. kosovo seceded from serbia in 2008. both states want to join the european union but brussels says they must normalize relations to forge closer ties with the bloc. serbia and kosovo signed an agreement on operating their power grid in 2015. however, it has not been implemented yet as they cannot agree on power distribution in kosovo amid conflicting claims about ownership of the grid, built when they were both part of yugoslavia. ( writing by maja zuvela ; editing by susan fenton ) i guess neither of the above are electrical engineers. answering the questions : how a decrease in electricity production can lead to a decrease of the frequency on the grid on the long term? isn't the frequency a parameter controlled by the power plant at the end of the day? if demand is approaching peak capacity then we have to let either the voltage or the frequency droop if we wish to avoid disconnecting customers. dropping the voltage will cause problems with certain loads and is to be avoided. the reuter's article fails to explain why the system average frequency has been low for so long. it can only be that it hasn't been able to run above 50 hz for long enough to catch up. off - peak seems the time to do this but there will be an upper limit on the frequency deviation - about 50. 5 hz ( but i don't have a definite number ). if the loss of power from some countries causes a frequency deviation, shouldn't we also observe other impacts, like a drop of the output voltage? this means we've also been experiencing a drop of voltage for weeks here in europe? no, we reduce frequency to avoid the drop in voltage. why some electric devices directly use the network frequency to sync their clocks, instead of a quartz crystal technology? they don't sync the clocks in the sense of adjusting or correcting the time. they maintain synchronisation by keeping the average frequency at exactly 50 hz. one reason for this is the millions of electro - mechanical clocks in service. these are fantastically reliable, don't require batteries and do the job. why replace them? this means the same oven


needs 2 different firmwares for countries with different electric network frequencies, while, with a crystal ( that should be needed anyway to run all the embedded circuits ), the same device would run unmodified everywhere. crystals will drift and the further complication of real - time clock with battery backup are required. electrical utilities work on timescales of 20 to 50 years. how long do you think the electrolytic capacitors in your digital clock will last? links : entso - e transmission system map. entso - e faq on the matter. other interesting bits : this grid time deviation is constantly balanced out. if the time deviation is more than twenty seconds the frequency is corrected in the grid. in order to balance out the time deviation again the otherwise customary frequency of 50 hz ( europe ) is changed as follows : 49. 990 hz, if the grid time is running ahead of utc time 50. 010 hz, if the grid time is lagging behind utc time source : swissgrid. meanwhile on 2018 - 03 - 08 : ntso - e has now confirmed with the serbian and kosovar tsos, respectively ems and kostt, that the deviations which affected the average frequency in the synchronous area of continental europe have ceased. this is a first step in the resolution of the issue. the second step is now to develop a plan for returning the missing energy to the system and putting the situation back to normal. source : entso - e. hmmm! they're referring to it as " missing energy ".


how much voltage is dangerous is not really a static number as it depends on your body resistance, time of exposure and source " stiffness " ( i. e. how much current it can supply ). you get figures like 60v ( or as low as 30v ) which are an attempt at an average figure above which " caution should be taken ". however, depending on how " conductive " you are at any one time, sometimes e. g. 50v might be quite safe and other times it may kill you. dc or ac ( and what frequency ) seem to make a difference too, female or male, etc - this table is very instructive : figures as low as 20ma across the heart are given as possibly capable of inducing fibrillation - here is another table from the same source that gives body resistance based on different situations : you can see that as low as 20v may be dangerous given the right conditions. here is the reference the tables came from, i think it is quite accurate based on some experiments i have done myself measuring body resistances. the rest of the site seems to be generally very well informed and presented from the bits i have read, so i think this may be quite a trustworthy source.


the scenarios are impossible and would be laughable if they were not so serious. the evidence is in the phylogenetic trees. its a bit like a crime scene when the forensics team investigate. we've done enough crime - scenes often going to the site, collecting the pathogen, sequencing and then analysis - ( usually neglected diseases ) without any associated conspiracy theories. the key technical issue is coronaviruses are zoonoses, pathogens spread to humans from animal reservoirs and phylogenetic tree really helps understand the how the virus is transmitted. trees the key thing about all the trees are bats. bats lineages are present at every single point of the betacoronavirus phylogeny ( tree ), both as paraphyletic and monophyletic lineages, one example is this tree of betacoronaviruses here. meaning the nodes connecting the branches of the tree to the " master - branch ", represent common ancestors and these were almost certainly bat - borne cornaviruses. this is especially true for sars and - here bat - viruses are everywhere. the tree here also shows that sars arose on independently on two occassions, again surrounded by bat lineages and 2019 - ncov has emerged separately at least once, again associated with bats. finally the tree below is a figure from biorxiv zhou et al ( 2020 ) " discovery of a novel coronavirus associated with the recent pneumonia outbreak in humans and its potential bat origin " shows the 2019 - ncov lineage is a direct descendent of a very closely virus isolated from a bat ( ratg13 * ). this is a really conclusive finding btw. note, i don't normally present inline images, but it is such a nice finding ( hint to reviewers ) and biorxiv is open access. conspiracy theory 1 : laboratory made virus literally it would require someone passaging a new virus, with unknown human pathogenicity, and independently introducing all the earlier passages enmass across bat populations of china. they would then hope each lineage becomes an indepedent virus population before, then introducing the virus to humans. thus when field teams of scientists go around using mist nets to trap the bats, buy them from markets, isolate the virus and sequence it they would find a beautiful, array of natural variation in the bat populations leading up to the human epidemics, that perfectly matches vast numbers of other viral zoonoses. moreover, this would have to have happen substancially prior to sars and 2019 - ncov


, because the bat betacoronaviruses have been known about prior both epidemics, viz. its simply not feasible. biological explanation general bats are a reservoir host to vast numbers of pathogens, particularly viruses, including many alphaviruses, flaviviruses, rabies virus and beleived to be important in ebolavirus ( i don't know about this ) and even important to several eukaryotic parasites. it makes sense, they are mammals, so evolutionary much closer to us than birds for example, with large dispersal potential and roost in'overcrowded'areas enable rapid transmission between bats. technical the trees show bats are the common ancestor of betacoronaviruses in particular for the lineage leading into the emergence of 2019 - ncov and sars, this is seen in this tree, this one and the tree above. the obvious explanation is the virus circulates endemically in bats and has jumped into humans. for sars the intermediate host, or possible " vector " was civet cats. the theory and the observations fit into a seamless biological answer. conspiracy theory 2 : middle eastern connection i heard a very weird conspiracy theory attempting to connect mers with 2019 - ncov. the theory was elaborate and i don't think it is productive to describe here. biological explanation all the trees of betacoronaviruses show mers was one of the earliest viruses to diverge and is very distant from 2019 - ncov, to the extent the theory is completely implausible. the homology between these viruses is 50 %, so its either mers or 2019 - ncov. its more extreme than mixing up yellow fever virus ( mortality 40 - 80 % ) with west nile virus ( mortality < < 0. 1 % ), the two viruses are completely different at every level. what about errors? phylogeneticists can spot it a mile off. there are tell - tale phylogenetic signatures we pick up, but also we do this to assess'rare'genetic phenomina. there is nothing'rare'about the coronaviruses. the only anomaly is variation in the poly - a tail and that is the natural variation from in vitro time - series experiments. basically we've looked at enough virses / parasites through trees, that have no conspiracy theories at all ( often neglected diseases ), and understand how natural variation operates - so a phylogenecist can shift the wheat from the chaff without really thinking about it. opinion the conspiracy theories are deeply misplaced, and


the only connection i can imagine is its china. however, the chinese have loads of viruses, influenza in particular which causes major pandemics, but that is a consequence of their natural ecology ( small - holder farming ) allowing the virus to move between reservoir hosts. i've not visited small - hold farms in china, but i have in other parts of the world and when you see them, you get it. the pigs, chickens ( ducks.. china ), dogs, horses and humans all living within 10 meters of each other. conclusion shipping large numbers of bats to market, bat soup, raw meat from arboreal ( tree - living ) mammals such as civets that are sympatric to bats. then consider the classical epidemiology in light of the phylogenetic data, which is very consistent, a single picture emerges that coronavirus is one of many zoonoses which has managed to transmit between patients. summary the fundamental point is the bioinformatics fit into the classical epidemiology of a zoonose. *, note the bat coronavirus ratg13 predates the 2019 - ncov outbreak by 7 years. it is not even clear whether the virus has been isolated, i. e. could just be a rna sequence. " they have found some 500 novel coronaviruses, about 50 of which fall relatively close to the sars virus on the family tree, including ratg13 — it was fished out of a bat fecal sample they collected in 2013 from a cave in moglang in yunnan province. " cohen, " mining coronavirus genomes for clues to the outbreak ’ s origins " feb, 2020 science magazine,


as far as i know, the commutator relations make a theory quantum. if all observables commute, the theory is classical. if some observables have non - zero commutators ( no matter if they are proportional to $ \ hbar $ or not ), the theory is quantum. intuitively, what makes a theory quantum is the fact that observations affect the state of the system. in some sense, this is encoded in the commutator relations : the order of the measurements affects their outcome, the first measurement affects the result of the second one.


no, uart and rs - 232 are not the same. uart is responsible for sending and receiving a sequence of bits. at the output of a uart these bits are usually represented by logic level voltages. these bits can become rs - 232, rs - 422, rs - 485, or perhaps some proprietary spec. rs - 232 specifies voltage levels. notice that some of these voltage levels are negative, and they can also reach ±15v. larger voltage swing makes rs - 232 more resistant to interference ( albeit only to some extent ). a microcontroller uart can not generate such voltages levels by itself. this is done with help of an additional component : rs - 232 line driver. a classic example of an rs - 232 line driver is max232. if you go through the datasheet, you'll notice that this ic has a charge pump, which generates ±10v from + 5v. ( source )


this algorithm can be re - written like this scan a until you find an inversion. if you find one, swap and start over. if there is none, terminate. now there can be at most $ \ binom { n } { 2 } \ in \ theta ( n ^ 2 ) $ inversions and you need a linear - time scan to find each - - so the worst - case running time is $ \ theta ( n ^ 3 ) $. a beautiful teaching example as it trips up the pattern - matching approach many succumb to! nota bene : one has to be a little careful : some inversions appear early, some late, so it is not per se trivial that the costs add up as claimed ( for the lower bound ). you also need to observe that swaps never introduce new inversions. a more detailed analysis of the case with the inversely sorted array will then yield something like the quadratic case of gauss'formula. as @ gnasher729 aptly comments, it's easy to see the worst - case running time is $ \ omega ( n ^ 3 ) $ by analyzing the running time when sorting the input $ [ 1, 2, \ dots, n, 2n, 2n - 1, \ dots, n + 1 ] $ ( though this input is probably not the worst case ). be careful : don't assume that a reversely - sorted array will necessarily be the worst - case input for all sorting algorithms. that depends on the algorithm. there are some sorting algorithms where a reversely - sorted array isn't the worst case, and might even be close to the best case.


i like george bergman's explanation ( beginning in section 7. 4 of his invitation to general algebra and universal constructions ). we start with a motivating example. suppose you are interested in solving $ x ^ 2 = - 1 $ in $ \ mathbb { z } $. of course, there are no solutions, but let's ignore that annoying reality for a moment. we use the notation $ \ mathbb { z } _ n $ for $ \ mathbb z / n \ mathbb z $. the equation has a solution in the ring $ \ mathbb { z } _ 5 $ ( in fact, two : both $ 2 $ and $ 3 $, which are the same up to sign ). so we want to find a solution to $ x ^ 2 = - 1 $ in $ \ mathbb { z } $ which satisfies $ x \ equiv 2 \ pmod { 5 } $. an integer that is congruent to $ 2 $ modulo $ 5 $ is of the form $ 5y + 2 $, so we can rewrite our original equation as $ ( 5y + 2 ) ^ 2 = - 1 $, and expand to get $ 25y ^ 2 + 20y = - 5 $. that means $ 20y \ equiv - 5 \ pmod { 25 } $, or $ 4y \ equiv - 1 \ pmod { 5 } $, which has the unique solution $ y \ equiv 1 \ pmod { 5 } $. substituting back we determine $ x $ modulo $ 25 $ : $ $ x = 5y + 2 \ equiv 5 \ cdot 1 + 2 = 7 \ pmod { 25 }. $ $ continue this way : putting $ x = 25z + 7 $ into $ x ^ 2 = - 1 $ we conclude $ z \ equiv 2 \ pmod { 5 } $, so $ x \ equiv 57 \ pmod { 125 } $. using hensel's lemma, we can continue this indefinitely. what we deduce is that there is a sequence of residues, $ $ x _ 1 \ in \ mathbb { z } _ 5, \ quad x _ 2 \ in \ mathbb { z } _ { 25 }, \ quad \ ldots, x _ { i } \ in \ mathbb { z } _ { 5 ^ i }, \ ldots $ $ each of which sat


##isfies $ x ^ 2 = - 1 $ in the appropriate ring, and which are " consistent ", in the sense that each $ x _ { i + 1 } $ is a lifting of $ x _ i $ under the natural homomorphisms $ $ \ cdots \ stackrel { f _ { i + 1 } } { \ longrightarrow } \ mathbb { z } _ { 5 ^ { i + 1 } } \ stackrel { f _ i } { \ longrightarrow } \ mathbb { z } _ { 5 ^ i } \ stackrel { f _ { i - 1 } } { \ longrightarrow } \ cdots \ stackrel { f _ 2 } { \ longrightarrow } \ mathbb { z } _ { 5 ^ 2 } \ stackrel { f _ 1 } { \ longrightarrow } \ mathbb { z } _ 5. $ $ take the set of all strings $ ( \ ldots, x _ i, \ ldots, x _ 2, x _ 1 ) $ such that $ x _ i \ in \ mathbb { z } _ { 5 ^ i } $ and $ f _ i ( x _ { i + 1 } ) = x _ i $, $ i = 1, 2, \ ldots $. this is a ring under componentwise operations. what we did above shows that in this ring, you do have a square root of $ - 1 $. added. bergman here inserts the quote, " if the fool will persist in his folly, he will become wise. " we obtained the sequence by stubbornly looking for a solution to an equation that has no solution, by looking at putative approximations, first modulo 5, then modulo 25, then modulo 125, etc. we foolishly kept going even though there was no solution to be found. in the end, we get a " full description " of what that object must look like ; since we don't have a ready - made object that satisfies this condition, then we simply take this " full description " and use that description as if it were an object itself. by insisting in our folly of looking for a solution, we have become wise by introducing an entirely new object that is a solution. this is much along the lines of taking a cauchy sequence of rationals, which " describes " a limit point, and using the entire cauchy sequence to represent this limit point


, even if that limit point does not exist in our original set. this ring is the $ 5 $ - adic integers ; since an integer is completely determined by its remainders modulo the powers of $ 5 $, this ring contains an isomorphic copy of $ \ mathbb { z } $. essentially, we are taking successive approximations to a putative answer to the original equation, by first solving it modulo $ 5 $, then solving it modulo $ 25 $ in a way that is consistent with our solution modulo $ 5 $ ; then solving it modulo $ 125 $ in a way that is consistent with out solution modulo $ 25 $, etc. the ring of $ 5 $ - adic integers projects onto each $ \ mathbb { z } _ { 5 ^ i } $ via the projections ; because the elements of the $ 5 $ - adic integers are consistent sequences, these projections commute with our original maps $ f _ i $. so the projections are compatible with the $ f _ i $ in the sense that for all $ i $, $ f _ i \ circ \ pi _ { i + 1 } = \ pi _ { i } $, where $ \ pi _ k $ is the projection onto the $ k $ th coordinate from the $ 5 $ - adics. moreover, the ring of $ 5 $ - adic integers is universal for this property : given any ring $ r $ with homomorphisms $ r _ i \ colon r \ to \ mathbb { z } _ { 5 ^ i } $ such that $ f _ i \ circ r _ { i + 1 } = r _ i $, for any $ a \ in r $ the tuple of images $ ( \ ldots, r _ i ( a ), \ ldots, r _ 2 ( a ), r _ 1 ( a ) ) $ defines an element in the $ 5 $ - adics. the $ 5 $ - adics are the inverse limit of the system of maps $ $ \ cdots \ stackrel { f _ { i + 1 } } { \ longrightarrow } \ mathbb { z } _ { 5 ^ { i + 1 } } \ stackrel { f _ i } { \ longrightarrow } \ mathbb { z } _ { 5 ^ i } \ stackrel { f _ { i - 1 } } { \ longrightarrow } \ cdots \ stackrel { f _ 2


} { \ longrightarrow } \ mathbb { z } _ { 5 ^ 2 } \ stackrel { f _ 1 } { \ longrightarrow } \ mathbb { z } _ 5. $ $ so the elements of the inverse limit are " consistent sequences " of partial approximations, and the inverse limit is a way of taking all these " partial approximations " and combine them into a " target object. " more generally, assume that you have a system of, say, rings, $ \ { r _ i \ } $, indexed by an directed set $ ( i, \ leq ) $ ( so that for all $ i, j \ in i $ there exists $ k \ in i $ such that $ i, j \ leq k $ ), and a system of maps $ f _ { rs } \ colon r _ s \ to r _ r $ whenever $ r \ leq s $ which are " consistent " ( if $ r \ leq s \ leq t $, then $ f _ { rs } \ circ f _ { st } = f _ { rt } $ ), and let's assume that the $ f _ { rs } $ are surjective, as they were in the example of the $ 5 $ - adics. then you can think of the $ r _ i $ as being " successive approximations " ( with a higher indexed $ r _ i $ as being a " finer " or " better " approximation than the lower indexed one ). the directedness of the index set guarantees that given any two approximations, even if they are not directly comparable to one another, you can combine them into an approximation which is finer ( better ) than each of them ( if $ i, j $ are incomparable, then find a $ k $ with $ i, j \ leq k $ ). the inverse limit is a way to combine all of these approximations into an object in a consistent manner. if you imagine your maps as going right to left, you have a branching tree that is getting " thinner " as you move left, and the inverse limit is the combination of all branches occurring " at infinity ". added. the example of the $ p $ - adic integers may be a bit misleading because our directed set is totally ordered and all maps are surjective. in the more general case, you can think of every chain in the directed set as a " line of approximation " ; the directed property


ensures that any finite number of " lines of approximation " will meet in " finite time ", but you may need to go all the way to " infinity " to really put all the lines of approximation together. the inverse limit takes care of this. if the directed set has no maximal elements, but the structure maps are not surjective, it turns out that no element that is not in the image will matter ; essentially, that element never shows up in a net of " successive approximations ", so it never forms part of a " consistent system of approximations " ( which is what the elements of the inverse limit are ).


i love this question, because it's a very simple demonstration of how to do science. while it's true that in science one should never accept anything'without evidence ', it's also true that blind skepticism of everything and anything gets one nowhere - skepticism has to be combined with rational inquiry. your date has gotten the'skepticism'part of science, but she's failed to grasp the equally - crucial part where one looks at the evidence and thinks about what the evidence implies. you cannot just refuse to think or accept evidence. if your goal is to learn nothing, then nothing is what you'll learn. there are many, many ways of verifying that the earth is not flat, and most of them are easy to think about and verify. you certainly do not need to go to space to realize the earth is round! if the earth is flat, why can't you see mt. kilimanjaro from your house? mt. kilimanjaro is tall, probably taller than anything in your immediate neighborhood ( unless you live in a very deep valley ) and so the question is why wouldn't you be able to see it from anywhere on earth? or, for that matter, why can't you see it from even closer? you have to be really close, in planetary terms, to be able to see it. this wouldn't be true if the earth were flat! one might argue that this is just because of the scattering of the atmosphere. distant objects appear paler, so probably after some distance you can't see anything at all. so then let's think about things that are closer. stand on the ground and the horizon appears only a few km away. go to the top of a hill, or a large tower, and suddenly you can see things much farther away. why is this the case if the earth is flat? why would your height above ground have anything to do with it? if i raise or lower my eyes with respect to a flat table, i can still see everything on that table. the'horizon'of the table never appears closer. if the earth is flat, why do time zones exist? hopefully your date realizes that time zones exist. if not, it's pretty easy to verify by doing a video call with someone in a distant location. the reason for time zones, of course, is that the sun sets and rises at different times at different parts of the globe. why would this be the case? on a flat earth, the


sun would rise and set at the same time everywhere. if the earth is flat, why is the moon round? the moon is round and not a flat disc, as you can see by the librations of the moon. what makes the earth special, then? further, all the planets are round, although to verify this you need a good telescope. again, what makes the earth special? if the earth is flat, then what is on its'underside '? hanging dirt and leaves? a large tree? turtles? those who reject the roundness of earth either have no explanation or their explanation is based on much less solid grounding than the pro - round arguments ( which, of course, is because the earth is not flat ). if there is'nothing'under the earth, then lunar eclipses would make no sense as the earth needs to be between the moon and the sun. edit : as to the question of whether the earth is round or some weird hemisphere / pear / donut shape, among other things those would all lead to a situation where gravity is wrong. for a hemisphere for example, gravity would not point down ( towards the earth ) at any point on the earth's surface unless if you were sitting right at the top of the hemisphere. similar arguments can be made for the other shapes. sure, it's possible to make it'work'by doing even stranger things like altering the distribution of mass and so on, but at that point you've gone very far into violating occam's razor.


my colleague, ido segev, pointed out that there is a problem with most of the elegant proofs here - tetris is not just a problem of tiling a rectangle. below is his proof that the conjecture is, in fact, false.


to be honest the line between the two is almost gone nowadays and there are processors that can be classified as both ( ad blackfin for instance ). generally speaking : microcontrollers are integer math processors with an interrupt sub system. some may have hardware multiplication units, some don't, etc. point is they are designed for simple math, and mostly to control other devices. dsps are processors optimized for streaming signal processing. they often have special instructions that speed common tasks such as multiply - accumulate in a single instruction. they also often have other vector or simd instructions. historically they weren't interrupt based systems and operated with non - standard memory systems optimized for their purpose making them more difficult to program. they were usually designed to operate in one big loop processing a data stream. dsp's can be designed as integer, fixed point or floating point processors. historically if you wanted to process audio streams, video streams, do fast motor control, anything that required processing a stream of data at high speed you would look to a dsp. if you wanted to control some buttons, measure a temperature, run a character lcd, control other ics which are processing things, you'd use a microcontroller. today, you mostly find general purpose microcontroller type processors with either built in dsp - like instructions or with on chip co - processors to deal with streaming data or other dsp operations. you don't see pure dsp's used much anymore except in specific industries. the processor market is much broader and more blurry than it used to be. for instance i hardly consider a arm cortex - a8 soc a micro - controller but it probably fits the standard definition, especially in a pop package. edit : figured i'd add a bit to explain when / where i've used dsps even in the days of application processors. a recent product i designed was doing audio processing with x channels of input and x channels of output per'zone '. the intended use for the product meant that it would often times sit there doing its thing, processing the audio channels for years without anyone touching it. the audio processing consisted of various acoustical filters and functions. the system also was " hot plugable " with the ability to add some number of independent'zones'all in one box. it was a total of 3 pcb designs ( mainboard, a backplane and a plug in module ) and the backplane supported 4 plug in modules. quite a fun


project as i was doing it solo, i got to do the system design, schematic, pcb layout and firmware. now i could have done the entire thing with an single bulky arm core, i only needed about 50mips of dsp work on 24bit fixed point numbers per zone. but because i knew this system would operate for an extremely long time and knew it was critical that it never click or pop or anything like that. i chose to implement it with a low power dsp per zone and a single pic microcontroller that played the system management role. this way even if one of the uc functions crashed, maybe a ddos attack on its ethernet port, the dsp would happily just keep chugging away and its likely no one would ever know. so the microcontroller played the role of running the 2 line character lcd, some buttons, temperature monitoring and fan control ( there were also some fairly high power audio amplifiers on each board ) and even served an ajax style web page via ethernet. it also managed the dsps via a serial connection. so thats a situation where even in the days where i could have used a single arm core to do everything, the design dictated a dedicated signal processing ic. other areas where i've run into dsps : * high end audio - very high end receivers and concert quality mixing and processing gear * radar processing - i've also used arm cores for this in low end apps. * sonar processing * real time computer vision for the most part, the low and mid ends of the audio / video / similar space have been taken over by application processors which combine a general purpose cpu with co - proc offload engines for various applications.


it is true that, from an outside perspective, nothing can ever pass the event horizon. i will attempt to describe the situation as best i can, to the best of my knowledge. first, let's imagine a classical black hole. by " classical " i mean a black - hole solution to einstein's equations, which we imagine not to emit hawking radiation ( for now ). such an object would persist for ever. let's imagine throwing a clock into it. we will stand a long way from the black hole and watch the clock fall in. what we notice as the clock approaches the event horizon is that it slows down compared to our clock. in fact its hands will asymptotically approach a certain time, which we might as well call 12 : 00. the light from the clock will also slow down, becoming red - shifted quite rapidly towards the radio end of the spectrum. because of this red shift, and because we can only ever see photons emitted by the clock before it struck twelve, it will rapidly become very hard to detect. eventually it will get to the point where we'd have to wait billions of years in between photons. nevertheless, as you say, it is always possible in principle to detect the clock, because it never passes the event horizon. i had the opportunity to chat to a cosmologist about this subject a few months ago, and what he said was that this red - shifting towards undetectability happens very quickly. ( i believe the " no hair theorem " provides the justification for this. ) he also said that the black - hole - with - an - essentially - undetectable - object - just - outside - its - event - horizon is a very good approximation to a black hole of a slightly larger mass. ( at this point i want to note in passing that any " real " black hole will emit hawking radiation until it eventually evaporates away to nothing. since our clock will still not have passed the event horizon by the time this happens, it must eventually escape - although presumably the hawking radiation interacts with it on the way out. presumably, from the clock's perspective all those billions of years of radiation will appear in the split - second before 12 : 00, so it won't come out looking much like a clock any more. to my mind the resolution to the black hole information paradox lies along this line of reasoning and not in any specifics of string theory. but of course that's just my opinion


. ) now, this idea seems a bit weird ( to me and i think to you as well ) because if nothing ever passes the event horizon, how can there ever be a black hole in the first place? my friendly cosmologist's answer boiled down to this : the black hole itself is only ever an approximation. when a bunch of matter collapses in on itself it very rapidly converges towards something that looks like a black - hole solution to einstein's equations, to the point where to all intents and purposes you can treat it as if the matter is inside the event horizon rather than outside it. but this is only ever an approximation because from our perspective none of the infalling matter can ever pass the event horizon.


first part it won't decide the issue but the organic chemistry text by clayden, greeves, warren and wothers also mentions that the matter might not be as clear - cut as the majority of your textbooks make it seem. this might strengthen the position of the textbook you're using a bit. but again, there are no references given. here is the relevant passage ( especially the last two paragraphs ) : second part i have found the following passage on the formation of halohydrins from epoxides in the book by smith and march ( 7th edition ), chapter 10 - 50, page 507 : unsymmetrical epoxides are usually opened to give mixtures of regioisomers. in a typical reaction, the halogen is delivered to the less sterically hindered carbon of the epoxide. in the absence of this structural feature, and in the absence of a directing group, relatively equal mixtures of regioisomeric halohydrins are expected. the phenyl is such a group, and in 1 - phenyl - 2 - alkyl epoxides reaction with $ \ ce { pocl3 } / \ ce { dmap } $ ( $ \ ce { dmap } $ = 4 - dimethylaminopyridine ) leads to the chlorohydrin with the chlorine on the carbon bearing the phenyl. $ { } ^ { 1231 } $ when done in an ionic liquid with $ \ ce { me3sicl } $, styrene epoxide gives 2 - chloro - 2 - phenylethanol. $ { } ^ { 1232 } $ the reaction of thionyl chloride and poly ( vinylpyrrolidinone ) converts epoxides to the corresponding 2 - chloro - 1 - carbinol. $ { } ^ { 1233 } $ bromine with a phenylhydrazine catalyst, however, converts epoxides to the 1 - bromo - 2 - carbinol. $ { } ^ { 1234 } $ an alkenyl group also leads to a halohydrin with the halogen on the carbon bearing the $ \ ce { c = c } $ unit. $ { } ^ { 1235 } $ epoxy carboxylic acids are another example. when $ \ ce { nai } $ reacts at ph 4, the major regioisomer is the 2 -


iodo - 3 - hydroxy compound, but when $ \ ce { incl3 } $ is added, the major product is the 3 - iodo - 2 - hydroxy carboxylic acid. $ { } ^ { 1236 } $ references : $ { } ^ { 1231 } $ sartillo - piscil, f. ; quinero, l. ; villegas, c. ; santacruz - juarez, e. ; de parrodi, c. a. tetrahedron lett. 2002, 43, 15. $ { } ^ { 1232 } $ xu, l. - w. ; li, l. ; xia, c. - g. ; zhao, p. - q. tetrahedron lett. 2004, 45, 2435. $ { } ^ { 1233 } $ tamami, b. ; ghazi, i. ; mahdavi, h. synth. commun. 2002, 32, 3725. $ { } ^ { 1234 } $ sharghi, h. ; eskandari, m. m. synthesis 2002, 1519. $ { } ^ { 1235 } $ ha, j. d. ; kim, s. y. ; lee, s. j. ; kang, s. k. ; ahn, j. h. ; kim, s. s. ; choi, j. - k. tetrahedron lett. 2004, 45, 5969. $ { } ^ { 1236 } $ fringuelli, f. ; pizzo, f. ; vaccaro, l. j. org. chem. 2001, 66, 4719. also see concellon, j. m. ; bardales, e. ; concellon, c. ; garcia - granda, s. ; diaz, m. r. j. org. chem. 2004, 69, 6923.


you need to add a couple of more questions - - ( c ) what dielectric should i use and ( d ) where do i place the capacitor in my layout. the amount and size varies by application. for power supply components the esr ( effective series resistance ) is a critical component. for example the mc33269 ldo datasheet lists an esr recommendation of 0. 2ohms to 10ohms. there is a minimum amount of esr required for stability. for most logic ics and op - amps i use a 0. 1uf ceramic capacitor. i place the capacitor very close to the ic so that there is very short path from the capacitor leads to the ground. i use extensive ground and power planes to provide low impedance paths. for power supply and high current components each application is different. i follow the manufacturer recommendations and place the capacitors very close to the ic. for bulk filtering of power inputs coming into the board i will typically use a 10uf ceramic x7r capacitor. again this varies with application. unless there is an minimum esr requirement for stability or i need very large values of capacitance i will use either x7r or x5r dielectrics. capacitance varies with voltage and temperature. currently it is not difficult to get affordable 10uf ceramic capacitors. you do not need to over specify the voltage rating on ceramic capacitors. at the rated voltage the capacitance is within the tolerance range. unless you increase the voltage above the dielectric breakdown you are only losing capacitance. typically the dielectric strength is 2 to 3 times the rated voltage. there is a very good application note about grounding and decoupling by paul brokaw called " an ic amplifier user's guide to decoupling, grounding,. and making things go right for a change ".


the moving average filter ( sometimes known colloquially as a boxcar filter ) has a rectangular impulse response : $ $ h [ n ] = \ frac { 1 } { n } \ sum _ { k = 0 } ^ { n - 1 } \ delta [ n - k ] $ $ or, stated differently : $ $ h [ n ] = \ begin { cases } \ frac { 1 } { n }, & & 0 \ le n < n \ \ 0, & & \ text { otherwise } \ end { cases } $ $ remembering that a discrete - time system's frequency response is equal to the discrete - time fourier transform of its impulse response, we can calculate it as follows : $ $ \ begin { align } h ( \ omega ) & = \ sum _ { n = - \ infty } ^ { \ infty } x [ n ] e ^ { - j \ omega n } \ \ & = \ frac { 1 } { n } \ sum _ { n = 0 } ^ { n - 1 } e ^ { - j \ omega n } \ end { align } $ $ to simplify this, we can use the known formula for the sum of the first $ n $ terms of a geometric series : $ $ \ sum _ { n = 0 } ^ { n - 1 } e ^ { - j \ omega n } = \ frac { 1 - e ^ { - j \ omega n } } { 1 - e ^ { - j \ omega } } $ $ what we're most interested in for your case is the magnitude response of the filter, $ | h ( \ omega ) | $. using a couple simple manipulations, we can get that in an easier - to - comprehend form : $ $ \ begin { align } h ( \ omega ) & = \ frac { 1 } { n } \ sum _ { n = 0 } ^ { n - 1 } e ^ { - j \ omega n } \ \ & = \ frac { 1 } { n } \ frac { 1 - e ^ { - j \ omega n } } { 1 - e ^ { - j \ omega } } \ \ & = \ frac { 1 } { n } \ frac { e ^ { - j \ omega n / 2 } } { e ^ { - j \ omega / 2 } } \ frac { e ^ { j \ omega n / 2 } - e ^ { - j \


omega n / 2 } } { e ^ { j \ omega / 2 } - e ^ { - j \ omega / 2 } } \ end { align } $ $ this may not look any easier to understand. however, due to euler's identity, recall that : $ $ \ sin ( \ omega ) = \ frac { e ^ { j \ omega } - e ^ { - j \ omega } } { j2 } $ $ therefore, we can write the above as : $ $ \ begin { align } h ( \ omega ) & = \ frac { 1 } { n } \ frac { e ^ { - j \ omega n / 2 } } { e ^ { - j \ omega / 2 } } \ frac { j2 \ sin \ left ( \ frac { \ omega n } { 2 } \ right ) } { j2 \ sin \ left ( \ frac { \ omega } { 2 } \ right ) } \ \ & = \ frac { 1 } { n } \ frac { e ^ { - j \ omega n / 2 } } { e ^ { - j \ omega / 2 } } \ frac { \ sin \ left ( \ frac { \ omega n } { 2 } \ right ) } { \ sin \ left ( \ frac { \ omega } { 2 } \ right ) } \ end { align } $ $ as i stated before, what you're really concerned about is the magnitude of the frequency response. so, we can take the magnitude of the above to simplify it further : $ $ | h ( \ omega ) | = \ frac { 1 } { n } \ left | \ frac { \ sin \ left ( \ frac { \ omega n } { 2 } \ right ) } { \ sin \ left ( \ frac { \ omega } { 2 } \ right ) } \ right | $ $ note : we are able to drop the exponential terms out because they don't affect the magnitude of the result ; $ | e ^ { j \ omega } | = 1 $ for all values of $ \ omega $. since $ | xy | = | x | | y | $ for any two finite complex numbers $ x $ and $ y $, we can conclude that the presence of the exponential terms don't affect the overall magnitude response ( instead, they affect the system's phase response ). the resulting function inside the magnitude brackets is


a form of a dirichlet kernel. it is sometimes called a periodic sinc function, because it resembles the sinc function somewhat in appearance, but is periodic instead. anyway, since the definition of cutoff frequency is somewhat underspecified ( - 3 db point? - 6 db point? first sidelobe null? ), you can use the above equation to solve for whatever you need. specifically, you can do the following : set $ | h ( \ omega ) | $ to the value corresponding to the filter response that you want at the cutoff frequency. set $ \ omega $ equal to the cutoff frequency. to map a continuous - time frequency to the discrete - time domain, remember that $ \ omega = 2 \ pi \ frac { f } { f _ s } $, where $ f _ s $ is your sample rate. find the value of $ n $ that gives you the best agreement between the left and right hand sides of the equation. that should be the length of your moving average.


heap just guarantees that elements on higher levels are greater ( for max - heap ) or smaller ( for min - heap ) than elements on lower levels, whereas bst guarantees order ( from " left " to " right " ). if you want sorted elements, go with bst. source : heap is better at findmin / findmax ( o ( 1 ) ), while bst is good at all finds ( o ( logn ) ). insert is o ( logn ) for both structures. if you only care about findmin / findmax ( e. g. priority - related ), go with heap. if you want everything sorted, go with bst. source :


classic torgerson's metric mds is actually done by transforming distances into similarities and performing pca ( eigen - decomposition or singular - value - decomposition ) on those. [ the other name of this procedure ( distances between objects - > similarities between them - > pca, whereby loadings are the sought - for coordinates ) is principal coordinate analysis or pcoa. ] so, pca might be called the algorithm of the simplest mds. non - metric mds is based on iterative alscal or proxscal algorithm ( or algorithm similar to them ) which is a more versatile mapping technique than pca and can be applied to metric mds as well. while pca retains m important dimensions for you, alscal / proxscal fits configuration to m dimensions ( you pre - define m ) and it reproduces dissimilarities on the map more directly and accurately than pca usually can ( see illustration section below ). thus, mds and pca are probably not at the same level to be in line or opposite to each other. pca is just a method while mds is a class of analysis. as mapping, pca is a particular case of mds. on the other hand, pca is a particular case of factor analysis which, being a data reduction, is more than only a mapping, while mds is only a mapping. as for your question about metric mds vs non - metric mds there's little to comment because the answer is straightforward. if i believe my input dissimilarities are so close to be euclidean distances that a linear transform will suffice to map them in m - dimensional space, i will prefer metric mds. if i don't believe, then monotonic transform is necessary, implying use of non - metric mds. a note on terminology for a reader. term classic ( al ) mds ( cmds ) can have two different meanings in a vast literature on mds, so it is ambiguous and should be avoided. one definition is that cmds is a synonym of torgerson's metric mds. another definition is that cmds is any mds ( by any algorithm ; metric or nonmetric analysis ) with single matrix input ( for there exist models analyzing many matrices at once - individual " indscal " model and replicated model ). illustration to the answer. some cloud of points ( ellipse ) is being mapped on a one - dimensional mds - map. a pair of points


is shown in red dots. iterative or " true " mds aims straight to reconstruct pairwise distances between objects. for it is the task of any mds. various stress or misfit criteria could be minimized between original distances and distances on the map : $ \ | d _ o - d _ m \ | _ 2 ^ 2 $, $ \ | d _ o ^ 2 - d _ m ^ 2 \ | _ 1 $, $ \ | d _ o - d _ m \ | _ 1 $. an algorithm may ( non - metric mds ) or may not ( metric mds ) include monotonic transformation on this way. pca - based mds ( torgerson's, or pcoa ) is not straight. it minimizes the squared distances between objects in the original space and their images on the map. this is not quite genuine mds task ; it is successful, as mds, only to the extent to which the discarded junior principal axes are weak. if $ p _ 1 $ explains much more variance than $ p _ 2 $ the former can alone substantially reflect pairwise distances in the cloud, especially for points lying far apart along the ellipse. iterative mds will always win, and especially when the map is wanted very low - dimensional. iterative mds, too, will succeed more when a cloud ellipse is thin, but will fulfill the mds - task better than pcoa. by the property of the double - centration matrix ( described here ) it appears that pcoa minimizes $ \ | d _ o \ | _ 2 ^ 2 - \ | d _ m \ | _ 2 ^ 2 $, which is different from any of the above minimizations. once again, pca projects cloud's points on the most advantageous all - corporal saving subspace. it does not project pairwise distances, relative locations of points on a subspace most saving in that respect, as iterative mds does it. nevertheless, historically pcoa / pca is considered among the methods of metric mds.


the starch forms a loosely bonded network that traps water vapor and air into a foamy mass, which expands rapidly as it heats up. starch is made of glucose polymers ( amylopectin is one of them, shown here ) : some of the chains are branched, some are linear, but they all have $ \ ce { - oh } $ groups which can form hydrogen bonds with each other. let's follow some starch molecules through the process and see what happens. in the beginning, the starch is dehydrated and tightly compacted - the chains are lined up in nice orderly structures with no water or air between them, maximizing the hydrogen bonds between starch polymers : as the water heats up ( or as you let the pasta soak ), water molecules begin to " invade " the tightly packed polymer chains, forming their own hydrogen bonds with the starch : soon, the polymer chains are completely surrounded by water, and are free to move in solution ( they have dissolved ) : however, the water / starch solution is not completely uniform. in the middle of the pot of water, the concentration of starch is low compared to water. there are lots and lots of water molecules available to surround the starch chains and to keep them apart. near the surface, when the water is boiling, the water molecules escape as vapor. this means that near the surface, the local concentration of starch increases. it increases so much as the water continues to boil, that the starch can collapse back in on itself and hydrogen bond to other starch molecules again. however, this time the orderly structure is broken and there is too much thermal motion to line up. instead, they form a loosely packed network of molecules connected by hydrogen bonds and surrounding little pockets of water and air ( bubbles ) : this network is very weak, but it is strong enough to temporarily trap the air as it expands due to heating - thus, the bubbles puff up and a rapidly growing foam forms. since they are very weak, it doesn't take much to disrupt them. some oil in the water will inhibit the bubbles from breaking the surface as easily, and a wooden spoon across the top will break the network mechanically as soon as it touches it. many biomolecules will form these types of networks under different conditions. for example, gelatin is a protein ( amino acid polymer ) that will form elastic hydrogen - bonded networks in hot water. as the gelatin - water mixture cools, the gel solidifies,


trapping the water inside to form what is called a sol - gel, or more specifically, a hydrogel. gluten in wheat is another example, although in this case the bonds are disulfide bonds. gluten networks are stronger than hydrogen - bonded polysaccharide networks, and are responsible for the elasticity of bread ( and of pasta ). disclaimer : pictures are not remotely to scale, starch is usually several hundred glucose monomers long, and the relative size of the molecules and atoms isn't shown. there aren't nearly enough water molecules - in reality there would be too many to be able to see the polymer ( 1, 000's ). the starch molecules aren't " twisty " enough or showing things like branching - the real network structure and conformations in solution would be much more complicated. but, hopefully you get the idea!


let me offer one reason and one misconception as an answer to your question. the main reason that it is easier to write ( seemingly ) correct mathematical proofs is that they are written at a very high level. suppose that you could write a program like this : function maximumwindow ( a, n, w ) : using a sliding window, calculate ( in o ( n ) ) the sums of all length - w windows return the maximum sum ( be smart and use only o ( 1 ) memory ) it would be much harder to go wrong when programming this way, since the specification of the program is much more succinct than its implementation. indeed, every programmer who tries to convert pseudocode to code, especially to efficient code, encounters this large chasm between the idea of an algorithm and its implementation details. mathematical proofs concentrate more on the ideas and less on the detail. the real counterpart of code for mathematical proofs is computer - aided proofs. these are much harder to develop than the usual textual proofs, and one often discovers various hidden corners which are " obvious " to the reader ( who usually doesn't even notice them ), but not so obvious to the computer. also, since the computer can only fill in relatively small gaps at present, the proofs must be elaborated to such a level that a human reading them will miss the forest for the trees. an important misconception is that mathematical proofs are often correct. in fact, this is probably rather optimistic. it is very hard to write complicated proofs without mistakes, and papers often contain errors. perhaps the most celebrated recent cases are wiles'first attempt at ( a special case of ) the modularity theorem ( which implies fermat's last theorem ), and various gaps in the classification of finite simple groups, including some 1000 + pages on quasithin groups which were written 20 years after the classification was supposedly finished. a mistake in a paper of voevodsky made him doubt written proofs so much that he started developing homotopy type theory, a logical framework useful for developing homotopy theory formally, and henceforth used a computer to verify all his subsequent work ( at least according to his own admission ). while this is an extreme ( and at present, impractical ) position, it is still the case that when using a result, one ought to go over the proof and check whether it is correct. in my area there are a few papers which are known to be wrong but have never been


retracted, whose status is relayed from mouth to ear among experts.


you can prove it by explicitly calculating the conditional density by brute force, as in procrastinator's link ( + 1 ) in the comments. but, there's also a theorem that says all conditional distributions of a multivariate normal distribution are normal. therefore, all that's left is to calculate the mean vector and covariance matrix. i remember we derived this in a time series class in college by cleverly defining a third variable and using its properties to derive the result more simply than the brute force solution in the link ( as long as you're comfortable with matrix algebra ). i'm going from memory but it was something like this : it is worth pointing out that the proof below only assumes that $ \ sigma _ { 22 } $ is nonsingular, $ \ sigma _ { 11 } $ and $ \ sigma $ may well be singular. let $ { \ bf x } _ { 1 } $ be the first partition and $ { \ bf x } _ 2 $ the second. now define $ { \ bf z } = { \ bf x } _ 1 + { \ bf a } { \ bf x } _ 2 $ where $ { \ bf a } = - \ sigma _ { 12 } \ sigma ^ { - 1 } _ { 22 } $. now we can write \ begin { align * } { \ rm cov } ( { \ bf z }, { \ bf x } _ 2 ) & = { \ rm cov } ( { \ bf x } _ { 1 }, { \ bf x } _ 2 ) + { \ rm cov } ( { \ bf a } { \ bf x } _ 2, { \ bf x } _ 2 ) \ \ & = \ sigma _ { 12 } + { \ bf a } { \ rm var } ( { \ bf x } _ 2 ) \ \ & = \ sigma _ { 12 } - \ sigma _ { 12 } \ sigma ^ { - 1 } _ { 22 } \ sigma _ { 22 } \ \ & = 0 \ end { align * } therefore $ { \ bf z } $ and $ { \ bf x } _ 2 $ are uncorrelated and, since they are jointly normal, they are independent. now, clearly $ e ( { \ bf z } ) = { \ boldsymbol \ mu } _ 1 + { \ bf a } { \ boldsymbol \ mu } _ 2 $, therefore it follows that \ begin


{ align * } e ( { \ bf x } _ 1 | { \ bf x } _ 2 ) & = e ( { \ bf z } - { \ bf a } { \ bf x } _ 2 | { \ bf x } _ 2 ) \ \ & = e ( { \ bf z } | { \ bf x } _ 2 ) - e ( { \ bf a } { \ bf x } _ 2 | { \ bf x } _ 2 ) \ \ & = e ( { \ bf z } ) - { \ bf a } { \ bf x } _ 2 \ \ & = { \ boldsymbol \ mu } _ 1 + { \ bf a } ( { \ boldsymbol \ mu } _ 2 - { \ bf x } _ 2 ) \ \ & = { \ boldsymbol \ mu } _ 1 + \ sigma _ { 12 } \ sigma ^ { - 1 } _ { 22 } ( { \ bf x } _ 2 - { \ boldsymbol \ mu } _ 2 ) \ end { align * } which proves the first part. for the covariance matrix, note that \ begin { align * } { \ rm var } ( { \ bf x } _ 1 | { \ bf x } _ 2 ) & = { \ rm var } ( { \ bf z } - { \ bf a } { \ bf x } _ 2 | { \ bf x } _ 2 ) \ \ & = { \ rm var } ( { \ bf z } | { \ bf x } _ 2 ) + { \ rm var } ( { \ bf a } { \ bf x } _ 2 | { \ bf x } _ 2 ) - { \ bf a } { \ rm cov } ( { \ bf z }, - { \ bf x } _ 2 ) - { \ rm cov } ( { \ bf z }, - { \ bf x } _ 2 ) { \ bf a }'\ \ & = { \ rm var } ( { \ bf z } | { \ bf x } _ 2 ) \ \ & = { \ rm var } ( { \ bf z } ) \ end { align * } now we're almost done : \ begin { align * } { \ rm var } ( { \ bf x } _ 1 | { \ bf x } _ 2 ) = { \ rm var } ( { \ bf z } ) & = { \ rm var }


( { \ bf x } _ 1 + { \ bf a } { \ bf x } _ 2 ) \ \ & = { \ rm var } ( { \ bf x } _ 1 ) + { \ bf a } { \ rm var } ( { \ bf x } _ 2 ) { \ bf a }'+ { \ bf a } { \ rm cov } ( { \ bf x } _ 1, { \ bf x } _ 2 ) + { \ rm cov } ( { \ bf x } _ 2, { \ bf x } _ 1 ) { \ bf a }'\ \ & = \ sigma _ { 11 } + \ sigma _ { 12 } \ sigma ^ { - 1 } _ { 22 } \ sigma _ { 22 } \ sigma ^ { - 1 } _ { 22 } \ sigma _ { 21 } - 2 \ sigma _ { 12 } \ sigma _ { 22 } ^ { - 1 } \ sigma _ { 21 } \ \ & = \ sigma _ { 11 } + \ sigma _ { 12 } \ sigma ^ { - 1 } _ { 22 } \ sigma _ { 21 } - 2 \ sigma _ { 12 } \ sigma _ { 22 } ^ { - 1 } \ sigma _ { 21 } \ \ & = \ sigma _ { 11 } - \ sigma _ { 12 } \ sigma ^ { - 1 } _ { 22 } \ sigma _ { 21 } \ end { align * } which proves the second part. note : for those not very familiar with the matrix algebra used here, this is an excellent resource. edit : one property used here this is not in the matrix cookbook ( good catch @ flyingpig ) is property 6 on the wikipedia page about covariance matrices : which is that for two random vectors $ \ bf x, y $, $ $ { \ rm var } ( { \ bf x } + { \ bf y } ) = { \ rm var } ( { \ bf x } ) + { \ rm var } ( { \ bf y } ) + { \ rm cov } ( { \ bf x }, { \ bf y } ) + { \ rm cov } ( { \ bf y }, { \ bf x } ) $ $ for scalars, of course, $ { \ rm cov } ( x, y ) = { \ rm cov } ( y, x ) $ but for vectors they are different insofar as the matrices are arranged differently.


one approach to this is to use whatever data you have to iteratively update the reference genome. you can keep chain files along the way so you can convert coordinates ( e. g. in gff files ) from the original reference to your new pseudoreference. a simple approach might be : align new data to existing reference call variants ( e. g. samtools mpileup, gatk, or whatever is best for you ) create new reference incorporating variants from 2 rinse and repeat ( i. e. go to 1 ) you can track some simple stats as you do this - e. g. the number of new variants should decrease, the number of reads mapped should increase, and the mismatch rate should decrease, with every iteration of the above loop. once the pseudoreference stabilises, you know you can't do much more.