question stringlengths 6 13.7k | text stringlengths 1 25.8k | source stringclasses 3
values |
|---|---|---|
This question was prompted by Can matter really fall through an event horizon?. Notoriously, if you calculate the Schwarzschild coordinate time for anything, matter or light, to reach the event horizon the result is infinite. This implies that the universe ages by an infinite time before someone falling into the black ... | 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,... | https://api.stackexchange.com |
This is a frequently-asked question within the nanopore community. Oxford Nanopore currently claims that they are able to generate run yields of 10-15 gigabases (e.g. see here and here), and yet it's more common to see users only managing in the 1-5 gigabase range.
So why the big difference in yield? | 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... | https://api.stackexchange.com |
I need to find the squares in an image using OpenCV (no problem in matlab or any other, generally what i expect are some ideas).
Consider the test image below :
I need to find those coloured squares in above image accurately (not the white long strips).
What I have done :
I applied the common method (which comes with... | 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
cle... | https://api.stackexchange.com |
A couple of colleagues suggested in a discussion that the virus that causes COVID-19 appears to be made by humans, since nature could not have produced such an efficient virus — that spreads so fast and whose patients are contagious quite some time before showing signs of infection.
Since my knowledge of biology is ver... | 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... | https://api.stackexchange.com |
I want to modify a dense square transition matrix in-place by changing the order of several of its rows and columns, using python's numpy library. Mathematically this corresponds to pre-multiplying the matrix by the permutation matrix P and post-multiplying it by P^-1 = P^T, but this is not a computationally reasonabl... | 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 ov... | https://api.stackexchange.com |
Question:
"Certain properties of a programming language may require that the only way to get the code written in it be executed is by interpretation. In other words, compilation to a native machine code of a traditional CPU is not possible. What are these properties?"
Compilers: Principles and Practice by Parag H. Dave... | 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 ... | https://api.stackexchange.com |
I understand the Fourier Transform which is a mathematical operation that lets you see the frequency content of a given signal. But now, in my comm. course, the professor introduced the Hilbert Transform.
I understand that it is somewhat linked to the frequency content given the fact that the Hilbert Transform is multi... | One application of the Hilbert Transform is to obtain a so-called Analytic Signal. For signal $s(t)$, its Hilbert Transform $\hat{s}(t)$ is defined as a composition:
$$s_A(t)=s(t)+j\hat{s}(t) $$
The Analytic Signal that we obtain is complex valued, therefore we can express it in exponential notation:
$$s_A(t)=A(t)e^{j\... | https://api.stackexchange.com |
Peoples' ears can hear sound whose frequencies range from 20 Hz to 20 kHz. Based on the Nyquist theorem, the recording rate should be at least 40 kHz. Is it the reason for choosing 44.1 kHz? | It is true that, like any convention, the choice of 44.1 kHz is sort of a historical accident. There are a few other historical reasons.
Of course, the sampling rate must exceed 40 kHz if you want high quality audio with a bandwidth of 20 kHz.
There was discussion of making it 48.0 kHz (it was nicely congruent with 24 ... | https://api.stackexchange.com |
Arthropods have 6 or more limbs and arthropods with 6 limbs appear to move faster than arthropods with 8 limbs so I wonder whether this might have something to do with fast and efficient locomotion. But, this is just a guess. I wonder what the official explanation is, if it exists. | Number of legs in terrestrial vertebrates
Not only do mammals have four legs but actually all terrestrial vertebrates (which include mammals) have four legs. There are slight exceptions though as some lineages have lost their legs. Typically snakes have no legs anymore. Apesteguia and Zaher (2006) discuss the evolution... | https://api.stackexchange.com |
When I'm using the arduino GPS module it usually takes a couple of minutes for it to start sending data. And it seems that it's usually the case with all GPS modules since they need to "listen" to the satellites for some time. However whenever I use my phones internal GPS it find its position in a matter of seconds. Wh... | There are several things which affect the time to first fix (TTFX).
Getting the almanac and ephemeris. These two things are technically a little different from each other, but for our purposes we'll treat them as the same. They are the locations of the satellites, and you need a to know where they are in order to wo... | https://api.stackexchange.com |
I want to get a .bed file with the genes' names and canonical coordinates, also I would like to have coordinates of exons, too. I can get the list from UCSC, however, if I choose UCSC Genes - knownCanonical, I can not extract coordinates of exons. If I use other options - I am getting coordinates of as many transcripti... | Via Gencode and BEDOPS convert2bed:
$ wget -qO- ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_28/gencode.v28.annotation.gff3.gz \
| gunzip --stdout - \
| awk '$3 == "gene"' - \
| convert2bed -i gff - \
> genes.bed
You can modify the awk statement to get exons, by replacing gene with e... | https://api.stackexchange.com |
What is wrong with this proof?
Is $\pi=4?$ | This question is usually posed as the length of the diagonal of a unit square. You start going from one corner to the opposite one following the perimeter and observe the length is $2$, then take shorter and shorter stair-steps and the length is $2$ but your path approaches the diagonal. So $\sqrt{2}=2$.
In both cases... | https://api.stackexchange.com |
Singular value decomposition (SVD) and principal component analysis (PCA) are two eigenvalue methods used to reduce a high-dimensional data set into fewer dimensions while retaining important information. Online articles say that these methods are 'related' but never specify the exact relation.
What is the intuitive re... | (I assume for the purposes of this answer that the data has been preprocessed to have zero mean.)
Simply put, the PCA viewpoint requires that one compute the eigenvalues and eigenvectors of the covariance matrix, which is the product $\frac{1}{n-1}\mathbf X\mathbf X^\top$, where $\mathbf X$ is the data matrix. Since th... | https://api.stackexchange.com |
I've recently talked with a friend about LaTeX compilation. LaTeX can use only one core to compile. So for the speed of LaTeX compiliation, the clock speed of the CPU is most important (see Tips for choosing hardware for best LaTeX compile performance)
Out of curiosity, I've looked for CPUs with the highest clock speed... | Practically, what limits CPU speed is both the heat generated and the gate delays, but usually, the heat becomes a far greater issue before the latter kicks in.
Recent processors are manufactured using CMOS technology. Every time there is a clock cycle, power is dissipated. Therefore, higher processor speeds means more... | https://api.stackexchange.com |
Fundamentally, they're both carbohydrates, although the cellulose in wood is essentially polymerized glucose, which combined with its isomer fructose forms sucrose.
So why does wood readily burn while table sugar chars? | Combustion is a gas phase reaction. The heat of the flame vapourises the substrate and it's the vapour that reacts with the air. That's why heat is needed to get combustion started.
Anyhow, wood contains lots of relatively volatile compounds so it's not too hard to get combustion started. Once combustion has started th... | https://api.stackexchange.com |
Am I looking for a better behaved distribution for the independent variable in question, or to reduce the effect of outliers, or something else? | I always hesitate to jump into a thread with as many excellent responses as this, but it strikes me that few of the answers provide any reason to prefer the logarithm to some other transformation that "squashes" the data, such as a root or reciprocal.
Before getting to that, let's recapitulate the wisdom in the existin... | https://api.stackexchange.com |
I read that the $\ce{O2}$ molecule is paramagnetic, so I'm wondering: could a strong magnet pull the $\ce{O2}$ to one part of a room – enough to cause breathing problems for the organisms in the room?
(I'm not a professional chemist, though I took some college chemistry.) | I'm a physicist, so apologies if the answer below is in a foreign language; but this was too interesting of a problem to pass up. I'm going to focus on a particular question: If we have oxygen and nothing else in a box, how strong does the magnetic field need to be to concentrate the gas in a region? The TL;DR is t... | https://api.stackexchange.com |
Why does the electron-donating inductive effect (+I) of the isotopes of hydrogen decrease in the order $\ce{T} > \ce{D} > \ce{H}$?
(where T is Tritium and D is Deuterium)
Google has nothing to offer. Does it have to do anything with mass, as the order implies? | Yes, it has a lot to do with mass. Since deuterium has a higher mass than protium, simple Bohr theory tells us that the deuterium 1s electron will have a smaller orbital radius than the 1s electron orbiting the protium nucleus (see "Note" below for more detail on this point). The smaller orbital radius for the deuteri... | https://api.stackexchange.com |
If one wants to smooth a time series using a window function such as Hanning, Hamming, Blackman etc., what are the considerations for favouring any one window over another? | The two primary factors that describe a window function are:
Width of the main lobe (i.e., at what frequency bin is the power half that of the maximum response)
Attenuation of the side lobes (i.e., how far away down are the side lobes from the mainlobe). This tells you about the spectral leakage in the window.
Anothe... | https://api.stackexchange.com |
I have a gene expression count matrix produced from bulk RNA-seq data. I'd like to find genes that were not expressed in a group of samples and were expressed in another group.
The problem of course is that not all effectively non-expressed genes will have 0 counts due to sequencing errors, or because they were express... | I'd like to find genes that were not expressed in a group of samples and were expressed in another group.
This is, fundamentally, a differential expression analysis, with a twist. To solve this, you’d first use a differential expression library of your choice (e.g. DESeq2) and perform a one-tailed test of differential... | https://api.stackexchange.com |
I'm doing a research on the FFT method, and a term that always comes up is "frequency bin". From what I understand, this has something to do with the band created around the frequency of a given sinusoid, but I can't really figure out how. I also figured out how to go from a given bin to its related frequency, but stil... | It's simpler than you think. When we discretize frequencies, we get frequency bins. So, when you discretize your Fourier Transform: $$e^{-j\omega} \rightarrow e^{-j{2\pi k}/{N}}$$ Our continuous frequencies become $N$ discrete bins.
This is exactly why the following is true: $$n^{th}\,\text{bin} = n*\dfrac{\text{sample... | https://api.stackexchange.com |
These three terms are often misused in the literature. Many researchers seem to treat them as synonyms. So, what is the definition of each of these terms and how do they differ from one another? | First, a note on spelling. Both "ortholog" and "orthologue" are correct, one is the American and the other the British spelling. The same is true for homolog/homologue and paralog/paralogue.
On to the biology. Homology is the blanket term, both ortho- and paralogs are homologs. So, when in doubt use "homologs". However... | https://api.stackexchange.com |
I am looking for a C++ tensor library that supports dimension-agnostic code. Specifically, I need to perform operations along each dimension (up to 3), e.g. calculating a weighted sum. The dimensions is a template parameter (and thus a compile-time constant). Another constraint is that the library should be relatively ... | FTensor is a lightweight, header only, fully templated library that includes ergonomic summation notation. It has been tested extensively in 2, 3, and 4 dimensions, but should work fine for any number of dimensions. | https://api.stackexchange.com |
What is the difference between Logit and Probit model?
I'm more interested here in knowing when to use logistic regression, and when to use Probit.
If there is any literature which defines it using R, that would be helpful as well. | A standard linear model (e.g., a simple regression model) can be thought of as having two 'parts'. These are called the structural component and the random component. For example:
$$
Y=\beta_0+\beta_1X+\varepsilon \\
\text{where } \varepsilon\sim\mathcal{N}(0,\sigma^2)
$$
The first two terms (that is, $\beta_0+\beta_... | https://api.stackexchange.com |
Are there any famous problems/algorithms in scientific computing that cannot be sped up by parallelisation? It seems to me whilst reading books on CUDA that most things can be. | The central issue is the length of the critical path $C$ relative to the total amount of computation $T$. If $C$ is proportional to $T$, then parallelism offers at best a constant speed-up. If $C$ is asymptotically smaller than $T$, there is room for more parallelism as the problem size increases. For algorithms in whi... | https://api.stackexchange.com |
When I first took linear algebra, we never learned about dual spaces. Today in lecture we discussed them and I understand what they are, but I don't really understand why we want to study them within linear algebra.
I was wondering if anyone knew a nice intuitive motivation for the study of dual spaces and whether or n... | Let $V$ be a vector space (over any field, but we can take it to be $\mathbb R$ if you like,
and for concreteness I will take the field to be $\mathbb R$ from now on;
everything is just as interesting in that case). Certainly one of the interesting concepts
in linear algebra is that of a hyperplane in $V$.
For example... | https://api.stackexchange.com |
I am lost in normalizing, could anyone guide me please.
I have a minimum and maximum values, say -23.89 and 7.54990767, respectively.
If I get a value of 5.6878 how can I scale this value on a scale of 0 to 1. | If you want to normalize your data, you can do so as you suggest and simply calculate the following:
$$z_i=\frac{x_i-\min(x)}{\max(x)-\min(x)}$$
where $x=(x_1,...,x_n)$ and $z_i$ is now your $i^{th}$ normalized data. As a proof of concept (although you did not ask for it) here is some R code and accompanying graph to ... | https://api.stackexchange.com |
My chemistry book explains that even though electrons in the $\mathrm{2p}$ orbital are closer to the nucleus on average, electrons from the $\mathrm{2s}$ orbital spend a very short time very close to the nucleus (penetration), so it has a lower energy. Why does this tiny amount of time spent close to the nucleus make s... | I think your question implicates another question (which is also mentioned in some comments here), namely: Why are all energy eigenvalues of states with a different angular momentum quantum number $\ell$ but with the same principal quantum number $n$ (e.g., $\mathrm{3s}$, $\mathrm{3p}$, $\mathrm{3d}$) degenerate in the... | https://api.stackexchange.com |
Do molecules with bridges through rings (in a manner illustrated by this) exist?
I sometimes get results like this when doing Energy Minimization on molview.org. For example:
Is this actually a thing?
EDIT: As a slightly more realistic example, consider this: | I'm not sure about the existence of molecules with bridges through rings. However, there are several publications of synthesis of molecules mimicking wheels and axles ([2]rotaxanes; The “[2]” refers to the number of interlocked components) as one shown below (Ref. 1):
(The diagram is from Reference 1)
This specific m... | https://api.stackexchange.com |
In my numerical analysis courses, I learned to analyze the efficiency of algorithms by counting the number of floating-point operations (flops) they require, relative to the size of the problem. For instance, in Trefethen & Bau's text on Numerical Linear Algebra, there are even 3D-looking pictures of the flop counts.
... | I think the (first order) right thing to do is look at the ratio of flops to bytes needed in the algorithm, which I call $\beta$. Let $F_{\mathrm{max}}$ be the maximum flop rate of the processor, and $B_{\mathrm{max}}$ the maximum bandwidth. If $\frac{F_{\mathrm{max}}}{\beta} > B_{\mathrm{max}}$, then the algorithm wil... | https://api.stackexchange.com |
In honor of April Fools Day $2013$, I'd like this question to collect the best, most convincing fake proofs of impossibilities you have seen.
I've posted one as an answer below. I'm also thinking of a geometric one where the "trick" is that it's very easy to draw the diagram wrong and have two lines intersect in the w... | $$x^2=\underbrace{x+x+\cdots+x}_{(x\text{ times})}$$
$$\frac{d}{dx}x^2=\frac{d}{dx}[\underbrace{x+x+\cdots+x}_{(x\text{ times})}]$$
$$2x=1+1+\cdots+1=x$$
$$2=1$$ | https://api.stackexchange.com |
When going from the strong form of a PDE to the FEM form it seems one should always do this by first stating the variational form. To do this you multiply the strong form by an element in some (Sobolev) space and integrate over your region. This I can accept. What I don't understand is why one also has to use Green's f... | Short answer:
No, you don't have to do integration for certain FEMs. But in your case, you have to do that.
Long answer:
Let's say $u_h$ is the finite element solution. If you choose piecewise linear polynomial as your basis, then taking $\Delta$ on it will give you an order 1 distribution (think taking derivative on... | https://api.stackexchange.com |
EDIT: I am testing if any eigenvalues have a magnitude of one or greater.
I need to find the largest absolute eigenvalue of a large sparse, non-symmetric matrix.
I have been using R's eigen() function, which uses the QR algo from either EISPACK or LAPACK to find all eigenvalues and then I use abs() to get the absolute... | It depends a lot on the size of your matrix, in the large-scale case also on whether it is sparse, and on the accuracy you want to achieve.
If your matrix is too large to allow a single factorization, and you need high accuracy, the Lanczsos algorithm is probably the fastest way. In the nonsymmetric case, the Arnoldi ... | https://api.stackexchange.com |
This question has always mystified me since young. For beetles, I can reason that they flip over because they have a higher centre of gravity causing them to be in unstable equilibrium when they tuck in their legs when they are about to die. For cockroaches with a lower profile, I would expect them to stay upright. But... | It is a result from the insecticide you are using. From this excerpt from the 10th Edition of the Mallis Handbook on Pest Control:
Neurotoxic insecticides cause tremors and muscle spasms, flipping the cockroach on its back. A healthy cockroach can easily right itself, but without muscle coordination, the cockroach di... | https://api.stackexchange.com |
I was told by my chemistry teacher that $\ce{HCN}$ smells like almonds. She then went on to tell a story about how some of her students tried to play a prank on her by pouring almond extract down the drain to make her think that they had inadvertently created $\ce{HCN}$ gas. She said that she knew that it wasn't $\ce{H... | The odour threshold for hydrogen cyanide $(\ce{HCN})$ is in fact quite a bit lower than the lethal toxicity threshold. Data for $\ce{HCN}$ can be found in many places, but here and here are a couple of good references. That subset of the human population that can detect bitter almonds do so at a threshold of $0.58$ to ... | https://api.stackexchange.com |
Data analysis cartoons can be useful for many reasons: they help communicate; they show that quantitative people have a sense of humor too; they can instigate good teaching moments; and they can help us remember important principles and lessons.
This is one of my favorites:
As a service to those who value this kind of... | Was XKCD, so time for Dilbert:
Source: | https://api.stackexchange.com |
I'm tutoring high school students. I've always taught them that:
A charged particle moving without acceleration produces an electric as well as a magnetic field.
It produces an electric field because it's a charge particle. But when it is at rest, it doesn't produce a magnetic field. All of a sudden when it starts mo... | If you are not well-acquainted with special relativity, there is no way to truly explain this phenomenon. The best one could do is give you rules steeped in esoteric ideas like "electromagnetic field" and "Lorentz invariance." Of course, this is not what you're after, and rightly so, since physics should never be about... | https://api.stackexchange.com |
What are the main differences between performing principal component analysis (PCA) on the correlation matrix and on the covariance matrix? Do they give the same results? | You tend to use the covariance matrix when the variable scales are similar and the correlation matrix when variables are on different scales.
Using the correlation matrix is equivalent to standardizing each of the variables (to mean 0 and standard deviation 1). In general, PCA with and without standardizing will give d... | https://api.stackexchange.com |
I was trying to unlock my car with a keyfob, but I was out of range. A friend of mine said that I have to hold the transmitter next to my head. It worked, so I tried the following later that day:
Walked away from the car until I was out of range
Put key next to my head (it worked)
Put key on my chest (it worked)
Put k... | This is a really interesting question. It turns out that your body is reasonably conductive (think salt water, more on that in the answer to this question), and that it can couple to RF sources capacitively. Referring to the Wikipedia article on keyless entry systems; they typically operate at an RF frequency of $315... | https://api.stackexchange.com |
I received this question from my mathematics professor as a leisure-time logic quiz, and although I thought I answered it right, he denied. Can someone explain the reasoning behind the correct solution?
Which answer in this list is the correct answer to this question?
All of the below.
None of the below.
All of the a... | // gcc ImpredictivePropositionalLogic1.c -o ImpredictivePropositionalLogic1.exe -std=c99 -Wall -O3
/*
Which answer in this list is the correct answer to this question?
(a) All of the below.
(b) None of the below.
(c) All of the above.
(d) One of the above.
(e) None of the above.
(f) None of the above.
*/
#include <s... | https://api.stackexchange.com |
I have learnt about Finite Element Method (also a little on other numerical methods) but I don't know what are exactly definition of these two errors and differences between them? | Error estimates usually have the form
$$ \|u - u_h\| \leq C(h),$$
where $u$ is the exact solution you are interested in, $u_h$ is a computed approximate solution, $h$ is an approximation parameter you can control, and $C(h)$ is some function of $h$ (among other things). In finite element methods, $u$ is the solution of... | https://api.stackexchange.com |
A lot of numerical algorithms (integration, differentiation, interpolation, special functions, etc.) are available in scientific computation libraries like GSL. But I often see code with "hand-rolled" implementations of these functions. For small programs which are not necessarily intended for public distribution, is i... | I used to implement everything myself, but lately have begun using libraries much more. I think there are several very important advantages of using a library, beyond just the issue of whether you have to write a routine yourself or not. If you use a library, you get
Code that has been tested by hundreds/thousands/m... | https://api.stackexchange.com |
There are two quicksort partition methods mentioned in Cormen:
(the argument A is the array, and [p, r] is the range, inclusive, to perform the partition on. The returned value is the index to the pivot after the partition.)
Hoare-Partition(A, p, r)
x = A[p]
i = p - 1
j = r + 1
while true
repeat
j = j - 1
... | Pedagogical Dimension
Due to its simplicity Lomuto's partitioning method might be easier to implement. There is a nice anecdote in Jon Bentley's Programming Pearl on Sorting:
“Most discussions of Quicksort use a partitioning scheme based on two approaching indices [...] [i.e. Hoare's]. Although the basic idea of that ... | https://api.stackexchange.com |
VHDL and Verilog are some of the HDLs used today.
What are the advantages and disadvantages of using Verilog or VHDL over the other? | I can't tell you which to learn, but here's some contrasting points (from a very VHDL-centric user, but I've tried to be as fair as possible!), which may help you make a choice based on your own preferences in terms of development style:
And keep in mind the famous quote which goes along the lines of "I prefer whicheve... | https://api.stackexchange.com |
I am strongly convinced of the value of using tests that verify a complete program (e.g. convergence tests), including an automated set of regression tests. After reading some programming books, I've gotten the nagging feeling that I "ought to" write unit tests (i.e., tests that verify the correctness of a single func... | For many years I was under the misapprehension that I didn't have enough time to write unit tests for my code. When I did write tests, they were bloated, heavy things which only encouraged me to think that I should only ever write unit tests when I knew they were needed.
Then I started to use Test Driven Development an... | https://api.stackexchange.com |
How do I know when to use lead, flux-core, lead-free, or any other kind of solder out there? Do you have any tips on solder gauge for specific applications? | A great question, and since a textbook could probably be written to answer it, there's probably not going to be any single answer. I want to provide a general answer tailored to hobbyists, and hope that people more knowledgeable can come in and tie up specifics.
Summary
Solder is basically metal wire with a "low" melt... | https://api.stackexchange.com |
To try to test whether an algorithm for some problem is correct, the usual starting point is to try running the algorithm by hand on a number of simple test cases -- try it on a few example problem instances, including a few simple "corner cases". This is a great heuristic: it's a great way to quickly weed out many in... | A common error I think is to use greedy algorithms, which is not always the correct approach, but might work in most test cases.
Example: Coin denominations, $d_1,\dots,d_k$ and a number $n$,
express $n$ as a sum of $d_i$:s with as few coins as possible.
A naive approach is to use the largest possible coin first,
and ... | https://api.stackexchange.com |
So we all know that the continued fraction containing all $1$s...
$$
x = 1 + \frac{1}{1 + \frac{1}{1 + \ldots}}.
$$
yields the golden ratio $x = \phi$, which can easily be proven by rewriting it as $x = 1 + \dfrac{1}{x}$, solving the resulting quadratic equation and assuming that a continued fraction that only contains... | You're attempting to take a limit.
$$x_{n+1} = 1-\frac{1}{x_n}$$
This recurrence actually never converges, from any real starting point.
Indeed, $$x_2 = 1-\frac{1}{x_1}; \\ x_3 = 1-\frac{1}{1-1/x_1} = 1-\frac{x_1}{x_1-1} = \frac{1}{1-x_1}; \\ x_4 = x_1$$
So the sequence is periodic with period 3.
Therefore it converges... | https://api.stackexchange.com |
I was wondering why dogs shouldn't eat chocolate. Can't dogs just excrete the indigestible component in their droppings?
It's common knowledge that dogs shouldn't eat chocolate. What I don't know is why chocolate would kill them, from a specifically biological perspective. | The reason is simple: Chocolate contains cocoa which contains Theobromine. The darker the chocolate is (meaning the more cocoa it contains) the more theobromine it contains. This is a bitter alkaloid which is toxic to dogs (and also cats), but can be tolerated by humans.
The reason for this is the much slower metaboliz... | https://api.stackexchange.com |
I am new to chemistry and I find it fascinating. I am trying to learn about chemical reactions and I was wondering if there was an easy way to quickly tell if any combination of chemical substances would produce a reaction and what product(s) if any might be formed.
For example, if I pick any two random substances $\c... | Can I predict the products of any chemical reaction?
In theory, yes!
Every substance has characteristic reactivity behavior. Likewise pairs and sets of substances have characteristic behavior. For example, the following combinations of substances only have one likely outcome each:
$$
\ce{HCl + NaOH -> NaCl + H2O} \\[2e... | https://api.stackexchange.com |
As the title says really, why do ethernet sockets need to be mag-coupled? I have a basic understanding of electronics, but mostly, I can't figure out the right search terms to google this properly. | The correct answer is because the ethernet specification requires it.
Although you didn't ask, others may wonder why this method of connection was chosen for that type of ethernet. Keep in mind that this applies only to the point-to-point ethernet varieties, like 10base-T and 100base-T, not to the original ethernet or... | https://api.stackexchange.com |
During convolution on a signal, why do we need to flip the impulse response during the process? | Adapted from an answer to a different question (as mentioned in a comment) in the hope that this question will not get thrown up repeatedly by Community Wiki as one of the Top Questions....
There is no "flipping" of the impulse response by a linear
(time-invariant) system.
The output of a linear time-invariant system ... | https://api.stackexchange.com |
It's pretty clear from a survey of the top500 that the industry is trending towards an exponential increase in processing cores. The largest supercomputers all use MPI for communication between nodes, though there does not appear to be a clear trend for on-node parallelism, with the simplest (but not necessarily the m... | Historical Perspective
It is really impossible to say what the new paradigms will be like in the future, for example a good historical perspective I suggest reading Ken Kennedy's Rise and Fall of HPF. Kennedy gives an account of two emerging patterns, MPI versus a smart compiler, and details how MPI had the right amou... | https://api.stackexchange.com |
Recently, I read in the journal Nature that Stephen Hawking wrote a paper claiming that black holes do not exist. How is this possible? Please explain it to me because I didn't understand what he said.
References:
Article in Nature News: Stephen Hawking: 'There are no black holes' (Zeeya Merali, January 24, 2014).
S.... | This is really a footnote to the accepted answer.
Light cannot escape from an event horizon. But how can you check that light can never escape? You can watch the surface for some time $T$, but all you have proved is that light can't escape in the time $T$. This is what we mean by an apparent horizon, i.e. it is a surfa... | https://api.stackexchange.com |
Gradient tree boosting as proposed by Friedman uses decision trees as base learners. I'm wondering if we should make the base decision tree as complex as possible (fully grown) or simpler? Is there any explanation for the choice?
Random Forest is another ensemble method using decision trees as base learners.
Based on ... | $\text{error = bias + variance}$
Boosting is based on weak learners (high bias, low variance). In
terms of decision trees, weak learners are shallow trees, sometimes
even as small as decision stumps (trees with two leaves). Boosting
reduces error mainly by reducing bias (and also to some extent variance,
by aggregati... | https://api.stackexchange.com |
Deterministic models. Clarification of the question:
The problem with these blogs is that people are inclined to start yelling at each other. (I admit, I got infected and it's difficult not to raise one's electronic voice.) I want to ask my question without an entourage of polemics.
My recent papers were greeted with s... | I can tell you why I don't believe in it. I think my reasons are different from most physicists' reasons, however.
Regular quantum mechanics implies the existence of quantum computation. If you believe in the difficulty of factoring (and a number of other classical problems), then a deterministic underpinning for quant... | https://api.stackexchange.com |
A famous exercise which one encounters while doing Complex Analysis (Residue theory) is to prove that the given integral:
$$\int\limits_0^\infty \frac{\sin x} x \,\mathrm dx = \frac \pi 2$$
Well, can anyone prove this without using Residue theory? I actually thought of using the series representation of $\sin x$:
$$\... | I believe this can also be solved using double integrals.
It is possible (if I remember correctly) to justify switching the order of integration to give the equality:
$$\int_{0}^{\infty} \Bigg(\int_{0}^{\infty} e^{-xy} \sin x \,dy \Bigg)\, dx = \int_{0}^{\infty} \Bigg(\int_{0}^{\infty} e^{-xy} \sin x \,dx \Bigg)\,dy$$
... | https://api.stackexchange.com |
What's the similarities and differences between these 3 methods:
Bagging,
Boosting,
Stacking?
Which is the best one? And why?
Can you give me an example for each? | All three are so-called "meta-algorithms": approaches to combine several machine learning techniques into one predictive model in order to decrease the variance (bagging), bias (boosting) or improving the predictive force (stacking alias ensemble).
Every algorithm consists of two steps:
Producing a distribution of sim... | https://api.stackexchange.com |
What differences or other criteria can be used to help decide between using overlap-add and overlap-save for filtering? Both overlap-add and overlap-save are described as algorithms for doing FFT based fast convolution of data streams with FIR filter kernels. What are the latency, computational efficiency or caching ... | Essentially, OS is slightly more efficient since it does not require the addition of the overlapping transients. However, you may want to use OA if you need to reuse the FFTs with zero-padding rather than repeated samples.
Here is a quick overview from an article I wrote a while ago
Fast convolution refers to the blo... | https://api.stackexchange.com |
In my last question I asked why we don't see increased complexity in artificial life simulations of evolution. It seems I had fallen for a common misconception, that evolution was about improvement by increasing complexity. One comment discussing that post read
"... he [David Deutsch] is falling for one of the biggest... | I think possibly the problem here is the way you're approaching the issue.
You're considering improvement as anything that increases the abilities or complexity of the organism—that isn't necessarily what an improvement is though. The outcome of natural selection is that the organism best equipped to survive/reproduce ... | https://api.stackexchange.com |
LIGO has announced the detection of gravitational waves on 11 Feb, 2016. I was wondering why the detection of gravitational waves was so significant?
I know it is another confirmation of general relativity (GR), but I thought we had already confirmed GR beyond much doubt. What extra stuff would finding gravitational w... | Gravitational waves are qualitatively different from other detections.
As much as we have tested GR before, it's still reassuring to find a completely different test that works just as well. The most notable tests so far have been the shifting of Mercury's orbit, the correct deflection of light by massive objects, and ... | https://api.stackexchange.com |
I was told in my organic chemistry course that $\text{S}_\text{N}1$ and $\text{S}_\text{N}2$ reactions did not occur at $\text{sp}^2$ centres. When I asked why, I was not given a satisfactory explanation. For $\text{S}_\text{N}2$ it was suggested that the reaction could not proceed with inversion of configuration, as t... | Sometimes, especially in introductory courses the instructor will try to keep things "focused" in order to promote learning. Still, it's unfortunate that the instructor couldn't respond in a more positive and stimulating way to your question.
These reactions do occur at $\ce{sp^2}$ hybridized carbon atoms, they are o... | https://api.stackexchange.com |
There are a lot of poorly drawn schematics here. A few times people have actually asked for critiques of their schematics. This question is intended as a single repository on schematic drawing rules and guidelines can point people to. The question is
What are the rules and guidelines for drawing good schematics?
Note:... | A schematic is a visual representation of a circuit. As such, its
purpose is to communicate a circuit to someone else. A schematic in a
special computer program for that purpose is also a machine-readable
description of the circuit. This use is easy to judge in absolute terms.
Either the proper formal rules for descr... | https://api.stackexchange.com |
How is it that you read a mathematics book?
Do you keep a notebook of definitions? What about theorems?
Do you do all the exercises? Focus on or ignore the proofs?
I have been reading Munkres, Artin, Halmos, etc. but I get a bit lost usually around the middle. Also, about how fast should you be reading it? Any advice i... | This method has worked well for me (but what works well for one person won't necessarily work well for everyone). I take it in several passes:
Read 0: Don't read the book, read the Wikipedia article or ask a friend what the subject is about. Learn about the big questions asked in the subject, and the basics of the th... | https://api.stackexchange.com |
I'm learning how to apply the VSEPR theory to Lewis structures and in my homework, I'm being asked to provide the hybridization of the central atom in each Lewis structure I've drawn.
I've drawn out the Lewis structure for all the required compounds and figured out the arrangements of the electron regions, and figured ... | If you can assign the total electron geometry (geometry of all electron domains, not just bonding domains) on the central atom using VSEPR, then you can always automatically assign hybridization. Hybridization was invented to make quantum mechanical bonding theories work better with known empirical geometries. If you k... | https://api.stackexchange.com |
I know that generative means "based on $P(x,y)$" and discriminative means "based on $P(y|x)$," but I'm confused on several points:
Wikipedia (+ many other hits on the web) classify things like SVMs and decision trees as being discriminative. But these don't even have probabilistic interpretations. What does discrimina... | The fundamental difference between discriminative models and generative models is:
Discriminative models learn the (hard or soft) boundary between classes
Generative models model the distribution of individual classes
To answer your direct questions:
SVMs (Support Vector Machines) and DTs (Decision Trees) are discri... | https://api.stackexchange.com |
I recently began experimenting with gnuplot and I quickly made an interesting discovery. I plotted all of the prime numbers beneath 1 million in polar coordinates such that for every prime $p$, $(r,\theta) = (p,p)$. I was not expecting anything in particular, I was simply trying it out. The results are fascinating.
Whe... | What we're seeing is arithmetic progressions (not prime-producing polynomials) of primes, combined with a classical phenomenon about rational approximations.
When the integers (or any subset of them) are represented by the polar points $(n,n)$, of course integers that are close to a multiple of $2\pi$ apart from each o... | https://api.stackexchange.com |
I recently read a post from R-Bloggers, that linked to this blog post from John Myles White about a new language called Julia. Julia takes advantage of a just-in-time compiler that gives it wicked fast run times and puts it on the same order of magnitude of speed as C/C++ (the same order, not equally fast). Furthermore... | I think the key will be whether or not libraries start being developed for Julia. It's all well and good to see toy examples (even if they are complicated toys) showing that Julia blows R out of the water at tasks R is bad at.
But poorly done loops and hand coded algorithms are not why many of the people I know who use... | https://api.stackexchange.com |
The accepted range for the wavelengths of light that the human eye can detect is roughly between 400nm and 700nm. Is it a co-incidence that these wavelengths are identical to those in the Photosynthetically Active Radiation (PAR) range (the wavelength of light used for normal photosynthesis)?
Alternatively is there s... | Good question.
If you look at the spectral energy distribution in the accepted answer here, we see that photons with wavelengths less than ~300 nm are absorbed by species such as ozone. Much beyond 750 infrared radiation is largely absorbed by species such as water and carbon dioxide. Therefore the vast majority of so... | https://api.stackexchange.com |
I found this math "problem" on the internet, and I'm wondering if it has an answer:
Question: If you choose an answer to this question at random, what is the probability that you will be correct?
a. $25\%$
b. $50\%$
c. $0\%$
d. $25\%$
Does this question have a correct answer? | No, it is not meaningful. 25% is correct iff 50% is correct, and 50% is correct iff 25% is correct, so it can be neither of those two (because if both are correct, the only correct answer could be 75% which is not even an option). But it cannot be 0% either, because then the correct answer would be 25%. So none of the ... | https://api.stackexchange.com |
I need to numerically evaluate the integral below:
$$\int_0^\infty \mathrm{sinc}'(xr) r \sqrt{E(r)} dr$$
where $E(r) = r^4 (\lambda\sqrt{\kappa^2+r^2})^{-\nu-5/2} K_{-\nu-5/2}(\lambda\sqrt{\kappa^2+r^2})$, $x \in \mathbb{R}_+$ and $\lambda, \kappa, \nu >0$. Here $K$ is the modified Bessel function of the second kind. I... | I've written my own integrator, quadcc, which copes substantially better than the Matlab integrators with singularities, and provides a more reliable error estimate.
To use it for your problem, I did the following:
>> lambda = 0.00313; kappa = 0.00825; nu = 0.33;
>> x = 10;
>> E = @(r) r.^4.*(lambda*sqrt(kappa^2 + r.^2... | https://api.stackexchange.com |
According to some chemistry textbooks, the maximum number of valence electrons for an atom is 8, but the reason for this is not explained.
So, can an atom have more than 8 valence electrons?
If this is not possible, why can't an atom have more than 8 valence electrons? | 2017-10-27 Update
[NOTE: My earlier notation-focused answer, unchanged, is below this update.]
Yes. While having an octet of valence electrons creates an exceptionally deep energy minimum for most atoms, it is only a minimum, not a fundamental requirement. If there are sufficiently strong compensating energy factors, e... | https://api.stackexchange.com |
My friend's 3-year-old daughter asked "Why are there circles there?"
It had either rained the night before or frost had thawed. What explains the circles?
Follow-up question: Ideally, are these really circles or some kind of superellipse? | Both thawing and evaporation involve heat exchange between the stone tile, the water sitting atop the stone tile, any water that's been absorbed by the stone tile, and the air around. The basic reason that the center and the edges of the tile evaporate differently is that the gaps between the tiles change the way that ... | https://api.stackexchange.com |
Paper is an extremely flexible material, at least when it is in sheet form. It will deform significantly according to the pressure applied and it is easy to fold.
Therefore, it's extremely counterintuitive that a sheet of paper could cut through human skin and probably through stiffer/harder materials, since when the ... | Paper, especially when freshly cut, might appear to have smooth edges, but in reality, its edges are serrated (i.e. having a jagged edge), making it more like a saw than a smooth blade. This enables the paper to tear through the skin fairly easily. The jagged edges greatly reduce contact area, and causes the pressure ... | https://api.stackexchange.com |
I have this problem from University Physics with Modern Physics (13th Edition):
The inside of an oven is at a temperature of 200 °C (392 °F). You can put your hand in the oven without injury as long as you don't touch anything. But since the air inside the oven is also at 200 °C, why isn't your hand burned just the sa... | There are two points relevant for the discussion: air itself carries a very small amount of thermal energy and it is a very poor thermal conductor.
For the first point, I think it is interesting to consider the product $\text{density} \times \text{specific heat}$, that is the amount of energy per unit volume that can b... | https://api.stackexchange.com |
As I have heard people did not trust Euler when he first discovered the formula (solution of the Basel problem)
$$\zeta(2)=\sum_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}$$
However, Euler was Euler and he gave other proofs.
I believe many of you know some nice proofs of this, can you please share it with us? | OK, here's my favorite. I thought of this after reading a proof from the book "Proofs from the book" by Aigner & Ziegler, but later I found more or less the same proof as mine in a paper published a few years earlier by Josef Hofbauer. On Robin's list, the proof most similar to this is number 9
(EDIT: ...which is actua... | https://api.stackexchange.com |
Why is the Lagrangian a function of the position and velocity (possibly also of time) and why are dependences on higher order derivatives (acceleration, jerk,...) excluded?
Is there a good reason for this or is it simply "because it works". | I reproduce a blog post I wrote some time ago:
We tend to not use higher derivative theories. It turns out that there
is a very good reason for this, but that reason is rarely discussed in
textbooks. We will take, for concreteness, $L(q,\dot q, \ddot
q)$, a Lagrangian which depends on the 2nd derivative in an
essent... | https://api.stackexchange.com |
What are the key differences between VCF versions 4.1 and 4.2?
It looks like v4.3 contains a changelog (specs available here) but earlier specifications do not.
This biostar post points out one difference: the introduction of Number=R for fields with one value per allele including REF — can anyone enumerate the other... | This is easy to check, you can download both specs in .tex format and do diff.
Changes to the v4.2 compared to v4.1:
Information field format: adding source and version as recommended fields.
INFO field can have one value for each possible allele (code R).
For all of the ##INFO, ##FORMAT, ##FILTER, and ##ALT metainfor... | https://api.stackexchange.com |
What is your best guess how Google Image Search works? I can upload a photo and can search for similar images. What algorithm does it use to identify similar images? | I don't know which algorithm Google uses. But, since you wanted a best guess, let me give some ideas on how a similar system could be constructed.
The whole field dealing with search-image-base-by-image is called Content Based Image Retrieval (CBIR). The idea is somehow to construct an image representation (not necessa... | https://api.stackexchange.com |
USB specifies 4 pins:
1. VBUS +5V
2. D- Data-
3. D+ Data+
4. GND Ground
Why is this not 3? Could the Data and Power not share a common ground? Am I correct in understanding that D- is the ground for D+? | No, D- is not ground. Data is sent over a differential line, which means that D- is a mirror image of D+, so both Data lines carry the signal. The receiver subtracts D- from D+. If some noise signal would be picked up by both wires, the subtraction will cancel it.
So differential signalling helps suppressing noise. ... | https://api.stackexchange.com |
Everyone knows computing speed has drastically increased since their invention, and it looks set to continue. But one thing is puzzling me: if you ran an electrical current through a material today, it would travel at the same speed as if you did it with the same material 50 years ago.
With that in mind, how is it comp... | if you ran an electrical current through a material today, it would travel at the same speed as if you did it with the same material 50 years ago.
With that in mind, how is it computers have become faster? What main area of processor design is it that has given these incredible speed increases?
You get erroneous concl... | https://api.stackexchange.com |
I've studied convex optimization pretty carefully, but don't feel that I have yet "grokked" the dual problem. Here are some questions I would like to understand more deeply/clearly/simply:
How would somebody think of the dual problem? What thought process would lead someone to consider the dual problem and to recogn... | Here's what's really going on with the dual problem. (This is my attempt to answer my own question, over a year after originally asking it.)
(A very nice presentation of this material is given in Ekeland and Temam. These ideas are also in Rockafellar.)
Let $V$ be a finite dimensional normed vector space over $\mathbb... | https://api.stackexchange.com |
There was some discussion on this question
What are some reasons to connect capacitors in series?
What are some reasons to connect capacitors in series?
which I don't see as being conclusively resolved:
"turns out that what might LOOK like two ordinary electrolytics are not, in fact, two ordinary electrolytics."
"N... | Summary:
Yes "polarised" aluminum "wet electrolytic" capacitors can legitimately be connected "back-to-back" (ie in series with opposing polarities) to form a non-polar capacitor.
C1 + C2 are always equal in capacitance and voltage rating
Ceffective = = C1/2 = C2/2
Veffective = vrating of C1 & C2.
See "Mechanism" a... | https://api.stackexchange.com |
This is a general question that was asked indirectly multiple times in here, but it lacks a single authoritative answer. It would be great to have a detailed answer to this for the reference.
Accuracy, the proportion of correct classifications among all classifications, is very simple and very "intuitive" measure, yet ... | Most of the other answers focus on the example of unbalanced classes. Yes, this is important. However, I argue that accuracy is problematic even with balanced classes.
Frank Harrell has written about this on his blog: Classification vs. Prediction and Damage Caused by Classification Accuracy and Other Discontinuous Imp... | https://api.stackexchange.com |
In machine learning, people talk about objective function, cost function, loss function. Are they just different names of the same thing? When to use them? If they are not always refer to the same thing, what are the differences? | These are not very strict terms and they are highly related. However:
Loss function is usually a function defined on a data point, prediction and label, and measures the penalty. For example:
Square loss: $l(f(x_i|\theta),y_i) = \left (f(x_i|\theta)-y_i \right )^2$, used in linear regression
Hinge loss: $l(f(x_i|\the... | https://api.stackexchange.com |
I am new to signal processing and especially to FFT, hence I am not sure if I am doing the correct thing here and I am a bit confused with the result.
I have a discrete real function (measurement data) and want to set up a low pass filter on that. The tool of choice is Python with the numpy package. I follow this proce... | The fact that the result is complex is to be expected. I want to point out a couple things:
You are applying a brick-wall frequency-domain filter to the data, attempting to zero out all FFT outputs that correspond to a frequency greater than 0.005 Hz, then inverse-transforming to get a time-domain signal again. In orde... | https://api.stackexchange.com |
Every once in a while, my eighth-inch audio jack will slip loose and I'll seemingly lose only the voice part of a track -- leaving somewhat of a "karaoke" version. What I would guess about how audio plugs work suggests that I'd be making this up; however, I've asked and others tell me they've experienced this as well.
... | When the plug starts to slip out of the jack, very often it's the ground contact (sleeve) that breaks its connection first, leaving the two "hot" leads (left and right, tip and ring) still connected.
With the ground open like this, both earpieces still get a signal, but now it's the "difference" signal between the left... | https://api.stackexchange.com |
I was soldering a very thin wire today, and when I had one end firmly soldered, I accidentally bumped the wire diagonally with my tweezers. What I'd expect to happen is that the wire oscillates for a little while in one axis, then stops. However, what actually occurred is quite different and much more interesting! I re... | Your wire is not quite round (almost no wire is), and consequently it has a different vibration frequency along its principal axes1.
You are exciting a mixture of the two modes of oscillation by displacing the wire along an axis that is not aligned with either of the principal axes. The subsequent motion, when analyzed... | https://api.stackexchange.com |
Mini USB connectors were standardized as part of USB 2.0 in 2000. In 2007, the USB Implemeters Forum standardized Micro USB connectors, deprecating Mini USB connectors four months later.
Why? What are the advantages of Micro USB over Mini USB that made USB-IF rip out an existing standard and replace it with another one... | Added mid 2022:
A lightly edited version of a comment by @LittleWhole
In 2022 the world is moving towards the far more robust and convenient USB-C connector. While there are still issues with USB-C (including even mechanical incompatibilities), things are slowly being addressed (i.e. USB4 standard on the protocol side)... | https://api.stackexchange.com |
I was drinking a glass of milk the other day and that got me thinking that no other animal to my knowledge drinks milk past their infant stages. One could argue that cats might but it isn't good for them to do.
Are humans the only animal that are able to drink milk as adults and not have it cause issues?
Of course, I k... | Good observation!
Gene coding for the lactase
Gene LCT
Mammals have a gene (called LCT C/T-13910) coding for the lactase enzyme, a protein able to digest lactose. Lactose is a disaccharide sugar found in milk.
Expression of LCT
In mammals, the gene LCT is normally expressed (see gene expression) only early in developme... | https://api.stackexchange.com |
Why do some assemblers like SOAPdenovo2 or Velvet require an odd-length k-mer size for the construction of de Bruijn graph, while some other assemblers like ABySS are fine with even-length k-mers? | From the manual of Velvet:
it must be an odd number, to avoid palindromes. If you put in an even
number, Velvet will just decrement it and proceed.
the palindromes in biology are defined as reverse complementary sequences. The problem of palindromes is explained in this review:
Palindromes induce paths that fold b... | https://api.stackexchange.com |
Background: We're increasingly needing some way of storing lots of variant data associated with lots of subjects: think clinical trials and hospital patients, looking for disease-causing or relevant genes. A thousand subjects is where we'd start, there's talk of millions on the horizon. With various genomic medicine in... | An epic question. Unfortunately, the short answer is: no, there are no widely used solutions.
For several thousand samples, BCF2, the binary representation of VCF, should work well. I don't see the need of new tools at this scale. For a larger sample size, ExAC people are using spark-based hail. It keeps all per-sample... | https://api.stackexchange.com |
Protein life times are, on average, not particularly long, on a human life timescale.
I was wondering, how old is the oldest protein in a human body? Just to clarify, I mean in terms of seconds/minutes/days passed from the moment that given protein was translated. I am not sure is the same thing as asking which human p... | Crystallin proteins are found in the eye lens (where their main job is probably to define the refractive index of the medium); they are commonly considered to be non-regenerated. So, your crystallins are as old as you are!
Because of this absence of regeneration, the accumulate damage over time, including proteolysis,... | https://api.stackexchange.com |
I understand that covalent bonding is an equilibrium state between attractive and repulsive forces, but which one of the fundamental forces actually causes atoms to attract each other?
Also, am I right to think that "repulsion occurs when atoms are too close together" comes from electrostatic interaction? | I understand that covalent bonding is an equilibrium state between attractive and repulsive forces, but which one of the fundamental forces actually causes atoms to attract each other?
The role of Pauli Exclusion in bonding
It is an unfortunate accident of history that because chemistry has a very convenient and predi... | https://api.stackexchange.com |
I am new to computer science and I was wondering whether half precision is supported by modern architecture in the same way as single or double precision is. I thought the 2008 revision of IEEE-754 standard introduced both quadruple and half precisions. | Intel support for IEEE float16 storage format
Intel supports IEEE half as a storage type in processors since Ivy Bridge (2013). Storage type means you can get a memory/cache capacity/bandwidth advantage but the compute is done with single precision after converting to and from the IEEE half precision format.
Inte... | https://api.stackexchange.com |
I have an integer linear program (ILP) with some variables $x_i$ that are intended to represent boolean values. The $x_i$'s are constrained to be integers and to hold either 0 or 1 ($0 \le x_i \le 1$).
I want to express boolean operations on these 0/1-valued variables, using linear constraints. How can I do this?
Mor... | Logical AND: Use the linear constraints $y_1 \ge x_1 + x_2 - 1$, $y_1 \le x_1$, $y_1 \le x_2$, $0 \le y_1 \le 1$, where $y_1$ is constrained to be an integer. This enforces the desired relationship. See also
Logical OR: Use the linear constraints $y_2 \le x_1 + x_2$, $y_2 \ge x_1$, $y_2 \ge x_2$, $0 \le y_2 \le 1$, ... | https://api.stackexchange.com |
I am able to write a basic sine wave generator for audio, but I want it to be able to smoothly transition from one frequency to another. If I just stop generating one frequency and immediately switch to another there will be a discontinuity in the signal and a "click" will be heard.
My question is, what is a good algor... | One approach that I have used in the past is to maintain a phase accumulator which is used as an index into a waveform lookup table. A phase delta value is added to the accumulator at each sample interval:
phase_index += phase_delta
To change frequency you change the phase delta that is added to the phase accumulator ... | https://api.stackexchange.com |
So this is supposed to be really simple, and it's taken from the following picture:
Text-only:
It took Marie $10$ minutes to saw a board into $2$ pieces. If she works just as fast, how long will it take for her to saw another board into
$3$ pieces?
I don't understand what's wrong with this question. I think the s... | Haha! The student probably has a more reasonable interpretation of the question.
Of course, cutting one thing into two pieces requires only one cut! Cutting something into three pieces requires two cuts!
------------------------------- 0 cuts/1 piece/0 minutes
---------------|--------------- 1 cut/2 pieces/10 m... | https://api.stackexchange.com |
I'm sure many people will respond with links to 'let me google that for you', so I want to say that I've tried to figure this out so please forgive my lack of understanding here, but I cannot figure out how the practical implementation of a neural network actually works.
I understand the input layer and how to normali... | Three sentence version:
Each layer can apply any function you want to the previous layer (usually a linear transformation followed by a squashing nonlinearity).
The hidden layers' job is to transform the inputs into something that the output layer can use.
The output layer transforms the hidden layer activations into... | https://api.stackexchange.com |
The Fast Fourier Transform takes $\mathcal O(N \log N)$ operations, while the Fast Wavelet Transform takes $\mathcal O(N)$. But what, specifically, does the FWT compute?
Although they are often compared, it seems like the FFT and FWT are apples and oranges. As I understand it, it would be more appropriate to compare t... | You are correct that the FWT is better thought of as a "cousin" of the STFT, rather than the FT. In fact, the FWT is just a discrete sampling of the CWT (continuous wavelet transform), as the FFT/DFT is a discrete sampling of the Fourier transform. This may seem like a subtle point, but it is relevant when choosing h... | https://api.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.