there are many ways to control for variables. the easiest, and one you came up with, is to stratify your data so you have sub - groups with similar characteristics - there are then methods to pool those results together to get a single " answer ". this works if you have a very small number of variables you want to control for, but as you've rightly discovered, this rapidly falls apart as you split your data into smaller and smaller chunks. a more common approach is to include the variables you want to control for in a regression model. for example, if you have a regression model that can be conceptually described as : bmi = impatience + race + gender + socioeconomic status + iq the estimate you will get for impatience will be the effect of impatience within levels of the other covariates - regression allows you to essentially smooth over places where you don't have much data ( the problem with the stratification approach ), though this should be done with caution. there are yet more sophisticated ways of controlling for other variables, but odds are when someone says " controlled for other variables ", they mean they were included in a regression model. alright, you've asked for an example you can work on, to see how this goes. i'll walk you through it step by step. all you need is a copy of r installed. first, we need some data. cut and paste the following chunks of code into r. keep in mind this is a contrived example i made up on the spot, but it shows the process. covariate < - sample ( 0 : 1, 100, replace = true ) exposure < - runif ( 100, 0, 1 ) + ( 0. 3 * covariate ) outcome < - 2. 0 + ( 0. 5 * exposure ) + ( 0. 25 * covariate ) that's your data. note that we already know the relationship between the outcome, the exposure, and the covariate - that's the point of many simulation studies ( of which this is an extremely basic example. you start with a structure you know, and you make sure your method can get you the right answer. now then, onto the regression model. type the following : lm ( outcome ~ exposure ) did you get an intercept = 2. 0 and an exposure = 0. 6766? or something close to it, given there will be some random variation in the data? good - this answer is wrong. we know it


' s wrong. why is it wrong? we have failed to control for a variable that effects the outcome and the exposure. it's a binary variable, make it anything you please - gender, smoker / non - smoker, etc. now run this model : lm ( outcome ~ exposure + covariate ) this time you should get coefficients of intercept = 2. 00, exposure = 0. 50 and a covariate of 0. 25. this, as we know, is the right answer. you've controlled for other variables. now, what happens when we don't know if we've taken care of all of the variables that we need to ( we never really do )? this is called residual confounding, and its a concern in most observational studies - that we have controlled imperfectly, and our answer, while close to right, isn't exact. does that help more?


knapsack problem is $ \ sf { np \ text { - } complete } $ when the numbers are given as binary numbers. in this case, the dynamic programming will take exponentially many steps ( in the size of the input, i. e. the number of bits in the input ) to finish $ \ dagger $. on the other hand, if the numbers in the input are given in unary, the dynamic programming will work in polynomial time ( in the size of the input ). this kind of problems is called weakly $ \ sf { np \ text { - } complete } $. $ \ dagger $ : another good example to understand the importance of the encoding used to give the input is considering the usual algorithms to see if a number is prime that go from $ 2 $ up to $ \ sqrt { n } $ and check if any of them divide $ n $. this is polynomial in $ n $ but not necessarily in the input size. if $ n $ is given in binary, the size of input is $ \ lg n $ and the algorithm runs in time $ o ( \ sqrt { n } ) = o ( 2 ^ { \ lg n / 2 } ) $ which is exponential in the input size. and the usual computational complexity of a problem is w. r. t. the size of the input. this kind of algorithm, i. e. polynomial in the largest number that is part of the input, but exponential in the input length is called pseudo - polynomial.


the quoted text in the question is a case of using bandpass sampling or undersampling. here, to avoid aliasing distortion, the signal of interest must be bandpass. that means that the signal's power spectrum is only non - zero between $ f _ l < | f | < f _ h $. if we sample the signal at a rate $ f _ s $, then the condition that the subsequent repeated spectra do not overlap means we can avoid aliasing. the repeated spectra happen at every integer multiple of $ f _ s $. mathematically, we can write this condition for avoiding aliasing distortion as $ $ \ frac { 2 f _ h } { n } \ le f _ s \ le \ frac { 2 f _ l } { n - 1 } $ $ where $ n $ is an integer that satisfies $ $ 1 \ le n \ le \ frac { f _ h } { f _ h - f _ l } $ $ there are a number of valid frequency ranges you can do this with, as illustrated by the diagram below ( taken from the wikipedia link above ). in the above diagram, if the problem lies in the grey areas, then we can avoid aliasing distortion with bandpass sampling - - - even though the sampled signal is aliased, we have not distorted the shape of the signal's spectrum.


to understand the difference between sets and types, ones has to go back to pre - mathematical ideas of " collection " and " construction ", and see how sets and types mathematize these. there is a spectrum of possibilities on what mathematics is about. two of these are : we think of mathematics as an activity in which mathematical objects are constructed according to some rules ( think of geometry as the activity of constructing points, lines and circles with a ruler and a compass ). thus mathematical objects are organized according to how they are constructed, and there are different types of construction. a mathematical object is always constructed in some unique way, which determines its unique type. we think of mathematics as a vast universe full of pre - existing mathematical objects ( think of the geometric plane as given ). we discover, analyze and think about these objects ( we observe that there are points, lines and circles in the plane ). we collect them into set. usually we collect elements that have something in common ( for instance, all lines passing through a given point ), but in principle a set may hold together an arbitrary selection of objects. a set is specified by its elements, and only by its elements. a mathematical object may belong to many sets. we are not saying that the above possibilities are the only two, or that any one of them completely describes what mathematics is. nevertheless, each view can serve as a useful starting point for a general mathematical theory that usefully describes a wide range of mathematical activities. it is natural to take a type $ t $ and imagine the collection of all things that we can construct using the rules of $ t $. this is the extension of $ t $, and it is not $ t $ itself. for instance, here are two types that have different rules of construction, but they have the same extension : the type of pairs $ ( n, p ) $ where $ n $ is constructed as a natural number, and $ p $ is constructed as a proof demonstrating that $ n $ is an even prime number larger than $ 3 $. the type of pairs $ ( m, q ) $ where $ m $ is constructed as a natural number, and $ q $ is constructed as a proof demonstrating that $ m $ is an odd prime smaller than $ 2 $. yes, these are silly trivial examples, but the point stands : both types have nothing in their extension, but they have different rules of construction. in contrast, the sets $ $ \ { n \ in \ mathbb { n } \ mid \ text


{ $ n $ is an even prime larger than $ 3 $ } \ } $ $ and $ $ \ { m \ in \ mathbb { n } \ mid \ text { $ m $ is an odd prime smaller than $ 2 $ } \ } $ $ are equal because they have the same elements. note that type theory is not about syntax. it is a mathematical theory of constructions, just like set theory is a mathematical theory of collections. it just so happens that the usual presentations of type theory emphasize syntax, and consequently people end up thinking type theory is syntax. this is not the case. to confuse a mathematical object ( construction ) with a syntactic expression that represents it ( a term former ) is a basic category mistake that has puzzled logicians for a long time, but not anymore.


the first time i tried to do the current calculation for a circuit similar to the previous circuit on a simulator, the program complained about not having a ground and " floating voltage sources ". your simulator wants to be able to do its calculations and report out the voltages of each node relative to some reference, rather than have to report the difference between every possible pair of nodes. it needs you to tell it which node is the reference node. other than that, for a well - designed circuit, the " ground " has no significance in the simulation. if you design a circuit where there is no dc path between two nodes, though, the circuit will be unsolvable. typical spice - like simulators resolve this by connecting extra resistors, typically 1 gohm, between every node and ground, so it is conceivable that the choice of ground node could artificially affect the results of a simulation of a very high - impedance circuit. i picked ground at the bottom, but would it be okay to pick ground between the 7 ohm and 2 ohm resistor - or any other place? and what would be the difference when analyzing the circuit? you can pick any node as your reference ground. often we think ahead and pick a node that will eliminate terms for the equations ( by setting them equal to 0 ), or simplify the schematic ( by allowing us to indicate connections through a ground symbol instead of by a bunch of lines connecting together ). i've read that there are 3 typical ground symbols with different meanings - chassis ground, earth ground, and signal ground. a lot of circuits i've seen used in exercises use earth ground or signal ground. what purpose is there in using earth ground? what is the signal ground connected to? earth ground is used to indicate a connection to something that is physically connected to the ground beneath our feet. a wire leading through the building down to a copper rod driven into the ground, in a typical case. this ground is used for safety purposes. we assume that someone who handles our equipment will be connected to something like earth ground by their feet. so earth ground is the safest circuit node for them to touch, because it won't drive currents through their body. chassis ground is just the potential of the case or enclosure of your circuit. for safety purposes it's often best for this to be connected to earth ground. but calling it " chassis " instead of " earth " means you haven't assumed that it is connected. signal ground is often distinguished from


earth ground ( and partially isolated from it ) to minimize the possibility that currents flowing through the earth ground wires will disturb measurements of the important signals. another question : since the ground is at unknown potential, wouldn't there be current flowing to or from ground to the circuit? remember, a complete circuit is required for current to flow. you would need connections to earth ground in two places for current to flow in and out of your circuit from earth ground. realistically, you'd also need some kind of voltage source ( a battery, or an antenna, or something ) in one of those connection paths to have any sustained flow back and forth between your circuit and the earth. however, when there are multiple voltage sources, some of them are " floating ". what meaning does the voltage of a floating voltage source have? if i have voltage source with value v between nodes a and b, it means that the voltage difference between a and b will be v volts. a perfect voltage source will generate whatever current is required to make this happen. if one of the nodes happens to be ground, that gives you immediately the value at the other node in your reference system. if neither of those nodes happens to be " ground " then you will need some other connections to establish the value of the voltages at a and b relative to ground.


as we cannot resolve arbitrarily small time intervals, what is'' really'' the case cannot be decided. but in classical and quantum mechanics ( i. e., in most of physics ), time is treated as continuous. physics would become very awkward if expressed in terms of a discrete time : the discrete case is essentially untractable since analysis ( the tool created by newton, in a sense the father of modern physics ) can no longer be applied. edit : if time appears discrete ( or continuous ) at some level, it could still be continuous ( or discrete ) at higher resolution. this is due to general reasons that have nothing to do with time per se. i explain it by analogy : for example, line spectra look discrete, but upon higher resolution one sees that they have a line width with a physical meaning. thus one cannot definitely resolve the question with finitely many observations of finite accuracy, no matter how contrived the experiment.


in the original paper that proposed dropout layers, by hinton ( 2012 ), dropout ( with p = 0. 5 ) was used on each of the fully connected ( dense ) layers before the output ; it was not used on the convolutional layers. this became the most commonly used configuration. more recent research has shown some value in applying dropout also to convolutional layers, although at much lower levels : p = 0. 1 or 0. 2. dropout was used after the activation function of each convolutional layer : conv - > relu - > drop.


my recommendation in terms of text books is rick lyons's understanding dsp. my review of the latest edition is here. i, and many others from the $ { \ tt comp. dsp } $ community and elsewhere, have helped rick revise parts of the text since the first edition. for self - study, i know of no better book. as an on - line, free resource, i recommend steve smith's book. personally, i prefer rick's style, but steve's book as the advantage of online accessibility ( and the online version is free! ). edit : rick sent me some feedback that i thought i'd share here : for your colleagues that have a copy of my dsp book, i'll be happy to send them the errata for my book. all they have to do is send me an e - mail telling me ( 1 ) the edition number, and ( 2 ) the printing number of their copy of the book. the printing number can be found on the page just before the'dedication'page. my e - mail address is : r. lyons [ at ] ieee. org i recommend that your colleagues have a look at : rick also gave me a long list of online dsp references. there are way too many to put here. i will see about setting up a googledocs version and re - post here later.


i think that mere touching does not bring the surfaces close enough. the surface of a metal is not perfect usually. maybe it has an oxide layer that resists any kind of reaction. if the metal is extremely pure and if you bring two pieces of it extremely close together, then they will join together. it's also called cold welding. for more information : what prevents two pieces of metal from bonding? cold welding


samtools merge merged. bam *. bam is efficient enough since the input files are sorted. you can get a bit faster with sambamba and / or biobambam, but they're not typically already installed and io quickly becomes a bottleneck anyway.


you have to take images for calibration from different points of view and angles, with as big difference between angles as possible ( all three euler angles should vary ), but so that pattern diameter was still fitting to camera field of view. the more views are you using the better calibration will be. that is needed because during the calibration you detect focal length and distortion parameters, so to get them by least square method different angles are needed. if you arn't moving camera at all you are not getting new information and calibration is useless. be aware, that you usually need only focal length, distortion parameters are usually negligible even for consumer cameras, web cameras and cell phone cameras. if you already know focal length from the camera specification you may not even need calibration. distortion coefficient are more present in " special " cameras like wide - angle or 360°. here is the wikipedia entry about calibration. and here is non - linear distortion, which is negligible for most cameras.


that depends both on the processor ( not just the processor series, it can vary from model to model ) and the operating systems, but there are general principles. whether a processor is multicore has no direct impact on this aspect ; the same process could be executing on multiple cores simultaneously ( if it's multithreaded ), and memory can be shared between processes, so cache synchronization is unavoidable regardless of what happens on a context switch. when a processor looks up a memory location in the cache, if there is an mmu, it can use either the physical or the virtual address of that location ( sometimes even a combination of both, but that's not really relevant here ). with physical addresses, it doesn't matter which process is accessing the address, the contents can be shared. so there is no need to invalidate the cache content during a context switch. if the two processes map the same physical page with different attributes, this is handled by the mmu ( acting as a mpu ( memory protection unit ) ). the downside of a physically addressed cache is that the mmu has to sit between the processor and the cache, so the cache lookup is slow. l1 caches are almost never physically addresses ; higher - level caches may be. the same virtual address can denote different memory locations in different processes. hence, with a virtually addressed cache, the processor and the operating system must cooperate to ensure that a process will find the right memory. there are several common techniques. the context - switching code provided by the operating system can invalidate the whole cache ; this is correct but very costly. some cpu architectures have room in their cache line for an asid ( address space identifier ) the hardware version of a process id, also used by the mmu. this effectively separates cache entries from different processes, and means that two processes that map the same page will have incoherent views of the same physical page ( there is usually a special asid value indicating a shared page, but these need to be flushed if they are not mapped to the same address in all processes where they are mapped ). if the operating system takes care that different processes use non - overlapping address spaces ( which defeats some of the purpose of using virtual memory, but can be done sometimes ), then cache lines remain valid. most processors that have an mmu also have a tlb. the tlb is a cache of mappings from virtual addresses to physical addresses. the t


##lb is consulted before lookups in physically - addressed caches, to determine the physical address quickly when possible ; the processor may start the cache lookup before the tlb lookup is complete, as often candidate cache lines can be identified from the middle bits of the address, between the bits that determine the offset in a cache line and the bits that determine the page. virtually - addressed caches bypass the tlb if there is a cache hit, although the processor may initiate the tlb lookup while it is querying the cache, in case of a miss. the tlb itself must be managed during a context switch. if the tlb entries contain an asid, they can remain in place ; the operating system only needs to flush tlb entries if their asid has changed meaning ( e. g. because a process has exited ). if the tlb entries are global, they must be invalidated when switching to a different context.


there was a story in my days about a physical chemist who was asked to explain some effect, illustrated by a poster on the wall. he did that, after which someone noticed that the poster was hanging upside down, so the effect appeared reversed in sign. undaunted, the guy immediately explained it the other way around, just as convincingly as he did the first time. cooking up explanations on the spot is a respectable sport, but your teacher went a bit too far. what's with that charles'law? see, it is a gas law ; it is about gases. and even then it is but an approximation. to make it exact, you have to make your gas ideal, which can't be done. as you lower the temperature, all gases become less and less ideal. and then they condense, and we're left to deal with liquids and solids, to which the said law never applied, not even as a very poor approximation. appealing to this law when we are near the absolute zero is about as sensible as ruling out certain reaction mechanism on the grounds that it requires atoms to move faster than allowed by the road speed limit in the state of hawaii. the energy argument is even more ridiculous. we don't have to remove all energy, but only the kinetic energy. the $ e = mc ^ 2 $ part remains there, so the mass is never going anywhere. all that being said, there is no physical law forbidding the existence of matter at absolute zero. it's not like its existence will cause the world to go down with error 500. it's just that the closer you get to it, the more effort it takes, like with other ideal things ( ideal vacuum, ideally pure compound, crystal without defects, etc ). if anything, we're doing a pretty decent job at it. using sophisticated techniques like laser cooling or magnetic evaporative cooling, we've long surpassed the nature's record in coldness.


to achieve ( at least some of ) your goals, i would recommend the variant effect predictor ( vep ). it is a flexible tool that provides several types of annotations on an input. vcf file. i agree that exac is the de facto gold standard catalog for human genetic variation in coding regions. to see the frequency distribution of variants by global subpopulation make sure " exac allele frequencies " is checked in addition to the 1000 genomes. output in the web - browser : if you download the annotated. vcf, frequencies will be in the info field : # # info = < id = csq, number =., type = string, description = " consequence annotations from ensembl vep. format : allele | consequence | impact | symbol | gene | feature _ type | feature | biotype | exon | intron | hgvsc | hgvsp | cdna _ position | cds _ position | protein _ position | amino _ acids | codons | existing _ variation | distance | strand | flags | symbol _ source | hgnc _ id | tsl | sift | polyphen | af | afr _ af | amr _ af | eas _ af | eur _ af | sas _ af | aa _ af | ea _ af | exac _ af | exac _ adj _ af | exac _ afr _ af | exac _ amr _ af | exac _ eas _ af | exac _ fin _ af | exac _ nfe _ af | exac _ oth _ af | exac _ sas _ af | clin _ sig | somatic | pheno | motif _ name | motif _ pos | high _ inf _ pos | motif _ score _ change the previously mentioned annovar can also annotate with exac allele frequencies. finally, should mention the newest whole - genome resource, gnomad.


although a pca applied on binary data would yield results comparable to those obtained from a multiple correspondence analysis ( factor scores and eigenvalues are linearly related ), there are more appropriate techniques to deal with mixed data types, namely multiple factor analysis for mixed data available in the factominer r package ( famd ( ) ). if your variables can be considered as structured subsets of descriptive attributes, then multiple factor analysis ( mfa ( ) ) is also an option. the challenge with categorical variables is to find a suitable way to represent distances between variable categories and individuals in the factorial space. to overcome this problem, you can look for a non - linear transformation of each variable - - whether it be nominal, ordinal, polynomial, or numerical - - with optimal scaling. this is well explained in gifi methods for optimal scaling in r : the package homals, and an implementation is available in the corresponding r package homals.


julia, at this point ( may 2019, julia v1. 1 with v1. 2 about to come out ) is quite mature for scientific computing. the v1. 0 release signified an end to yearly code breakage. with that, a lot of scientific computing libraries have had the time to simply grow without disruption. a broad overview of julia packages can be found at pkg. julialang. org. for core scientific computing, the differentialequations. jl library for differential equations ( odes, sdes, daes, ddes, gillespie simulations, etc. ), flux. jl for neural networks, and the jump library for mathematical programming ( optimization : linear, quadratic, mixed integer, etc. programming ) are three of the cornerstones of the scientific computing ecosystem. the differential equation library in particular is far more developed than what you'd see in other languages, with a large development team implementing features like epirk integrators, runge - kutta - nystrom, stiff / differential - algebraic delay differential equation, and adaptive time stiff stochastic differential equation integrators, along with a bunch of other goodies like adjoint sensitivity analysis, chemical reaction dsls, matrix - free newton - krylov, and full ( data transfer free ) gpu compatibility, with training of neural differential equations, all with fantastic benchmark results ( disclaimer : i am the lead developer ). the thing that is a little mind - boggling about the matured julia ecosystem is its composibility. essentially, when someone builds a generic library function like those in differentialequations. jl, you can use any abstractarray / number type to generate new code on the fly. so for example, there is a library for error propagation ( measurements. jl ) and when you stick it in the ode solver, it automatically compiles a new version of the ode solver which does error propagation without parameter sampling. because of this, you may not find some features documented because the code for the features generates itself, and so you need to think more about library composition. one of the ways where composition is most useful is in linear algebra. the ode solvers for example allow you to specify jac _ prototype, letting you give it the type for the jacobian that will be used internally. of course there's things in the lineraalgebra standard library like symmetric and tridiagonal you can use here, but given the utility of


composibility in type generic algorithms, people have by now gone and built entire array type libraries. bandedmatrices. jl and blockbandedmatrices. jl are libraries which define ( block ) banded matrix types which have fast lu overloads, making them a nice way to accelerate the solution of stiff mol discretizations of systems of partial differential equations. pdmats. jl allows for the specification of positive - definite matrices. elemental. jl allows you to define a distributed sparse jacobian. cuarrays. jl defines arrays on the gpu. etc. then you have all of your number types. unitful. jl does unit checking at compile time so it's an overhead - free units library. doublefloats. jl is a fast higher precision library, along with quadmath. jl and arbfloats. jl. forwarddiff. jl is a library for forward - mode automatic differentiation which uses dual number arithmetic. and i can keep going listing these out. and yes, you can throw them into sufficiently generic julia libraries like differentialequations. jl to compile a version specifically optimized for these number types. even something like approxfun. jl which is functions as algebraic objects ( like chebfun ) works with this generic system, allowing the specification of pdes as odes on scalars in a function space. given the advantages of composibility and the way that types can be use to generate new and efficient code on generic julia functions, there has been a lot of work to get implementations of core scientific computing functionality into pure julia. optim. jl for nonlinear optimization, nlsolve. jl for solving nonlinear systems, iterativesolvers. jl for iterative solvers of linear systems and eigensystems, blackboxoptim. jl for black - box optimization, etc. even the neural network library flux. jl just uses cuarrays. jl's automatic compilation of code to the gpu for its gpu capabilities. this composibility was the core of what created things like neural differential equations in diffeqflux. jl. probabilistic programming languages like turing. jl are also quite mature now and make use of the same underlying tooling. since julia's libraries are so fundamentally based on code generation tools, it should be no surprised that there's a lot of tooling around code generation


. julia's broadcast system generates fused kernels on the fly which are overloaded by array types to give a lot of the features mentioned above. cudanative. jl allows for compiling julia code to gpu kernels. modelingtoolkit. jl automatically de - sugars asts into a symbolic system for transforming mathematical code. cassette. jl lets you " overdub " someone else's existing function, using rules to change their function before compile time ( for example : change all of their array allocations to static array allocations and move operations to the gpu ). this is more advanced tooling ( i don't expect everyone doing scientific computing to take direct control of the compiler ), but this is how a lot of the next generation tooling is being built ( or rather, how the features are writing themselves ). as for parallelism, i've mentioned gpus, and julia has built - in multithreading and distributed computing. julia's multithreading will very soon use a parallel - tasks runtime ( partr ) architecture which allows for automated scheduling of nested multithreading. if you want to use mpi, you can just use mpi. jl. and then of course, the easiest way to make use of it all is to just use an abstractarray type setup to use the parallelism in its operations. julia also has the basic underlying ecosystem you would expect of a general purpose language used for scientific applications. it has the juno ide with a built - in debugger with breakpoints, it has plots. jl for making all sorts of plots. a lot of specific tools are nice as well, like revise. jl automatically updates your functions / library when a file saves. you have your dataframes. jl, statistics libraries, etc. one of the nicest libraries is actually distributions. jl which lets you write algorithms generic to the distribution ( for example : rand ( dist ) takes a random number of whatever distribution was passed in ), and there's a whole load of univariate and multivariate distributions ( and of course dispatch happens at compile time, making this all as fast as hardcoding a function specific to the distribution ). there is a bunch of data handling tooling, web servers, etc. you name it. at this point it's mature enough that if there's a basic scientific thing and you'd expect for it to exist,


you just google it with. jl or julia and it'll show up. then there's a few things to keep in mind on the horizon. packagecompiler is looking to build binaries from julia libraries, and it already has some successes but needs more development. makie. jl is a whole library for gpu - accelerated plotting with interactivity, and it still needs some more work but it's really looking to become the main plotting library in julia. zygote. jl is a source - to - source automatic differentiation library which doesn't have the performance issues of a tracing - based ad ( flux's tracker, pytorch, jax ), and that is looking to work on all pure julia codes. etc. in conclusion, you can find a lot of movement in a lot of places, but in most areas there is already a solid matured library. it's no longer at a place where you ask " will it be adopted? " : julia has been adopted by enough people ( millions of downloads ) that it has the momentum to stay around for good. it has a really nice community, so if you ever just want to shoot the breeze and talk about parallel computing or numerical differential equations, some of the best chat rooms for that are in the julialang slack. whether it's a language you should learn is a personal question, and whether it's the right language for your project is a technical question, and those are different. but is it a language that has matured and has the backing of a large consistent group of developers? that seems to be an affirmative yes.


there are some other application - specific journals to list : such as journal of computational physics or computer physics communications, that accept articles both about algorithms as well as the software used to implement them. if you're in the chemistry field, journal of chemical theory and computation might be another journal to consider. all of these do allow packages to be published — i've seen codes i've used discussed in them. computers and chemical engineering does allow software implementation papers, but they need to do something original — it can't be an " incremental advance " paper.


tl ; dr fluorine is electronegative and can support the extra negative charge that is dispersed on the six x atoms in $ \ ce { sx6 } $, whereas hydrogen cannot. first, let's debunk a commonly taught myth, which is that the bonding in $ \ ce { sf6 } $ involves promotion of electrons to the 3d orbitals with a resulting $ \ mathrm { sp ^ 3d ^ 2 } $ hybridisation. this is not true. here's a recent and arguably more understandable reference : j. chem. educ. 2020, 97 ( 10 ), 3638 – 3646 which explains this. quoting : the natural ionicity, $ i _ \ ce { sf } $, of each $ \ ce { s - f } $ bond [ in $ \ ce { sf6 } $ ] is 0. 86, indicating a rather ionic σ bond. each fluorine has an average charge of $ −0. 45 $, resulting in a sulfur center of charge $ + 2. 69 $. [... ] in summary, the electronic structure of this system is best described as a sulfur center with a charge somewhere between $ 2 + $ and $ 3 + $ ; the corresponding negative charge is distributed among the equivalent fluorine atoms. shown in figure 12 is the orbital occupation of the sulfur center, $ \ ce { 3s ^ 1 3p ^ { 2. 1 } 3d ^ { 0. 19 } 5p ^ { 0. 03 } 4f ^ { 0. 01 } } $. the minimal occupation of d - type orbitals eliminates the possibility of $ \ mathrm { sp ^ 3d ^ 2 } $ hybridization. if not via d - orbital bonding, how does one then describe the structure of $ \ ce { sf6 } $? i'll present an lcao - mo answer. here's a " simple " mo diagram ( i won't go through the details of how to construct it ). it's actually fairly similar to that of an octahedral transition metal complex, except that here the 3s and 3p orbitals on sulfur are below the 3d orbitals. just for the sake of counting electrons, i treated the compound as being " fully ionic ", i. e. $ \ ce { s ^ 6 + } + 6 \ ce { f - } $. so sulfur started off with 0 valence electrons, and each fluorine started off with 2


electrons in its σ orbitals. i've also neglected the π contribution to bonding, so the fluorine lone pairs don't appear in the diagram. you'll see that, for a total of six $ \ ce { s - f } $ bonds, we only have four pairs of electrons in bonding mos. the other two pairs of electrons reside in the $ \ mathrm { e _ g } $ mos, which are nonbonding and localised on fluorine. if we want to assign a formal charge to sulfur based on this diagram, it would be + 2, because there are only actually four bonds. we could perhaps use lewis diagrams to represent it this way : the " hypervalent " resonance form contributes rather little and does not rely on invoking d - orbital participation ; see martin's comment on my answer below for greater detail about the resonance contributions. i am guessing that its existence can be mostly attributed to negative hyperconjugation, although i'm not 100 % sure on this. the trans and cis resonance forms are not equal, so their contribution is not the same, but the contribution from each individual trans resonance form has to be the same by symmetry. overall, the six fluorines in $ \ ce { sf6 } $ have to be equivalent by the octahedral symmetry of the molecule. you could run a $ \ ce { ^ 19f } $ nmr of the compound and it should only give you one peak. ( an alternative way of looking at it is that two of the $ \ ce { s - f } $ bonds are " true " 2c2e bonds, and that the other four $ \ ce { s - f } $ " bonds " are in fact just a couple of 3c4e bonds, but i won't go into that. for more information on multi - centre bonds, this article is a nice introduction : j. chem. educ. 1998, 75, 910 ; see also refs. 12 and 13 in that article. ) right from the outset, we can see why $ \ ce { sh6 } $ is not favoured as much. if we use the same framework to describe the bonding in $ \ ce { sh6 } $, then those " correct " resonance forms that we drew would involve $ \ ce { h - } $. i'll leave it to the reader to figure out whether $ \ ce { f - } $ or $ \ ce { h - } $ is


more stable. alternatively, if you want to stick to the mo description, the idea is that in $ \ ce { sh6 } $, the relatively high energy of h1s compared to f2p will lead to the nonbonding $ \ mathrm { e _ g } $ orbitals being relatively higher in energy. all things being equal, it's less favourable for a higher - energy orbital to be occupied, and $ \ ce { sh6 } $ would therefore be very prone to losing these electrons, i. e. being oxidised. in fact, if we do remove those four electrons from the $ \ mathrm { e _ g } $ orbitals, then it's possible that these six - coordinate hydrides could form. but obviously we might not want to have a $ \ ce { sh6 ^ 4 + } $ molecule on the loose. it'll probably lose all of its protons in a hurry to get back to being $ \ ce { h2s + 4h + } $. is there anything better? well, there's the species $ \ ce { ch6 ^ 2 + } $, which is methane protonated twice. it's valence isoelectronic with $ \ ce { sh6 ^ 4 + } $, and if you want to read about it, here's an article : j. am. chem. soc. 1983, 105, 5258. while it's hardly the most stable molecule on the planet, it's certainly more plausible than $ \ ce { sh6 } $. now, just to come back to where we started from : d - orbital participation. yes, there is an $ \ mathrm { e _ g } $ set of d orbitals that can overlap with the apparently " nonbonding " $ \ mathrm { e _ g } $ linear combination of f2p orbitals, thereby stabilising it. it is true that some degree of this does happen. the issue is how much. considering the fairly large energy gap between the $ \ mathrm { e _ g } $ orbitals, this interaction is bound to be fairly small, and is nowhere near enough to justify a $ \ mathrm { sp ^ 3d ^ 2 } $ description of it ; martin's comments contain more details.


the resistor can be on either side of the led, but it must be present. when two or more components are in series, the current will be the same through all of them, and so it doesn't matter which order they are in. i think the way to read " the resistor must be connected to the anode " as " the resistor cannot be omitted from the circuit. "


computers are used in several steps of sequencing, from the raw data to finished sequence : image processing modern sequencers usually use fluorescent labelling of dna fragments in solution. the fluorescence encodes the different nucleobase ( = “ base ” ) types ( generally called a, c, g and t ). to achieve high throughput, millions of sequencing reactions are performed in parallel in microscopic quantities on a glass chip, and for each micro - reaction, the label needs to be recorded at each step in the reaction. this means : the sequencer takes progressive digital photographs of the chip containing the sequencing reagent. these photos have differently coloured pixels which need to be told apart and assigned a specific colour value. as can be seen, this ( strongly magnified ; the image is < 100 µm across! ) image fragment is fuzzy and many of the dots overlap. this makes it hard to determine which colour to assign to which pixel ( though more recent versions of the sequencing machine have improved focussing systems, and the image is consequently crisper ). base calling one such image is registered for each step of the sequencing process, yielding one image for each base of the fragments. for a fragment of length 75, that ’ d be 75 images. once you have analysed the images, you get colour spectra for each pixel across the images. the spectra for each pixel correspond to one sequence fragment ( often called a “ read ” ) and are considered separately. so for each fragment you get such a spectrum : ( this image is generated by an alternative sequencing process called sanger sequencing but the principle is the same. ) now you need to decide which base to assign for each position based on the signal ( “ base calling ” ). for most positions this is fairly easy but sometimes the signal overlaps or decays significantly. this has to be considered when deciding the base calling quality ( i. e. which confidence you assign to your decision for a given base ). doing this for each read yields up to billions of reads, each representing a short fragment of the original dna that you sequenced. most bioinformatics analysis starts here ; that is, the machines emit files containing the short sequence fragments. now we need to make a sequence from them. read mapping and assembly the key point that allows retrieving the original sequence from these small fragments is the fact that these fragments are ( non - uniformly ) randomly distributed over the genome, and they are overlapping. the next step depends on whether you have a similar, already sequenced


genome at hand. often, this is the case. for instance, there is a high - quality “ reference sequence ” of the human genome and since all the genomic sequences of all humans are ~ 99. 9 % identical ( depending on how you count ), you can simply look where your reads align to the reference. read mapping this is done to search for single changes between the reference and your currently studied genome, for example to detect mutations that lead to diseases. so all you have to do is to map the reads back to their original location in the reference genome ( in blue ) and look for differences ( such as base pair differences, insertions, deletions, inversions … ). two points make this hard : you have got billions (! ) of reads, and the reference genome is often several gigabytes large. even with the fastest thinkable implementation of string search, this would take prohibitively long. the strings don ’ t match precisely. first of all, there are of course differences between the genomes – otherwise, you wouldn ’ t sequence the data at all, you ’ d already have it! most of these differences are single base pair differences – snps ( = single nucleotide polymorphisms ) – but there are also larger variations that are much harder to deal with ( and they are often ignored in this step ). furthermore, the sequencing machines aren ’ t perfect. a lot of things influence the quality, first and foremost the quality of the sample preparation, and minute differences in the chemistry. all this leads to errors in the reads. in summary, you need to find the position of billions of small strings in a larger string which is several gigabytes in size. all this data doesn ’ t even fit into a normal computer ’ s memory. and you need to account for mismatches between the reads and the genome. unfortunately, this still doesn ’ t yield the complete genome. the main reason is that some regions of the genome are highly repetitive and badly conserved, so that it ’ s impossible to map reads uniquely to such regions. as a consequence, you instead end up with distinct, contiguous blocks ( “ contigs ” ) of mapped reads. each contig is a sequence fragment, like reads, but much larger ( and hopefully with less errors ). assembly sometimes you want to sequence a new organism so you don ’ t have a reference sequence to map to. instead, you need to do a de novo assembly. an assembly can also be used to piece conti


##gs from a mapped reads together ( but different algorithms are used ). again we use the property of the reads that they overlap. if you find two fragments which look like this : acgtcgatcgctagccgcatcagcaaacaacacgctacagcct atccccaaacaacacgctacagcctggcggggcatagcactgg you can be quite certain that they overlap like this in the genome : acgtcgatcgctagccgcatcagcaaacaacacgctacagcct atccccattcaacacgcta - agcttggcggggcatacgcactg ( notice again that this isn ’ t a perfect match. ) so now, instead of searching for all the reads in a reference sequencing, you search for head - to - tail correspondences between reads in your collection of billions of reads. if you compare the mapping of a read to searching a needle in a haystack ( an often used analogy ), then assembling reads is akin to comparing all the straws in the haystack to each other straw, and putting them in order of similarity.


wheels are possible on the molecular level — bacterial flagella are rotating cores inside a molecular motor, but wheels larger than the flagellum have not really been found. defining a wheel as a freely rotating joint that can rotate indefinitely in one direction, a single animal with a wheel is an improbable * development that would require a single animal have two separate parts ( axle / wheel and body ). [ * read as : pretty much impossible ] it's hard to imagine how such a thing could evolve. a wheel and axle would need to be made of living tissue, otherwise it would be vulnerable to wear and tear. wheels also have problems going over uneven terrain, which is really all terrain animals live in. it's difficult to imagine what sort of selection conditions would be strong enough to push animals away from legs. if you include driver - vehicle symbionts where the'car'and'wheel'are actually two animals, then they have evolved. parasites can have all sorts of symbiotic control over their victims including as means of transport. the jewel wasp is one which is the most suggestive of what you may be thinking. the wasp stings its victim ( a cockroach ) in the thorax to immobilize the animal and then again just behind its head. after this, the wasp can ride the beetle, steering it by holding its antennae back to its nest where the roach is immobilized to feed the wasp larvae there. ( see section " pet cockaroaches " in this reference. ) as to the three schools of thought you added to the question, i would probably rather say there were two strong arguments against. the first is whether there is an evolutionary path to wheels ( argument 1 in your question ), which i doubt. given even a large amount of evolutionary time you will not see a naked human being able to fly on their own power. too many structural characteristics of the body plan have been made to all be reversed so that wings or other means of aerial conveyance will show up. the same can be said for wheels when the body plans have fins / legs / and wings already. argument 3, which i also tend to agree with, is perhaps more convincing. by the time a pair of animals makes a symbiotic relationship to make an axel, or a single macroscopic animal evolves wheels, they will literally develop legs and walk away. when life came onto the land this happened, and since then it's happened several times. it's sort


of like saying that the random movement of water molecules might line up to run a stream uphill. its possible, but there's just such a strong path downwards, that the statistical chances of you seeing it happen are nil. this is a hypothetical case, but arguing this in a convincing way i think you would need to describe : a ) an environment with a selective advantage for wheels to evolve over legs or other similar adaptations, perhaps based on the energy efficiency of wheels ; b ) a physiological model for the wheels that convey a reasonable lifestyle for the wheel. there are lots of questions that would need to be satisfied in our thought experiment. here are some : " the symbiotic wheel would be spinning constantly ; if it died the driver creature would be completely defenseless " ; " if the ground were bumpy, all these wheeled animals would get eaten " ; " how would the wheel symbiont eat while its spinning all the time? only fed by the driver? even symbionts such as barnacles or lampreys on the flanks of sharks still have their own ability to feed. " many similar questions of this sort ensue where there are many disadvantages which outweigh advantages for animals. e. g. " why are all the flying animals and fish and plants even more similar to airplanes than helicopters? " sorry if i seem negative, but way back in grad school i actually did go over some of these angles. update : first gear found in a living creature. a european plant - hopper insect with one of the largest accelerations known in biology has been found to have gears! ( there's a movie on the article page. ) the little bug has gears in its exoskeleton that synchronize its two jumping legs. once again selection surprises. the gears themselves are an oddity. with gear teeth shaped like cresting waves, they look nothing like what you'd find in your car or in a fancy watch. there could be two reasons for this. through a mathematical oddity, there is a limitless number of ways to design intermeshing gears. so, either nature evolved one solution at random, or, as gregory sutton, coauthor of the paper and insect researcher at the university of bristol, suspects, the shape of the issus's gear is particularly apt for the job it does. it's built for " high precision and speed in one direction, " he says. the gears do not rotate 360 degrees, but appear on


the surface of two joints to synchronize them as they wind up like a circular spring. the gear itself is not living tissue, so the bug solves the problem of regenerating the gear by growing a new set when it molts ( i. e. gears that continually regenerate and heal are still unknown ). it also does not keep its gears throughout its lifecycle. so the arguments here still stand ; the exception still supports the rule. additional note : in his book " the god delusion " ( chapter 4 somewhere ) richard dawkins muses that the flagellar motor is the only example of a freely rotating axle that he knows of, and that a wheeled animal might be a true example of'irreducibly complexity'in biology... but the fact that there is no such example is probably to the point.


it is not true. if the null hypothesis is true then it will not be rejected more frequently at large sample sizes than small. there is an erroneous rejection rate that's usually set to 0. 05 ( alpha ) but it is independent of sample size. therefore, taken literally the statement is false. nevertheless, it's possible that in some situations ( even whole fields ) all nulls are false and therefore all will be rejected if n is high enough. but is this a bad thing? what is true is that trivially small effects can be found to be " significant " with very large sample sizes. that does not suggest that you shouldn't have such large samples sizes. what it means is that the way you interpret your finding is dependent upon the effect size and sensitivity of the test. if you have a very small effect size and highly sensitive test you have to recognize that the statistically significant finding may not be meaningful or useful. given some people don't believe that a test of the null hypothesis, when the null is true, always has an error rate equal to the cutoff point selected for any sample size, here's a simple simulation in r proving the point. make n as large as you like and the rate of type i errors will remain constant. # number of subjects in each condition n < - 100 # number of replications of the study in order to check the type i error rate nsamp < - 10000 ps < - replicate ( nsamp, { # population mean = 0, sd = 1 for both samples, therefore, no real effect y1 < - rnorm ( n, 0, 1 ) y2 < - rnorm ( n, 0, 1 ) tt < - t. test ( y1, y2, var. equal = true ) tt $ p. value } ) sum ( ps <. 05 ) / nsamp # ~. 05 no matter how big n is. note particularly that it is # not an increasing value always finding effects when n is very large.


no, this is not possible. there are a few reasons for that, but most important are that the only thing a mosquito injects is its own saliva, while the blood is sucked into the stomach where it is digested. to be able to infect other people hiv would need to be able to leave the gut intact and then also be able to replicate in the mosquitos which it cannot do, due to the missing of the cd4 antigen on the surface of the insect cells. these are needed as a surface receptor for the virus to bind and enter the cells. this is also true for other blood sucking insects like bed bugs or fleas. other pathogens can do this, examples would be yellow fever or malaria. in yellow fever the virus first infects epithelial cells of the gut, then enters the blood system of the insect to finally end up in the salivary glands, where the virus is injected together with the saliva into the biten person. in malaria the pathogen is also able to leave the gut region and mature in the salivary glands. hiv can only be transmitted through blood ( either through direct transmission, operations etc. ), through semen ( cum ), pre - seminal fluid ( pre - cum ), rectal fluids, vaginal fluids, and breast milk. see reference 3. references : why mosquitoes cannot transmit aids can we get aids from mosquito bites? hiv transmission risk : a summary of evidence


you should use box plots and pca plot. let's take a look at the ruv paper : before normalization and after uq normalization : libraries do not cluster as expected according to treatment.... for uq - normalized counts. uq normalization does not lead to better clustering of the samples... before normalization, the medians in the box - plot obviously look very different among replicates. after uq normalization, the medians look closer but trt. 11 look like an outlier. furthermore, the treatments aren't clustered on the pca plot. since they are replicates, you'd like them be close on the plot. after ruv normalization... ruvg shrinks the expression measures for library 11 towards the median across libraries, suggesting robustness against outliers.... libraries cluster as expected by treatment.... the ruv has made the distribution more robust and the samples closer on the pca plot. however, it's still not perfect as one of the treatments is not close to the other two on the first pc. the vignettes for bioconductor ruvseq describes the two functions : plotrle and plotpca.


you have at least two options, depending on what problem you want to solve. if you want innocent readers of your code to not get the answers inadvertently, or you at least want to make it a bit difficult so that users are not tempted, you can encrypt the solutions and store the key as part of your code, perhaps a result of some computation ( to make it even more difficult ). if you want to prevent users from retrieving the answer, you can use a one - way function, or in computer jargon, a hash function. store a hash of the answer, and they you can test whether the answer is correct without it being possible to deduce the answer at all without finding it first. this has the disadvantage that it is harder to check for an answer that is close to the correct answer, though there are some solutions even to this problem.


could someone please convince me that there is something natural about the choice of the lagrangian formulation... if i ask a high school physics student, " i am swinging a ball on a string around my head in a circle. the string is cut. which way does the ball go? ", they will probably tell me that the ball goes straight out - along the direction the string was pointing when it was cut. this is not right ; the ball actually goes along a tangent to the circle, not a radius. but the beginning student will probably think this is not natural. how do they lose this instinct? probably not by one super - awesome explanation. instead, it's by analyzing more problems, seeing the principles applied in new situations, learning to apply those principles themselves, and gradually, over the course of months or years, building what an undergraduate student considers to be common intuition. so my guess is no, no one can convince you that the lagrangian formulation is natural. you will be convinced of that as you continue to study more physics, and if you expect to be convinced of it all at once, you are going to be disappointed. it is enough for now that you understand what you've been taught, and it's good that you're thinking about it. but i doubt anyone can quickly change your mind. you'll have to change it for yourself over time. that being said, i think the most intuitive way to approach action principles is through the principle of least ( i. e. stationary ) time in optics. try feynman's qed, which gives a good reason to believe that the principle of stationary time is quite natural. you can go further mathematically by learning the path integral formulation of nonrelativistic quantum mechanics and seeing how it leads to high probability for paths of stationary action. more importantly, just use lagrangian mechanics as much as possible, and not just finding equations of motion for twenty different systems. use it to do interesting things. learn how to see the relationship between symmetries and conservation laws in the lagrangian approach. learn about relativity. learn how to derive electromagnetism from an action principle - first by studying the lagrangian for a particle in an electromagnetic field, then by studying the electromagnetic field itself as described by a lagrange density. try to explain it to someone - their questions will sharpen your understanding. check out leonard susskind's lectures on youtube ( series 1 and 3


especially ). they are the most intuitive source i know for this material. read some of the many questions here in the lagrangian or noether tags. see if you can figure out their answers, then read the answers people have provided to compare. if you thought that the lagrangian approach was wrong, then you might want someone to convince you otherwise. but if you just don't feel comfortable with it yet, you'd be robbing yourself of a great pleasure by not taking the time to learn its intricacies. finally, your question is very similar to this one, so check out the answers there as well.


this is a very broad question and i am going to give you some things to think about ( some are already included in your post, but they are repeated here for completeness ). scope of problems you need to define the interface of how to specify problems. are you going to allow parameters that can be fixed or can vary for solutions? are you going to allow perturbation parameters to slightly perturb problems and see if they are still solvable ( for example, an $ \ epsilon $ parameter to be defined anywhere ) in a specific problem? are you going to allow infinite precision? are you going to test for speed and sensitivity to numerical precision? have you chosen two ( maybe more ) libraries that already exist to compare results? how will you choose stopping criteria, will you use various methods and let the user select or define their own? are you going to measure error using various measures and allow the user to turn those on and off? have you looked at the professional packages like computer - algebra - systems ( cas ) and understand all of the options they allow? are you going to allow displaying of results and / or comparisons and / or plots? problem recommendations you need to write a test specification defining the source of problems, the scope of how problems were tested, capturing results and metrics of running the routines. i would certainly look to other libraries already out there for the problems they are using ( maybe test files ). i would go to college libraries and go through books on odes and pull out problems of all types, those with known closed form or numeric only solutions. case 1 : we want as many variations of closed form solution problems as we can get in order to compare exact versus numerical results. case 2 : i would go to every numerical analysis book i can find and capture the worked examples and duplicate them. i would additionally capture the problem sets, particularly the ones that have some pathology that exist in most books ( sensitivity to this or that types ). case 3 : i would go to different branches of applied math like physics, ecology, biology, economics, et. al and capture problems from each of those domains to validate that your specification language for problems allows for such examples. case 4 : i would research papers / journals that contain the most useful examples where the particular author had to modify a particular approach to account for some pathology or weirdness or hardness. case 5 : search the web for additional examples. for stiff, see the references here and peruse them all to ferret out test problems. here are some mat


##lab examples to peruse. this is not unique. if you look at the book " numerical methods for unconstrained optimization and nonlinear equations " by dennis and schnabel, appendix b, " test problems ", you can see how they did it. after developing one of the most beautiful set of algorithms write ups i have ever seen, they threw a collection of problems at it that made if go nuts. you had to tweak here and there! they included five very different and pathological problems that strained the capabilities of the solvers. this has taught me that we can continue to throw problems at algorithms that they are incapable of handling for a host of reasons. note, they even borrowed this set of problems from more ', garbow and hillstrom ( you can also look up that reference and perhaps there are others you can use as a guide ). in other words, this is not a trivial task. you need known - answer - test cases that always allow you to test the validity of updates and don't break things. that is, a repeatable and extensive set of problems from low to high, from easy to hard, from possible to impossible,... you also need a collection of problems that your solvers cannot handle in order to truly understand its limitations.


this is a subtle question. it takes a thoughtful person not to understand those quotations! although they are suggestive, it turns out that none of them is exactly or generally correct. i haven't the time ( and there isn't the space here ) to give a full exposition, but i would like to share one approach and an insight that it suggests. where does the concept of degrees of freedom ( df ) arise? the contexts in which it's found in elementary treatments are : the student t - test and its variants such as the welch or satterthwaite solutions to the behrens - fisher problem ( where two populations have different variances ). the chi - squared distribution ( defined as a sum of squares of independent standard normals ), which is implicated in the sampling distribution of the variance. the f - test ( of ratios of estimated variances ). the chi - squared test, comprising its uses in ( a ) testing for independence in contingency tables and ( b ) testing for goodness of fit of distributional estimates. in spirit, these tests run a gamut from being exact ( the student t - test and f - test for normal variates ) to being good approximations ( the student t - test and the welch / satterthwaite tests for not - too - badly - skewed data ) to being based on asymptotic approximations ( the chi - squared test ). an interesting aspect of some of these is the appearance of non - integral " degrees of freedom " ( the welch / satterthwaite tests and, as we will see, the chi - squared test ). this is of especial interest because it is the first hint that df is not any of the things claimed of it. we can dispose right away of some of the claims in the question. because " final calculation of a statistic " is not well - defined ( it apparently depends on what algorithm one uses for the calculation ), it can be no more than a vague suggestion and is worth no further criticism. similarly, neither " number of independent scores that go into the estimate " nor " the number of parameters used as intermediate steps " are well - defined. " independent pieces of information that go into [ an ] estimate " is difficult to deal with, because there are two different but intimately related senses of " independent " that can be relevant here. one is independence of random variables ; the other is functional independence. as an example of the latter, suppose we collect morph


##ometric measurements of subjects - - say, for simplicity, the three side lengths $ x $, $ y $, $ z $, surface areas $ s = 2 ( xy + yz + zx ) $, and volumes $ v = xyz $ of a set of wooden blocks. the three side lengths can be considered independent random variables, but all five variables are dependent rvs. the five are also functionally dependent because the codomain ( not the " domain "! ) of the vector - valued random variable $ ( x, y, z, s, v ) $ traces out a three - dimensional manifold in $ \ mathbb { r } ^ 5 $. ( thus, locally at any point $ \ omega \ in \ mathbb { r } ^ 5 $, there are two functions $ f _ \ omega $ and $ g _ \ omega $ for which $ f _ \ omega ( x ( \ psi ), \ ldots, v ( \ psi ) ) = 0 $ and $ g _ \ omega ( x ( \ psi ), \ ldots, v ( \ psi ) ) = 0 $ for points $ \ psi $ " near " $ \ omega $ and the derivatives of $ f $ and $ g $ evaluated at $ \ omega $ are linearly independent. ) however - - here's the kicker - - for many probability measures on the blocks, subsets of the variables such as $ ( x, s, v ) $ are dependent as random variables but functionally independent. having been alerted by these potential ambiguities, let's hold up the chi - squared goodness of fit test for examination, because ( a ) it's simple, ( b ) it's one of the common situations where people really do need to know about df to get the p - value right and ( c ) it's often used incorrectly. here's a brief synopsis of the least controversial application of this test : you have a collection of data values $ ( x _ 1, \ ldots, x _ n ) $, considered as a sample of a population. you have estimated some parameters $ \ theta _ 1, \ ldots, \ theta _ p $ of a distribution. for example, you estimated the mean $ \ theta _ 1 $ and standard deviation $ \ theta _ 2 = \ theta _ p $ of a normal distribution, hypothesizing that the population is normally distributed but not knowing ( in advance of obtaining the data )


what $ \ theta _ 1 $ or $ \ theta _ 2 $ might be. in advance, you created a set of $ k $ " bins " for the data. ( it may be problematic when the bins are determined by the data, even though this is often done. ) using these bins, the data are reduced to the set of counts within each bin. anticipating what the true values of $ ( \ theta ) $ might be, you have arranged it so ( hopefully ) each bin will receive approximately the same count. ( equal - probability binning assures the chi - squared distribution really is a good approximation to the true distribution of the chi - squared statistic about to be described. ) you have a lot of data - - enough to assure that almost all bins ought to have counts of 5 or greater. ( this, we hope, will enable the sampling distribution of the $ \ chi ^ 2 $ statistic to be approximated adequately by some $ \ chi ^ 2 $ distribution. ) using the parameter estimates, you can compute the expected count in each bin. the chi - squared statistic is the sum of the ratios $ $ \ frac { ( \ text { observed } - \ text { expected } ) ^ 2 } { \ text { expected } }. $ $ this, many authorities tell us, should have ( to a very close approximation ) a chi - squared distribution. but there's a whole family of such distributions. they are differentiated by a parameter $ \ nu $ often referred to as the " degrees of freedom. " the standard reasoning about how to determine $ \ nu $ goes like this i have $ k $ counts. that's $ k $ pieces of data. but there are ( functional ) relationships among them. to start with, i know in advance that the sum of the counts must equal $ n $. that's one relationship. i estimated two ( or $ p $, generally ) parameters from the data. that's two ( or $ p $ ) additional relationships, giving $ p + 1 $ total relationships. presuming they ( the parameters ) are all ( functionally ) independent, that leaves only $ k - p - 1 $ ( functionally ) independent " degrees of freedom " : that's the value to use for $ \ nu $. the problem with this reasoning ( which is the sort of calculation the quotations in the question are hinting at ) is that it's wrong except when some special additional conditions hold. moreover


, those conditions have nothing to do with independence ( functional or statistical ), with numbers of " components " of the data, with the numbers of parameters, nor with anything else referred to in the original question. let me show you with an example. ( to make it as clear as possible, i'm using a small number of bins, but that's not essential. ) let's generate 20 independent and identically distributed ( iid ) standard normal variates and estimate their mean and standard deviation with the usual formulas ( mean = sum / count, etc. ). to test goodness of fit, create four bins with cutpoints at the quartiles of a standard normal : - 0. 675, 0, + 0. 657, and use the bin counts to generate a chi - squared statistic. repeat as patience allows ; i had time to do 10, 000 repetitions. the standard wisdom about df says we have 4 bins and 1 + 2 = 3 constraints, implying the distribution of these 10, 000 chi - squared statistics should follow a chi - squared distribution with 1 df. here's the histogram : the dark blue line graphs the pdf of a $ \ chi ^ 2 ( 1 ) $ distribution - - the one we thought would work - - while the dark red line graphs that of a $ \ chi ^ 2 ( 2 ) $ distribution ( which would be a good guess if someone were to tell you that $ \ nu = 1 $ is incorrect ). neither fits the data. you might expect the problem to be due to the small size of the data sets ( $ n $ = 20 ) or perhaps the small size of the number of bins. however, the problem persists even with very large datasets and larger numbers of bins : it is not merely a failure to reach an asymptotic approximation. things went wrong because i violated two requirements of the chi - squared test : you must use the maximum likelihood estimate of the parameters. ( this requirement can, in practice, be slightly violated. ) you must base that estimate on the counts, not on the actual data! ( this is crucial. ) the red histogram depicts the chi - squared statistics for 10, 000 separate iterations, following these requirements. sure enough, it visibly follows the $ \ chi ^ 2 ( 1 ) $ curve ( with an acceptable amount of sampling error ), as we had originally hoped. the point of this comparison - - which i hope


you have seen coming - - is that the correct df to use for computing the p - values depends on many things other than dimensions of manifolds, counts of functional relationships, or the geometry of normal variates. there is a subtle, delicate interaction between certain functional dependencies, as found in mathematical relationships among quantities, and distributions of the data, their statistics, and the estimators formed from them. accordingly, it cannot be the case that df is adequately explainable in terms of the geometry of multivariate normal distributions, or in terms of functional independence, or as counts of parameters, or anything else of this nature. we are led to see, then, that " degrees of freedom " is merely a heuristic that suggests what the sampling distribution of a ( t, chi - squared, or f ) statistic ought to be, but it is not dispositive. belief that it is dispositive leads to egregious errors. ( for instance, the top hit on google when searching " chi squared goodness of fit " is a web page from an ivy league university that gets most of this completely wrong! in particular, a simulation based on its instructions shows that the chi - squared value it recommends as having 7 df actually has 9 df. ) with this more nuanced understanding, it's worthwhile to re - read the wikipedia article in question : in its details it gets things right, pointing out where the df heuristic tends to work and where it is either an approximation or does not apply at all. a good account of the phenomenon illustrated here ( unexpectedly high df in chi - squared gof tests ) appears in volume ii of kendall & stuart, 5th edition. i am grateful for the opportunity afforded by this question to lead me back to this wonderful text, which is full of such useful analyses. edit ( jan 2017 ) here is r code to produce the figure following " the standard wisdom about df... " # # simulate data, one iteration per column of ` x `. # n < - 20 n. sim < - 1e4 bins < - qnorm ( seq ( 0, 1, 1 / 4 ) ) x < - matrix ( rnorm ( n * n. sim ), nrow = n ) # # compute statistics. # m < - colmeans ( x ) s < - apply ( sweep ( x, 2, m ), 2, sd ) counts < - apply (


matrix ( as. numeric ( cut ( x, bins ) ), nrow = n ), 2, tabulate, nbins = 4 ) expectations < - mapply ( function ( m, s ) n * diff ( pnorm ( bins, m, s ) ), m, s ) chisquared < - colsums ( ( counts - expectations ) ^ 2 / expectations ) # # plot histograms of means, variances, and chi - squared stats. the first # two confirm all is working as expected. # mfrow < - par ( " mfrow " ) par ( mfrow = c ( 1, 3 ) ) red < - " # a04040 " # intended to show correct distributions blue < - " # 404090 " # to show the putative chi - squared distribution hist ( m, freq = false ) curve ( dnorm ( x, sd = 1 / sqrt ( n ) ), add = true, col = red, lwd = 2 ) hist ( s ^ 2, freq = false ) curve ( dchisq ( x * ( n - 1 ), df = n - 1 ) * ( n - 1 ), add = true, col = red, lwd = 2 ) hist ( chisquared, freq = false, breaks = seq ( 0, ceiling ( max ( chisquared ) ), 1 / 4 ), xlim = c ( 0, 13 ), ylim = c ( 0, 0. 55 ), col = " # c0c0ff ", border = " # 404040 " ) curve ( ifelse ( x < = 0, inf, dchisq ( x, df = 2 ) ), add = true, col = red, lwd = 2 ) curve ( ifelse ( x < = 0, inf, dchisq ( x, df = 1 ) ), add = true, col = blue, lwd = 2 ) par ( mfrow = mfrow )


this picture ( source ) should pretty much answer your question : the train's destination is not above the ground, but rather far away, and perspective means that the tracks appear not to be parallel but instead to converge to the vanishing point. the same applies to the beams of light above them. the sun is very far away and the beams are pretty much parallel, but they're pointing towards you, and perspective makes them appear to converge towards the vanishing point - which in this case is the sun's location in the sky. the technical term for these beams is " crepuscular rays. " occasionally, when the sun is very low on the horizon, you can see " anticrepuscular rays, " where the beams seem to converge to a different point on the opposite side of the sky to the sun. here's an example : ( source ) this happens for the same reason - the rays are really parallel, and there's another vanishing point in the opposite direction from the sun.


the only difference between cross - correlation and convolution is a time reversal on one of the inputs. discrete convolution and cross - correlation are defined as follows ( for real signals ; i neglected the conjugates needed when the signals are complex ) : $ $ x [ n ] * h [ n ] = \ sum _ { k = 0 } ^ { \ infty } h [ k ] x [ n - k ] $ $ $ $ corr ( x [ n ], h [ n ] ) = \ sum _ { k = 0 } ^ { \ infty } h [ k ] x [ n + k ] $ $ this implies that you can use fast convolution algorithms like overlap - save to implement cross - correlation efficiently ; just time reverse one of the input signals first. autocorrelation is identical to the above, except $ h [ n ] = x [ n ] $, so you can view it as related to convolution in the same way. edit : since someone else just asked a duplicate question, i've been inspired to add one more piece of information : if you implement correlation in the frequency domain using a fast convolution algorithm like overlap - save, you can avoid the hassle of time - reversing one of the signals first by instead conjugating one of the signals in the frequency domain. it can be shown that conjugation in the frequency domain is equivalent to reversal in the time domain.


the discrete fourier transform ( dft ), commonly implemented by the fast fourier transform ( fft ), maps a finite - length sequence of discrete time - domain samples into an equal - length sequence of frequency - domain samples. the samples in the frequency domain are in general complex numbers ; they represent coefficients that can be used in a weighted sum of complex exponential functions in the time domain to reconstruct the original time - domain signal. these complex numbers represent an amplitude and phase that is associated with each exponential function. thus, each number in the fft output sequence can be interpreted as : $ $ x [ k ] = \ sum _ { n = 0 } ^ { n - 1 } x [ n ] e ^ { \ frac { - j 2 \ pi n k } { n } } = a _ k e ^ { j \ phi _ k } $ $ you can interpret this as follows : if you want to reconstruct x [ n ], the signal that you started with, you can take a bunch of complex exponential functions $ e ^ { \ frac { j 2 \ pi n k } { n } }, k = 0, 1, \ ldots, n - 1 $, weight each one by $ x [ k ] = a _ k e ^ { j \ phi _ k } $, and sum them. the result is exactly equal ( within numerical precision ) to $ x [ n ] $. this is just a word - based definition of the inverse dft. so, speaking to your question, the various flavors of the fourier transform have the property that a delay in the time domain maps to a phase shift in the frequency domain. for the dft, this property is : $ $ x [ n ] \ leftrightarrow x [ k ] $ $ $ $ x [ n - d ] \ leftrightarrow e ^ { \ frac { - j2 \ pi k d } { n } } x [ k ] $ $ that is, if you delay your input signal by $ d $ samples, then each complex value in the fft of the signal is multiplied by the constant $ e ^ { \ frac { - j2 \ pi k d } { n } } $. it's common for people to not realize that the outputs of the dft / fft are complex values, because they are often visualized as magnitudes only ( or sometimes as magnitude and phase ). edit : i want to point out that there are some subtle


##ties to this rule for the dft due to its finiteness in time coverage. specifically, the shift in your signal must be circular for the relation to hold ; that is, when you delay $ x [ n ] $ by $ d $ samples, you need to wrap the last $ d $ samples that were at the end of $ x [ n ] $ to the front of the delayed signal. this wouldn't really match what you would see in a real situation where the signal just doesn't start until after the beginning of the dft aperture ( and is preceded by zeros, for example ). you can always get around this by zero - padding the original signal $ x [ n ] $ so that when you delay by $ d $ samples, you just wrap around zeros to the front anyway. this relationship only applies to the dft since it is finite in time ; it's does not apply to the classic fourier transform or discrete - time fourier transform.


kernel is a way of computing the dot product of two vectors $ \ mathbf x $ and $ \ mathbf y $ in some ( possibly very high dimensional ) feature space, which is why kernel functions are sometimes called " generalized dot product ". suppose we have a mapping $ \ varphi \, : \, \ mathbb r ^ n \ to \ mathbb r ^ m $ that brings our vectors in $ \ mathbb r ^ n $ to some feature space $ \ mathbb r ^ m $. then the dot product of $ \ mathbf x $ and $ \ mathbf y $ in this space is $ \ varphi ( \ mathbf x ) ^ t \ varphi ( \ mathbf y ) $. a kernel is a function $ k $ that corresponds to this dot product, i. e. $ k ( \ mathbf x, \ mathbf y ) = \ varphi ( \ mathbf x ) ^ t \ varphi ( \ mathbf y ) $. why is this useful? kernels give a way to compute dot products in some feature space without even knowing what this space is and what is $ \ varphi $. for example, consider a simple polynomial kernel $ k ( \ mathbf x, \ mathbf y ) = ( 1 + \ mathbf x ^ t \ mathbf y ) ^ 2 $ with $ \ mathbf x, \ mathbf y \ in \ mathbb r ^ 2 $. this doesn't seem to correspond to any mapping function $ \ varphi $, it's just a function that returns a real number. assuming that $ \ mathbf x = ( x _ 1, x _ 2 ) $ and $ \ mathbf y = ( y _ 1, y _ 2 ) $, let's expand this expression : $ \ begin { align } k ( \ mathbf x, \ mathbf y ) & = ( 1 + \ mathbf x ^ t \ mathbf y ) ^ 2 = ( 1 + x _ 1 \, y _ 1 + x _ 2 \, y _ 2 ) ^ 2 = \ \ & = 1 + x _ 1 ^ 2 y _ 1 ^ 2 + x _ 2 ^ 2 y _ 2 ^ 2 + 2 x _ 1 y _ 1 + 2 x _ 2 y _ 2 + 2 x _ 1 x _ 2 y _ 1 y _ 2 \ end { align } $ note that this is nothing else but a dot product between two vectors $ ( 1,


x _ 1 ^ 2, x _ 2 ^ 2, \ sqrt { 2 } x _ 1, \ sqrt { 2 } x _ 2, \ sqrt { 2 } x _ 1 x _ 2 ) $ and $ ( 1, y _ 1 ^ 2, y _ 2 ^ 2, \ sqrt { 2 } y _ 1, \ sqrt { 2 } y _ 2, \ sqrt { 2 } y _ 1 y _ 2 ) $, and $ \ varphi ( \ mathbf x ) = \ varphi ( x _ 1, x _ 2 ) = ( 1, x _ 1 ^ 2, x _ 2 ^ 2, \ sqrt { 2 } x _ 1, \ sqrt { 2 } x _ 2, \ sqrt { 2 } x _ 1 x _ 2 ) $. so the kernel $ k ( \ mathbf x, \ mathbf y ) = ( 1 + \ mathbf x ^ t \ mathbf y ) ^ 2 = \ varphi ( \ mathbf x ) ^ t \ varphi ( \ mathbf y ) $ computes a dot product in 6 - dimensional space without explicitly visiting this space. another example is gaussian kernel $ k ( \ mathbf x, \ mathbf y ) = \ exp \ big ( - \ gamma \, \ | \ mathbf x - \ mathbf y \ | ^ 2 \ big ) $. if we taylor - expand this function, we'll see that it corresponds to an infinite - dimensional codomain of $ \ varphi $. finally, i'd recommend an online course " learning from data " by professor yaser abu - mostafa as a good introduction to kernel - based methods. specifically, lectures " support vector machines ", " kernel methods " and " radial basis functions " are about kernels.


i would recommend steering clear of schwarzschild coordinates for these kind of questions. all the classical ( i. e. firewall paradox aside ) infinities having to do with the event horizon are due to poor coordinate choices. you want to use a coordinate system that is regular at the horizon, like kruskal - szekeres. indeed, have a look at the kruskal - szekeres diagram : ( source : wikipedia ) this is the maximally extended schwarschild geometry, not a physical black hole forming from stellar collapse, but the differences shouldn't bother us for this question. region i and iii are asymptotically flat regions, ii is the interior of the black hole and iv is a white hole. the bold hyperbolae in regions ii and iv are the singularities. the diagonals through the origin are the event horizons. the origin ( really a 2 - sphere with angular coordinates suppressed ) is the throat of a non - traversable wormhole joining the separate " universes " i and iii. radial light rays remain 45 degree diagonal lines on the kruskal - szekeres diagram. the dashed hyperbolae are lines of constant schwarzschild $ r $ coordinate, and the dashed radial rays are lines of constant $ t $. you can see how the event horizon becomes a coordinate singularity where $ r $ and $ t $ switch roles. now if you draw a worldline from region i going into region ii it becomes obvious that it crosses the horizon in finite proper time and, more importantly, the past light - cone of the event where it hits the singularity cannot possibly contain the whole spacetime. so the short answer to your question is no, someone falling into a black hole does not see the end of the universe. i don't know the formula you ask for for $ t $, but in principle you can read it off from light rays on the diagram and just convert to whatever coordinate / proper time you want to use.


i attended a talk by josh quick at porecampau 2017, in which he discussed some common barriers to getting both good sequencing yield and long read length. it mostly boils down to being more careful with the sample preparation. bear in mind that the minion will still sequence a dirty sample, it will just be at a reduced yield. here are my notes from that talk : the hardest thing about minion sequencing is getting the sample in the first place there are lots of different sample types and extraction methods you can't get longer reads than what you put in ; shit in leads to shit out dna is very stable when not moving, but very sensitive to lateral damage the phenol chloroform method of dna extraction is very good, and can be used with a phase - locked gel to make extraction easier a simple salt + alcohol extraction might be the best method for extraction ( because it involves the least amount of work on the dna ) edta ( e. g. as found in te buffer, and many extraction kits ) is not compatible with the rapid kit the most consistently good nanopore runs produced by josh's lab were 1d ligations runs on r9. 4 ; the best overall run was a phenol - chloroform extraction + rapid kit john tyson can tune himself out of a low - yield hole ( via software ) getting small numbers of short reads is very important suggested ( and mostly untested ) purification techniques : spin column ( 60 - 100kb ) ; ethanol extraction ( 100 - 150kb ), dialysis ( 150 - 250kb ) ; low melting - point agarose plug ( ~ 1mb, dna extraction in situ ) the nanopore protocol input is in nanograms, but should really be stated as molarity ; the kit expects about 0. 2 pmol input picture molecules tethered to the surface of the membrane. you can then see that the flow cell density is independent of the sequence length tapestation, qubit and nanodrop are all a good idea ; a dna sample that can pass all three tests will work well : no short - length shoulders by tapestation, sufficient dna by qubit, high purity by nanodrop rna can interfere with sequencing ; digesting rna is recommended freezing dna is a really bad idea. the ice crystals are very good at chopping dna up into small pieces dna that is kept in the fridge is remarkably stable ; can be kept for over two years ( and probably indefinitely ) for us, our best cd


##na sequencing run on minion produced over 15m reads in june 2020. we've since shifted over to doing cdna sequencing on promethion flow cell ( using a p2 solo ), and our best so far with that run was 89m reads.


a first attempt using matlab : im = imread ('squares. jpg') ; im2 = rgb2gray ( im ) ; se = strel ('disk ', 15 ) ; for i = 1 : 16 ; t = 60 + i * 5 ; % try out a range of bw thresholds to see what works best labelled = bwlabel ( im2 > t ) ; % label regions in the bw image closed = imclose ( labelled, se ) ; % close small regions cleared = imclearborder ( ~ closed, 4 ) ; % clear regions touching the border subplot ( 4, 4, i ) ; imshow ( cleared ) ; title ( ['t ='num2str ( t ) ] ) ; end results in the following regions : as you can see, selecting the threshold that results in the highest number of regions ( t = 120 ) would already give 7 correct locations, some merged locations, one false positive and two false negatives. this was a fairly simple attempt but i think it shows that the approach works. adding some stuff to break up elongated regions, or doing this for each color channel separately are just a couple of the things you could do to improve on this. it would also help if you provided a few more test images.


at the moment, there is very little scientific literature about this, but i found two papers that address the problem and are fairly easy to understand. you can find them in the references. reference 1 is probably the most interesting and is the basis for this answer. edit : it is also interesting to read reference 2 on the origin of sars - cov - 2 ; the article also addresses some of the conspiracy theories. as far as i can see, there are a few major points taken up by conspiracy theories. 1. sars - cov - 2 leaked from a lab in which research on the bat cov ( ratg13 ) was done : unlikely, since the viruses share only around 96 % sequence homology, which translates into more than 1100 sites where the sequence of sars - cov - 2 viruses is different from ratg13. the mutations are distributed throughout the viral genome in a natural evolutionary pattern, making it highly unlikely that sars - cov - 2 is a direct descendant from ratg13. for comparison, the original sars - cov and the intermediate host palm civet sars - like cov from which it originated shared 99. 8 % sequence homology, showing a much closer relation. 2. the s ( spike ) protein from bat sars - cov cannot be used to enter human cells via the human ace2 receptor and therefore has been adapted in the lab : this is untrue, since a 2013 study of a novel bat coronavirus was published showing the ability of the virus to enter cells via the ace2 receptor. see reference 3 for details. 3. the spike protein of sars - cov contains a unique inserted sequence ( 1378 bp ) located in the middle of its spike glycoprotein gene that had no match in other coronaviruses : as shown in reference 4, the sequence comparison of the sars - cov - 2 with closely related other coronaviruses shows that this sequence is not unique to the new virus but is already present in older strains. it shows some difference due to inserted mutations. 4. the claim that sars - cov - 2 contains four insertions from hiv - 1 : the paper claiming this has now been retracted due to severe criticism, and additionally a renowned hiv expert published an analysis ( reference 5 ) demonstrating that the hiv - 1 claimed insertions are random rather than targeted. 5. the claim that the sars - cov - 2 virus is completely man - made : to design such a " weapon grade "


virus in the lab, the design would usually start from a known virus backbone and then introduce logical changes ( for example, complete genes from other viruses ). this cannot be seen in the genome of the virus ; rather, you see randomly distributed changes throughout the genome coming from virus evolution and not directed cloning. it is more likely that this virus originates from the recombination of a bat cov ( to which it is closely, but not directly related ) and another, not yet known cov in an intermediate host, like the palm civet for the 2003 cov. references : no credible evidence supporting claims of the laboratory engineering of sars - cov - 2 the proximal origin of sars - cov - 2 isolation and characterization of a bat sars - like coronavirus that uses the ace2 receptor is sars - cov - 2 originated from laboratory? a rebuttal to the claim of formation via laboratory recombination hiv - 1 did not contribute to the 2019 - ncov genome


according to the docs, there is no in - place permutation method in numpy, something like ndarray. sort. so your options are ( assuming that m is a $ n \ times n $ matrix and p the permutation vector ) implementing your own algorithm in c as an extension module ( but in - place algorithms are hard, at least for me! ) $ n $ memory overhead for i in range ( n ) : m [ :, i ] = m [ p, i ] for i in range ( n ) : m [ i, : ] = m [ i, p ] $ n ^ 2 $ memory overhead m [ :, : ] = m [ p, : ] m [ :, : ] = m [ :, p ] hope that these suboptimal hacks are useful.


the distinction between interpreted and compiled code is probably a fiction, as underlined by raphael's comment : the claim seems to be trivially wrong without further assumptions : if there is an interpreter, i can always bundle interpreter and code in one executable... the fact is that code is always interpreted, by software, by hardware or a combination of both, and the compiling process cannot tell which it will be. what you perceive as compilation is a translation process from one language $ s $ ( for source ) to another language $ t $ ( for target ). and, the interpreter for $ s $ is usually different from the interpreter for $ t $. the compiled program is translated from one syntactic form $ p _ s $ to another syntactic form $ p _ t $, such that, given the intended semantics of the languages $ s $ and $ t $, $ p _ s $ and $ p _ t $ have the same computational behavior, up to a few things that you are usually trying to change, possibly to optimize, such as complexity or simple efficiency ( time, space, surface, energy consumption ). i am trying not to talk of functional equivalence, as it would require precise definitions. some compilers have been actually used simply to reduce the size of the code, not to " improve " execution. this was the case for language used in the plato system ( though they did not call it compiling ). you may consider your code fully compiled if, after the compiling process, you no longer need the interpreter for $ s $. at least, that is the only way i can read your question, as an engineering rather than theoretical question ( since, theoretically, i can always rebuild the interpreter ). one thing that may raise problem, afaik, is meta - circularity. that is when a program will manipulate syntactic structures in its own source language $ s $, creating program fragment that are then intepreted as if they had been part of the original program. since you can produce arbitrary program fragments in the language $ s $ as the result of arbitrary computation manipulating meaningless syntactic fragments, i would guess you can make it nearly impossible ( from an engineering point of view ) to compile the program into the language $ t $, so that it now generate fragments of $ t $. hence the interpreter for $ s $ will be needed, or at least the compiler from $ s $ to $ t $ for on - the - fly compiling of generated fragments in


$ s $ ( see also this document ). but i am not sure how this can be formalized properly ( and do not have time right now for it ). and impossible is a big word for an issue that is not formalized. futher remarks added after 36 hours. you may want to skip this very long sequel. the many comments to this question show two views of the problem : a theoretical view that see it as meaningless, and an engineering view that is unfortunately not so easily formalized. there are many ways to look at interpretation and compilation, and i will try to sketch a few. i will attempt to be as informal as i can manage the tombstone diagram one of the early formalization ( early 1960s to late 1990 ) is the t or tombstone diagrams. these diagrams presented in composable graphical elements the implementation language of the interpreter or compiler, the source language being interpreted or compiled, and the target language in the case of compilers. more elaborate versions can add attributes. these graphic representations can be seen as axioms, inference rules, usable to mechanically derive processor generation from a proof of their existence from the axioms, a la curry - howard ( though i am not sure that was done in the sixties : ). partial evaluation another interesting view is the partial evaluation paradigm. i am taking a simple view of programs as a kind of function implementation that computes an answer given some input data. then an interpreter $ i _ s $ for the language $ s $ is a program that take a program $ p _ s $ written in $ s $ and data $ d $ for that program, and computes the result according to the semantics of $ s $. partial evaluation is a technique for specializing a program of two arguments $ a _ 1 $ and $ a _ 2 $, when only one argument, say $ a _ 1 $, is known. the intent is to have a faster evaluation when you finally get the second argument $ a _ 2 $. it is especially useful if $ a _ 2 $ changes more often than $ a _ 1 $ as the cost of partial evaluation with $ a _ 1 $ can be amortized on all the computations where only $ a _ 2 $ is changing. this is a frequent situation in algorithm design ( often the topic of the first comment on se - cs ), when some more static part of the data is pre - processed, so that the cost of the pre - processing can be amortized on all applications of the algorithm with more variable parts of the input data.


this is also the very situation of interpreters, as the first argument is the program to be executed, and is usually executed many times with different data ( or has subparts executed many times with different data ). hence it become a natural idea to specialize an interpreter for faster evaluation of a given program by partially evaluating it on this program as first argument. this may be seen as a way of compiling the program, and there has been significant research work on compiling by partial evaluation of a interpreter on its first ( program ) argument. the smn theorem the nice point about the partial evaluation approach is that it does take its roots in theory ( though theory can be a liar ), notably in kleene's smn theorem. i am trying here to give an intuitive presentation of it, hoping it will not upset pure theoreticians. given a godel numbering $ \ varphi $ of recursive functions, you can view $ \ varphi $ as your hardware, so that given the godel number $ p $ ( read object code ) of a program $ \ varphi _ p $ is the function defined by $ p $ ( i. e. computed by the object code on your hardware ). in its simplest form, the theorem is stated in wikipedia as follows ( up to a small change in notation ) : given a godel numbering $ \ varphi $ of recursive functions, there is a primitive recursive function $ \ sigma $ of two arguments with the following property : for every godel number $ q $ of a partial computable function $ f $ with two arguments, the expressions $ \ varphi _ { \ sigma ( q, x ) } ( y ) $ and $ f ( x, y ) $ are defined for the same combinations of natural numbers $ x $ and $ y $, and their values are equal for any such combination. in other words, the following extensional equality of functions holds for every $ x $ : $ \ ; \ ; \ varphi _ { \ sigma ( q, x ) } \ simeq \ lambda y. \ varphi _ q ( x, y ). \, $ now, taking $ q $ as the interpreter $ i _ s $, $ x $ as the source code of a program $ p _ s $, and $ y $ as the data $ d $ for that program, we can write : $ \ ; \ ; \ varphi _ { \ sigma ( i _ s, p _ s )