question
stringlengths
6
13.7k
text
stringlengths
1
25.8k
source
stringclasses
3 values
I have read many articles about DTFT and DFT but am not able to discern the difference between the two except for a few visible things like DTFT goes till infinity while DFT is only till $N-1$. Can anyone please explain the difference and when to use what? Wiki says The DFT differs from the discrete-time Fourier trans...
Alright, I'm gonna answer this with an argument that "opponents" to my rigid nazi-like position regarding the DFT have. First of all, my rigid, nazi-like position: The Discrete Fourier Transform and Discrete Fourier Series are one-and-the-same. The DFT maps one infinite and periodic sequence, $x[n]$ with period $N$ in ...
https://api.stackexchange.com
What are the advantages of having Bioconductor, for the bioinformatics community? I've read the 'About' section and skimmed the paper, but still cannot really answer this. I understand Bioconductor is released twice a year (unlike R), but if I want to use the latest version of a package, I'll have to use the dev versio...
Benefits of central repository for Community Having a central repository for packages is very useful. For couple of reasons: It makes very easy to resolve dependencies. Installing all the dependencies manually would be exhausting but also dangerous (point 2). Package compatibility! If I install package with dependenci...
https://api.stackexchange.com
On a quantum scale the smallest unit is the Planck scale, which is a discrete measure. There several question that come to mind: Does that mean that particles can only live in a discrete grid-like structure, i.e. have to "magically" jump from one pocket to the next? But where are they in between? Does that even give ...
The answer to all questions is No. In fact, even the right reaction to the first sentence - that the Planck scale is a "discrete measure" - is No. The Planck length is a particular value of distance which is as important as $2\pi$ times the distance or any other multiple. The fact that we can speak about the Planck sca...
https://api.stackexchange.com
Most people have experienced the temporary loss of feeling and tingling in their leg resulting from sitting in an abnormal position for a short while. Usually you get a loss of feeling in your leg while it is being compressed/constricted at some point and then the tingling sensation as the pressure is removed. But what...
The feeling you describe is called "paresthesia," and according to the NINDS info page, it happens "when sustained pressure is placed on a nerve."
https://api.stackexchange.com
There are nice technical definitions in textbooks and wikipedia, but I'm having a hard time understanding what differentiates stationary and non-stationary signals in practice? Which of the following discrete signals are stationary? why?: white noise - YES (according to every possible information found) colored nois...
There is no stationary signal. Stationary and non-stationary are characterisations of the process that generated the signal. A signal is an observation. A recording of something that has happened. A recording of a series of events as a result of some process. If the properties of the process that generates the events D...
https://api.stackexchange.com
I am trying to implement a content based image retrieval system but before I do so I would like to get an overview of some programming languages suitable for this task (having good libs and such). Does anyone know some good languages and libs for that kind of task? What about Python or Java? Best
Maybe you can be more specific about the scope and scale of your work (academic project? Desktop or Mobile commercial product? Web-based commercial project?). Some recommendations and comments: Matlab is common in the academic world, and quite good for sketching/validating ideas. You will have access to a large body o...
https://api.stackexchange.com
I'm working on a PCB that has shielded RJ45 (ethernet), RS232, and USB connectors, and is powered by a 12V AC/DC brick power adapter (I do the 5V and 3.3V step down on board). The entire design is enclosed in a metal chassis. The shields of the I/O connectors are connected to a CHASSIS_GND plane on the periphery of ...
This is a very complex issue, since it deals with EMI/RFI, ESD, and safety stuff. As you've noticed, there are many ways do handle chassis and digital grounds-- everybody has an opinion and everybody thinks that the other people are wrong. Just so you know, they are all wrong and I'm right. Honest! :) I've done it ...
https://api.stackexchange.com
The nitration of N,N-dimethylaniline with $\ce{H2SO4}$ and $\ce{HNO3}$ gives mainly the meta product, even though $\ce{-NMe2}$ is an ortho,para-directing group. Why is this so?
In the presence of these strong acids the $\ce{-NMe2}$ group is protonated, and the protonated form is electron-withdrawing via the inductive effect. This discourages attack at the electron-poor ortho position. Under the conditions I know for that experiment, you get a mixture of para- and meta-product, but no ortho-pr...
https://api.stackexchange.com
Four-legged chairs are by far the most common form of chair. However, only three legs are necessary to maintain stability whilst sitting on the chair. If the chair were to tilt, then with both a four-legged and three-legged chair, there is only one direction in which the chair can tilt whilst retaining two legs on the ...
Suppose the leg spacing for a square and triangular chair is the same then the positions of the legs look like: If we call the leg spacing $2d$ then for the square chair the distance from the centre to the edge is $d$ while for the triangular chair it's $d\tan 30^\circ$ or about $0.58d$. That means on the triangular c...
https://api.stackexchange.com
I'm a grad student in psychology, and as I pursue more and more independent studies in statistics, I am increasingly amazed by the inadequacy of my formal training. Both personal and second hand experience suggests that the paucity of statistical rigor in undergraduate and graduate training is rather ubiquitous within ...
Failing to look at (plot) the data.
https://api.stackexchange.com
According to Wikipedia, The $\ce{C60}$ molecule is extremely stable,[26] withstanding high temperatures and high pressures. The exposed surface of the structure can selectively react with other species while maintaining the spherical geometry.[27] Atoms and small molecules can be trapped within the molecule without re...
Aromaticity is not binary, but rather there are degrees of aromaticity. The degree of aromaticity in benzene is large, whereas the spiro-aromaticity in [4.4]nonatetraene is relatively small. The aromaticity in naphthalene is not twice that of benzene. Aromaticity has come to mean a stabilization resulting from p-orbit...
https://api.stackexchange.com
My nephew was folding laundry, and turning the occasional shirt right-side-out. I showed him a "trick" where I turned it right-side-out by pulling the whole thing through a sleeve instead of the bottom or collar of the shirt. He thought it was really cool (kids are easily amused, and so am I). So he learned that you c...
First, a warning. I suspect this response is likely not going to be immediately comprehensible. There is a formal set-up for your question, there are tools available to understand what's going on. They're not particularly light tools, but they exist and they're worthy of being mentioned. Before I write down the mai...
https://api.stackexchange.com
Green is the most common circuit-board color because it has become an industry standard. What I'm interested in is How the traditional "PCB Green" become a standard in the first place? Were there any interesting historical reasons for the initial choice, or was it just a product of what one particularly successful com...
This is what I have found on the topic so far. There are a few competing theories for why the solder mask of PCB is commonly green. Possible explanations: The US military required PCBs to be green When mixing the base resin and the hardener together, they turn green It is an ergonomic choice due to the human eyes abi...
https://api.stackexchange.com
Is it possible for a woman to conceive from two different men and give birth to half-siblings?
Yes, this is possible through something called heteropaternal superfecundation (see below for further explanation). Of all twin births, 30% are identical and 70% are non-identical (fraternal) twins. Identical twins result when a zygote (one egg, or ovum, fertilized by one sperm) splits at an early stage to become twins...
https://api.stackexchange.com
There are so many biological processes which are dependent upon ions of lighter metals (upper part of periodic table) such as $\ce{K+}$, $\ce{Na+}$, $\ce{Mg^{2+}}$ and even early transition elements ($\ce{Fe}$, $\ce{Mn}$, $\ce{Cu}$, $\ce{Ni}$), but I haven't yet come across dependence of biological phenomena on alumini...
One argument put forward has been that aluminum is very poorly bioavailable, moreso than many other elements. Aluminum oxide is very insoluble in water. In addition, any dissolved aluminum that does form in seawater is likely to be precipitated by silicic acid, forming hydroxyaluminosilicates. From Chris Exeter's 2...
https://api.stackexchange.com
I understand that I can not connect an LED directly to a battery because it will draw too much current. Thus, there must be something else in the circuit to limit the current. What options are there? Are some methods more efficient than others?
An LED requires a minimum voltage before it will turn on at all. This voltage varies with the type of LED, but is typically in the neighborhood of 1.5V - 4.4V. Once this voltage is reached, current will increase very rapidly with voltage, limited only by the LED's small resistance. Consequently, any voltage much higher...
https://api.stackexchange.com
If I can smell an object, it means that molecules are getting separated from it, so they can reach my nose. As far as I know, metals don't sublimate, especially not at room temperature. However, copper has a very strong and characteristic smell. Does it mean that copper will degrade pretty quickly, or are just we so se...
This is a nice question, as it confronts a very replicable and common experience with a well established yet seemingly contradictory fact. As you expected, the smell of metal has nothing to do with the metal actually getting into your nose, as most metals have far too low of a vapor pressure at ordinary temperatures to...
https://api.stackexchange.com
In 1d signal processing, many types of low pass filters are used. Gaussian filters are almost never used, though. Why are they so popular in image processing applications? Are these filters a result of optimizing any criterion or are just ad hoc solution since image 'bandwidth' is usually not well defined.
Image processing applications are different from say audio processing applications, because many of them are tuned for the eye. Gaussian masks nearly perfectly simulate optical blur (see also point spread functions). In any image processing application oriented at artistic production, Gaussian filters are used for blur...
https://api.stackexchange.com
I have been wondering about this question since I was an undergraduate student. It is a general question but I will elaborate with examples below. I have seen a lot of algorithms - for example, for maximum flow problems, I know around 3 algorithms which can solve the problem: Ford-Fulkerson, Edmonds-Karp & Dinic, with ...
There's a textbook waiting to be written at some point, with the working title Data Structures, Algorithms, and Tradeoffs. Almost every algorithm or data structure which you're likely to learn at the undergraduate level has some feature which makes it better for some applications than others. Let's take sorting as an e...
https://api.stackexchange.com
I was laying on my bed, reading a book when the sun shone through the windows on my left. I happened to look at the wall on my right and noticed this very strange effect. The shadow of my elbow, when near the pages of the book, joined up with the shadow of the book even though I wasn't physically touching it. Here's wh...
As said by John Rennie, it has to do with the shadows' fuzzyness. However, that alone doesn't quite explain it. Let's do this with actual fuzzyness: I've simulated shadow by blurring each shape and multiplying the brightness values1. Here's the GIMP file, so you can see how exactly and move the shapes around yourself....
https://api.stackexchange.com
A binary indexed tree has very less or relatively no literature as compared to other data structures. The only place where it is taught is the topcoder tutorial. Although the tutorial is complete in all the explanations, I cannot understand the intuition behind such a tree? How was it invented? What is the actual proof...
Intuitively, you can think of a binary indexed tree as a compressed representation of a binary tree that is itself an optimization of a standard array representation. This answer goes into one possible derivation. Let's suppose, for example, that you want to store cumulative frequencies for a total of 7 different elem...
https://api.stackexchange.com
Suppose we have data set $(X_i,Y_i)$ with $n$ points. We want to perform a linear regression, but first we sort the $X_i$ values and the $Y_i$ values independently of each other, forming data set $(X_i,Y_j)$. Is there any meaningful interpretation of the regression on the new data set? Does this have a name? I imagine ...
I'm not sure what your boss thinks "more predictive" means. Many people incorrectly believe that lower $p$-values mean a better / more predictive model. That is not necessarily true (this being a case in point). However, independently sorting both variables beforehand will guarantee a lower $p$-value. On the other ...
https://api.stackexchange.com
I'm in a course about computing and complexity, and am unable to understand what these terms mean. All I know is that NP is a subset of NP-complete, which is a subset of NP-hard, but I have no idea what they actually mean. Wikipedia isn't much help either, as the explanations are still a bit too high level.
I think the Wikipedia articles $\mathsf{P}$, $\mathsf{NP}$, and $\mathsf{P}$ vs. $\mathsf{NP}$ are quite good. Still here is what I would say: Part I, Part II [I will use remarks inside brackets to discuss some technical details which you can skip if you want.] Part I Decision Problems There are various kinds of compu...
https://api.stackexchange.com
I was skimming through some lecture notes by Cosma Shalizi (in particular, section 2.1.1 of the second lecture), and was reminded that you can get very low $R^2$ even when you have a completely linear model. To paraphrase Shalizi's example: suppose you have a model $Y = aX + \epsilon$, where $a$ is known. Then $\newcom...
To address the first question, consider the model $$Y = X + \sin(X) + \varepsilon$$ with iid $\varepsilon$ of mean zero and finite variance. As the range of $X$ (thought of as fixed or random) increases, $R^2$ goes to 1. Nevertheless, if the variance of $\varepsilon$ is small (around 1 or less), the data are "noticea...
https://api.stackexchange.com
In this comment I wrote: ...default SciPy integrator, which I'm assuming only uses symplectic methods. in which I am refering to SciPy's odeint, which uses either a "non-stiff (Adams) method" or a "stiff (BDF) method". According to the source: def odeint(func, y0, t, args=(), Dfun=None, col_deriv=0, full_output=0, ...
Let me start off with corrections. No, odeint doesn't have any symplectic integrators. No, symplectic integration doesn't mean conservation of energy. What does symplectic mean and when should you use it? First of all, what does symplectic mean? Symplectic means that the solution exists on a symplectic manifold. A symp...
https://api.stackexchange.com
I need help with this integral: $$I=\int_{-1}^1\frac1x\sqrt{\frac{1+x}{1-x}}\ln\left(\frac{2\,x^2+2\,x+1}{2\,x^2-2\,x+1}\right)\ \mathrm dx.$$ The integrand graph looks like this: $\hspace{1in}$ The approximate numeric value of the integral: $$I\approx8.372211626601275661625747121...$$ Neither Mathematica nor Maple cou...
I will transform the integral via a substitution, break it up into two pieces and recombine, perform an integration by parts, and perform another substitution to get an integral to which I know a closed form exists. From there, I use a method I know to attack the integral, but in an unusual way because of the 8th degr...
https://api.stackexchange.com
This may be a ridiculous question, but is it possible to have a problem that actually gets easier as the inputs grow in size? I doubt any practical problems are like this, but maybe we can invent a degenerate problem that has this property. For instance, perhaps it begins to "solve itself" as it gets larger, or behav...
No, it's not possible: at least, not in an asymptotic sense, where you require the problem to keep getting strictly easier, forever, as $n \to \infty$. Let $T(n)$ be the best possible running time for solving such a problem, where $n$ is the size of the input. Note that the running time is a count of the number of ins...
https://api.stackexchange.com
General relativity says that spacetime is a Lorentzian 4-manifold $M$ whose metric satisfies Einstein's field equations. I have two questions: What topological restrictions do Einstein's equations put on the manifold? For instance, the existence of a Lorentz metric implies some topological things, like the Euler cha...
That's a great question! What you are asking about is one of the missing links between classical and quantum gravity. On their own, the Einstein equations, $ G_{\mu\nu} = 8 \pi G T_{\mu\nu}$, are local field equations and do not contain any topological information. At the level of the action principle, $$ S_{\mathrm{eh...
https://api.stackexchange.com
I would like to implement an algorithm for automatic model selection. I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though). My problem is that I am unable to find a methodology, or an open source implementation (I am woking in java). The methodology I have ...
I think this approach is mistaken, but perhaps it will be more helpful if I explain why. Wanting to know the best model given some information about a large number of variables is quite understandable. Moreover, it is a situation in which people seem to find themselves regularly. In addition, many textbooks (and cou...
https://api.stackexchange.com
At the Renaissance fair a few years back I was watching a smith forge metal into shapes. During this time a very odd question came to me. I was wondering what the furnace was made of. My logic stated that whatever the furnace was made of must have a higher melting point than the materials he was melting. This quickly t...
Tungsten's melting point of 3422 °C is the highest of all metals and second only to carbon's, for which melting occurs only at high pressure (there's no standard melting point). This is why tungsten is used in rocket nozzles and reactor linings. There are refractory ceramics and alloys that have higher melting points,...
https://api.stackexchange.com
I remember coming across the following question about a language that supposedly is context-free, but I was unable to find a proof of the fact. Have I perhaps misremembered the question? Anyway, here's the question: Show that the language $L = \{xy \mid |x| = |y|, x\neq y\}$ is context free.
Claim: $L$ is context-free. Proof Idea: There has to be at least one difference between the first and second half; we give a grammar that makes sure to generate one and leaves the rest arbitrary. Proof: For sake of simplicity, assume a binary alphabet $\Sigma = \{a,b\}$. The proof readily extends to other sizes. Consid...
https://api.stackexchange.com
How do you write a .gz (or .bgz) fastq file using Biopython? I'd rather avoid a separate system call. The typical way to write an ASCII .fastq is done as follows: for record in SeqIO.parse(fasta, "fasta"): SeqIO.write(record, fastq, "fastq") The record is a SeqRecord object, fastq is the file handle, and "fastq" ...
I'm not sure I'm doing it the best way, but here is an example where I read a compressed gzip fastq file and write the records in block gzip fastq: from Bio import SeqIO, bgzf # Used to convert the fastq stream into a file handle from io import StringIO from gzip import open as gzopen records = SeqIO.parse( # Ther...
https://api.stackexchange.com
I was just learning about the frequency domain in images. I can understand the frequency spectrum in case of waves. It denotes what frequencies are present in a wave. If we draw the frequency spectrum of $\cos(2\pi f t)$, we get an impulse signal at $-f$ and $+f$. And we can use corresponding filters to extract partic...
But what does frequency spectrum means in case of images? The "mathematical equations" are important, so don't skip them entirely. But the 2d FFT has an intuitive interpretation, too. For illustration, I've calculated the inverse FFT of a few sample images: As you can see, only one pixel is set in the frequency domai...
https://api.stackexchange.com
In an 8-bit microprocessor its data bus consists of 8 data lines. In a 16-bit microprocessor its data bus consists of 16 data lines and so on. Why is there neither a 256-bit microprocessor nor a 512-bit microprocessor? Why don't they simply increase the number of the data lines and create a 256-bit microprocessor or ...
Think about it. What exactly do you envision a "256 bit" processor being? What makes the bit-ness of a processor in the first place? I think if no further qualifications are made, the bit-ness of a processor refers to its ALU width. This is the width of the binary number that it can handle natively in a single opera...
https://api.stackexchange.com
A number of countries are using test kits for detecting new cases of nCoV (2019-Coronavirus) and apparently China is running low. What exactly is in a nCoV "Test Kit" — How does it work? (Surely they also differ, so in which way do they differ?)
The CDC has made available online its nCoV test kit. Briefly,the kit contains primers and probes for real-time reverse-transcriptase PCR, as well as instructions for appropriate use and (critically) controls and guidelines to avoid false positives and negatives. Kits from different countries may use slightly different ...
https://api.stackexchange.com
Interstitial fluid is the fluid between cells in tissues - forming the medium between cells and capillaries. From what I gather, the typical human has 5L of blood and 11L of interstitial fluid. This raises an interesting question. If I get cut, why do I not bleed interstitial fluid? When humans are cut, generally their...
For fluid to flow from a wound there needs to be a significant pressure gradient between where it is now and the outside of the body. Your skin generally does not have a strong compressive effect, which is why a deep cut exposing fat will not lead to the fatty tissue being expulsed from the body any more than the inter...
https://api.stackexchange.com
The ghostly passage of one body through another is obviously out of the question if the continuum assumption were valid, but we know that at the micro, nano, pico levels (and beyond) this is not even remotely the case. My understanding is that the volume of the average atom actually occupied by matter is a vanishingly ...
Things are not empty space. Our classical intuition fails at the quantum level. Matter does not pass through other matter mainly due to the Pauli exclusion principle and due to the electromagnetic repulsion of the electrons. The closer you bring two atoms, i.e. the more the areas of non-zero expectation for their elect...
https://api.stackexchange.com
I'd like to take pictures of labels on a jar of food, and be able to transform them so the label is flat, with the right and left side resized to be even with the center of the image. Ideally, I'd like to use the contrast between the label and the background in order to find the edges and apply the correction. Otherwi...
A similar question was asked on Mathematica.Stackexchange. My answer over there evolved and got quite long in the end, so I'll summarize the algorithm here. Abstract The basic idea is: Find the label. Find the borders of the label Find a mapping that maps image coordinates to cylinder coordinates so that it maps the ...
https://api.stackexchange.com
The Kalman filter algorithm works as follows Initialize $ \hat{\textbf{x}}_{0|0}$ and $\textbf{P}_{0|0}$. At each iteration $k=1,\dots,n$ Predict Predicted (a priori) state estimate $$ \hat{\textbf{x}}_{k|k-1} = \textbf{F}_{k}\hat{\textbf{x}}_{k-1|k-1} + \textbf{B}_{k} \textbf{u}_{k} $$ Predicted (a priori...
I found a good way of thinking intuitively of Kalman Gain $K$. If you write $K$ this way $\displaystyle \quad\ \bf{K_k} = \bf{P_k^-\, H_k^{\rm T} (H_k P_k^-\, H_k^{\rm T} + R_k)^{-1}} = \bf{\frac {P_k^-\, H_k^{\rm T}}{H_k P_k^-\, H_k^{\rm T} + R_k}}$ you will realize that the relative magnitudes of matrices ($R_k$) a...
https://api.stackexchange.com
What is the extra, 5th, pin on micro usb 2.0 adapters for? Here is an image with the different connectors. Most of them have 5 pins, but the A-type host only has four. (source: wikimedia.org)
It's for On-The-Go, to select which device is the host or slave: The OTG cable has a micro-A plug on one side, and a micro-B plug on the other (it cannot have two plugs of the same type). OTG adds a fifth pin to the standard USB connector, called the ID-pin; the micro-A plug has the ID pin grounded, while the ID...
https://api.stackexchange.com
I have found that many USB wall chargers use a resistive voltage divider to set the D+ and D- pins to a specific voltage, usually between 2 and 3 volts. Other USB wall chargers short the D+ and D- pins together with no connection to anything else. From my experience some devices will not accept a charge rate above 50...
I found this page answers your question clearly. I quote the relevant parts below. The BC1.2 outlines three distinct types of USB port and two key monikers. A "charging" port is one that delivers currents higher than 500mA. A "downstream" port signals data as per USB 2.0. The BC1.2 specification also establishes both...
https://api.stackexchange.com
The 3.0 version of the MPI standard formally deleted the C++ interface (it was previously deprecated). While implementations may still support it, features that are new in MPI-3 do not have a C++ interface defined in the MPI standard. See for more information. The motivation for removing the C++ interface from MPI w...
Let me first answer why I think C++ interfaces to MPI have generally not been overly successful, having thought about the issue for a good long time when trying to decide whether we should just use the standard C bindings of MPI or building on something at higher level: When you look at real-world MPI codes (say, PETSc...
https://api.stackexchange.com
I see the HSV colour space used all over the place: for tracking, human detection, etc... I'm wondering, why? What is it about this colour space that makes it better than using RGB?
The simple answer is that unlike RGB, HSV separates luma, or the image intensity, from chroma or the color information. This is very useful in many applications. For example, if you want to do histogram equalization of a color image, you probably want to do that only on the intensity component, and leave the color co...
https://api.stackexchange.com
What's the state-of-the-art in the approximation of highly oscillatory integrals in both one dimension and higher dimensions to arbitrary precision?
I'm not entirely familiar with what's now done for cubatures (multidimensional integration), so I'll restrict myself to quadrature formulae. There are a number of effective methods for the quadrature of oscillatory integrals. There are methods suited for finite oscillatory integrals, and there are methods for infinite ...
https://api.stackexchange.com
I noticed that I have been bending my book all along, when I was reading it with one hand. This also works for plane flexible sheets of any material. Illustration using an A4 sheet Without bending the sheet: With a bend along perpendicular axis How do you explain this sturdiness, that comes only when the object ...
Understanding why this works turns out to be quite deep. This answer is kind of a long story, but there's no maths. At the end ('A more formal approach') there is an outline of how the maths works: skip to that if you don't want the story. Insect geometry Consider a little insect or something who lives on the surface ...
https://api.stackexchange.com
Flash memory storage and EEPROM both use floating gate transistors for storage of data. What differs between the two and why is Flash so much faster?
The first ROM devices had to have information placed in them via some mechanical, photolithographic, or other means (before integrated circuits, it was common to use a grid where diodes could be selectively installed or omitted). The first major improvement was a "fuse-PROM"--a chip containing a grid of fused diodes, ...
https://api.stackexchange.com
I would like to convert a BED format to GFF3. The only useful tool that I could find via a google search seems to be Galaxy, and I do not feel very comfortable with online tools, plus the webserver is currenlty under maintenance. Does anyone knows about a command-line tool that can handle this conversion? Edit: here a...
To answer the question as asked, for people googling. For BED6, in python: #contigs.tsv contians chromosome names and lengths in two columns for line in open("contigs.tsv"): fields = line.strip().split("\t") print fields[0], ".", "contig","1",str(fields[1]), ".", "+", ".", "ID=%s" % fields[0] for line in open("...
https://api.stackexchange.com
There are lots of attempts at proving either $\mathsf{P} = \mathsf{NP} $ or $\mathsf{P} \neq \mathsf{NP}$, and naturally many people think about the question, having ideas for proving either direction. I know that there are approaches that have been proven to not work, and there are probably more that have a history of...
I'd say the most well known barriers to solving $P=NP$ are Relativization (as mentioned by Ran G.) Natural Proofs - under certain cryptographic assumptions, Rudich and Razborov proved that we cannot prove $P\neq NP$ using a class of proofs called natural proofs. Algebrization - by Scott Aaronson and Avi Wigderson. Th...
https://api.stackexchange.com
Anyone trying to learn mathematics on his/her own has had the experience of "going down the Math Rabbit Hole." For example, suppose you come across the novel term vector space, and want to learn more about it. You look up various definitions, and they all refer to something called a field. So now you're off to learn ...
Your example makes me think of graphs. Imagine some nice, helpful fellow came along, and made a big graph of every math concept ever, where each concept is one node and related concepts are connected by edges. Now you can take a copy of this graph, and color every node green based on whether you "know" that concept (un...
https://api.stackexchange.com
I know phenols are more acidic as compared to alcohols, but are they considered different from alcohols? Sure, you can study something as a subset, but are phenols considered a subset of alcohols, or are they considered as completely different from alcohols? My confusion is due to the fact that both of them contain a h...
Nope. Alcohols consist of an -$\ce{OH}$ group bonded to a saturated carbon ($\mathrm{sp^3}$ hybridized, no multiple bonds). IUPAC says: alcohols Compounds in which a hydroxy group, -$\ce{OH}$, is attached to a saturated carbon atom $\ce{R3COH}$. The term 'hydroxyl' refers to the radical species, $\ce{HO^.}$. and phe...
https://api.stackexchange.com
What is a simple algorithm for computing the SVD of $2 \times 2$ matrices? Ideally, I'd like a numerically robust algorithm, but I'll like to see both simple and not-so-simple implementations. C code accepted. Any references to papers or code?
See (sorry, I would have put that in a comment but I've registered just to post this so I can't post comments yet). But since I'm writing it as an answer, I'll also write the method: $$E=\frac{m_{00}+m_{11}}{2}; F=\frac{m_{00}-m_{11}}{2}; G=\frac{m_{10}+m_{01}}{2}; H=\frac{m_{10}-m_{01}}{2}\\ Q=\sqrt{E^2+H^2}; R=\sqrt...
https://api.stackexchange.com
Edit: This question is very similar to this and related to this one (though the latter focuses on homology instead of scaling laws). However, the answer to this question is far more comprehensive, in particular it offers a plausible explanation why horse legs evolved as they did (vs human or even rhino legs). Large gra...
Elephant, rhinoceros, &c all have much thicker legs in proportion. The answer, I think, lies in the fact that the animals you mention all evolved as cursorial animals (that is, they run to escape predators). Less mass in the lower leg means it swings easier, so the animal can run faster. There are two things you're ...
https://api.stackexchange.com
Sparse linear systems turn up with increasing frequency in applications. One has a lot of routines to choose from for solving these systems. At the highest level, there is a watershed between direct (e.g. sparse Gaussian elimination or Cholesky decomposition, with special ordering algorithms, and multifrontal methods) ...
The important thing when choosing iterative solvers is the spectrum of the operator, see this paper. However, there are so many negative results, see this paper where no iterative solver wins for all problems and this paper in which they prove they can get any convergence curve for GMRES for any spectrum. Thus, it seem...
https://api.stackexchange.com
There are lots of questions about how to analyze the running time of algorithms (see, e.g., runtime-analysis and algorithm-analysis). Many are similar, for instance those asking for a cost analysis of nested loops or divide & conquer algorithms, but most answers seem to be tailor-made. On the other hand, the answers t...
Translating Code to Mathematics Given a (more or less) formal operational semantics you can translate an algorithm's (pseudo-)code quite literally into a mathematical expression that gives you the result, provided you can manipulate the expression into a useful form. This works well for additive cost measures such as n...
https://api.stackexchange.com
What is the name of these little plastic things that protect wires from being cut into by the sharp edges of a drilled hole?
That's a grommet, not to be confused with Gromit. Gromit, of Wallace and Gromit fame.
https://api.stackexchange.com
I have a set of high-troughput experiments with 2 genotypes ("WT" and "prg1") and 3 treatments ("RT", "HS30" and "HS30RT120"), and there are 2 replicates for each of the genotype x treatment combinations. The read counts for the genes are summarized in a file that I load as follows in R: > counts_data <- read.table("pa...
The simplest manner is to not use a wald test, but rather an LRT with a reduced model lacking the factor of interest: dds = DESeq(dds, test="LRT" reduced=~geno+geno:Treatment) The above would give you results for Treatment regardless of level while still accounting for a possible interaction (i.e., a "main effect of t...
https://api.stackexchange.com
This picture is take from my village in Gujarat, India. I think it is a small bird which I have never seen before. It is smaller than an Indian hummingbird and even smaller than a neem tree leaf. You can see the leaf and the flowers. That flower's diameter is maybe a half inch so you can see how small the bird is. This...
Great picture and great find. But unfortunately I don't think that is a new species of bird...or even a bird at all! It looks like a hummingbird hawk-moth, Macroglossum stellatarum. Here you can really see the 'little trunk' (as you described it) known as a proboscis, which it uses to feed on flowers. Fun fact: It's ...
https://api.stackexchange.com
I am looking for information from anyone that has tried to use OpenCL in their scientific code. Has anyone tried (recently) ViennaCL? If so, how does it compare to cusp? What about OCLTools? Does it live up to the promise? If so, would it be a feasible way to start writing math kernels in OpenCL?
First of all I wish to thanks Aron Ahmadia for pointing me to this thread. As for OpenCL in scientific code: OpenCL is meant to be a low-level API, thus it is crucial to wrap this functionality in some way in order to reach a reasonable productivity. Moreover, as soon as several compute kernels are involved, code can g...
https://api.stackexchange.com
All the long-read sequencing platforms are based on single-molecule sequencing which causes higher per-base error rates. For this reason a polishing step was added to genome assembly pipelines - mapping raw reads back to assembly and correcting details of the assembly. I have decent PacBio RSII dataset of single indivi...
A few possibilities: Falcon Try falcon and falcon-unzip. These are designed exactly for your problem and your data: Not Falcon If you think you have assembled haplotypes (which seems reasonable to expect given enough coverage), you should be able to see the two haplotypes by just doing all pairwise alignments of your ...
https://api.stackexchange.com
Assume that I am a programmer and I have an NP-complete problem that I need to solve it. What methods are available to deal with NPC problems? Is there a survey or something similar on this topic?
There are a number of well-studied strategies; which is best in your application depends on circumstance. Improve worst case runtime Using problem-specific insight, you can often improve the naive algorithm. For instance, there are $O(c^n)$ algorithms for Vertex Cover with $c < 1.3$ [1]; this is a huge improvement ove...
https://api.stackexchange.com
With the following circuits as examples : and How will the current I know how much to flow? Would any other wave travel first in the circuit and then come back and say so much current should flow?
Not sure if this is what you're asking, but yes, when the battery is connected, an electric field wave travels from the battery down the wires to the load. Part of the electrical energy is absorbed by the load (depending on Ohm's law), and the rest is reflected off the load and travels back to the battery, some is abs...
https://api.stackexchange.com
In spite of their different dimensions, the numerical values of $\pi^2$ and $g$ in SI units are surprisingly similar, $$\frac{\pi^2}{g}\approx 1.00642$$ After some searching, I thought that this fact isn't a coincidence, but an inevitable result of the definition of a metre, which was possibly once based on a pendulum...
The differential equation for a pendulum is $$\ddot{\phi}(t) = -\frac{g}{l}\cdot\sin{\phi(t)}$$ If you solve this, you will get $$\omega = \sqrt{\frac{g}{l}}$$ or $$T_{1/2}=\pi\sqrt{\frac{l}{g}}$$ $$g=\pi^2\frac{l}{T_{1/2}^2}$$ If you define one metre as the length of a pendulum with $T_{1/2}=1\,\mathrm{s}$ this will ...
https://api.stackexchange.com
In the standard brown ring test for the nitrate ion, the brown ring complex is: $$\ce{[Fe(H2O)5(NO)]^{2+}}$$ In this compound, the nitrosyl ligand is positively charged, and iron is in a $+1$ oxidation state. Now, iron has stable oxidation states +2 and +3. Nitrosyl, as a ligand, comes in many flavours, of which a nega...
According Kinetics, Mechanism, and Spectroscopy of the Reversible Binding of Nitric Oxide to Aquated Iron(II). An Undergraduate Text Book Reaction Revisited The correct structure is $\ce{ [Fe^{III}(H_2O)_5(NO^{-})]^{2+} }$ For many years it was thought that iron was reduced to $\ce{Fe^{I}}$ and $\ce{NO}$ oxidized to $\...
https://api.stackexchange.com
I'm looking forward to enroll in an MSc in Signal and Image processing, or maybe Computer Vision (I have not decided yet), and this question emerged. My concern is, since deep learning doesn't need feature extraction and almost no input pre-processing, is it killing image processing (or signal processing in general)? ...
On the top of this answer, you can see a section of updated links, where artificial intelligence, machine intelligence, deep learning or and database machine learning progressively step of the grounds of traditional signal processing/image analysis/computer vision. Below, variations on the original answer. For a short ...
https://api.stackexchange.com
Many computer science programs require two or three calculus classes. I'm wondering, how and when is calculus used in computer science? The CS content of a degree in computer science tends to focus on algorithms, operating systems, data structures, artificial intelligence, software engineering, etc. Are there times whe...
I can think of a few courses that would need Calculus, directly. I have used bold face for the usually obligatory disciplines for a Computer Science degree, and italics for the usually optional ones. Computer Graphics/Image Processing, and here you will also need Analytic Geometry and Linear Algebra, heavily! If you ...
https://api.stackexchange.com
I'm familiar with the Radon transform from learning about CT scans, but not the Hough transform. Wikipedia says The (r,θ) plane is sometimes referred to as Hough space for the set of straight lines in two dimensions. This representation makes the Hough transform conceptually very close to the two-dimensional Radon tr...
The Hough transform and the Radon transform are indeed very similar to each other and their relation can be loosely defined as the former being a discretized form of the latter. The Radon transform is a mathematical integral transform, defined for continuous functions on $\mathbb{R}^n$ on hyperplanes in $\mathbb{R}^n$....
https://api.stackexchange.com
I believe I saw this claim somewhere on the internet a long time ago. Specifically, it was claimed that the difference could be observed by filling one long, straight tube with light water and one with heavy water, and looking through both tubes lengthwise (so that light has to travel through the tubes' lengths before ...
Based on your description, I may have found the article you originally saw, or at least one very similar. Researchers from Dartmouth College published a paper$\mathrm{^1}$ in which they report, among other things, the results of viewing sunlit white paper through two 3 meter lengths of plexiglass; one filled with $\ce{...
https://api.stackexchange.com
Cockroaches are very hardy insects. It is known that, among other things, they are able to withstand bursts of ionizing radiation that would kill a human being. The explanations of this observed resistance I've seen include cell division not being that fast in cockroaches, and the relative simplicity of these insects c...
Off the top of head as a medical professional I can imagine the following mechanisms (everything is just speculative reasoning): Insects don't have blood. Instead, they have hemolymph whose primary role is not oxygen transport (they have an additional tracheal system for this purpose), but rather that of nutrients. Th...
https://api.stackexchange.com
How should one understand the keys, queries, and values that are often mentioned in attention mechanisms? I've tried searching online, but all the resources I find only speak of them as if the reader already knows what they are. Judging by the paper written by Bahdanau (Neural Machine Translation by Jointly Learning to...
The key/value/query formulation of attention is from the paper Attention Is All You Need. How should one understand the queries, keys, and values The key/value/query concept is analogous to retrieval systems. For example, when you search for videos on Youtube, the search engine will map your query (text in the search...
https://api.stackexchange.com
Is it a good idea to use vector<vector<double>> (using std) to form a matrix class for high performance scientific computing code? If the answer is no. Why? Thanks
It's a bad idea because vector needs to allocate as many objects in space as there are rows in your matrix. Allocation is expensive, but primarily it is a bad idea because the data of your matrix now exists in a number of arrays scattered around memory, rather than all in one place where the processor cache can easily ...
https://api.stackexchange.com
Lots of people use a main tool like Excel or another spreadsheet, SPSS, Stata, or R for their statistics needs. They might turn to some specific package for very special needs, but a lot of things can be done with a simple spreadsheet or a general stats package or stats programming environment. I've always liked Python...
It's hard to ignore the wealth of statistical packages available in R/CRAN. That said, I spend a lot of time in Python land and would never dissuade anyone from having as much fun as I do. :) Here are some libraries/links you might find useful for statistical work. There's plenty of other stuff out there, but this i...
https://api.stackexchange.com
What's the cheapest way to link a few microcontrollers wirelessly at low speeds over short distances. I'm looking to keep it ultra-cheap, use common discrete parts and keep it physically small. I don't care about bands and licensing so long as it works. 802.15.4/ZigBee, Bluetooth and WiFi all require an expensive copro...
You pretty much have to buy pre-made modules, you can't expect to wire up your own transmitter/receiver from a few transistors and a crystal, RF circuit design is unforgiving and all but requires a custom PCB (or custom IC) to do. You could probably build your own RF module on a PCB if you did some work, but at that po...
https://api.stackexchange.com
The industry standard for aligning short reads seems to be bwa-mem. However, in my tests I have seen that using bwa backtrack (bwa-aln + bwa-sampe + bwa-samse) performs better. It is slightly slower, but gives significantly better results in terms of both sensitivity and specificity. I have tested it using the genome i...
bwa mem is newer, faster, and [should be] more accurate, particularly for longer reads. From the bwa man page (presumably in Heng Li's own words): BWA is a software package for mapping low-divergent sequences against a large reference genome, such as the human genome. It consists of three algorithms: BWA-backtrack, B...
https://api.stackexchange.com
What's the maximum amount of current which I can draw from each of the Arduino's pins without tripping any of the internal fuses? Is there a limit per pin as well as an overall limit for the whole board?
This is a bit complex. Basically, there are a number of limiting factors: The IO lines from the microcontroller (i.e. the analog and digital pins) have both an aggregate (e.g. total) current limit, and an per-pin limit: From the ATmega328P datasheet. However, depending on how you define the Arduino "Pins", this is not...
https://api.stackexchange.com
I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, if you put, say, NRZ through a matched filter, the SNR will be maximised at the decision point only and that is the advantage of the matched filter. Does it maximise the SNR any...
Since this question has multiple sub-questions in edits, comments on answers, etc., and these have not been addressed, here goes. Matched filters Consider a finite-energy signal $s(t)$ that is the input to a (linear time-invariant BIBO-stable) filter with impulse response $h(t)$, transfer function $H(f)$, and produce...
https://api.stackexchange.com
I've been reading some resources on the web about Galerkin methods to solve PDEs, but I'm not clear about something. The following is my own account of what I have understood. Consider the following boundary value problem (BVP): $$L[u(x,y)]=0 \quad \text{on}\quad (x,y)\in\Omega, \qquad S[u]=0 \quad \text{on} \quad (x,y...
A quick and general answers without mathematical abstractions. There are several options to impose boundary conditions, e.g. Strictly speaking the Galerkin method requires that you choose a set of basis functions which satisfy the BC of the problem (e.g. via basis recombination and/or splitting of the approximation $u_...
https://api.stackexchange.com
I am not very familiar with the common discretization schemes for PDEs. I know that Crank-Nicolson is popular scheme for discretizing the diffusion equation. Is also a good choice for the advection term? I am interesting in solving the Reaction-Diffusion-Advection equation, $\frac{\partial u}{\partial t} + \nabla \cdot...
This is a well-framed question and a very useful thing to understand. Korrok is correct to refer you to von Neumann analysis and LeVeque's book. I can add a bit more to that. I'd like to write a detailed answer, but at the moment I only have time for a short one: With $\alpha=\beta=1/2$, you get a method that is abs...
https://api.stackexchange.com
I've heard of (structural) induction. It allows you to build up finite structures from smaller ones and gives you proof principles for reasoning about such structures. The idea is clear enough. But what about coinduction? How does it work? How can one say anything conclusive about an infinite structure? There are (at...
First, to dispel a possible cognitive dissonance: reasoning about infinite structures is not a problem, we do it all the time. As long as the structure is finitely describable, that's not a problem. Here are a few common types of infinite structures: languages (sets of strings over some alphabet, which may be finite);...
https://api.stackexchange.com
A while ago I was trying different ways to draw digital waveforms, and one of the things I tried was, instead of the standard silhouette of the amplitude envelope, to display it more like an oscilloscope. This is what a sine and square wave look like on a scope: The naïve way to do this is: Divide up the audio file ...
What I'd go with is essentially Jason R's "random resampler", which in turn is a presampled-signal based implementation of yoda's stochastic sampling. I've used simple cubic interpolation to one random point between each two samples. For a primitive synth sound (decaying from a saturated non-bandlimited square-like sig...
https://api.stackexchange.com
During breakfast with my colleagues, a question popped into my head: What is the fastest method to cool a cup of coffee, if your only available instrument is a spoon? A qualitative answer would be nice, but if we could find a mathematical model or even better make the experiment (we don't have the means here:-s) for th...
I We did the experiment. (Early results indicate that dipping may win, though the final conclusion remains uncertain.) $\mathrm{H_2O}$ ice bath canning jar thermometer pot of boiling water stop watch There were four trials, each lasting 10 minutes. Boiling water was poured into the canning jar, and the spoon was take...
https://api.stackexchange.com
Mathematica's ImageResize function supports many resampling methods. Not being familiar with this area, beyond nearest neighbour, bilinear, biquadratic and bicubic (which are obvious from the name), I am lost. Can you point me to some source that will explain the basic (mathematical) differences between these methods, ...
Given an image $I(m,n)$ with $m,n$ integers, the interpolation of that image at any arbitrary point $m',n'$ can be written as $$\tilde{I}(m',n')=\sum_{m=\left\lfloor m'\right\rfloor-w+1}^{\left\lfloor m'\right\rfloor+w}\ \sum_{n=\left\lfloor n'\right\rfloor-w+1}^{\left\lfloor n'\right\rfloor+w}I(m,n)\ f(m'-m,n'-n)$$ T...
https://api.stackexchange.com
I'm going to start self-stydying algebraic geometry very soon. So, my question is why do mathematicians study algebraic geometry? What are the types of problems in which algebraic geometers are interested in? And what are some of the most beautiful theorems in algebraic geometry?
NEW ADDITION: a big list of freely available online courses on algebraic geometry, from introduction to advanced topics, has been compiled in this other answer. And a digression on motivation for studying the subject along with a self-learning guide of books is in this new answer. There are other similar questions, abo...
https://api.stackexchange.com
I understand OpenCV is the de facto library for programming image processing in C/C++; I'm wondering if there is a C or C++ library like that for audio processing. I basically want to filter raw waves from a microphone, and analyze them with some machine learning algorithms. But I may eventually also need: Multiplatfo...
Consider the following: clam-project.org: CLAM (C++ Library for Audio and Music) is a full-fledged software framework for research and application development in the Audio and Music Domain. It offers a conceptual model as well as tools for the analysis, synthesis and processing of audio signals. MARF: MARF is an ope...
https://api.stackexchange.com
I'm interested in obtaining coding sequences of my favourite gene in all individuals from the 1000Genomes (and similar projects). I use GATK to get the right subset of variants, vcf-consensus to map these variants onto the reference genome and finally samtools to extract the individual exons. This works fine if the var...
I think that you need a LiftOver Chain file to transform your coordinates. You can obtain such a file using bcftools consensus with the -c parameter: -c, --chain <file> write a chain file for liftover Then you can use it to transform coordinates in various genomic formats using CrossMap.
https://api.stackexchange.com
So we have arithmetic mean (AM), geometric mean (GM) and harmonic mean (HM). Their mathematical formulation is also well known along with their associated stereotypical examples (e.g., Harmonic mean and it's application to 'speed' related problems). However, a question that has always intrigued me is "how do I decide w...
This answer may have a slightly more mathematical bent than you were looking for. The important thing to recognize is that all of these means are simply the arithmetic mean in disguise. The important characteristic in identifying which (if any!) of the three common means (arithmetic, geometric or harmonic) is the "righ...
https://api.stackexchange.com
From my basic understanding: The viruses causing Ebola, Sars and Covid-19 are all the result of a zoonosis, meanings that the viruses have passed from animals to humans. So my question is: Are all recently (let's say 100 years) emerged viral diseases, with potential for a global epidemic, the result of a zoonosis?
To my knowledge, yes. A partial list of recently emerged/emerging viral diseases (I certainly could have missed some), with probable reservoir hosts: Chikungunya* (birds, rodents) coronaviruses/sarbecoviruses (SARS [bats], MERS [camels], COVID-19 [?? bats ?? pangolins ??]) Ebola and other filoviruses (Marburg): (bats?...
https://api.stackexchange.com
I do a fair bit of soldering (lead-free). Is breathing in solder/flux/paste fumes actually going to harm me? Are cheap fume extractors worth buying?
Solder fumes aren't very good for you. Some people can become sensitized to flux fumes, especially from the older rosin flux used in cored solder, and get breathing problems: Controlling health risks from rosin (colophony) based solder fluxes The no-clean flux isn't as bad. I once felt quite ill after assembling about ...
https://api.stackexchange.com
The datasheet for the ATTiny13A, for instance, lists Min frequency of 0 MHz. Does this mean the clock can be run at any arbitrarily low frequency with no ill effects? I'm assuming it draws lower current at lower clock speeds? Does 0 MHz mean you can stop the clock completely, and as long as power is still applied, i...
Yes. If the datasheet says "fully static operation", then you can clock it at any speed, even 0 Hz. A "dynamic" chip needs to have a clock at a specific rate or it loses its state.
https://api.stackexchange.com
What aerodynamic effects actually contribute to producing the lift on an airplane? I know there's a common belief that lift comes from the Bernoulli effect, where air moving over the wings is at reduced pressure because it's forced to travel further than air flowing under the wings. But I also know that this is wrong, ...
A short summary of the paper mentioned in another answer and another good site. Basically planes fly because they push enough air downwards and receive an upwards lift thanks to Newton's third law. They do so in a variety of manners, but the most significant contributions are: The angle of attack of the wings, which u...
https://api.stackexchange.com
We are working on a product where the entire device needs to be dissolved in liquid after the device has operated and the device is no longer usable or desired. This is a down-hole application. The device body is either aluminum or magnesium. There is a small lithium-ion battery plus a circuit board with some electro...
Researchers from the National Physical Laboratory (NPL), in London, in cooperation with partners In2Teck Ltd and Gwent Electronic Materials Ltd, have developed a 3D printable circuit board that separates into individual components when immersed in hot water. The goal of the ReUSE project was to increase the re...
https://api.stackexchange.com
If we convolve 2 signals we get a third signal. What does this third signal represent in relation to the input signals?
There's not particularly any "physical" meaning to the convolution operation. The main use of convolution in engineering is in describing the output of a linear, time-invariant (LTI) system. The input-output behavior of an LTI system can be characterized via its impulse response, and the output of an LTI system for any...
https://api.stackexchange.com
Say I want to estimate a large number of parameters, and I want to penalize some of them because I believe they should have little effect compared to the others. How do I decide what penalization scheme to use? When is ridge regression more appropriate? When should I use lasso?
Keep in mind that ridge regression can't zero out coefficients; thus, you either end up including all the coefficients in the model, or none of them. In contrast, the LASSO does both parameter shrinkage and variable selection automatically. If some of your covariates are highly correlated, you may want to look at the E...
https://api.stackexchange.com
Reposted on MathOverflow Let $\,A,B,C\in M_{n}(\mathbb C)\,$ be Hermitian and positive definite matrices such that $A+B+C=I_{n}$, where $I_{n}$ is the identity matrix. Show that $$\det\left(6(A^3+B^3+C^3)+I_{n}\right)\ge 5^n \det \left(A^2+B^2+C^2\right)$$ This problem is a test question from China (xixi). It is sa...
Here is a partial and positive result, valid around the "triple point" $A=B=C= \frac13\mathbb 1$. Let $A,B,C\in M_n(\mathbb C)$ be Hermitian satisfying $A+B+C=\mathbb 1$, and additionally assume that $$\|A-\tfrac13\mathbb 1\|\,,\,\|B-\tfrac13\mathbb 1\|\,,\, \|C-\tfrac13\mathbb 1\|\:\leqslant\:\tfrac16\tag{1}$$ in the ...
https://api.stackexchange.com
Is anyone aware of any research/papers/software for identifying a trail (as a line or point-to-point curve) in an image of a forest scene (from the perspective of the camera standing somewhere along the trail)? I'm trying to find an algorithm that could take an image like: and produce a mask, identifying a likely "tra...
I don't believe you have enough information in the source image to produce the mask image. You might start by segmenting on color, i.e. green is not trail, gray/brown is. However, there are gray/brown regions on the "trail borders" that are not represented in your mask. (See the lower left quadrant of your source im...
https://api.stackexchange.com
We were given the following exercise. Let $\qquad \displaystyle f(n) = \begin{cases} 1 & 0^n \text{ occurs in the decimal representation of } \pi \\ 0 & \text{else}\end{cases}$ Prove that $f$ is computable. How is this possible? As far as I know, we do not know wether $\pi$ contains every sequence of digits (or which...
There are only two possibilities to consider. For every positive integer $n$, the string $0^n$ appears in the decimal representation of $\pi$. In this case, the algorithm that always returns 1 is always correct. There is a largest integer $N$ such that $0^N$ appears in the decimal representation of $\pi$. In this ca...
https://api.stackexchange.com
Why do human women have periods when most animals don't? It is known that the unfertilized egg needs to be shed from the uterus. But why shed the whole endometrium? Why didn't evolution put macrophages to work to simply digest the ovum and only the ovum, instead of the physiologically, energy-draining process of menstr...
Short answer Shedding or reabsorbing the endometrial lining is energetically advantageous to the female.The advantage of shedding over re-absorption may be that sperm-born pathogens are removed from the uterus. A more parsimonious explanation, however, is that the endometrium in primates has developed into too large of...
https://api.stackexchange.com
I apologize if this is a vague question, but here goes: Over the past few years, functional programming has received a lot of attention in the Software Engineering community. Many have started using languages such as Scala and Haskell and claimed success over other programming languages and paradigms. My question is: a...
I've only done a little bit of functional programming, so take this answer with a grain of salt. Pros: Functional programming looks very mathematical; it's a nice paradigm for expressing some mathematical concepts There are good libraries available for things like formal verification of programs and theorem proving, s...
https://api.stackexchange.com
In my experimentation, I've used only BJTs as switches (for turning on and off things like LEDs and such) for my MCU outputs. I've been repeatedly told, however, that N-channel enhancement-mode MOSFETs are a better choice for switches (see here and here, for examples), but I'm not sure I understand why. I do know that ...
When is a MOSFET more appropriate as a switch than a BJT? Answer: 1) a MOSFET is better than a BJT when: When you need really low power. MOSFETs are voltage-controlled. So, you can just charge their Gate once and now you have no more current draw, and they stay on. BJT transistors, on the other hand, are current-con...
https://api.stackexchange.com
I'd like to learn which format is most commonly used for storing the full human genome sequence (4 letters without a quality score) and why. I assume that storing it in plain-text format would be very inefficient. I expect a binary format would be more appropriate (e.g. 2 bits per nucleotide). Which format is most comm...
Genomes are commonly stored as either fasta files (.fa) or twoBit (.2bit) files. Fasta files store the entire sequence as text and are thus not particularly compressed. twoBit files store each nucleotide in two bits and contain additional metadata that indicates where there's regions containing N (unknown) bases. For ...
https://api.stackexchange.com
It could seem an easy question and without any doubts it is but I'm trying to calculate the variance of white Gaussian noise without any result. The power spectral density (PSD) of additive white Gaussian noise (AWGN) is $\frac{N_0}{2}$ while the autocorrelation is $\frac{N_0}{2}\delta(\tau)$, so variance is infinite?
White Gaussian noise in the continuous-time case is not what is called a second-order process (meaning $E[X^2(t)]$ is finite) and so, yes, the variance is infinite. Fortunately, we can never observe a white noise process (whether Gaussian or not) in nature; it is only observable through some kind of device, e.g. a (B...
https://api.stackexchange.com