question
stringlengths
6
13.7k
text
stringlengths
1
25.8k
source
stringclasses
3 values
It seems that a well-designed SMPS has a capacitor connecting the ground planes of the primary and secondary sides of the transformer, such as the C13 capacitor here. What is the purpose of this capacitor? I've let myself understand that it's for EMI suppression, but what kind of EMI does it suppress, and how? It seems...
Switched mode power supplies use what is known as a "flyback converter" to provide voltage conversion and galvanic isolation. A core component of this converter is a high frequency transformer. Practical transformers have some stray capacitance between primary and secondary windings. This capacitance interacts with the...
https://api.stackexchange.com
Move a match slowly and nothing happens but if you shake it violently the fire will extinguish. Oxygen makes fire grow so why does waving a flame through the oxygen-rich air put the fire out? Does this primarily have to do with a decrease in the temperature of the burning materials or is it something else? Also what ab...
Combustion of small materials, such as a match or birthday candle, actually involves the release of volatile vapours, which themselves burn. It is not the solid material that burns. There needs to be a minimum amount of volatile material present in this combustion zone (just above the burning match) for the ignition to...
https://api.stackexchange.com
People often say that LR(k) parsers are more powerful than LL(k) parsers. These statements are vague most of the time; in particular, should we compare the classes for a fixed $k$ or the union over all $k$? So how is the situation really? In particular, I am interested in how LL(*) fits in. As far as I know, the respec...
There are numerous containments known. Let $\subseteq$ denote containment and $\subset$ proper containment. Let $\times$ denote incomparability. Let $LL = \bigcup_k LL(k)$, $LR = \bigcup_k LR(k)$. Grammar level For LL $LL(0) \subset LL(1) \subset LL(2) \subset LL(2) \subset \cdots \subset LL(k) \subset \cdots \subset ...
https://api.stackexchange.com
In this YouTube video from Cody's Lab, Cody claims that heavy water tastes sweet. He does some fairly convincing comparisons but still expresses a little doubt that the effect is real. Has this been studied by others? Is the effect verified and if so, what possible explanations exist?
According to H.C. Urey and G. Failla, Science 15 Mar 1935, Vol. 81, Issue 2098, pp. 273, there's no difference in the taste of ordinary and heavy water.
https://api.stackexchange.com
When designing a digital filter based on an analog filter we usually use the bilinear transform. To approximate a discrete transfer function $D_a(z)$ from analog (continuous) transfer function $A(s)$ we substitute $$z = \frac{1+sT/2}{1-sT/2}$$ where $T$ is the sampling period. Alternatively, to approximate an continuo...
Analog filters are stable if the poles are in the left half of the s-plane (figure on the left) and digital filters are stable if the poles are inside the unit circle (figure on the right). So mathematically all that is needed to convert from analog to digital is a mapping (conformal?) from the half-space to the unit d...
https://api.stackexchange.com
I have browsed several ASIC manufacturer's webs, but I haven't found an actual number. I assume there would be a fixed cost associated with creating masks and such and then there will be a cost per unit. Note: that I don't actually want to have an ASIC made, I'm just curious.
I looked into ASIC's a while ago and here's what I found: Everybody has different definitions for the word "ASIC". There are (very roughly) three categories: FPGA Conversions, "normal" ASIC, and "full custom". As expected, these are in order of increasing price and increasing performance. Before describing what thes...
https://api.stackexchange.com
Welch's method has been my go-to algorithm for computing power spectral density (PSD) of evenly-sampled timeseries. I noticed that there are many other methods for computing PSD. For example, in Matlab I see: PSD using Burg method PSD using covariance method PSD using periodogram PSD using modified covariance method...
I have no familiarity with the Multitaper method. That said, you've asked quite a question. In pursuit of my MSEE degree, I took an entire course that covered PSD estimation. The course covered all of what you listed (with exception to the Multitaper method), and also subspace methods. Even this only covers some of the...
https://api.stackexchange.com
First, sorry if I am missing something basic - I am a programmer recently turned bioinformatician so I still don't know a lot of stuff. This is a cross post with a Biostars question hope that's not bad form. While it is obvious that scRNA-seq data contain lots of zeroes, I couldn't find any detailed explanation of why...
It may be necessary to distinguish between methods that use unique molecular identifiers (UMIs), such as 10X's Chromium, Drop-seq, etc, and non-UMI methods, such as SMRT-seq. At least for UMI-based methods, the alternative perspective, that there is no significant zero-inflation in scRNA-seq, is also advocated in the ...
https://api.stackexchange.com
The Vapnik–Chervonenkis (VC)-dimension formula for neural networks ranges from $O(E)$ to $O(E^2)$, with $O(E^2V^2)$ in the worst case, where $E$ is the number of edges and $V$ is the number of nodes. The number of training samples needed to have a strong guarantee of generalization is linear with the VC-dimension. This...
"If the map and the terrain disagree, trust the terrain." It's not really understood why deep learning works as well as it does, but certainly old concepts from learning theory such as VC dimensions appear not to be very helpful. The matter is hotly debated, see e.g.: H. W. Lin, M. Tegmark, D. Rolnick, Why does deep a...
https://api.stackexchange.com
Some people say that it's awful that humans eat animals. They feel that it's barbaric, because you're killing life and then on top of that, you're eating it, and that you should eat vegetation instead. But isn't vegetation life too? Personally, I see no difference between animals and veg as all life has cells, dna et...
The answer to your question is yes it is certainly possible. At one time it was thought that there was something special about "organic" chemicals which meant that they could not be artificially synthesised out of fundamental elements. In 1828 Frederick Wöhler synthesised urea (CO(NH2)2) which is often taken as the fi...
https://api.stackexchange.com
I believe I have a reasonable grasp of complexities like $\mathcal{O}(1)$, $\Theta(n)$ and $\Theta(n^2)$. In terms of a list, $\mathcal{O}(1)$ is a constant lookup, so it's just getting the head of the list. $\Theta(n)$ is where I'd walk the entire list once, and $\Theta(n^2)$ is walking the list once for each element ...
The $\Theta(\log n)$ complexity is usually connected with subdivision. When using lists as an example, imagine a list whose elements are sorted. You can search in this list in $\mathcal{O}(\log n)$ time - you do not actually need to look at each element because of the sorted nature of the list. If you look at the elem...
https://api.stackexchange.com
Many plants (e.g. roses, palms) can be protected from frost during the winter if shielded with an appropriate coat that can be bought in garden shops. Do plants produce any heat that can be kept inside with these "clothes"?
Cellular respiration in plants is slightly different than in other eukaryotes because the electron transport chain contains an additional enzyme called Alternative Oxidase (AOX). AOX takes some electrons out of the pathway prematurely - basically the energy is used to generate heat instead of ATP. The exact purpose of...
https://api.stackexchange.com
Is it possible to kill yourself by holding your breath? This question is obviously copied from Quora, but I had heard it as a fact that we cannot kill ourselves by holding our breath and I'm looking for a referenced answer.
Short answer Healthy people cannot hold their breaths until unconsciousness sets in, let alone commit suicide. Background According to Parkes (2005), a normal person cannot even hold their breath to unconsciousness, let alone death. Parkes says: Breath‐holding is a voluntary act, but normal subjects appear unable to...
https://api.stackexchange.com
I have several challenging non-convex global optimization problems to solve. Currently I use MATLAB's Optimization Toolbox (specifically, fmincon() with algorithm='sqp'), which is quite effective. However, most of my code is in Python, and I'd love to do the optimization in Python as well. Is there a NLP solver with...
I work in a lab that does global optimization of mixed-integer and non-convex problems. My experience with open source optimization solvers has been that the better ones are typically written in a compiled language, and they fare poorly compared to commercial optimization packages. If you can formulate your problem as ...
https://api.stackexchange.com
I was learning about voltaic cells and came across salt bridges. If the purpose of the salt bridge is only to move electrons from an electrolyte solution to the other, then why can I not use a wire? Also, will using $\ce{NaCl}$ instead of $\ce{KNO3}$ in making the salt bridge have any effects on voltage/current output ...
There's another question related to salt bridges on this site. The purpose of a salt bridge is not to move electrons from the electrolyte, rather it's to maintain charge balance because the electrons are moving from one-half cell to the other. The electrons flow from the anode to the cathode. The oxidation reaction t...
https://api.stackexchange.com
I am reading a data mining book and it mentioned the Kappa statistic as a means for evaluating the prediction performance of classifiers. However, I just can't understand this. I also checked Wikipedia but it didn't help too: How does Cohen's kappa help in evaluating the prediction performance of classifiers? What do...
Introduction The Kappa statistic (or value) is a metric that compares an Observed Accuracy with an Expected Accuracy (random chance). The kappa statistic is used not only to evaluate a single classifier, but also to evaluate classifiers amongst themselves. In addition, it takes into account random chance (agreement wit...
https://api.stackexchange.com
Given a recording I need to detect whether any clipping has occurred. Can I safely conclude there was clipping if any (one) sample reaches the maximum sample value, or should I look for a series of subsequent samples at the maximum level? The recording may be taken from 16 or 24-bit A/D converters, and are converted ...
I was in the middle of typing an answer pretty much exactly like Yoda's. He's is probably the most reliable but, I'll proposed a different solution so you have some options. If you take a histogram of your signal, you will more than likely a bell or triangle like shape depending on the signal type. Clean signals will...
https://api.stackexchange.com
What are some good books for learning general relativity?
I can only recommend textbooks because that's what I've used, but here are some suggestions: Gravity: An Introduction To General Relativity by James Hartle is reasonably good as an introduction, although in order to make the content accessible, he does skip over a lot of mathematical detail. For your purposes, you mig...
https://api.stackexchange.com
What is more acidic: $\ce{D3O+}$ in $\ce{D2O}$ or $\ce{H3O+}$ in $\ce{H2O}$ and why? I think it's $\ce{D3O+}$ in $\ce{D2O}$ as I saw somewhere that this property is used in mechanistic studies (the inverse isotope effect), but I need a proper explanation. EDIT: I found a statement about this in Clayden: Water $\ce{H...
For the reasons explained in New point of view on the meaning and on the values of $K_\mathrm{a}(\ce{H3O+, H2O})$ and $K_\mathrm{b}(\ce{H2O, OH-})$ pairs in water Analyst, February 1998, Vol. 123 (409–410), the $\mathrm{p}K_\mathrm{a}$ of $\ce{H3O+}$ in $\ce{H2O}$ and the $\mathrm{p}K_\mathrm{a}$ of $\ce{D3O+, D2O}$ ar...
https://api.stackexchange.com
Can someone point me to a paper, or show here, why symmetric matrices have orthogonal eigenvectors? In particular, I'd like to see proof that for a symmetric matrix $A$ there exists decomposition $A = Q\Lambda Q^{-1} = Q\Lambda Q^{T}$ where $\Lambda$ is diagonal.
For any real matrix $A$ and any vectors $\mathbf{x}$ and $\mathbf{y}$, we have $$\langle A\mathbf{x},\mathbf{y}\rangle = \langle\mathbf{x},A^T\mathbf{y}\rangle.$$ Now assume that $A$ is symmetric, and $\mathbf{x}$ and $\mathbf{y}$ are eigenvectors of $A$ corresponding to distinct eigenvalues $\lambda$ and $\mu$. Then $...
https://api.stackexchange.com
I recently used bootstrapping to estimate confidence intervals for a project. Someone who doesn't know much about statistics recently asked me to explain why bootstrapping works, i.e., why is it that resampling the same sample over and over gives good results. I realized that although I'd spent a lot of time understand...
fwiw the medium length version I usually give goes like this: You want to ask a question of a population but you can't. So you take a sample and ask the question of it instead. Now, how confident you should be that the sample answer is close to the population answer obviously depends on the structure of population. ...
https://api.stackexchange.com
I'm confused about the difference between genome and DNA. Is it correct to say that the same type of bacteria has the same DNA? But my understanding is that it is not correct to say that the same type of human has the same DNA, since every human has a different DNA. What am I missing here?
All humans have some differences in their DNA, but there's far more that is shared. On average the difference between humans is only about one thousandth of their full DNA, which means we're about 99.9% the same. These differences aren't distributed fully randomly, but are often because of specific gene alternatives. (...
https://api.stackexchange.com
This is based on a question from betsy.s.collins on BioStars. The original post can be found here. Does anyone have any suggestions for other tags or filtering steps on BWA-generated BAM files that can be used so reads only map to one location? One example application would be to find seeds for the TULIP assembler/sca...
Update - as of January 2021, samtools can now do filtering based on an expression that includes tag variables. In this case, this expression can be used to exclude any reads that have either an XA or SA tag: samtools view -b mapped.bam -e '!([XA] | [SA])' > unique_mapped.bam For more details on the samtools expression...
https://api.stackexchange.com
I have been working on the topic of camera pose estimation for augmented reality and visual tracking applications for a while and I think that although there is a lot of detailed information on the task, there are still a lot of confussions and missunderstandings. I think next questions deserve a detailed step by step...
It is important to understand that the only problem here is to obtain the extrinsic parameters. Camera intrinsics can be measured off-line and there are lots of applications for that purpose. What are camera intrinsics? Camera intrinsic parameters is usually called the camera calibration matrix, $K$. We can write $$K =...
https://api.stackexchange.com
I have been fascinated by the Collatz problem since I first heard about it in high school. Take any natural number $n$. If $n$ is even, divide it by $2$ to get $n / 2$, if $n$ is odd multiply it by $3$ and add $1$ to obtain $3n + 1$. Repeat the process indefinitely. The conjecture is that no matter what number you sta...
Most of the answers so far have been along the general lines of 'Why hard problems are important', rather than 'Why the Collatz conjecture is important'; I will try to address the latter. I think the basic question being touched on is: In what ways does the prime factorization of $a$ affect the prime factorization of ...
https://api.stackexchange.com
My teacher didn't answer this properly: Is toothpaste solid or liquid? You can't say toothpaste is a solid because solid material have a fixed shape but toothpaste doesn't. However, you can't say it's a liquid because liquids flow easily but toothpaste needs a certain force to push it out of the tube. So is it a sol...
Toothpaste is what is called a non-newtonian fluid, more specifically toothpaste is a Bingham plastic. This means that the viscosity of the fluid is linearly dependent on the shear stress, but with an offset called the yield stress (see figure below). This yield stress is what makes it hard to say whether it is liquid...
https://api.stackexchange.com
Assume the following first order IIR Filter: $$ y[n] = \alpha x[n] + (1 - \alpha) y[n - 1] $$ How can I choose the parameter $ \alpha $ s.t. the IIR approximates as good as possible the FIR which is the arithmetic mean of the last $ k $ samples: $$ z[n] = \frac{1}{k}x[n] + \frac{1}{k}x[n-1] + \ldots + \frac{1}{k}x[n-k+...
OK, let's try to derive the best: $$ \begin{array}{lcl} y[n] &=& \alpha x[n] + (1 - \alpha) y[n - 1] \\ &=& \alpha x[n] + (1 - \alpha) \alpha x[n-1] + (1 - \alpha)^2 y[n - 2]\\ &=& \alpha x[n] + (1 - \alpha) \alpha x[n-1] + (1 - \alpha)^2 \alpha x[n-2] + (1 - \alpha)^3 y[n - 3]\\ \end{array} $$ so that the coefficien...
https://api.stackexchange.com
I'm looking at the melting temperature of metallic elements, and notice that the metals with high melting temperature are all grouped in some lower-left corner of the $\mathrm{d}$-block. If I take for example the periodic table with physical state indicated at $\pu{2165 K}$: I see that (apart from boron and carbon) th...
Some factors were hinted, but let me put them in an order of importance and mention some more: metals generally have a high melting point, because metallic interatomic bonding by delocalized electrons ($\ce{Li}$ having only a few electrons for this "electron sea") between core atoms is pretty effective in those pure e...
https://api.stackexchange.com
I understand the formal differences between them, what I want to know is when it is more relevant to use one vs. the other. Do they always provide complementary insight about the performance of a given classification/detection system? When is it reasonable to provide them both, say, in a paper? instead of just one? ...
The key difference is that ROC curves will be the same no matter what the baseline probability is, but PR curves may be more useful in practice for needle-in-haystack type problems or problems where the "positive" class is more interesting than the negative class. To show this, first let's start with a very nice way to...
https://api.stackexchange.com
I was reading about the p-block elements and found that the inert pair effect is mentioned everywhere in this topic. However, the book does not explain it very well. So, what is the inert pair effect? Please give a full explanation (and an example would be great!).
The inert pair effect describes the preference of late p-block elements (elements of the 3rd to 6th main group, starting from the 4th period but getting really important for elements from the 6th period onward) to form ions whose oxidation state is 2 less than the group valency. So much for the phenomenological part. B...
https://api.stackexchange.com
It seems that nitrous oxide $(\ce{N2O})$ is frequently used to create whipped cream. But why can't just regular nitrogen gas $(\ce{N2})$ be used instead?
There are two ways to efficiently make an aerosol product: Use a gas that liquifies under the pressure inside the can. For example, butane lighters. Nitrogen is one of the "fixed gases", meaning it's a gas under most conditions (but take a look at the temperatures and pressures needed for liquid nitrogen—it's not goin...
https://api.stackexchange.com
Recently, I am learning the production of soluble and insoluble salts. My friend and I have done this experiment at the school lab. We wanted to taste them to see whether they are salty are not. The teacher luckily stopped us from doing that. So without tasting them, I would really like to know whether all salts are s...
No. There are sweet, bitter, and various other salts. (Likely, there are tasteless salts too). Pure salty taste is as far as I know exclusive for table salt, though I wouldn't bet on it. Lead and Beryllium salts are said to be sweet, though toxic. Epsom salt, $\ce{MgSO4}$, is bitter. $\ce{CuSO4}$ has an incomprehensibl...
https://api.stackexchange.com
With all the technology available today with being able to boost voltage efficiently using SMPS, why do we still use 9V batteries? Is there some secret advantage with them that I am unaware of? If you look at the size as well, the 9V is just big and bulky and I have designed projects where I can use 2xAA batteries and...
A 400mAh 9V battery will last a year with a 40µA current draw. Now consider a smoke detector. It is low power analog circuitry, most likely drawing less than the 40µA figure above. If you wanted to power it from a boost converter and AAs, then you'd need a converter with very low idle current. But... when there is fire...
https://api.stackexchange.com
I had heard that tape is still the best medium for storing large amounts of data. So I figured I can store a relatively large amount of data on a cassette tape. I was thinking of a little project to read/write digital data on a cassette tape from my computer sound card just for the retro feeling. (And perhaps read/writ...
I had heard that tape is still the best medium for storing large amounts of data. well, "best" is always a reduction to a single set of optimization parameters (e.g. cost per bit, durability, ...) and isn't ever "universally true". I can see, for example, that "large" is already a relative term, and for a small office...
https://api.stackexchange.com
We all suffer from common cold, and that, frequently. Why have we not developed immunity against it till now? By immunity I mean immunity as a species.
Long lasting immunity is obtained by means of the adaptive immune system, and mainly involves the development of antibodies that identify specific parts (epitopes) of the pathogen's proteins. Common cold is typically caused by a type of virus called rhinovirus. Viruses have very high mutation rates, which alter the seq...
https://api.stackexchange.com
I've read several websites about equipment covered with gold foil and astronaut helmet visors are coated with gold. However, their explanations are devoid of almost all physics content. Can someone explain the basic concept of why gold foil is so popular with NASA as a coating on visors?
In space, the sun transfers heat via radiation to equipment and astronauts. Although the sun’s peak emission is in the visible region (about 500 nm), you can see that there is also a fair amount of IR (infrared) and UV (ultraviolet) emitted as well at the top of the atmosphere. To control the surface temperature of an...
https://api.stackexchange.com
The main principle behind a vaccine is to take a deactivated virus, "show" it to the immune system so it can "learn" how it looks like, so if and when the real virus does attack us, our immune system is already prepared for it. Vaccines have been developed using this idea even in the 1880's. If that's the case, why doe...
Roni Saiba's answer does a good job of explaining what goes into current vaccine development and why it takes so much effort, but I want to directly address the question of why we can't just grow some virus, kill it with UV and have a protective vaccine. The answer is that not all immune responses to viral antigens are...
https://api.stackexchange.com
The common understanding is that, setting air resistance aside, all objects dropped to Earth fall at the same rate. This is often demonstrated through the thought experiment of cutting a large object in half—the halves clearly don't fall more slowly just from having been sliced into two pieces. However, I believe the a...
Using your definition of "falling," heavier objects do fall faster, and here's one way to justify it: consider the situation in the frame of reference of the center of mass of the two-body system (CM of the Earth and whatever you're dropping on it, for example). Each object exerts a force on the other of $$F = \frac{G ...
https://api.stackexchange.com
I have done a lot of research and found out methods like adaptive thresholding , watershed etc that can be used of detecting veins in leaves . However thresholding isn't good as it introduces a lot of noise All my images are gray image please could anyone suggest what approaches to adopt while considering this problem...
You're not looking for edges (=borders between extended areas of high and low gray value), you're looking for ridges (thin lines darker or brighter than their neighborhood), so edge filters might not be ideal: An edge filter will give you two flanks (one on each side of the line) and a low response in the middle of the...
https://api.stackexchange.com
Assume that we are playing a game of Russian roulette (6 chambers) and that there is no shuffling after the shot is fired. I was wondering if you have an advantage in going first? If so, how big of an advantage? I was just debating this with friends, and I wouldn't know what probability to use to prove it. I'm thinking...
For a $2$ Player Game, it's obvious that player one will play, and $\frac16$ chance of losing. Player $2$, has a $\frac16$ chance of winning on turn one, so there is a $\frac56$ chance he will have to take his turn. (I've intentionally left fractions without reducing them as it's clearer where the numbers came from) P...
https://api.stackexchange.com
How would you describe in plain English the characteristics that distinguish Bayesian from Frequentist reasoning?
Here is how I would explain the basic difference to my grandma: I have misplaced my phone somewhere in the home. I can use the phone locator on the base of the instrument to locate the phone and when I press the phone locator the phone starts beeping. Problem: Which area of my home should I search? Frequentist Reasonin...
https://api.stackexchange.com
I've learned about a number of edge detection algorithms, including algorithms like Sobel, Laplacian, and Canny methods. It seems to me the most popular edge detector is a Canny edge detector, but is there cases where this isn't the optimal algorithm to use? How can I decide which algorithm to use? Thanks!
There are lots of edge detection possibilities, but the 3 examples you mention happen to fall in 3 distinct categories. Sobel This approximates a first order derivative. Gives extrema at the gradient positions, 0 where no gradient is present. In 1D, it is = $\left[ \begin{array}{ccc} -1 & 0 & 1 \end{array} \right]$ sm...
https://api.stackexchange.com
I'd like to mix two or more PCM audio channels (eg recorded samples) digitally in an acoustically-faithful manner, preferably in near-real-time (meaning little or no peek-ahead). The physically "correct" way to do this is summing the samples. However when you add two arbitrary samples, the resulting value could be up t...
The physically "correct" way to do this is summing the samples. However when you add two arbitrary samples, the resulting value could be up to twice the maximum value. ... The naive solution here is to divide by N, where N is the number of channels being mixed. That's not the "naive" solution, its the only solution. ...
https://api.stackexchange.com
I am at an international conference (ICIAM2019) about numerical methods and am surprised by the prevalence of applications directly relatable to arms research. examples: One award winner holds his talk about the mathematical problem of radar reconstruction/detection of moving objects, within his talk he describes the ...
TL;DR: It is certainly possible to build a career in applied math and computational sciences without directly contributing to arms research. It is hardly possible to build a career in any research without indirectly contributing to arms research. One can easily avoid direct contributions to military topics by choosi...
https://api.stackexchange.com
I have trouble distinguishing between these two concepts. This is my understanding so far. A stationary process is a stochastic process whose statistical properties do not change with time. For a strict-sense stationary process, this means that its joint probability distribution is constant; for a wide-sense stationary...
A random process is a collection of random variables, one for each time instant under consideration. Typically this may be continuous time ($-\infty < t < \infty$) or discrete time (all integers $n$, or all time instants $nT$ where $T$ is the sample interval). Stationarity refers to the distributions of the random va...
https://api.stackexchange.com
I was reading this article on researching bacteria resistance to silver by removing some of their genes. Researchers then used "colony-scoring" software to measure the differences in growth and size of each plate's bacterial colony. E. coli strains with genes deleted involved in producing sensitivity, or toxicity, to ...
You are absolutely right, flushing down the toilet (or the sink) or simply throwing them into the normal waste doesn't work for biosafety reasons. And it is also not allowed, depending on the country you would do this in, this can lead to hefty fines. Biologically contaminated lab waste can be inactivated (=all potenti...
https://api.stackexchange.com
Many of us have experienced the failure of nitrile gloves when exposed to chloroform. What's going on at a mechanistic level when this occurs? I would guess that the chloroform dissolves some of the polymer into its constituent monomers, but I've never heard anything more definite than that. Is it a similar mechanism ...
Nitrile gloves are made of nitrile rubber, or poly(butadiene/acrylonitrile). This polymer is highly soluble in chloroform, with some papers I found indicating that one can dissolve up to 18% in mass of nitrile butadiene rubber in chloroform. Moreover, it permeates easily through NBR, meaning we can expect the dissoluti...
https://api.stackexchange.com
It is well known (the simplest textbook example) that a diamond has a well-defined arrangement of sp3 carbon atoms, as each atom is connected to four others in a tetrahedral structure. But what about the last carbon atoms at the edge? For each of these, three bonds are missing; it has a single bond with one carbon ato...
Atoms at the edge of a crystal that have an unsatisfied valence are said to have "dangling bonds." Many elements, in addition to carbon, can have dangling bonds. Dangling bonds is a subject of current interest because of the impact these structures can have on semiconductor properties. These dangling bonds are very s...
https://api.stackexchange.com
I awoke with the following puzzle that I would like to investigate, but the answer may require some programming (it may not either). I have asked on the meta site and believe the question to be suitable and hopefully interesting for the community. I will try to explain the puzzle as best I can then detail the question...
Just for visual amusement, here are more pictures. In all cases, initial point is a large red dot. Primes up to $10^5$: Primes up to $10^6$: Primes up to $10^6$ starting gaps of length $>6$: Primes up to $10^7$ starting gaps of length $>10$: Primes up to $10^8$ starting gaps of length $>60$: For anyone interested,...
https://api.stackexchange.com
Developers of software have the choice to choose an appropriate license in accordance with the goal(s) of the work. Can anyone give some recommendations/experiences on which license to pick for software? What are the pros/cons of "giving away" all the coded work as open source codes? How to deal with industrial players...
Can anyone give some recommendations/experiences on which license to pick for software? Which license you chose will depend on how free you want your code to be, but free means different things to different people. For proponents of permissive licenses, free means allowing people now to use the software however they ...
https://api.stackexchange.com
As the title says. It is common sense that sharp things cut, but how do they work at the atomical level?
For organic matter, such as bread and human skin, cutting is a straightforward process because cells/tissues/proteins/etc can be broken apart with relatively little energy. This is because organic matter is much more flexible and the molecules bind through weak intermolecular interactions such as hydrogen bonding and ...
https://api.stackexchange.com
I've been looking into the math behind converting from any base to any base. This is more about confirming my results than anything. I found what seems to be my answer on mathforum.org but I'm still not sure if I have it right. I have the converting from a larger base to a smaller base down okay because it is simply t...
This seems a very basic question to me, so excuse me if I lecture you a bit. The most important point for you to learn here is that a number is not its digit representation. A number is an abstract mathematical object, whereas its digit representation is a concrete thing, namely a sequence of symbols on a paper (or a s...
https://api.stackexchange.com
When searching graphs, there are two easy algorithms: breadth-first and depth-first (Usually done by adding all adjactent graph nodes to a queue (breadth-first) or stack (depth-first)). Now, are there any advantages of one over another? The ones I could think of: If you expect your data to be pretty far down inside th...
I'd like to quote an answer from Stack Overflow by hstoerr which covers the problem nicely: That heavily depends on the structure of the search tree and the number and location of solutions. If you know a solution is not far from the root of the tree, a breadth first search (BFS) might be better. If the tree is ver...
https://api.stackexchange.com
The Feynman lectures are universally admired, it seems, but also a half-century old. Taking them as a source for self-study, what compensation for their age, if any, should today's reader undertake? I'm interested both in pointers to particular topics where the physics itself is out-of-date, or topics where the pedago...
The Feynman Lectures need only a little amending, but it's a relatively small amount compared to any other textbook. The great advantage of the Feynman Lectures is that everything is worked out from scratch Feynman's way, so that it is taught with the maximum insight, something that you can only do after you sit down a...
https://api.stackexchange.com
As of 2024, according to , Voyager 1 is around one light·day away from Earth and still in radio contact. When Voyager 1 sends messages to Earth, roughly how many photons are (1) transmitted and (2) received per bit?
For an exact calculation we need to address a few choices: (you can change them, the answer will not be tremendously affected) What is the receiver? Let's assume a 70 m dish, like this one [CDSCC] in the Deep Space Network. [Voyager 1] can transmit at $2.3 {\rm GHz}$ or $8.4 {\rm GHz}$. Let's assume $8.4 {\rm GHz}$, f...
https://api.stackexchange.com
This is a question from /u/apivan19 on reddit. The original post can be found here. I have some proteomics data that was given to me with the UniProt gene identifiers in column 1. I've been trying to convert these to normal gene symbols using various programs, but it is proving to be difficult. The Uniprot website does...
I tend to use Ensembl Biomart for such queries since there are APIs for various programming languages, e.g. biomaRt, and, maybe more interestingly, via a REST API (although it’s a pretty terrible one). To translate identifiers from different databases, proceed as follows: Choose database “Ensembl genes” Choose dataset...
https://api.stackexchange.com
My father explained to me how rockets work and he told me that Newton's Third Law of motion worked here. I asked him why it works and he didn't answer. I have wasted over a week thinking about this problem and now I am giving up. Can anyone explain why Newton's Third Law works? For reference, Newton's third law: To ev...
Why do you want to know? I'm not kidding. That's actually an important question. The answer really depends on what you intend to do with the information you are given. Newton's laws are an empirical model. Newton ran a bunch of studies on how things moved, and found a small set of rules which could be used to predic...
https://api.stackexchange.com
Is the butterfly effect real? It is a well-known statement that a butterfly, by flapping her wings in a slightly different way, can cause a hurricane somewhere else in the world that wouldn't occur if the butterfly had moved her wings in a slightly different way. Now, this can be interpreted as a figure of speech, but ...
Does the flap of a butterfly's wing in Brazil set off a tornado in Texas? This was the whimsical question Edward Lorenz posed in his 1972 address to the 139th meeting of the American Association for the Advancement of Science. Some mistakenly think the answer to that question is "yes." (Otherwise, why would he have po...
https://api.stackexchange.com
From what I can tell and what thus far all people with whom I discussed this subject confirmed is that time appears to "accelerate" as we age. Digging a little, most explanations I found basically reduced this to two reasons: As we age physically, a time frame of constant length becomes ever smaller in contrast to the...
This is not really a biological answer, but a psychological one: One important fact to consider is that the perception of time is essentially a recollection of past experience, rather than perception of the present. Researchers who study autobiographical memory have suggested that part of this effect may be explained b...
https://api.stackexchange.com
I discovered this site which claims that "$7$ is the only prime followed by a cube". I find this statement rather surprising. Is this true? Where might I find a proof that shows this? In my searching, I found this question, which is similar but the answers seem focused on squares next to cubes. Any ideas?
This is certainly true. Suppose $n^3 - 1$ is prime, for some $n$. We get that $n^3-1 = (n-1)(n^2 + n + 1)$ and so we have that $n-1$ divides $n^3 - 1$. If $n-1>1$ then we're done, as we have a contradiction to $n^3 - 1$ being prime.
https://api.stackexchange.com
A quick google around and all I seem to be able to find are people talking about the physics & the chemistry of the capacitors but not how this affects choosing which to use. Avoiding talking about the difference in their make-up, and the larger capacities found in electrolytic caps, what are the main thoughts that dri...
1. Capacitors There are a lot of misconceptions about capacitors, so I wanted to briefly clarify what capacitance is and what capacitors do. Capacitance measures how much energy will be stored in the electric field generated between two different points for a given difference of potential. This is why capacitance is o...
https://api.stackexchange.com
Having recently graduated from my PhD program in statistics, I had for the last couple of months began searching for work in the field of statistics. Almost every company I considered had a job posting with a job title of "Data Scientist". In fact, it felt like long gone were the days of seeing job titles of Statistica...
People define Data Science differently, but I think that the common part is: practical knowledge how to deal with data, practical programming skills. Contrary to its name, it's rarely "science". That is, in data science the emphasis is on practical results (like in engineering), not proofs, mathematical purity or rig...
https://api.stackexchange.com
I've heard it suggested that "solid tantalum" capacitors are dangerous and may cause fire, may fail short circuit and are fatally sensitive to even very short over voltage spikes. Are tantalum capacitors reliable? Are they safe for use in general circuits and new designs?
Summary: "When used properly" tantalum capacitors are highly reliable. They have the advantage of high capacitance per volume and good decoupling characteristics due to relatively low internal resistance and low inductance compared to traditional alternatives such as aluminum wet electrolytic capacitors. The 'catch' is...
https://api.stackexchange.com
Today in chemistry class we were discussing Organic Chemistry. We discussed what organic compounds basically are and then I asked the teacher whether $\ce{CO_2}$ is organic or not. She told that it is as it contains carbon and oxygen with a covalent bond. I told her it can't be as it is not found in animals (naturally)...
It is entirely arbitrary whether you call it an organic compound or not, though most would not. The distinction you make that organic compounds should be found in living things is not a useful criterion. Moreover you are wrong that carbon dioxide isn't: it is both made and used by living things. Animals make it when t...
https://api.stackexchange.com
Typically mobile devices that have a mains-powered supply will accept voltage that is multiple of some single battery voltage. For example, 4.5 volts is 1.5 volts (AA primary battery) 3 times and 36 volts is 3.6 volts (Li-Ion battery) 10 times. Now there're laptops that use external power supplies rated at exactly 19 v...
Now there're laptops that use external power supplies rated at exactly 19 volts. That isn't a multiple of anything suitable. Puzzles me a lot. This is not a design question as posed, but it has relevance to design of battery charging systems. Summary: The voltage is slightly more than a multiple of the fully charge...
https://api.stackexchange.com
I don't want to deal with virtualenv for a local Python installation, I just want to install a few packages locally without dealing with the PYTHONPATH environment variable, how do I do that?
Python (as of 2.6 and 3.0) now searches in the ~/.local directory for local installs, which do not require administrative privileges to install, so you just need to point your installer to that directory. If you have already downloaded the package foo and would like to install it manually, type: cd path/to/foo python s...
https://api.stackexchange.com
I'm sorry if this question goes against the meta for posting questions - I attached all the "beware, this is a soft-question" tags I could. This is a question I've been asking myself now for some time. In most areas, there's a "cut off age" to be good at something. For example, you're not going to make the NHL if you s...
Karl Weierstrass was in his 40's when he got his PHD. There are a dozen other counterexamples, a number fairly recent. A good set of examples can be found in the thread on MO here.This myth of "science is a game for the young" is one of the falsest and most destructive canards in modern society. Don't listen to it. You...
https://api.stackexchange.com
I have a pipeline for generating a BigWig file from a BAM file: BAM -> BedGraph -> BigWig Which uses bedtools genomecov for the BAM -> BedGraph part and bedGraphToBigWig for the BedGraph -> BigWig part. The use of bedGraphToBigWig to create the BigWig file requires a BedGraph file to reside on disk in uncompressed for...
This can be done in R very easily from an indexed .bam file. Given single-end file for sample1. library(GenomicAlignments) library(rtracklayer) ## read in BAM file (use readGAlignmentPairs for paired-end files) gr <- readGAlignments('sample1.bam') ## convert to coverages gr.cov <- coverage(gr) ## export as bigWig ex...
https://api.stackexchange.com
At the voltage levels of typical overhead transmission lines in the US, a bird can land on one and be just fine (as long as it doesn't do something like spread its wings and touch a tree or something else at lower electric potential). However, what about a hypothetical powerline at much higher voltage (as in tens of me...
Assuming the bird still is at earth potential when entering in contact with the wire (say, it jumped right on it from the pole). There are lots of unknowns in this problem but let's try to fill some gaps with data we kind of know in humans. So until an EE stackexchanger who is an ornithologist shows up with interesting...
https://api.stackexchange.com
The Human Genome Project was the project of 'determining the sequence of nucleotide base pairs that make up human DNA, and of identifying and mapping all of the genes of the human genome'. It was declared complete in 2003, i.e. 99% of the euchromatic human genome completed with 99.99% accuracy. Are the datasets provide...
The HGP developed the first "reference" human genome - a genome that other genomes could be compared to, and was actually a composite of multiple human genome sequences. The standard human reference genome is actually continually updated with major and minor revisions, a bit like software. The latest major version is ...
https://api.stackexchange.com
It seems kind of anti-productive in terms of survival for a plant to produce an addictive chemical as that plant will constantly be sought after by animals that ingest it. In this instance, I'm looking for a possible general & inclusive answer here that would describe most plants that make this. Not a specific instance...
It's a matter of perspective. Most of the chemicals that are addictive to us humans (particularly alkaloids), and may be addictive for some other animals as well, are also insecticides. Lots of plants that we consider poisonous are good food for other species, and lots of plants that insects would consider poisonous ar...
https://api.stackexchange.com
Could someone provide me with a good explanation of why $0^0=1$? My train of thought: $$x>0\\ 0^x=0^{x-0}=\frac{0^x}{0^0}$$ so $$0^0=\frac{0^x}{0^x}=\,?$$ Possible answers: $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=\frac{0^x}{0^x}=\frac00$, which is undefined PS. I've read the explanation on mathforum.org, but it isn'...
In general, there is no good answer as to what $0^0$ "should" be, so it is usually left undefined. Basically, if you consider $x^y$ as a function of two variables, then there is no limit as $(x,y)\to(0,0)$ (with $x\geq 0$): if you approach along the line $y=0$, then you get $\lim\limits_{x\to 0^+} x^0 = \lim\limits_{x\...
https://api.stackexchange.com
It is well known that quantum mechanics and (general) relativity do not fit well. I am wondering whether it is possible to make a list of contradictions or problems between them? E.g. relativity theory uses a space-time continuum, while quantum theory uses discrete states. I am not merely looking for a solution or rebu...
There are zero contradictions between quantum mechanics and special relativity; quantum field theory is the framework that unifies them. General relativity also works perfectly well as a low-energy effective quantum field theory. For questions like the low-energy scattering of photons and gravitons, for instance, the S...
https://api.stackexchange.com
This question is about why we have a universal speed limit (the speed of light in vacuum). Is there a more fundamental law that tells us why this is? I'm not asking why the speed limit is equal to $c$ and not something else, but why there is a limit at all. EDIT: Answers like "if it was not.." and answers explaining th...
Imagine a person who prefers to measure the amount of money in his bank account with the value $V$. The equation is $V = C\tanh N$, where $N$ is the actual amount of money in dollars. This person will also be confused: Why is there a limit ($C$) on the amount of money that I can have? Is there any law that says the va...
https://api.stackexchange.com
You are given an array of $2n$ elements $$a_1, a_2, \dots, a_n, b_1, b_2, \dots b_n$$ The task is to interleave the array, using an in-place algorithm such that the resulting array looks like $$b_1, a_1, b_2, a_2, \dots , b_n, a_n$$ If the in-place requirement wasn't there, we could easily create a new array and copy ...
Here is the answer which elaborates upon the algorithm from the paper linked by Joe: First let us consider a $\Theta(n \log n)$ algorithm which uses divide and conquer. 1) Divide and Conquer We are given $$a_1, a_2, \dots , b_1, b_2, \dots b_n$$ Now to use divide and conquer, for some $m = \Theta(n)$, we try to get t...
https://api.stackexchange.com
Having two different size of sets of points (2D for simplicity) dispersed within two different size squares the question are that: 1- how to find any occurrence of the the small one through the large one? 2- Any idea on how to rank the occurrences as shown on the following figure? Here is a simple demonstration of th...
From a computer vision perspective: the basic problem is estimating a homography between your target point set and a subset of points in the large set. In your case, with rotation only, it will be an affine homography. You should look into the RANSAC method. It is designed to find a match in a set with many outliers. ...
https://api.stackexchange.com
I was wondering what the difference between the variance and the standard deviation is. If you calculate the two values, it is clear that you get the standard deviation out of the variance, but what does that mean in terms of the distribution you are observing? Furthermore, why do you really need a standard deviation?
The standard deviation is the square root of the variance. The standard deviation is expressed in the same units as the mean is, whereas the variance is expressed in squared units, but for looking at a distribution, you can use either just so long as you are clear about what you are using. For example, a Normal distrib...
https://api.stackexchange.com
Here is a funny exercise $$\sin(x - y) \sin(x + y) = (\sin x - \sin y)(\sin x + \sin y).$$ (If you prove it don't publish it here please). Do you have similar examples?
$$\int_0^1\frac{\mathrm{d}x}{x^x}=\sum_{k=1}^\infty \frac1{k^k}$$
https://api.stackexchange.com
Could somebody explain the difference between dependent types and refinement types? As I understand it, a refinement type contains all values of a type fulfilling a predicate. Is there a feature of dependent types which distinguishes them? If it helps, I came across Refined types via the Liquid Haskell project, and de...
The main differences are along two dimensions -- in the underlying theory, and in how they can be used. Lets just focus on the latter. As a user, the "logic" of specifications in LiquidHaskell and refinement type systems generally, is restricted to decidable fragments so that verification (and inference) is completely ...
https://api.stackexchange.com
What exactly is meant by "stochastic sampling" and is it profoundly different from the regular Nyquist-Shannon sampling theorem? Is it related to sampling a stochastic process?
Stochastic sampling doesn't have anything to do with sampling stochastic waveforms. It simply means that instead of sampling at regular intervals, the waveform is sampled randomly. Recall that in a sampling scheme per the Nyquist-Shannon sampling theorem, a continuous signal $x(t)$ on $\mathbb{R}$ is sampled as $x[n]=x...
https://api.stackexchange.com
I begin this post with a plea: please don't be too harsh with this post for being off topic or vague. It's a question about something I find myself doing as a mathematician, and wonder whether others do it as well. It is a soft question about recreational mathematics - in reality, I'm shooting for more of a conversatio...
Yes, definitely. For example, I found that $$ m\int_0^{\infty} y^{\alpha} e^{-y}(1-e^{-y})^{m-1} \, dy = \Gamma(\alpha+1) \sum_{k \geq 1} (-1)^{k-1} \binom{m}{k} \frac{1}{k^{\alpha}} $$ (and related results for particular values of $\alpha$) while mucking about with some integrals. Months later, I was reading a paper a...
https://api.stackexchange.com
At work we were discussing this as my boss has never heard of normalization. In Linear Algebra, Normalization seems to refer to the dividing of a vector by its length. And in statistics, Standardization seems to refer to the subtraction of a mean then dividing by its SD. But they seem interchangeable with other possibi...
Normalization rescales the values into a range of [0,1]. This might be useful in some cases where all parameters need to have the same positive scale. However, the outliers from the data set are lost. $$ X_{changed} = \frac{X - X_{min}}{X_{max}-X_{min}} $$ Standardization rescales data to have a mean ($\mu$) of 0 and...
https://api.stackexchange.com
If you have a variable which perfectly separates zeroes and ones in target variable, R will yield the following "perfect or quasi perfect separation" warning message: Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred We still get the model but the coefficient estimates are inflated. How do y...
You've several options: Remove some of the bias. (a) By penalizing the likelihood as per @Nick's suggestion. Package logistf in R or the FIRTH option in SAS's PROC LOGISTIC implement the method proposed in Firth (1993), "Bias reduction of maximum likelihood estimates", Biometrika, 80,1.; which removes the first-order ...
https://api.stackexchange.com
In languages like C, the programmer is expected to insert calls to free. Why doesn't the compiler do this automatically? Humans do it in a reasonable amount of time(ignoring bugs), so it is not impossible. EDIT: For future reference, here is another discussion that has an interesting example.
Because it's undecidable whether the program will use the memory again. This means that no algorithm can correctly determine when to call free() in all cases, which means that any compiler that tried to do this would necessarily produce some programs with memory leaks and/or some programs that continued to use memory t...
https://api.stackexchange.com
The bit that makes sense – tidal forces My physics teacher explained that most tidal effect is caused by the Moon rotating around the Earth, and some also by the Sun. They said that in the Earth - Moon system, the bodies are in free-fall about each other. But that points on the surface of Earth, not being at Earth's ce...
There is no tidal bulge. This was one of Newton's few mistakes. Newton did get the tidal forcing function correct, but the response to that forcing in the oceans: completely wrong. Newton's equilibrium theory of the tides with its two tidal bulges is falsified by observation. If this hypothesis was correct, high tide w...
https://api.stackexchange.com
Say I have some historical data e.g., past stock prices, airline ticket price fluctuations, past financial data of the company... Now someone (or some formula) comes along and says "let's take/use the log of the distribution" and here's where I go WHY? Questions: WHY should one take the log of the distribution in the ...
Log-scale informs on relative changes (multiplicative), while linear-scale informs on absolute changes (additive). When do you use each? When you care about relative changes, use the log-scale; when you care about absolute changes, use linear-scale. This is true for distributions, but also for any quantity or changes i...
https://api.stackexchange.com
I was surprised to learn that worker ants in some species live many years. I would have expected a lifespan of a few weeks or months (which is apparently the case for many species). What factors might account for the length (and/or variation) in ants' lifespans? (ie, is there some evolutionary preference? Some fundam...
There will always be a tradeoff in terms of resource allocation between reproduction and self maintenance. Since worker ants forego reproduction to perform other roles (gathering resources, caring for young etc.) within the colony, it makes sense that this would favour a longer lifespan. This idea works for most animal...
https://api.stackexchange.com
I have a high-level understanding of the $P=NP$ problem and I understand that if it were absolutely "proven" to be true with a provided solution, it would open the door for solving numerous problems within the realm of computer science. My question is, if someone were to publish a indisputable, constructive proof of $P...
We won't necessarily see any effects. Suppose that somebody finds an algorithm that solves 3SAT on $n$ variables in $2^{100} n$ basic operations. You won't be able to run this algorithm on any instance, since it takes too long. Or suppose that she finds an algorithm running in $n^{100}$ basic operations. We will only b...
https://api.stackexchange.com
Why is the recipe for Coca-Cola still a secret? I think that given the current state of technology, it should be proficient enough to find any of the secret ingredients in Coca Cola. Any thoughts? Can we make a 100% identical clone of Coca-Cola next week?
There are different angles this question can be answered: Chemical point of view: A full analysis of a totally unknown mixture is painful and extremely costly. It is always helpful to know how many components you are looking for; what types etc. In this case, it is not enough to analyse the elemental composition or som...
https://api.stackexchange.com
I'm looking at a genome sequence for 2019-nCoV on NCBI. The FASTA sequence looks like this: >MN988713.1 Wuhan seafood market pneumonia virus isolate 2019-nCoV/USA-IL1/2020, complete genome ATTAAAGGTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAA CGAACTTTAAAATCTGTGTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTAT...
That is the correct sequence for 2019-nCov. Coronavirus is of course an RNA virus and in fact, to my knowledge, every RNA virus in Genbank is present as cDNA (AGCT, i.e. thydmine) and not RNA (AGCU, i.e. uracil). The reason is simple, we never sequence directly from RNA because RNA is too unstable and easily degraded b...
https://api.stackexchange.com
I want to focus on transcriptome analysis. We know it's possible to analyze RNA-Seq experiment based on alignment or k-mers. Possible alignment workflow: Align sequence reads with TopHat2 Quantify the gene expression with Cufflinks Possible reference-free workflow: Quantify sequence reads with Kallisto reference-fre...
First of all, I would emphasize that "alignment-free" quantification tools like Salmon and Kallisto are not reference-free. The basic difference between them and more traditional aligners is that they do not report a specific position (either in a genome or transcriptome) to which a read maps. However, their overall pu...
https://api.stackexchange.com
Just a general electronics question: What is negative voltage, like -5 Volt? From my basic knowledge, power is generated by electrons wandering from the minus to the plus side of the power source (assuming DC power here). Is negative voltage when electrons wander from + to -? Why do some devices even need it, what is s...
Someone may have better words to explain this than me, but the big thing you have to remember is voltage is a potential difference. In most cases the "difference" part is a difference between some potential and ground potential. When someone says -5v, they're saying that you are below ground. You also need to keep in m...
https://api.stackexchange.com
What is the difference between "forward" and "reverse" voltages when working with diodes and LEDs? I realize this question is answered elsewhere on the interwebs such as wikipedia, but I am looking for a short summary that is less of a technical discussion and more a useful tip to someone using diodes in a hobby circui...
The forward voltage is the voltage drop across the diode if the voltage at the anode is more positive than the voltage at the cathode (if you connect + to the anode). You will be using this value to calculate the power dissipation of the diode and the voltage after the diode. The reverse voltage is the voltage drop acr...
https://api.stackexchange.com
$A$ and $B$ are $n \times n$ matrices and $v$ is a vector with $n$ elements. $Av$ has $\approx 2n^2$ flops and $A+B$ has $n^2$ flops. Following this logic, $(A+B)v$ should be faster than $Av+Bv$. Yet, when I run the following code in matlab A = rand(2000,2000); B = rand(2000,2000); v = rand(2000,1); tic D=zeros(size(A)...
Except for code which does a significant number of floating-point operations on data that are held in cache, most floating-point intensive code is performance limited by memory bandwidth and cache capacity rather than by flops. $v$ and the products $Av$ and $Bv$ are all vectors of length 2000 (16K bytes in double preci...
https://api.stackexchange.com
I am trying to figure out the difference between crystals, oscillators, and resonators. I'm starting to grasp it but I still have some questions. From my understanding, an oscillator is built from a crystal and two capacitors. What is a resonator then? Is it a difference in terminology? If an oscillator and a resona...
Both ceramic resonators and quartz crystals work on the same principle: the vibrate mechanically when an AC signal is applied to them. Quartz crystals are more accurate and temperature stable than ceramic resonators. The resonator or crystal itself has two connections. On the left the crystal, right the ceramic resonat...
https://api.stackexchange.com
I have often downloaded datasets from the SRA where the authors failed to mention which adapters were trimmed during the processing. Local alignments tend to overcome this obstacle, but it feels a bit barbaric. fastQC works occasionally to pick them up, but sometimes fails to find the actual adapter sequences. Usually,...
You mention that FastQC "fails to find the actual adapter sequences" - I guess you mean in the Adapter Sequence Contamination plot. However, the kmer and Sequence Content Plots are often useful even when the former fails. I've used these in the past - you can sometimes just read off the adapter sequence from the start ...
https://api.stackexchange.com
Engineers often insist on using locally conservative methods such as finite volume, conservative finite difference, or discontinuous Galerkin methods for solving PDEs. What can go wrong when using a method that is not locally conservative? Okay, so local conservation is important for hyperbolic PDEs, what about ellipti...
In the solution of nonlinear hyperbolic PDEs, discontinuities ("shocks") appear even when the initial condition is smooth. In the presence of discontinuities, the notion of solution can only be defined in the weak sense. The numerical velocity of a shock depends on the correct Rankine-Hugoniot conditions being impose...
https://api.stackexchange.com
I read that 'Euclidean distance is not a good distance in high dimensions'. I guess this statement has something to do with the curse of dimensionality, but what exactly? Besides, what is 'high dimensions'? I have been applying hierarchical clustering using Euclidean distance with 100 features. Up to how many features ...
A great summary of non-intuitive results in higher dimensions comes from "A Few Useful Things to Know about Machine Learning" by Pedro Domingos at the University of Washington: [O]ur intuitions, which come from a three-dimensional world, often do not apply in high-dimensional ones. In high dimensions, most of the mass...
https://api.stackexchange.com
Are there any tools specifically designed for compressing floating point scientific data? If a function is smooth, there's obviously a lot of correlation between the numbers representing that function, so the data should compress well. Zipping/gzipping binary floating point data doesn't compress it that well though. ...
Try out Blosc. It is in many cases faster than memcopy. Think about that for a second. . . wicked. It is super stable, highly-vetted, cross-platform, and performs like a champ.
https://api.stackexchange.com
I'm looking for cases of invalid math operations producing (in spite of it all) correct results (aka "every math teacher's nightmare"). One example would be "cancelling" the 6s in $$\frac{64}{16}$$ Another one would be something like $$\frac{9}{2} - \frac{25}{10} = \frac{9 - 25}{2 - 10} = \frac{-16}{-8} = 2 \;\;$$ Yet ...
I was quite amused when a student produced the following when cancelling a fraction: $$\frac{x^2-y^2}{x-y}$$ He began by "cancelling" the $x$ and the $y$ on top and bottom, to get: $$\frac{x-y}{-}$$ and then concluded that "two negatives make a positive", so the final answer has to be $x+y$.
https://api.stackexchange.com