question stringlengths 6 13.7k | text stringlengths 1 25.8k | source stringclasses 3
values |
|---|---|---|
Mammals, reptiles, arachnids, insects, etc are all as far as I am aware symmetrical in appearance.
Take a human for instance, make a line from the top of our head right down the middle. However, internally it is not the same. Our organs excluding the kidneys, lungs, reproductive organs, etc are not symmetrically placed... | First, I think it worthwhile considering 'Why would internal symmetry be beneficial?' Developmental simplicity jumps to mind immediately. You can also consider relationship to external organs; the stomach and esophagus are lined up with the mouth which is symmetrical about the sagittal plane. Or maybe even balance; the... | https://api.stackexchange.com |
Can anyone recommend me a good workflow management system (WMS), preferably in Python? So far I have been using GNU Make, but it introduces a layer of complexity that I want to avoid. A good WMS should have the following features:
integrate easily with command line tools and Python scripts,
simple to use and lightweig... | For logging that allows full reproducibility, I highly recommend the Sumatra python package. It nicely links the version control commit number, machine state, and output files to each program run and has a django web interface to interact with the database of run info. The python API makes it very easy to include loggi... | https://api.stackexchange.com |
I am reading the datasheet of an ARM Cortex chip, specifically the GPIO chapter. Ultimately, I want to configure various GPIO pins to use them in "Alternate Function" mode for read/write access to SRAM.
Of all the GPIO registers available, I do not understand two: GPIO_PUPDR and GPIO_OTYPE which are respectively the "p... | This answer is general to processors and peripherals, and has an SRAM specific comment at the end, which is probably pertinent to your specific RAM and CPU.
Output pins can be driven in three different modes:
open drain - a transistor connects to low and nothing else
open drain, with pull-up - a transistor connects to... | https://api.stackexchange.com |
Why do most mammals produce their own Vitamin C?
Why do Humans not? | Humans do not produce Vitamin C due to a mutation in the GULO (gulonolactone oxidase) gene, which results in the inability to synthesize the protein. Normal GULO is an enzyme that catalyses the reaction of D-glucuronolactone with oxygen to L-xylo-hex-3-gulonolactone. This then spontaneously forms Ascorbic Acid (Vitam... | https://api.stackexchange.com |
In Density Functional Theory courses, one is often reminded that Kohn-Sham orbitals are often said to bear no any physical meaning. They only represent a noninteracting reference system which has the same electron density as the real interacting system.
That being said, there are plenty of studies in that field’s liter... | When people say that Kohn-Sham orbitals bear no physical meaning, they mean it in the sense that nobody has proved mathematically that they mean anything. However, it has been empirically observed that many times, Kohn-Sham orbitals often do look very much like Hartree-Fock orbitals, which do have accepted physical int... | https://api.stackexchange.com |
I was writing some exercises about the AM-GM inequality and I got carried away by the following (pretty nontrivial, I believe) question:
Q: By properly folding a common $210mm\times 297mm$ sheet of paper, what
is the maximum amount of water such a sheet is able to contain?
The volume of the optimal box (on the rig... | This problem reminds me of tension field theory and related problems in studying the shape of inflated inextensible membranes (like helium balloons). What follows is far from a solution, but some initial thoughts about the problem.
First, since you're allowing creasing and folding, by Nash-Kuiper it's enough to consid... | https://api.stackexchange.com |
What function is served by the epidermal or capillary ridges on human fingers, the supposedly unique impressions of which are known as fingerprints? | I found many plausible claims that fingerprints increase friction. However, the following article claims, at least under their experimental conditions, that fingerprints actually decrease friction with smooth surfaces by reducing contact area.
Fingerprints are unlikely to increase the friction of primate fingerpads.
I... | https://api.stackexchange.com |
What is the true meaning of a minimum phase system? Reading the Wikipedia article and Oppenheim is some help, in that, we understand that for an LTI system, minimum phase means the inverse is causal and stable. (So that means zeros and poles are inside the unit circle), but what does "phase" and "minimum" have to do wi... | The relation of "minimum" to "phase" in a minimum phase system or filter can be seen if you plot the unwrapped phase against frequency. You can use a pole zero diagram of the system response to help do a incremental graphical plot of the frequency response and phase angle. This method helps in doing a phase plot with... | https://api.stackexchange.com |
Which is the best introductory textbook for Bayesian statistics?
One book per answer, please. | John Kruschke released a book in mid 2011 called Doing Bayesian Data Analysis: A Tutorial with R and BUGS. (A second edition was released in Nov 2014: Doing Bayesian Data Analysis, Second Edition: A Tutorial with R, JAGS, and Stan.) It is truly introductory. If you want to walk from frequentist stats into Bayes though,... | https://api.stackexchange.com |
I have a project where I would like to image an object and be able to derive the heights of features in this image to sub-millimetre precision (exactly how precise is still yet to be determined, but let's say 100ths of a millimetre for now).
I have been previously advised that direct laser ranging techniques will not b... | Stereo imaging
Given the large field of view you need in relation to the accuracy you want, and how close you want to be, I think that stereo imaging may be a challenging, so you need to somehow amplify the differences you are trying to measure.
Structured lighting
If you are essentially trying to measure the profile o... | https://api.stackexchange.com |
I have run Oxford Nanopore Technologies' MinION sequencing on the same DNA sample using three flowcells, each aligned against the same reference genome (E.coli K12 MG1655) using both BWA MEM and GraphMap and stored as BAM files.
How can I quantitatively and efficiently analyse the quality of alignment (percentage ident... | Qualimap will do this for you.
Go to qualimap.bioinfo.cipf.es
Run qualimap (default params are fine) on each BAM file
Open up the HTML output, and you can read off the %identity (they measure the opposite, i.e. mismatch rate, but 100% - mismatch rate is %identity of course), indel rate, etc.
One thing to watch out f... | https://api.stackexchange.com |
In simple terms, how would you explain (perhaps with simple examples) the difference between fixed effect, random effect in mixed effect models? | There are good books on this such as Gelman and Hill. What follows is essentially a summary of their perspective.
First of all, you should not get too caught up in the terminology. In statistics, jargon should never be used as a substitute for a mathematical understanding of the models themselves. That is especially tr... | https://api.stackexchange.com |
How do CUDA and OpenCL compare to each other as of late 2013 from a programmer's perspective? My group is thinking about trying to make use of GPU computing. Would we be limiting ourself significantly by choosing hardware that only supports OpenCL but not CUDA?
To be a bit more specific, are the following assumptions... | I'll try to summarize my experiences obtained in the course of developing ViennaCL, where we have CUDA and OpenCL backends with mostly 1:1 translations of a lot of compute kernels. From your question I'll also assume that we are mostly taking about GPUs here.
Performance Portability. First of all, there is no such thin... | https://api.stackexchange.com |
Many times have I heard that anti-vaccine people are dangerous even to the vaccinated population. Is that true? If so, how can it be? People say that germs will attack them, and soon they would eventually grow and spread even toward general population which actually got its vaccines.
I mean it's so counter-intuitive: i... | Biology is rarely black or white, all or nothing. Protective immunity is generally not an on/off switch, where from the moment you're vaccinated you're infinitely resistant for the rest of your life. You shouldn't expect that, having received a smallpox vaccine, you could have billions of smallpox viruses squirted dire... | https://api.stackexchange.com |
I've read that the oxygen atom in water is $\mathrm{sp^2}$ hybridized, such that one of the oxygen lone pairs should be in an $\mathrm{sp^2}$ orbital and the other should be in a pure p atomic orbital.
First, am I correct about the lone pairs being non-equivalent?
Second, if so, does this have any significance in actua... | Water, as simple as it might appear, has quite a few extraordinary things to offer. Most does not seem to be as it appears.
Before diving deeper, a few cautionary words about hybridisation. Hybridisation is an often misconceived concept. It only is a mathematical interpretation, which explains a certain bonding situa... | https://api.stackexchange.com |
I'm a children's book writer and illustrator, and I want to to create a book for young readers that exposes the beauty of mathematics. I recently read Paul Lockhart's essay "The Mathematician's Lament," and found that I, too, lament the uninspiring quality of my elementary math education.
I want to make a book that dis... | This wasn't the first, but it's definitely awesome:
This is a proof of the Pythagorean theorem, and it uses no words! | https://api.stackexchange.com |
I am having some trouble understanding how salt water, a simple solution, could so effectively remove the pains of a sore throat.
I do believe that the answer is closely related to hypo/hyper-tonic solutions, but why is this so, and how does this work? | Salt water may have anti-septic properties due to the effect it has on water potential. Pure water has a water potential (Ψ) of zero. A concentrated salt solution has a lower (more-negative) water potential. The water potential of the salt solution is likely to be more negative than that of the pathogen's cytoplasm;... | https://api.stackexchange.com |
I'm interested in examples of very effective methods in scientific computing that are the sum or naive combination of very ineffective or bad ones. | In W. Kahan, "Interval arithmetic options in the proposed IEEE floating point arithmetic standard". In: Karl L. E. Nickel (ed.), Interval Mathematics 1980, New York: Academic Press 1980, pp. 99-128, the author addresses some common fallacies with regard to floating-point computation, which he calls anti-theorems. One o... | https://api.stackexchange.com |
While revisiting some of my old notes about the Miller-Urey experiment, I stumbled across the "equation"...
Electricity + $\ce{CH4~/~ NH3~/~H2O~/~CO}$ = Amino Acids
This got me thinking.
Conventionally, why are molecules like $\ce{CH4}$ and $\ce{NH3}$'s molecular formula written differently (in H placement) than othe... | The choice of whether to write binary hydrides with the hydrogen first or second depends on whether that hydrogen is considered acidic, with water marking the delineation point.
By convention, if a binary hydride is more acidic than water, then they are written in the form $\ce{H}_{\text{n}}\ce{X}$. If a binary hydride... | https://api.stackexchange.com |
$\pi$ Pi
Pi is an infinite, nonrepeating $($sic$)$ decimal - meaning that
every possible number combination exists somewhere in pi. Converted
into ASCII text, somewhere in that infinite string of digits is the
name of every person you will ever love, the date, time and manner
of your death, and the answers to all the ... | It is not true that an infinite, non-repeating decimal must contain ‘every possible number combination’. The decimal $0.011000111100000111111\dots$ is an easy counterexample. However, if the decimal expansion of $\pi$ contains every possible finite string of digits, which seems quite likely, then the rest of the statem... | https://api.stackexchange.com |
This has been bugging me for a while now...
Obviously, to calculate the volume/space occupied by a mole of (an ideal) gas, you'll have to specify temperature ($T$) and pressure ($P$), find the gas constant ($R$) value with the right units and plug them all in the ideal gas equation $$PV = nRT.$$
The problem? It seems t... | The common saying is a hold over from when STP was defined to be $\pu{273.15 K}$ and $\pu{1 atm}$. However, IUPAC changed the definition in 1982 so that $\pu{1 atm}$ became $\pu{1 bar}$. I think the main issue is a lot of educators didn't get the memo and went right along either teaching STP as $\pu{1 atm}$ or continui... | https://api.stackexchange.com |
Of course, we've all heard the colloquialism "If a bunch of monkeys pound on a typewriter, eventually one of them will write Hamlet."
I have a (not very mathematically intelligent) friend who presented it as if it were a mathematical fact, which got me thinking... Is this really true? Of course, I've learned that deal... | I found online the claim (which we may as well accept for this purpose) that there are $32241$ words in Hamlet. Figuring $5$ characters and one space per word, this is $193446$ characters. If the character set is $60$ including capitals and punctuation, a random string of $193446$ characters has a chance of $1$ in $6... | https://api.stackexchange.com |
I am a mathematics student with a hobby interest in physics. This means that I've taken graduate courses in quantum dynamics and general relativity without the bulk of undergraduate physics courses and sheer volume of education into the physical tools and mindset that the other students who took the course had, like No... | The reason that it's so hard to understand what physicists mean when they talk about "gauge freedom" is that there are at least four inequivalent definitions that I've seen used:
Definition 1: A mathematical theory has a gauge freedom if some of the mathematical degrees of freedom are "redundant" in the sense that two... | https://api.stackexchange.com |
I know plants are green due to chlorophyll.
Surely it would be more beneficial for plants to be red than green as by being green they reflect green light and do not absorb it even though green light has more energy than red light.
Is there no alternative to chlorophyll? Or is it something else? | Surely it would be even more beneficial for plants to be black instead of red or green, from an energy absorption point of view. And Solar cells are indeed pretty dark.
But, as Rory indicated, higher energy photons will only produce heat. This is because the chemical reactions powered by photosynthesis require only a c... | https://api.stackexchange.com |
To my knowledge, there are 4 ways to solving a system of linear equations (correct me if there are more):
If the system matrix is a full-rank square matrix, you can use Cramer’s Rule;
Compute the inverse or the pseudoinverse of the system matrix;
Use matrix decomposition methods (Gaussian or Gauss-Jordan elimination i... | Your question is a bit like asking for which screwdriver to choose depending on the drive (slot, Phillips, Torx, ...): Besides there being too many, the choice also depends on whether you want to just tighten one screw or assemble a whole set of library shelves. Nevertheless, in partial answer to your question, here ar... | https://api.stackexchange.com |
Bulk gold has a very characteristic warm yellow shine to it, whereas almost all other metals have a grey or silvery color. Where does this come from?
I have heard that this property arises from relativistic effects, and I assume that it has to do with some distinct electronic transition energies in the gold atoms. But ... | Yes, this is a beautiful question.
As you said, in lower rows of the periodic table, there are relativistic effects for the electrons. That is, for core electrons in gold, the electrons are traveling at a significant fraction of the speed of light (e.g., ~58% for $\ce{Au}$ $\mathrm{1s}$ electrons). This contracts the B... | https://api.stackexchange.com |
I have a collection of old books (all 80+ years old), recently, I received a British Chemistry text from 1903 (intro page below) - this being the oldest book of my collection (112 years old at the time of writing this question):
One thing I notice is that there is a distinct smell that comes from the pages of older b... | This is a very interesting question. Provided that the materials used in making papers aren't the same around the globe, this is a very broad case of study. However, a study has been conducted in which the main goal was to identify the compounds that are the cause of the smell; VOCs:[1]
Volatile organic compounds (VOC... | https://api.stackexchange.com |
Obviously, the temperature of water does not affect its chemical composition. At least not in the ranges we are likely to drink it in. Yet it is clearly far more pleasant and refreshing to drink cool water than it is to drink tepid or warm water.
Is there actually any difference to the organism or is this just a matter... | Short answer: Cold is pleasant only when your are not already freezing and cold might satiate thirst better because it acts as enhancer of the "water intake flow meter".
Is cold water more tasty than warm water? No, it is actually the reverse as detailed in my footnote.
Cold is pleasant when your body is over-heating ... | https://api.stackexchange.com |
After discovering a few difficulties with genome assembly, I've taken an interest in finding and categorising repetitive DNA sequences, such as this one from Nippostrongylus brasiliensis [each base is colour-coded as A: green; C: blue; G: yellow; T: red]:
[FASTA file associated with this sequence can be found here]
T... | I've sorted the visualisation out. Here are three alternative representations of repetitive structures for the same sequence:
These were generated using the same R script, callable from the command line:
$ repaver.r -style dotplot -prefix dotplot MAOA_chrX_43645715-43756016.fa
$ repaver.r -style profile -prefix pr... | https://api.stackexchange.com |
The other day, I bumped my bookshelf and a coin fell down. This gave me an idea. Is it possible to compute the mass of a coin, based on the sound emitted when it falls?
I think that there should be a way to do it. But how? | So, I decided to try it out. I used Audacity to record ~5 seconds of sound that resulted when I dropped a penny, nickel, dime, and quarter onto my table, each 10 times. I then computed the power spectral density of the sound and obtained the following results:
I also recorded 5 seconds of me not dropping a coin 10 ti... | https://api.stackexchange.com |
How can one prove the statement
$$\lim_{x\to 0}\frac{\sin x}x=1$$
without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.
This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving ... | The area of $\triangle ABC$ is $\frac{1}{2}\sin(x)$. The area of the colored wedge is $\frac{1}{2}x$, and the area of $\triangle ABD$ is $\frac{1}{2}\tan(x)$. By inclusion, we get
$$
\frac{1}{2}\tan(x)\ge\frac{1}{2}x\ge\frac{1}{2}\sin(x)\tag{1}
$$
Dividing $(1)$ by $\frac{1}{2}\sin(x)$ and taking reciprocals, we get
... | https://api.stackexchange.com |
You read the title and that's what I am trying to do.
Synopsis: I have a young son who is determined to catch Santa (to what ends I don't know). He even dreamed up using some kind of pressure plate and connecting it to a light that will turn on when Santa steps on it to get cookies. I would love to help him build this ... | Adorable.
Frankly, the Little Bits kit is way overkill and incredibly expensive. If your goal is to make a simple sensor that detects pressure and turns on a light bulb, that can be done using stuff you probably have around the house.
Here's a basic idea that might be "good enough" for this year. Next year may require ... | https://api.stackexchange.com |
Why in computer science any complexity which is at most polynomial is considered efficient?
For any practical application(a), algorithms with complexity $n^{\log n}$ are way faster than algorithms that run in time, say, $n^{80}$, but the first is considered inefficient while the latter is efficient. Where's the logic?!... | Another perspective on "efficiency" is that polynomial time allows us to define a notion of "efficiency" that doesn't depend on machine models. Specifically, there's a variant of the Church-Turing thesis called the "effective Church-Turing Thesis" that says that any problem that runs in polynomial time on on kind of ma... | https://api.stackexchange.com |
I know the spent fuel is still radioactive. But it has to be more stable than what was put in and thus safer than the uranium that we started with. That is to say, is storage of the waste such a big deal? If I mine the uranium, use it, and then bury the waste back in the mine (or any other hole) should I encounter any ... | Typical nuclear power reactions begin with a mixture of uranium-235 (fissionable, with a half-life of 700 Myr) and uranium-238 (more common, less fissionable, half-life 4 Gyr) and operate until some modest fraction, 1%-5%, of the fuel has been expended. There are two classes of nuclides produced in the fission reactio... | https://api.stackexchange.com |
In the TV show "Breaking Bad", Walter White frequently gets rid of people who get in his way by submerging them in a plastic container full of hydrofluoric acid. This, at least in the TV show, completely dissolves the body leaving nothing but a red sludge behind at the end.
Is it actually possible to dispose of a body ... | Hydrofluoric acid is toxic and corrosive, but actually isn't that strong of an acid compared to other hydrohalic acids; the fluorine has a very good orbital overlap with hydrogen and is also not very polarizable, therefore it resists donating its proton, unlike other hydrohalic acids which are good proton donators. It ... | https://api.stackexchange.com |
I'm told by smart people that
$$0.999999999\ldots=1$$
and I believe them, but is there a proof that explains why this is? | What does it mean when you refer to $.99999\ldots$? Symbols don't mean anything in particular until you've defined what you mean by them.
In this case the definition is that you are taking the limit of $.9$, $.99$, $.999$, $.9999$, etc. What does it mean to say that limit is $1$? Well, it means that no matter how sm... | https://api.stackexchange.com |
Taking a look at Julia's webpage, you can see some benchmarks of several languages across several algorithms (timings shown below). How can a language with a compiler originally written in C, outperform C code?
Figure: benchmark times relative to C (smaller is better, C performance = 1.0). | There is no necessary relation between the implementation of the compiler and the output of the compiler. You could write a compiler in a language like Python or Ruby, whose most common implementations are very slow, and that compiler could output highly optimized machine code capable of outperforming C. The compiler i... | https://api.stackexchange.com |
I'm pretty fluent in C/C++, and can make my way around the various scripting languages (awk/sed/perl). I've started using python a lot more because it combines some of the nifty aspects of C++ with the scripting capabilities of awk/sed/perl.
But why are there so many different programming languages ? I'm guessing all t... | Programming languages evolve and are improved with time (innovation).
People take ideas from different languages and combine them into new languages. Some features are improved (inheritance mechanisms, type systems), some are added (garbage collection, exception handling), some are removed (goto statements, low-level p... | https://api.stackexchange.com |
Here's my issue I faced;
I worked really hard studying Math, so because of that, I started to realised that I understand things better. However, that comes at a big cost:
In the last few years, I had practically zero physical exercise, I've gained $30$ kg, I've spent countless hours studying at night, constantly had sl... | In my view the central question that you should ask yourself is what is the end goal of your studies. As an example, American college life as depicted in film is hedonistic and certainly not centered on actual studies. Your example is the complete opposite - you describe yourself as an ascetic devoted to scholarship.
M... | https://api.stackexchange.com |
K-means is a widely used method in cluster analysis. In my understanding, this method does NOT require ANY assumptions, i.e., give me a dataset and a pre-specified number of clusters, k, and I just apply this algorithm which minimizes the sum of squared errors (SSE), the within cluster squared error.
So k-means is esse... | What a great question- it's a chance to show how one would inspect the drawbacks and assumptions of any statistical method. Namely: make up some data and try the algorithm on it!
We'll consider two of your assumptions, and we'll see what happens to the k-means algorithm when those assumptions are broken. We'll stick t... | https://api.stackexchange.com |
I ask because, as a first-year calculus student, I am running into the fact that I didn't quite get this down when understanding the derivative:
So, a derivative is the rate of change of a function with respect to changes in its variable, this much I get.
Thing is, definitions of 'differential' tend to be in the form o... | Originally, "differentials" and "derivatives" were intimately connected, with derivative being defined as the ratio of the differential of the function by the differential of the variable (see my previous discussion on the Leibnitz notation for the derivative). Differentials were simply "infinitesimal changes" in whate... | https://api.stackexchange.com |
In the Nature paper published by Google, they say,
To demonstrate quantum supremacy, we compare our quantum processor against state-of-the-art classical computers in the task of sampling the output of a pseudo-random quantum circuit. Random circuits are a suitable choice for benchmarking because they do not possess st... | To elaborate on my intuition here, the thing I consider "impressive" about classical computers is their ability to simulate other systems, not just themselves. When setting up a classical circuit, the question we want to answer is not "which transistors will be lit up once we run a current through this?" We want to ans... | https://api.stackexchange.com |
Why does $\ce{F}$ replace an axial bond in $\ce{PCl5}$? I realize that it would be more stable there than at equatorial bond, but what is the reason of its stability? Similarly in $\ce{AB4}$ type of molecules with $\ce{sp^3d}$ hybridization (4 bond pairs and 1 lone pair) why is the geometry of the molecule that of a se... | Recently, there has been a lot of discussion of Bent's rule (see for example "What is Bent's rule?") here in SE Chem. Simply stated, the rule suggests that $\mathrm{p}$-character tends to concentrate in orbitals directed at electronegative elements.
Why does $\ce{F}$ replace an axial bond in $\ce{PCl5}$?
In order to ... | https://api.stackexchange.com |
I recently encountered a case where I needed an integer division operation on a chip that lacked one (ARM Cortex-A8). While trying to research why that must be, I found out that in general division takes many more cycles than addition, subtraction or multiplication on pretty much any integer (or fixed-point) architectu... | Division is an iterative algorithm where the result from the quotient must be shifted to the remainder using a Euclidean measure, see 2; whereas, multiplication can be reduced to a (fixed) series of bit manipulation tricks. | https://api.stackexchange.com |
So there are several types of transistors:
BJT
JFET
MOSFET
Combine all that with the various flavors of each (NPN, PNP, enhancement mode, depletion mode, HEXFET, etc) and you've got a wide array of parts, many of which are capable of accomplishing the same job. Which type is best suited for which application? Trans... | The main division is between BJTs and FETs, with the big difference being the former are controlled with current and the latter with voltage.
If you're building small quantities of something and aren't very familiar with the various choices and how you can use the characteristics to advantage, it's probably simpler to ... | https://api.stackexchange.com |
What is the difference between a consistent estimator and an unbiased estimator?
The precise technical definitions of these terms are fairly complicated, and it's difficult to get an intuitive feel for what they mean. I can imagine a good estimator, and a bad estimator, but I'm having trouble seeing how any estimator c... | To define the two terms without using too much technical language:
An estimator is consistent if, as the sample size increases, the estimates (produced by the estimator) "converge" to the true value of the parameter being estimated. To be slightly more precise - consistency means that, as the sample size increases, th... | https://api.stackexchange.com |
Although blue foods exist, they're rare enough compared to other foods for food preparers to use blue plasters as a convention. The natural colour of a given food is due to pigments that have some biological origin. Is there any evolutionary reason why these are rarely blue? | Short answer
Blue color is not only rare in edible organisms - Blue color is rare in both the animal and plant Kingdoms in general. In animals, blue coloring is generated through structural optic light effects, and not through colored pigments. In the few blue-colored plants, the blue color is generated by blue pigment... | https://api.stackexchange.com |
I am trying to solving the advection equation but have a strange oscillation appearing in the solution when the wave reflects from the boundaries. If anybody has seen this artefact before I would be interested to know the cause and how to avoid it!
This is an animated gif, open in separate window to view the animation ... | The equation you're solving does not permit right-going solutions, so there is no such thing as a reflecting boundary condition for this equation. If you consider the characteristics, you'll realize that you can only impose a boundary condition at the right boundary. You are trying to impose a homogeneous Dirichlet b... | https://api.stackexchange.com |
I've been trying to answer my (high school) daughter's questions about the periodic table, and the reactivity series, but we keep hitting gaps in my knowledge.
So I showed that the noble gases have a full outer shell, which is why they don't react with anything. And then over the other side of the periodic table we hav... | First off, gold does react. You can form stable gold alloys and gold compounds. It's just hard, mostly for reasons explained by the other answer
The reason bulk gold solid is largely unreactive is because the electrons in gold fall at energies which few molecules or chemicals match (i.e., due to relativistic effects).
... | https://api.stackexchange.com |
According to the cross-correlation theorem : the cross-correlation between two signals is equal to the product of fourier transform of one signal multiplied by complex conjugate of fourier transform of another signal. After doing this, when we take the ifft of the product signal, we get a peak which indicates the shift... | The concept is based on the convolution theorem, which states that for two signals $x(t)$ and $y(t)$, the product of their Fourier transforms $X(f)$ and $Y(f)$ is equal to the Fourier transform of the convolution of the two signals. That is:
$$
\mathcal{F}\{x(t) * y(t)\} = \mathcal{F}\{x(t)\}\mathcal{F}\{y(t)\}
$$
You ... | https://api.stackexchange.com |
While hiking on the northern Idaho-Montana border, I encountered a large area where virtually every tree is bent at the base in the downhill direction. Only the very largest and very smallest trees are straight. What could cause this? | The phenomenon in question is probably related to geotropism.
If the hill soil is "on the move" it will cause the bend on the trees -
If the soil in a slope is moving downward, the trees on this slope
will tip downward. As the tree continues to try to grow upward, the
trunk will show a curve. The degree of bendi... | https://api.stackexchange.com |
I got a bunch of vcf files (v4.1) with structural variations of bunch of non-model organisms (i.e. there are no known variants). I found there are quite a some tools to manipulate vcf files like VCFtools, R package vcfR or python library PyVCF. However none of them seems to provide a quick summary, something like (pref... | According to the bcftools man page, it is able to produce statistics using the command bcftools stats. Running this myself, the statistics look like what you're asking for:
# This file was produced by bcftools stats (1.2-187-g1a55e45+htslib-1.2.1-256-ga356746) and can be plotted using plot-vcfstats.
# The command line ... | https://api.stackexchange.com |
To find the median of an unsorted array, we can make a min-heap in $O(n\log n)$ time for $n$ elements, and then we can extract one by one $n/2$ elements to get the median. But this approach would take $O(n \log n)$ time.
Can we do the same by some method in $O(n)$ time? If we can, then how? | This is a special case of a selection algorithm that can find the $k$th smallest element of an array with $k$ is the half of the size of the array. There is an implementation that is linear in the worst case.
Generic selection algorithm
First let's see an algorithm find-kth that finds the $k$th smallest element of an a... | https://api.stackexchange.com |
Biopython's .count() methods, like Python's str.count(), perform a non-overlapping count, how can I do an overlapping one?
For example, these code snippets return 2, but I want the answer 3:
>>> from Bio.Seq import Seq
>>> Seq('AAAA').count('AA')
2
>>> 'AAAA'.count('AA')
2 | For Biopython 1.70, there is a new Seq.count_overlap() method, which includes optional start and end arguments:
>>> from Bio.Seq import Seq
>>> Seq('AAAA').count_overlap('AA')
3
>>> Seq('AAAA').count_overlap('AA', 1, 4)
2
This method is also implemented for the MutableSeq and UnknownSeq classes:
>>> from Bio.Seq impor... | https://api.stackexchange.com |
What are common cost functions used in evaluating the performance of neural networks?
Details
(feel free to skip the rest of this question, my intent here is simply to provide clarification on notation that answers may use to help them be more understandable to the general reader)
I think it would be useful to have a l... | Here are those I understand so far. Most of these work best when given values between 0 and 1.
Quadratic cost
Also known as mean squared error, this is defined as:
$$C_{MST}(W, B, S^r, E^r) = 0.5\sum\limits_j (a^L_j - E^r_j)^2$$
The gradient of this cost function with respect to the output of a neural network and some ... | https://api.stackexchange.com |
Fortran has a special place in numerical programming. You can certainly make good and fast software in other languages, but Fortran keeps performing very well despite its age. Moreover, it's easier to make fast programs in Fortran. I've made fast programs in C++, but you have to be more careful about things like pointe... | Language designers face many choices. Ken Kennedy emphasized two: (1) better abstractions and (2) higher- or lower-level (less or more machine-like) code. While functional languages like Haskell and Scheme focus on the former, traditional scientific-computing languages like Fortran and C/C++ focused on the latter. S... | https://api.stackexchange.com |
I have a dataset and would like to figure out which distribution fits my data best.
I used the fitdistr() function to estimate the necessary parameters to describe the assumed distribution (i.e. Weibull, Cauchy, Normal). Using those parameters I can conduct a Kolmogorov-Smirnov Test to estimate whether my sample data ... | First, here are some quick comments:
The $p$-values of a Kolmogorov-Smirnov-Test (KS-Test) with estimated parameters can be quite wrong because the p-value does not take the uncertainty of the estimation into account. So unfortunately, you can't just fit a distribution and then use the estimated parameters in a Kolmog... | https://api.stackexchange.com |
After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests. It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting ... | Understanding $p$-value
Suppose, that you want to test the hypothesis that the average height of male students at your University is $5$ ft $7$ inches. You collect heights of $100$ students selected at random and compute the sample mean (say it turns out to be $5$ ft $9$ inches). Using an appropriate formula/statistica... | https://api.stackexchange.com |
In low-cost mass-produced items I often run into black blobs of what looks like resin applied directly on top of something on the PCB. What are these things exactly? I suspect this is some kind of custom IC that is layed out directly on the PCB to save on the plastic housing/connector pins. Is this correct? If so, wha... | It's called chip-on-board. The die is glued to the PCB and wires are bonded from it to pads. The Pulsonix PCB software I use has it as an optional extra.
The main benefit is reduced cost, since you don't have to pay for a package. | https://api.stackexchange.com |
We learned about the class of regular languages $\mathrm{REG}$. It is characterised by any one concept among regular expressions, finite automata and left-linear grammars, so it is easy to show that a given language is regular.
How do I show the opposite, though? My TA has been adamant that in order to do so, we would ... | Proof by contradiction is often used to show that a language is not regular: let $P$ a property true for all regular languages, if your specific language does not verify $P$, then it's not regular.
The following properties can be used:
The pumping lemma, as exemplified in Dave's answer;
Closure properties of regular l... | https://api.stackexchange.com |
An incredible news story today is about a man who survived for two days at the bottom of the sea (~30 m deep) in a capsized boat, in an air bubble that formed in a corner of the boat. He was eventually rescued by divers who came to retrieve dead bodies. Details here. Since gases diffuse through water (and are dissolved... | Summary: I find a formula for the diameter of a bubble large enough to support one human and plug in known values to get $d=400\,{\rm m}$.
I'll have a quantitative stab at the answer to the question of how large an air bubble has to be for the carbon dioxide concentration to be in a breathable steady state, whilst a hu... | https://api.stackexchange.com |
Hidden Markov models (HMMs) are used extensively in bioinformatics, and have been adapted for gene prediction, protein family classification, and a variety of other problems. Indeed, the treatise by Durbin, Eddy and colleagues is one of the defining volumes in this field.
Although the details of each of these different... | I would also recommend to take a look at pomegranate, a nice Python package for probabilistic graphical models. It includes solvers for HMMs and much more. Under the hood it uses Cythonised code, so it's also quite fast. | https://api.stackexchange.com |
I was trying to figure out which piano keys were being played in an audio recording using spectral analysis, and I noticed that the harmonics are not integer multiple of the base note. What is the reason for this?
Take a look at the spectrogram of a clean sample from a single piano key. I am using Piano.ff.A4 from h... | This effect is known as inharmonicity, and it is important for precision piano tuning.
Ideally, waves on a string satisfy the wave equation
$$v^2 \frac{\partial^2 y}{\partial x^2} = \frac{\partial^2 y}{\partial t^2}.$$
The left-hand side is from the tension in the string acting as a restoring force.
The solutions are o... | https://api.stackexchange.com |
Let me clarify:
Given a scatterplot of some given number of points n, if I want to find the closest point to any point in the plot mentally, I can immediately ignore most points in the graph, narrowing my choices down to some small, constant number of points nearby.
Yet, in programming, given a set of points n, in orde... | Your model of what you do mentally is incorrect. In fact, you operate in two steps:
Eliminate all points that are too far, in $O(1)$ time.
Measure the $m$ points that are about as close, in $\Theta(m)$ time.
If you've played games like pétanque (bowls) or curling, this should be familiar — you don't need to examine t... | https://api.stackexchange.com |
This is a problem that has haunted me for more than a decade. Not all the time - but from time to time, and always on windy or rainy days, it suddenly reappears in my mind, stares at me for half an hour to an hour, and then just grins at me, and whispers whole day: "You will never solve me..."
Please save me from this ... | For more than two, the moving knife is a nice solution. Somebody takes a knife and moves it slowly across the sandwich. Any player may say "cut". At that moment, the sandwich is cut and the piece given to the one who said "cut". As he has said that is an acceptable piece, he believes he has at least $\frac 1n$ of t... | https://api.stackexchange.com |
What are the actual differences between different annotation databases?
My lab, for reasons still unknown to me, prefers Ensembl annotations (we're working with transcript/exon expression estimation), while some software ship with RefSeq annotations. Are there significant differences between them today, or are they, f... | To add to rightskewed answer:
While it is true that:
Gencode is an additive set of annotation (the manual one done by Havana and an automated one done by Ensembl),
the annotation (GTF) files are quite similar for a few exceptions involving the X chromosome and Y par and additional remarks in the Gencode file (see more ... | https://api.stackexchange.com |
Even after having studied these for quite sometime, I tend to forget (if I'm out of touch for a while) how they are related to each other and what each stands for (since they have such similar sounding names). I'm hoping you'd come up with an explanation that is so intuitive and mathematically beautiful that they'll ge... | I wrote this handout as a complement to Oppenheim and Willsky. Please take a look at Table 4.1 on page 14, reproduced below. (Click for larger image.) I wrote that table specifically to answer questions such as yours.
Note the similarities and differences among the four operations:
"Series": periodic in time, discret... | https://api.stackexchange.com |
In the past, I've come across statements along the lines of "function $f(x)$ has no closed form integral", which I assume means that there is no combination of the operations:
addition/subtraction
multiplication/division
raising to powers and roots
trigonometric functions
exponential functions
logarithmic functions
... | It is a theorem of Liouville, reproven later with purely algebraic methods, that for rational functions $f$ and $g$, $g$ non-constant, the antiderivative of
$$f(x)\exp(g(x)) \, \mathrm dx$$
can be expressed in terms of elementary functions if and only if there exists some rational function $h$ such that it is a solutio... | https://api.stackexchange.com |
As a software engineer, I write a lot of code for industrial products. Relatively complicated stuff with classes, threads, some design efforts, but also some compromises for performance. I do a lot of testing, and I am tired of testing, so I got interested in formal proof tools, such as Coq, Isabelle... Could I use one... | I'll try to give a succinct answer to some of your questions. Please bear in mind that this is not strictly my field of research, so some of my info may be outdated/incorrect.
There are many tools that are specifically designed to formally prove properties of Java and C++.
However I need to make a small digression he... | https://api.stackexchange.com |
This is a question from /u/beneficii9 on reddit. The original post can be found here.
Through the Personal Genome Project, I have had my whole genome sequenced by Veritas, and have it in the form of a single VCF file for the whole genome and one BAS file for each chromosome. The reference genome associated with the VC... | A modified implementation of Vivek's answer.
peddy is a Python package that samples an input .vcf at ~25000 sites and projects onto a principal component space built on 2504 thousand genome samples. The author has extensive documentation of the tool's features and a link to the preprint.
I downloaded the .vcf and .vcf... | https://api.stackexchange.com |
In quantum computation, what is the equivalent model of a Turing machine?
It is quite clear to me how quantum circuits can be constructed out of quantum gates, but how can we define a quantum Turing machine (QTM) that can actually benefit from quantum effects, namely, perform on high-dimensional systems? | (note: the full desciption is a bit complex, and has several subtleties which I prefered to ignore. The following is merely the high-level ideas for the QTM model)
When defining a Quantum Turing machine (QTM), one would like to have a simple model, similar to the classical TM (that is, a finite state machine plus an in... | https://api.stackexchange.com |
If you do an FFT plot of a simple signal, like:
t = 0:0.01:1 ;
N = max(size(t));
x = 1 + sin( 2*pi*t ) ;
y = abs( fft( x ) ) ;
stem( N*t, y )
1Hz sinusoid + DC
FFT of above
I understand that the number in the first bin is "how much DC" there is in the signal.
y(1) %DC
> 101.0000
The number in the second bin shou... | Real signals are "mirrored" in the real and negative halves of the Fourier transform because of the nature of the Fourier transform. The Fourier transform is defined as the following-
$$H(f) = \int h(t)e^{-j2\pi ft}dt$$
Basically it correlates the signal with a bunch of complex sinusoids, each with its own frequency. ... | https://api.stackexchange.com |
Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.
This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me t... | Here’s one to get things started.
Let $U$ be a non-empty open subset of $\Bbb R$. For $x,y\in U$ define $x\sim y$ iff $\big[\min\{x,y\},\max\{x,y\}\big]\subseteq U$. It’s easily checked that $\sim$ is an equivalence relation on $U$ whose equivalence classes are pairwise disjoint open intervals in $\Bbb R$. (The term in... | https://api.stackexchange.com |
For someone who is physically unable to use a pencil and paper, what would be the best way to do math?
In my case, I have only a little movement in my fingers. I can move a computer mouse and press the left button. Currently I do very little math and when I do I use MS Office but this is a very slow way of doing it and... | (Background: I have a chronic pain condition, and it is extremely painful for me to do any sort of repetitive fine motor activity, including writing and typing. I earned an undergraduate degree in math with quite little handwriting, and I'm currently a graduate student.)
Unfortunately, I've never been able to find any... | https://api.stackexchange.com |
I understand the this (or self or Me) is used to refer to the current object, and that it is a feature of object-oriented programming languages. The earliest language I could find which has such a concept was Smalltalk, which uses self but was wondering where and when (which programming language) the concept was first ... | Simula 67 is generally considered the first object-oriented language and predates Smalltalk by a number of years.
It also used the this keyword for the same concept, which can be seen in this book chapter extract:
class Linker;
begin
ref(Linker) Next, Sex, Employment;
text ID;
procedure Add_to_List(... | https://api.stackexchange.com |
It is known that impurities in a desired isolated product lower the melting point of the mixture, even if the impurities' melting point is much higher than the desired product. Why is that so? | It's a very general statement, but it's not always true. I'll explain why it's often true, and give a counter-example at the end.
Your majority component B and the impurity (let's call it A) form a binary system. In most cases, such binary mixtures exhibit a solid–liquid phase diagram as follows:
(image taken from th... | https://api.stackexchange.com |
What happens to the energy when waves completely cancel each other out via destructive interference? It seems like the energy just disappears, but that would violate the law of energy conservation.
My guess is that the kinetic energy is transformed into potential energy. Or maybe what happens to the energy depends on t... | Waves always travel. Even standing waves can always be interpreted as two traveling waves that are moving in opposite directions (more on that below).
Keeping the idea that waves must travel in mind, here's what happens whenever you figure out a way to build a region in which the energy of such a moving wave cancels ou... | https://api.stackexchange.com |
Recently, I have found in a paper by Klammer, et al. a statement that p-values should be uniformly distributed. I believe the authors, but cannot understand why it is so.
Klammer, A. A., Park, C. Y., and Stafford Noble, W. (2009) Statistical Calibration of the SEQUEST XCorr Function. Journal of Proteome Research. 8(4)... | To clarify a bit. The p-value is uniformly distributed when the null hypothesis is true and all other assumptions are met. The reason for this is really the definition of alpha as the probability of a type I error. We want the probability of rejecting a true null hypothesis to be alpha, we reject when the observed $... | https://api.stackexchange.com |
Polyploidy is the multiplication of number of chromosomal sets from 2n to 3n (triploidy), 4n (tetraploidy) and so on. It is quite common in plants, for example many crops like wheat or Brassica forms. It seems to be rarer in animals but still it is present among some amphibian species like Xenopus.
As I know in mammals... | Great question, and one about which there has historically been a lot of speculation, and there is currently a lot of misinformation. I will first address the two answers given by other users, which are both incorrect but have been historically suggested by scientists. Then I will try to explain the current understandi... | https://api.stackexchange.com |
Is mathematics one big tautology? Let me put the question in clearer terms:
Mathematics is a deductive system; it works by starting with arbitrary axioms, and deriving therefrom "new" properties through the process of deduction. As such, it would seem that we are simply creating a string of equivalences; each property ... | Disclaimer: different people view this differently. I side with Lakatos: Logic is a tool. Proofs are a way to verify one's intuition (and in many cases to improve one's intuition) and it is a tool to check the consistency of theories in a process of refining the axioms. The fact that every proof boils down to a tautolo... | https://api.stackexchange.com |
Despite the fact that oxygen is much more electronegative than carbon, the bond in $\ce{CO}$ presents a weak dipole moment.
This observation can easily be explained using the concept of "dative bond", that is, one bond is formed with two electrons from oxygen, producing a polarization $\ce{O\bond{->}C}$ which equilibra... | Unfortunately, nothing in the bonding situation in carbon monoxide is easily explained, especially not the dipole moment. According to the electronegativities of the elements, you would expect the partial positive charge to be at the carbon and a partial negative charge at oxygen. However, this is not the case, which c... | https://api.stackexchange.com |
Evaluate the following integral
$$
\tag1\int_{0}^{\frac{\pi}{2}}\frac1{(1+x^2)(1+\tan x)}\,\Bbb dx
$$
My Attempt:
Letting $x=\frac{\pi}{2}-x$ and using the property that
$$
\int_{0}^{a}f(x)\,\Bbb dx = \int_{0}^{a}f(a-x)\,\Bbb dx
$$
we obtain
$$
\tag2\int_{0}^{\frac{\pi}{2}}\frac{\tan x}{\left(1+\left(\frac{\pi}{2}-x\r... | Here is an approach.
We give some preliminary results.
The poly-Hurwitz zeta function
The poly-Hurwitz zeta function may initially be defined by the series
$$
\begin{align}
\displaystyle \zeta(s\mid a,b) := \sum_{n=1}^{+\infty} \frac{1}{(n+a)^{s}(n+b)},
\quad \Re a >-1, \, \Re b >-1, \, \Re s>0. \tag1
\end{... | https://api.stackexchange.com |
In algebra, all quadratic problems can be solved by using the quadratic formula. I read a couple of books, and they told me only HOW and WHEN to use this formula, but they don't tell me WHY I can use it. I have tried to figure it out by proving these two equations are equal, but I can't.
Why can I use $x = \dfrac{-b\pm... | I would like to prove the Quadratic Formula in a cleaner way. Perhaps if teachers see this approach they will be less reluctant to prove the Quadratic Formula.
Added: I have recently learned from the book Sources in the Development of Mathematics: Series and Products from the Fifteenth to the Twenty-first Century (Ran... | https://api.stackexchange.com |
I'm working on a simple web app that allows the user to tune his/her guitar. I'm a real beginner in signal processing, so please don't judge me too harshly if my question is inappropriate.
So, I managed to get the fundamental frequency using an FFT algorithm and at this point the application is somehow functional. Howe... | I'm guessing the other frequencies it gets are harmonics of the fundamental? Like you're playing 100 Hz and it picks out 200 Hz or 300 Hz instead? First, you should limit your search space to the frequencies that a guitar is likely to be. Find the highest fundamental you're likely to need and limit to that.
Autocorr... | https://api.stackexchange.com |
If I have a square invertible matrix and I take its determinant, and I find that $\det(A) \approx 0$, does this imply that the matrix is poorly conditioned?
Is the converse also true? Does an ill-conditioned matrix have a nearly zero determinant?
Here is something I tried in Octave:
a = rand(4,4);
det(a) %0.008
cond(a)... | It's the largeness of the condition number $\kappa(\mathbf A)$ that measures the nearness to singularity, not the tininess of the determinant.
For instance, the diagonal matrix $10^{-50} \mathbf I$ has tiny determinant, but is well-conditioned.
On the flip side, consider the following family of square upper triangular ... | https://api.stackexchange.com |
I noticed that after stirring, a bubble in the centre of my mug of tea changed the speed it was rotating at periodically. Speeding up, then slowing down, then speeding up again, etc. Almost like when a ballerina pulls in her arms to increase her speed.
Tea after stirring
Edit:
I've repeated this with room temperature w... | Just looking at the video, it appears that the shape of the surface is varying quasi-periodically, as if the liquid is moving outward (and upward) toward the cup walls, then moving inward and rising in the center of the cup. This can be expected, if in the beginning the shape is not a perfect equilibrium shape (e.g., ... | https://api.stackexchange.com |
What's the difference between a microcontroller and a microprocessor? | A microprocessor generally does not have RAM, ROM and IO pins. It usually uses its pins as a bus to interface to peripherals such as RAM, ROM, Serial ports, Digital and Analog IO. It is expandable at the board level due to this.
A microcontroller is 'all in one', the processor, ram, IO all on the one chip, as such you ... | https://api.stackexchange.com |
There was a reason why I constantly failed physics at school and university, and that reason was, apart from the fact I was immensely lazy, that I mentally refused to "believe" more advanced stuff until I understand the fundamentals (which I, eventually, never did).
As such, one of the most fundamental things in physic... | I'm going to go with a programmer metaphor for you.
The mathematics (including "A field is a function that returns a value for a point in space") are the interface: they define for you exactly what you can expect from this object.
The "what is it, really, when you get right down to it" is the implementation. Formally ... | https://api.stackexchange.com |
I'm trying to understand algorithm complexity, and a lot of algorithms are classified as polynomial. I couldn't find an exact definition anywhere. I assume it is the complexity that is not exponential.
Do linear/constant/quadratic complexities count as polynomial? An answer in simple English will be appreciated :) | First, consider a Turing machine as a model (you can use other models too as long as they are Turing equivalent) of the algorithm at hand. When you provide an input of size $n$, then you can think of the computation as a sequence of the machine's configuration after each step, i.e., $c_0, c_1, \ldots$ . Hopefully, the ... | https://api.stackexchange.com |
As enrichment analysis a usual step is to infer the pathways enriched in a list of genes. However I can't find a discussion about which database is better. Two of the most popular (in my particular environment) are Reactome and KEGG (Maybe because there are tools using them in Bioconductor).
KEGG requires a subscriptio... | One big downside of KEGG is the licensing issue. One big advantage of Reactome are various crosslinks to other databases and data.
ad 1, This depends on which pathway, they are both primary databases. Sometimes other databases that for instance combine data of primary databases have better annotation of pathways (there... | https://api.stackexchange.com |
So I've got a decent head for what problems I work with are best one in serial, and which can be managed in parallel. But right now, I don't have much of an idea of what's best handled by CPU-based computation, and what should be offloaded to a GPU.
I know its a basic question, but much of my searching gets caught in p... | GPU hardware has two particular strengths: raw compute (FLOPs) and memory bandwidth. Most difficult computational problems fall into one of these two categories. For example, dense linear algebra (A * B = C or Solve[Ax = y] or Diagonalize[A], etc) falls somewhere on the compute/memory bandwidth spectrum depending on ... | https://api.stackexchange.com |
In my field of research the specification of experimental errors is commonly accepted and publications which fail to provide them are highly criticized. At the same time I often find that results of numerical computations are provided without any account of numerical errors, even though (or maybe because) often questio... | Your question is asking about model Verification. You can find numerous resources on methods and standards by searching for Verification and Validation (Roache 1997, 2002, 2004, Oberkampf & Trucano 2002, Salari & Knupp 2000, Babuska & Oden 2004), as well as the broader topic of Uncertainty Quantification. Rather than e... | https://api.stackexchange.com |
I don't understand why the Halting Problem is so often used to dismiss the possibility of determining whether a program halts. The Wikipedia article correctly explains that a deterministic machine with finite memory will either halt or repeat a previous state. You can use the algorithm which detects whether a linked li... | Because a lot of really practical problems are the halting problem in disguise. A solution to them solves the halting problem.
You want a compiler that finds the fastest possible machine code for a given program? Actually the halting problem.
You have JavaScript, with some variables at a high security level and some at... | https://api.stackexchange.com |
I'm using a 5 V / 2 A voltage regulator (L78S05) without a heatsink. I'm testing the circuit with a microcontroller (PIC18FXXXX), a few LEDs and a 1 mA piezzo buzzer. The input voltage is aprox. 24 VDC. After running for a minute, the voltage regulator starts to overheat, meaning it burns my finger if I keep it there f... | Summary: YOU NEED A HEATSINK NOW !!!!! :-)
[and having a series resistor as well wouldn't hurt :-) ]
Well asked question Your question is asked well - much better than usual.
The circuit diagram and references are appreciated.
This makes it much easier to give a good answer first time.
Hopefully this is one ... :-)
I... | https://api.stackexchange.com |
In some literature, I have read that a regression with multiple explanatory variables, if in different units, needed to be standardized. (Standardizing consists in subtracting the mean and dividing by the standard deviation.) In which other cases do I need to standardize my data? Are there cases in which I should on... | In regression, it is often recommended to center the variables so that the predictors have mean $0$. This makes it easier to interpret the intercept term as the expected value of $Y_i$ when the predictor values are set to their means. Otherwise, the intercept is interpreted as the expected value of $Y_i$ when the predi... | https://api.stackexchange.com |
The division of the chromatic scale in $7$ natural notes (white keys in a piano) and $5$ accidental ones (black) seems a bit arbitrary to me.
Apparently, adjacent notes in a piano (including white or black) are always separated by a semitone. Why the distinction, then? Why not just have scales with $12$ notes? (apparen... | The first thing you have to understand is that notes are not uniquely defined. Everything depends on what tuning you use. I'll assume we're talking about equal temperament here. In equal temperament, a half-step is the same as a frequency ratio of $\sqrt[12]{2}$; that way, twelve half-steps makes up an octave. Why ... | https://api.stackexchange.com |
I have looked extensively for a proof on the internet but all of them were too obscure. I would appreciate if someone could lay out a simple proof for this important result. Thank you. | These answers require way too much machinery. By definition, the characteristic polynomial of an $n\times n$ matrix $A$ is given by
$$p(t) = \det(A-tI) = (-1)^n \big(t^n - (\text{tr} A) \,t^{n-1} + \dots + (-1)^n \det A\big)\,.$$
On the other hand, $p(t) = (-1)^n(t-\lambda_1)\dots (t-\lambda_n)$, where the $\lambda_j$... | https://api.stackexchange.com |
An Amazon EC2 compute cluster costs about \$800-\$1000 (depending on duty cycle) per physical CPU core over the course of 3 years. In our last round of hardware acquisition, my lab picked up 48 cores worth of hardware very similar to that of Amazon's clusters for about ~$300 a core.
Am I missing something here? Are the... | The main advantage, in my opinion, of using Cloud-based resources is flexibility, i.e. if you have a fluctuating workload, you only pay for what you need.
If this is not the case in your application, i.e. you know you will have a quantifiable and constant workload, then you're probably better-off building your own clus... | https://api.stackexchange.com |
When I look around for why copper and chromium only have one electron in their outermost s orbital and 5/10 in their outermost d orbital, I'm bombarded with the fact that they are more stable with a half or completely filled d orbital, so the final electron enters that orbital instead of the 'usual' s orbital.
What I'... | As I understand this, there are basically two effects at work here.
When you populate an $\mathrm{s}$-orbital, you add a significant amount of electron density close to the nucleus. This screens the attractive charge of the nucleus from the $\mathrm{d}$-orbitals, making them higher in energy (and more radially diffuse)... | https://api.stackexchange.com |
An exam for high school students had the following problem:
Let the point $E$ be the midpoint of the line segment $AD$ on the square $ABCD$. Then let a circle be determined by the points $E$, $B$ and $C$ as shown on the diagram. Which of the geometric figures has the greater perimeter, the square or the circle?
Of cou... | Perhaps the examiner intended the students to notice the square is determined by a $(3, 4, 5)$ triangle, because $3 + 5 = 4 + 4$ (!):
Consequently, as several others have noted,
$$
\frac{\text{perimeter of the circle}}{\text{perimeter of the square}}
= \frac{5 \cdot 2\pi}{4 \cdot 8} = \frac{\pi}{3.2}
< 1.
$$
For a... | https://api.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.