qid int64 1 4.65M | metadata listlengths 3 3 | prompt stringlengths 31 25.8k | chosen stringlengths 17 28.2k | rejected stringlengths 19 40.5k | domain stringclasses 28
values |
|---|---|---|---|---|---|
5,321 | [
"https://scicomp.stackexchange.com/questions/5321",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/3304/"
] | I'm trying to understand how to compute the value of Pi by means of the Monte Carlo simulation.
I have a circle inside a square where the sides of the square are tangent to the circle. As data I have the number of random points and the ratio between the lenght of one side of the square and the diameter.
$$\displaystyl... | Suppose, that your circle have unitary radius: $r=1$, then length of square's side equal to $l = r_a \cdot d = 2\cdot r_a$.
So, area of circle equals to $S_c = \pi$ and area of square equals to $S_s = 4 r_a^2$.
If you "throw" $N_t$ random points inside of square, a part of them (say, $N_c$) will fall into the circle.... | I don't think that you can find the radius $r$ with the informations that you provide. For example, you can imagine having
<ul>
<li>a circle with diameter $d=1$ centered in a square with side $l=1$</li>
<li>a circle with diameter $d=2$ centered in a square with side $l=2$</li>
</ul>
Both circles will be tangent to t... | https://scicomp.stackexchange.com |
171,337 | [
"https://math.stackexchange.com/questions/171337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/35135/"
] | <blockquote>
Determine whether each of these sets is countable or uncountable. For those that are countably infinite, exhibit a one-to-one correspondence between the set of positive integers and that set.
1) Integers not divisible by $3$.
2) Integers divisible by $5$ but not by $7$.
</blockquote>
I figur... | They are both indeed countable. for the second one, you can use the fact that all numbers divisible by $5$ and $7$ are divisible by $35$, so the set is equivalent to
"Integers divisible by $5$ but not by $35$".
Also, for the first part of the question (simply "are they countable?"), you can simply show that they're a... | If $a$ and $b$ are relatively prime, then the numbers divisible by $a$ but <em>not</em> by $b$ belong to the set $$\{\text{lcm}(a,b)k+a,\text{lcm}(a,b)k+2a, \ldots, \text{lcm}(a,b)k+(b-1)a : k \in \mathbb{Z}\}$$
| https://math.stackexchange.com |
347,171 | [
"https://mathoverflow.net/questions/347171",
"https://mathoverflow.net",
"https://mathoverflow.net/users/24965/"
] | Let <span class="math-container">$\text{ppTop}$</span> denote the category of pointed and path connected topological spaces with morphisms base-preserve continuous maps. The fundamental group gives a functor <span class="math-container">$FG: \text{ppTop}\to \text{Gp}$</span> where GP is the category of groups.
Now we ... | For any such lift <span class="math-container">$\widetilde{FG}:\mathrm{pTop}\to \mathrm{Gp}$</span> the induced map <span class="math-container">$pTop(X,Y)\to Gp(\widetilde{FG}(X),\widetilde{FG}(Y))$</span> must factor through the set of homotopy classes of the maps between <span class="math-container">$X$</span> and <... | There is a more topological way. If you assume that <span class="math-container">$X$</span> admits a universal covering <span class="math-container">$\tilde X$</span> (so <span class="math-container">$X$</span> is path connected and semilocally simply connected, I believe) then the <span class="math-container">$G=\pi_1... | https://mathoverflow.net |
6,789 | [
"https://mathoverflow.net/questions/6789",
"https://mathoverflow.net",
"https://mathoverflow.net/users/382/"
] | Of course "flatness" is a word that evokes a very particular geometric picture, and it seems to me like there should be a reason why this word is used, but nothing I can find gives me a reason!
Is there some geometric property corresponding to "flatness" (of morphisms, modules, whatever) that makes the choice of termi... | A lot of people will tell you that flatness means "continuously varying fibres" in some sense, and that flatness was invented to have correspondingly nice <em>consequences</em>, which is true. But there is a way to expect this (vague) interpretation <em>a priori</em> from an alternative, equivalent definition:
An $A$... | The key geometric meaning is that flat families are those families where the fibers vary "continuously". This notion allows one to talk about limits of families of algebraic varieties, which is particularly important in the study of deformation theory/moduli problems. Since the colloquial meaning of flatness also sug... | https://mathoverflow.net |
70,687 | [
"https://cs.stackexchange.com/questions/70687",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/66813/"
] | Suppose I have an algorithm that runs in $O(n)$ for every input of size $n$, but only after a pre-computation step of $O(n^2)$ for that given size $n.$ Is the algorithm considered $O(n)$ still, with $O(n^2)$ amortized? Or does big O only consider one "run" of the algorithm at size $n$, and so the pre-computation step i... | I understand that you have some computational problem with input size $n$, and you use $f(n)$ time for preprocessing. Perhaps after that, you can answer some kind of queries in $g(n)$ time. Both $f$ and $g$ are functions of the input size, and you can now apply Big Oh and say, for instance, that $f(n) = O(n^2)$ and $g(... | When you write about "the complexity", you must write exactly what you are measuring.
In your example, the time for solving one single problem of size n is $O (n^2)$ (actually, it could be better if there is an algorithm that doesn't do the reusable pre-computation and is faster than $O (n^2)$).
The time for solvin... | https://cs.stackexchange.com |
3,098,637 | [
"https://math.stackexchange.com/questions/3098637",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/14096/"
] | Let <span class="math-container">$f$</span> be a non negative function defined on <span class="math-container">$[0,1]$</span> and <span class="math-container">$\displaystyle \int^{1}_{0}(f(x))^2dx=1$</span>
Find the max of <span class="math-container">$\displaystyle \int^{1}_{0}f(x) x^{2002}dx$</span>
What I tried ... | <strong>Hint:</strong> The Cauchy-Schwarz inequality says that
<span class="math-container">$$
\left(\int_0^1 x^{2002}f(x)\,dx\right)^2 \leq \int_0^1 (x^{2002})^2dx \cdot \int_0^1 (f(x))^2dx
$$</span>
| Your method can be refined: for every <span class="math-container">$c>0$</span>,
<span class="math-container">$$
\int^{1}_{0}\bigg(f(x)-c\cdot x^{2002}\bigg)^2\mathrm dx=\int^{1}_{0}(f(x))^2\mathrm
dx+c^2\int^{1}_{0}x^{4004}\mathrm dx-2c\int^{1}_{0}x^{2002}f(x)\mathrm dx\geq 0.
$$</span> Thus for every <span class... | https://math.stackexchange.com |
39,936 | [
"https://dba.stackexchange.com/questions/39936",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/22523/"
] | I am very new at SQL and databases in general. I only use them for the occasional homework so I haven't even tried to master them.
I have seats at a theater, the seats are divided into 4 main areas (A, B, C, D). Each area has the same number of rows and the same number of seats per row.
In my database, I'd like to ha... | You should use one table for this, unless you need more stringent constraints.
<blockquote>
Each area has the same number of rows and the same number of seats per row.
</blockquote>
Let's say there are 5 rows in every area, and 6 seats in every row. You'd want to use something along these lines.
<pre><code>create... | If the information for the seat entity is the same per area, then you could simplify the design by having just one <code>Seats</code> table with an <code>Area</code> column.
In this case, the query would look something like:
<pre><code>SELECT ... FROM Seats
WHERE Seats.Area = 'A'
AND Seats.Row = X
AND Seats.Number... | https://dba.stackexchange.com |
294,837 | [
"https://physics.stackexchange.com/questions/294837",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/137267/"
] | I am trying to brush up my rusty intuition on second quantization and many-particle systems and i came across the following problem:
In 1-particle QM we have the continuity equation
$$
\frac{\partial}{\partial t}\left(\psi\psi^*\right)=\frac{i\hbar}{2m}\left(\psi^*\triangle\psi-\psi\triangle\psi^*\right)
$$
Now, in m... | $\def\rr{{\bf r}}
\def\ii{{\rm i}}$
There is indeed a continuity equation for the particle density $\rho(\rr)=\Psi^\dagger(\rr)\Psi(\rr),$ where the field operator $\Psi^\dagger(\rr)$ creates a particle at position $\rr$. To derive it, you need only the canonical commutation relations for the field
\begin{align}
[\Psi... | The many-body probability continuity equation follows from the Schrödinger equation in the same way as in the one-particle case. Assume n particles with coordinates $x_{1,i},x_{2,i},x_{3,i}$ in 3-D space with the Hamiltonian operator $$H=\sum_{i~=~1}^n\sum_{j~=~0}^3 \left[p_{i,j}^2/2m+W_i(x_{j},t)\right]+V(x_{1,1},x_{2... | https://physics.stackexchange.com |
56,330 | [
"https://softwareengineering.stackexchange.com/questions/56330",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7764/"
] | In job interviews I am frequently asked if I know the company, explain why do I think I would be the best choice for this company, etc and I have never liked this kinds of questions.
Using your experiences in job interviewing, what do you think it would happen if I ask the interviewer to explain me why he think the co... | I think it's a great question. Remember that interviews are a two-way process. They evaluate you to see if you'll fit into their team, but at the same time you need to evaluate the company to check that you'll enjoy working there.
If the company can't convince you that they're a good fit for you, why work there?
Gr... | Usually, this quesion is phrased "Which benefits does the company offer? Anything beyond the usual standards?". Assuming you are not in a desperate situation, this is a very valid question to ask.
Asking the "Why is this company the best choice" question assumes that the other person knows what is most important for y... | https://softwareengineering.stackexchange.com |
698,033 | [
"https://math.stackexchange.com/questions/698033",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/132606/"
] | Is the equation $x \equiv -6 \bmod 5$ identical to $x \equiv 4 \bmod 5$ or to $\equiv 1 \bmod 5$?
Generally what is the best way to convert negative constant into positive? Do we have a formula for it?
| You can add 5 without changing value. So mod 5, $-6 \equiv -1 \equiv 4$.
| By definition of congruence $\pmod n$ $$ x \equiv y \pmod n \Longleftrightarrow \exists \ m \ s.t. \ x-y =m*n$$
Clearly all the letters denote integers. So it is a consequences of definition that adding multiple of $n$ doesn't change anything.
<strong>in fact</strong> you can view congruence mod a number like viewi... | https://math.stackexchange.com |
110,669 | [
"https://datascience.stackexchange.com/questions/110669",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/135375/"
] | <pre><code>import numpy as np
import pandas as pd
from sklearn.neural_network import MLPClassifier
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
#read data
data=pd.read_csv('adult-stretch.data', header=None)
#convert to arr... | Maximum likelihood is a method for estimating parameters.
Gradient descent is a numerical technique to help us solve equations that we might not be able to solve by traditional means (e.g., we can't get a closed-form solution when we take the derivative and set it equal to zero).
<strong>The two can coexist.</strong>
I... | I think you are comparing apples and oranges here. Maximum likelihood is a the maximum value of your likelihood function, which somehow describes your data generation process. Specifically likelihood gives you the probability of observing your data, given the data-generation model you imagine. It is similar to a loss m... | https://datascience.stackexchange.com |
155,148 | [
"https://physics.stackexchange.com/questions/155148",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/65074/"
] | Here is a traditional derivation of time dilation:
<blockquote>
There's a train with a lamp in the ceiling, moving at velocity v with respect to an observer. In the frame of the observer, the path taken by the light from the lamp straight down to the ground is actually diagonal because the train has moved forwards b... | The empirical answer to the question is simple: <em>radioactive beams have longer half-lives as measured in the lab frame than the same particles have when at rest.</em>
This was first noticed in the context of cosmic-ray muons, and later in the hadronic spray emerging from deep inelastic scattering, and these days w... | Time dilation applies to light clocks and matter (clocks) equally.
This really arises from the following law...
<ol>
<li>The speed of light is an absolute speed limit for matter.</li>
</ol>
If you take a property of matter, say temperature, it is just the average kinetic energy of particles moving relative to each othe... | https://physics.stackexchange.com |
3,151,789 | [
"https://math.stackexchange.com/questions/3151789",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/602383/"
] | A Craps game consists of throwing 2 dices. If the sum is either 7 or 11, you win. Else, if the sum is either 2,3 or 12, then you loose. If the sum is either 4, 5, 6, 8, 9 or 10, then let's call the sum <span class="math-container">$X$</span>. You will throw the two dices again, until the sum 7 (you loose) or the sum is... | I'd attack the problem of whether you successfully score a point before crapping out with a <span class="math-container">$7$</span> a little more simply. If you have a point, the only issue is whether you roll that point before you roll a <span class="math-container">$7$</span>. All other throws are irrelevant so you... | Let's solve the problem in a much easier manner. Denote the probability of winning the game after <span class="math-container">$n$</span> times playing Craps by <span class="math-container">$p_n$</span>. Therefore<span class="math-container">$$p_n{=\Pr(\text{Winning at the n-th chance})\\=\Pr(\text{Postponing the first... | https://math.stackexchange.com |
155,762 | [
"https://electronics.stackexchange.com/questions/155762",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/68009/"
] | I recently purchased a NIMH Battery (5000MAH, 7.2V) and when I plugged it into my Tenergy Battery Charger I set the charge rate to 5amps. After watching it for several minutes the "voltage" jumped to around 8volts. Did I set it to the correct amps? Why did it exceed its apparent voltage limit?
Sorry, I'm still new to... | <strong>It's fine.</strong> If your cells are rated for a nominal 7.2 volts that means it's 7.2/1.2=6 cells. When charging NiMH's especially when you're charging them fast, the voltage can get up pretty high relative to the nominal voltage.
<img src="https://i.stack.imgur.com/vHg6E.png" alt="enter image description her... | Most likely not. I have several "professional-class" chargers and they all show voltage much higher than the rated pack voltage while charging.
That said: I <em>really</em> don't like charging NiMh or NiCd batteries at a rate higher than about C/2 (or lower). Your batteries will thank you by giving you longer servic... | https://electronics.stackexchange.com |
30,235 | [
"https://physics.stackexchange.com/questions/30235",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/9916/"
] | Assume there is a completely frictionless surface. Would touching such a surface be possible? If so, what would it feel to the touch?
| I'd guess the downvote (the downvote wasn't me BTW :-) is because "what your fingers feel" isn't really a physics question. I'd say it was biology or physiology or something like that.
Anyhow, to get back to your question, it's possible to make surfaces that are almost entirely frictionless by using a fluid layer as a... | I think that frictionless surface can't be felt.
I'll give you an example.
When you are walking, you feel air.
When you are running you feel it better.
And when travelling by any motor vehicle, you feel it in much better way.
This shows that friction is important to feel.
Thats why you can't feel frictionl... | https://physics.stackexchange.com |
122,736 | [
"https://mathoverflow.net/questions/122736",
"https://mathoverflow.net",
"https://mathoverflow.net/users/31696/"
] | For the projective line $CP^1$, its cohomology ring has a single generator. Moreover, this generator is given by the cohomology class of the fundamental form associated associated to the Fubini--Study Kahler metric on $CP^1$. If I have understood correctly this also holds for all the higher projective spaces.
Now the ... | Antonio,
The answer to first question is no. Let $F$ be the variety of full flags in $\mathbb{C}^3$. This can be viewed as variety of
pairs $F=\lbrace (p,\ell)\in \mathbb{C}\mathbb{P}^2\times \mathbb{C}\check{\mathbb{P}}^2\mid p\in \ell\rbrace$. There are two generators for cohomology given by pulling back the Kaehler... | If you look at the second question, the OP is asking when the cohomology ring can be generated by some <em>set</em> of Kähler forms, not by a <em>single</em> Kähler form. Thus, while the variety $F$ of full flags in $\mathbb{C}^3$ has two generators, say $\omega_1$ and $\omega_2$ that are <em>not</em> Kähler forms, the... | https://mathoverflow.net |
20,295 | [
"https://robotics.stackexchange.com/questions/20295",
"https://robotics.stackexchange.com",
"https://robotics.stackexchange.com/users/24870/"
] | For my master thesis in robotics I have to compute the orientation error between two coordinate frames, called E and H. Their orientation is expressed through rotation matrices (3x3) with respect to a "world frame", W.
Remark: writing <span class="math-container">$R_A^B$</span> I'm indicating the orientation of frame A... | The rotation error between two frames can be viewed in two ways:
<ol>
<li>The orientation of one frame as seen from the other, calculated by multiplying the inverse of the observing frame by the observed frame. For frames <span class="math-container">$E$</span> and <span class="math-container">$H$</span>, this error i... | A rotation matrix represents the rotation between two frames. Therefore, it does not make sense to talk about in which "one" frame the error rotation is expressed. Namely, the rotation matrix <span class="math-container">$R^B_A$</span> represents the rotation from frame <span class="math-container">$B$</span> to frame<... | https://robotics.stackexchange.com |
175,883 | [
"https://dba.stackexchange.com/questions/175883",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/122901/"
] | Consider we have a database for an windows application it's for 2 years ago, now we have changed many things in database so there is differences and we don't know what are the differences.
I don't want to use compare tools like Red Gate compare tool.
What's the best way to see new columns are in new database :
Query... | <strong>Columns in old database but not in new , or default value, nullable and data type changed:</strong>
<pre><code>SELECT t1.*,
t2.*
FROM [OldDb].[INFORMATION_SCHEMA].[COLUMNS] t1
LEFT JOIN [NewDb].[INFORMATION_SCHEMA].[COLUMNS] t2
ON t1.COLUMN_NAME = t2.COLUMN_NAME
WHERE t2.COLUMN_NAME I... | While nothing wrong with your own approach, I might prefer <code>EXCEPT</code> to grab all the differences here...
<pre><code>;WITH
a AS (
SELECT *
FROM [OldDB].INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'foo_table'
)
,b AS (
SELECT *
FROM [NewDB].INFORMATION_SC... | https://dba.stackexchange.com |
286,941 | [
"https://math.stackexchange.com/questions/286941",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/53128/"
] | I have gotten this far, but I'm not sure how to make it apply to all rational and irrational numbers....
http://i.imgur.com/6KeniwJ.png">
BTW, I'm quite newbish so please explain your reasoning to me like I'm 5. Thanks! <img src="https://i.stack.imgur.com/vMj4s.png" alt="">
UPDATE:
<img src="https://i.stack.imgur.c... | Let $p/q$ be a rational number and $r$ be an irrational number.
Consider the number $w = \dfrac{p/q+r}2$ and prove the following statements.
$1$. If $p/q < r$, then $w \in ]p/q,r[$. (Why?)
$2$. Similarly, if $r < p/q$, then $w \in ]r,p/q[$. (Why?)
$3$. $w$ is irrational. (Why?)
| let $a$ be rational and $b$ be irrational $\frac{a+b}{2}$ is between them and irrational.
| https://math.stackexchange.com |
47,401 | [
"https://stats.stackexchange.com/questions/47401",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/18526/"
] | Which null hypothesis can be tested by a $\chi^2$ test?
could you please write the description of the relevant null hypothesis or at least give an example.
Thank you.
| There are <em>lots</em> of things to test with chi-square. Perhaps the most common, in my experience anyway, is whether two categorical variables are associated. But also whether one variable fits a certain distribution. It can also come up in testing of various models.
| It is used to check if a given sample is of a certain law (goodness-of-fit test), and it's also used to check whether to samples are independent.
Here's an example using R
<pre><code>x=rnorm(100)
y=rnorm(100)
chisq.test(x,y) # test for goodness of fit
</code></pre>
HTH
| https://stats.stackexchange.com |
189,596 | [
"https://electronics.stackexchange.com/questions/189596",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35526/"
] | Here's the isochronous endpoint descriptor:
<pre><code>0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type */
CONSUMER_ENDPOINT, /* Endpoint address and description */
CY_U3P_USB_EP_ISO, /* Iso endpoint type */
0x00,0x04, ... | The capacitors don't conduct when the supply is pure DC so ignore them. Next use ohms law to calculate current through R11 and R12. Hint Rtotal = R11+R12.
Next calculate the voltage across R12 given that current you just calculated.
Or, you can just simply look at it and notice that R11 and R12 are the same value hen... | When working with EE, there are two things to remember: superposition and symmetry. In this case, the symmetry is pretty clear, so DDR_VREF = 1V5_DDR/2.
| https://electronics.stackexchange.com |
128,940 | [
"https://softwareengineering.stackexchange.com/questions/128940",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/18384/"
] | For example, I've got a root object exposed in a SOA service, say <code>Invoice</code> (<code>Invoice</code> has line items as children).
Sometimes, I need to retrieve its detail line items. I'm thinking to make it lazy loading, because it's a traffic overhead to transfer line items every time <code>Invoice</code> is... | There is nothing wrong in calling a service again to get the invoice items. On service level:
<ol>
<li><code>ServiceInvoice LoadInvoice(Guid invoiceId)</code> will get you the invoice without the details,</li>
<li><code>List<InvoiceItem> LoadDetails(Guid invoiceId)</code> will get you the lines.</li>
</ol>
Afte... | What I would do is to implement a client library that interacts with that service and then use some proxy to provide lazy loading.
For example, your service could return Invoice POCOs and InvoiceLine POCOs in two separate calls.
Now, as the user/caller/client of that service, you can have your own client library that ... | https://softwareengineering.stackexchange.com |
2,578,218 | [
"https://math.stackexchange.com/questions/2578218",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/516330/"
] | $\newcommand{\R}{\operatorname{Ran}} \newcommand{\K}{\operatorname{Ker}}\newcommand{\b}{\mathbf}$If $A$ is a linear operator then prove that $A = A'P_{\R A^*}$ in the domain $\R A^*$; $A'$ is an invertible transformation from $\R A^* \to \R A$ such that $A' \ = A $ on $\R A^*$ and $P_{\R A^*}$ is orthogonal projectio... | In your proof of injectivity of $A'$, you started with $Ay=0$ (instead of $A'y=0$), but $Ay=0$ implies $A'y=0$ only if $y\in\operatorname{Ran}(A^\ast)$, but not for general $y\in\Bbb C^n$.
Similarly, in the proof of surjectivity, you write $Ax=A'x$, but this holds only for $x\in\operatorname{Ran}(A^\ast)$ and is false,... | For this answer, I will use "range of" instead of "Ran".
I might be missing something but the way this question is asked, projection onto the range of A* -when the domain is range of A*- is, well, just the identity.
As such, we now need to show A = A' on range of A*, but that is already given in the question.
Hopef... | https://math.stackexchange.com |
670,864 | [
"https://physics.stackexchange.com/questions/670864",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/316128/"
] | I understand that if some wavefunction <span class="math-container">$\psi(x)$</span> is a an eigenfunction of some operator, say, momentum <span class="math-container">$-i \hbar \frac{d}{dx}$</span>, then:
<span class="math-container">$$\hat{p}\psi(x)=p\psi(x) \equiv \hat{p}\left| \psi \right> = p \left| \psi \right... | The possible values that can result from measuring an observable <span class="math-container">$\hat{O}$</span> is the observables spectrum <span class="math-container">$\sigma(\hat{O})$</span>. The spectrum of an operator is the set of its eigenvalues (this is not completely true, but let's just ignore that here).
The ... | It means you can use the eigenvalue <em>as a label</em> for the state since (in your example) <span class="math-container">$\Delta p=0$</span>. Not only is the average value <span class="math-container">$p$</span>, but there is no fluctuation in this outcome.
Hence for instance we can <em>label</em> hydrogen states by... | https://physics.stackexchange.com |
297,826 | [
"https://physics.stackexchange.com/questions/297826",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/36793/"
] | In time-independent perturbation theory, one writes $$\hat{H}=\hat{H}_0+\lambda \hat{H}^\prime$$ where $\lambda H^\prime$ is a "small" perturbation.
<ol>
<li>Why should the perturbation be small for perturbation theory to work?</li>
<li>Both $\hat{H}_0$ and $\hat{H}^\prime$ are operators. Therefore, what does it mean... | Answer to (2); saying that the perturbation is "small"...all that means is that $\lambda << 1$.
As a silly example: if $\hat{H}_{0} = \left[ \begin{matrix} 1 & 0 \\ 0 & -1 \end{matrix} \right]$ and $\hat{H}^{\prime} = \left[ \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \right]$, and if you've got a... | When one assumes the solution to the perturbed system is of the form
$$|\psi\rangle=\sum_{n=0}^\infty \lambda^n|\psi_n\rangle$$
where $|\psi_0\rangle$ is an eigenstate of $H_0$, one hopes that the expression is meaningful <em>and</em> that only the first few terms are significant which is to say that $|\psi\rangle$ i... | https://physics.stackexchange.com |
27,571 | [
"https://mechanics.stackexchange.com/questions/27571",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/13624/"
] | I recently acquired a chevy 350 manufactured in 2015 for free because of some crank issues. I'm in the process of rebuilding it and have finished the disassembly of the engine. The engine itself only has 200 miles on it would it be necessary to replace the piston rings on the piston heads or can I leave the ones in the... | With only 200 miles on the engine, I'm thinking you could get away with using the same rings on the engine as long as you didn't see any scoring on the cylinder walls or any other obvious damage.
With that said, a stock set of piston rings is dirt cheap for a 350 or a SBC in general ... as long as you are talking abou... | I would replace the piston rings and inspect the pistons for any signs of damage. You are already investing money in repairing the engine. It does not make sense to skip such an important part. Make sure that the cylinder surface is prepared properly. A good machine shop should be able to do the work for not a lot of m... | https://mechanics.stackexchange.com |
151,503 | [
"https://cs.stackexchange.com/questions/151503",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/150645/"
] | Consider the following problem:
<blockquote>
<ul>
<li>Input: A Turing Machine M and a DFA D.</li>
<li>Question: Is <span class="math-container">$L(D) \subseteq L(M)$</span>?</li>
</ul>
</blockquote>
Of course, this problem is not decidable. Because it is known that judging whether a word belong to a Turing Machine is n... | Assume <span class="math-container">$n\ge2022$</span>. Consider a sequence of <span class="math-container">$n$</span> INSERTs.
<em><strong>Lower bound of time for <span class="math-container">$n$</span> INSERTs</strong></em><br />
Each expansion that has been done expands the capacity by no more than <span class="math-... | You can't use the physicists' or accountants' method, as these are only applicable for proving an <em>upper</em> boundon the amortized cost, and you need a <em>lower</em> bound.
Consider the time it takes to double in size from <span class="math-container">$n$</span> to <span class="math-container">$2n$</span>. Each ex... | https://cs.stackexchange.com |
317,535 | [
"https://physics.stackexchange.com/questions/317535",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/148036/"
] | Let's suppose you entangled two photons, you separate the photons, and then you measure the polarization of one the photons collapsing its wave function. The wave function of the other photon collapses also?
| Each photon does not have its own wave function. They are entangled. By definition, there is only one wave function between them. One function describes both particles simultaneously. If you do something to one particle that alters the wave function, then that's it; the wave function is altered.
Here's an analogy: I h... | If you have two spins in an entangled state they define a wave function
$$
|\psi\rangle~=~\frac{1}{\sqrt{2}}\left(|+\rangle|-\rangle~+~e^{-i\phi}|-\rangle|+\rangle\right)
$$
in a singlet state of entanglement. What exists is the entangled state. In effect the individual spin states do not exist. A measurement of one sp... | https://physics.stackexchange.com |
29,913 | [
"https://electronics.stackexchange.com/questions/29913",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/16307/"
] | Inside a computer, a crystal oscillator sends signals to a microcontroller or microprocessors. I want to know if the crystal oscillator is increasing the frequency or generating pulses. My questions are:
1) Clock rates of computers are high which means crystal oscillator's frequency is high too. Is the crystal oscilla... | <ol>
<li>I don't know what you mean when you say "Clock rates of computers are too high". Too high for what? They're high, yes, often as high as technology will allow (GHz), often as low as the application allows, for instance a 32kHz watch crystal, if only little processing power is required, or power has to be limite... | <ol>
<li>Oscillators, as the name suggest, oscillate, thus generating the clock themselves - which means, you don't need to give them a signal, just a supply.</li>
<li>They are fed by a DC voltage, the same that supplies the microcontroller; the AC mains voltage has to be rectified and lowered by the PSU (Power Supply ... | https://electronics.stackexchange.com |
57,952 | [
"https://mathoverflow.net/questions/57952",
"https://mathoverflow.net",
"https://mathoverflow.net/users/9246/"
] | Fix $p>0$ a rational prime, and $K$ an algebraic number field with Galois group $G_K:=Gal(\bar{\mathbb{Q}}/K) $. The Fontaine-Mazur conjecture predicts that if $\rho:G_K\rightarrow GL(V)$ is a finite dimensional $\mathbb{Q}_p$-representation, then it comes from a motive over $K$ (like a subquotient of $H^i_c(X\times... | Here are two things that can occur:
1) If V is the representation attached to an overconvergent modular form f, then V will be unramified at almost every prime but will not be de Rham at p (unless f is classical).
2) Ramakrishna has written an article "Infinitely ramified Galois representations". Here's part of the i... | On the contrary, it is not so hard by deformation theoretic arguments to create $p$-adic Galois representations which are not even Hodge--Tate at $p$ (and hence not de Rham (equivalently, pst) at $p$). So a reasonable intuition is that "most" $p$-adic Galois representations are not de Rham at $p$.
| https://mathoverflow.net |
731,576 | [
"https://physics.stackexchange.com/questions/731576",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/332903/"
] | We know the following formula:
<span class="math-container">$$P=V^2/R.$$</span>
I want to ask <strong>what the <span class="math-container">$R$</span> in the above formula represents.</strong> Is it the normal resistance of the resistor (load) or is it the increased resistance of the resistor (load) due to heat generat... | The relation <span class="math-container">$P=V^2/R$</span> gives the power <span class="math-container">$P$</span> dissipated by a given element that's subjected to an external voltage <span class="math-container">$V$</span> and which presents an electrical resistance <span class="math-container">$R$</span> <em>at the ... | I think you should interpret the <span class="math-container">$100W$</span> power of the lamp as the power of the lamp at operating temperature. Hence, at operating temperature the resistance is <span class="math-container">$576\Omega$</span>, and thus at room temperature the resistance will be a factor <span class="ma... | https://physics.stackexchange.com |
36,118 | [
"https://mathoverflow.net/questions/36118",
"https://mathoverflow.net",
"https://mathoverflow.net/users/8636/"
] | Most cellular automata are defined as being updated synchronously. I am interested in asynchronous automata, where they do not all have to update simultaneously. I am restricting myself to cellular automata on a graph (e.g. lattice) where the cellular automata is a FSM and all of the automata on the graph are identica... | Perhaps you were told about
<blockquote>
Larry J. Stockmeyer, Albert R. Meyer: Cosmological lower bound on the circuit complexity of a small problem in logic. J. ACM 49(6): 753-784 (2002)
</blockquote>
From the abstract: <em>"An exponential lower bound on the circuit complexity of deciding the weak monadic second-o... | The general fact surrounding some of the other answers is
the following:
Every computably axiomatizable consistent theory $T$
containing trivial arithmetic admits very short theorems
requiring extremely long proofs.
The basic fact is that there can be no total computable
bound on the length of the proof required. To ... | https://mathoverflow.net |
162,977 | [
"https://softwareengineering.stackexchange.com/questions/162977",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/39815/"
] | I am extracting interfaces from some classes in .NET, and I am not completely sure about what level of detail of description to use for some of the interface members (properties, methods).
An example:
<pre><code>interface ISomeInterface
{
/// <summary>
/// Checks if the object is checked out.
/// &... | I would advise taking a step back and looking at what you're trying to achieve.
What does the XML documentation give you? XDoc Documentation? Think about what you want to see in that document. Intellisense? Think about what you want to see when someone is using that method from the interface. Or are you just doing it ... | Be as specific as you can describing how interfaces should look and behave. There is no use having an interface method whose return value is ambiguous - it breaks the whole notion of interfaces. Just because few languages offer the ability to enforce all the requirements and intentions of the interface, such as the pre... | https://softwareengineering.stackexchange.com |
149,355 | [
"https://softwareengineering.stackexchange.com/questions/149355",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/52488/"
] | I often catch myself doing code unnecessarily complicated (sad but true). Is there any set of rules, discipline, etc to help avoid that? (excluding the KISS principle, because I know it but often forget when it comes to the real code :)
| As Antoine de St-Exupéry says: "A designer knows that he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away."
This is a difficult and common problem, but it's something you can address over the course of the next few years. Recognizing it's a problem is the most ... | I generally do these things to avoid over-complication
<ul>
<li>Before you start to code, make a plan and design an interface for your code. Always think about what your code is actually going to do and what it probably isn't. Be realistic about that, but don't use any quirky solutions. Each function in the interface ... | https://softwareengineering.stackexchange.com |
1,234,469 | [
"https://math.stackexchange.com/questions/1234469",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/227415/"
] | So here are the two problems:
<ol>
<li>Recursively define the set of bit strings K that do not have 00 as its substring.</li>
<li>How many bit strings of length 10 are included in the above set K?</li>
</ol>
Can someone please solve it and explain to me what's going on at each step? Thank you!
| Let $1_n$ be the set of such strings of length $n$ ending in $1$. Similarly let $0_n$ be the set of such strings ending in $0$. Then we have
$$
\begin{align}
1_{n+1}&=\{x\parallel 1\mid x\in 1_n\cup 0_n\}\\
0_{n+1}&=\{x\parallel 0\mid x\in 1_n\}
\end{align}
$$
<hr>
Define $A_n=|1_n|$ and $B_n=|0_n|$. Then we ... | Let $S$ be this set, and $\epsilon$ be the empty string.
Define $S_0 ::= 0S_*$ and $S_* ::= \epsilon \mid 1S_0 \mid 1S_*$.
$S ::= S_0 \mid S_*$.
This is BNF notation.
<hr>
Let $u_n$ be the number of strings of length $n$ in $S_0$, and $v_n$ be the number of strings of length $n$ in $S_*$.
We have $u_n = v_{n-1}$... | https://math.stackexchange.com |
1,873,328 | [
"https://math.stackexchange.com/questions/1873328",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/350836/"
] | Given a sequence $(a_n)$ in $\mathbb{R}^+$ such that for all $n, m$:
$$
(+) \quad a_{n+m} \leq K (a_n + L)
$$
where $K, L$ are positive constants, prove that $(a_n)$ is Cauchy.
<hr>
I had an idea, but it doesn't really work. Maybe the solution has nothing to do with this, but here it goes anyway.
Chose some $\epsilo... | The column- and row rank of a matrix coincide, so it does not matter whether you transpose the matrix or not.
| <ul>
<li><b>Elementary row operations alter the linear dependences among the rows, but they do not alter the row space.</b> Clearly the new rows introduced by any row operations are in the row space of the old rows. And vice-versa, since row operations can be inverted by other row operations. Since they do not alter ... | https://math.stackexchange.com |
29,238 | [
"https://cs.stackexchange.com/questions/29238",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/20972/"
] | I understand context switches and threading on a single core system, but I'm trying to understand what happens in a multi-core system. I know multiple threads from the same process can run simultaneously in a multi-core system. However, can multiple processes run simultaneously in such a system as well?
In other words... | Yes, you can categorize your problem as in NP and is NP-complete if you have the followings:
<ul>
<li>The set of real numbers from which you draw the number from and you use as input into your procedure is countable</li>
</ul>
In this case, you can represent your input as proper input into Turing machine because you ... | No, you can not say that your problem is NP-complete.
The reason is that it is not in NP: there is no Turing machine at all (let alone a poly-time (non-deterministic) one) that can solve it because TMs can not handle real numbers.
The reduction may still go through and show that the problem is NP-hard; a subset of th... | https://cs.stackexchange.com |
197,973 | [
"https://physics.stackexchange.com/questions/197973",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/74534/"
] | Is every electron in the Universe in a different quantum state? Is this what the Pauli Exclusion Principle tells us?
| The simple answer is yes, but as usual things are rather more complicated than a simple answer would suggest.
For example, if you take a free electron then it isn't quantised but has a continuous energy spectrum. This means you can't usefully talk about two free electrons being in the same quantum state. In principle ... | Note that <em>usually</em> electrons are somewhat localised, and that localisation is part of the quantum state. The Pauli principle is a consequence of the symmetrization postulate, that states that, for fermionic particles, the wavefunction must be antysymmetric if you exchange the coordinates of any two particles. A... | https://physics.stackexchange.com |
108,101 | [
"https://electronics.stackexchange.com/questions/108101",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/40956/"
] | I'm a hobbyist so my theoretical knowledge surrounding electronics is pretty limited.
I'm working on modifying a synthesizer that uses a sine wave control signal whose frequency is in the sub-audio range. The signal peaks at -5v & 5v, and is used to control things like pitch and amplitude of a signal.
I would li... | <blockquote>
Does it really mean, for example 10V per V (10V/V)?
</blockquote>
Yes, it does. For every volt the input increases or decreases by, the output increases or decreases by 10 volts. Until it comes near the rails, of course. Note that this amplification is continuous; an input increase of 0.25V will result ... | Gain is a dimensionless quantity .The plots of input voltage to out put voltages are commonly used to find the transfer characteristics of a Device or circuit or a control system .For example in CMOS inverter we use the same for finding the point at which input voltage is high enough so that the circuit act as an inver... | https://electronics.stackexchange.com |
3,365,456 | [
"https://math.stackexchange.com/questions/3365456",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/707323/"
] | A square <span class="math-container">$ABCD$</span> is divided by a straight line <span class="math-container">$g$</span> into two parts with the same surface area.
Prove that then the diagonal intersection <span class="math-container">$M$</span> of the square <span class="math-container">$ABCD$</span> lies on the line... | Suppose by contrary. i.e. <span class="math-container">$M$</span> is out side of <span class="math-container">$g$</span>. draw a line from <span class="math-container">$M$</span> to one of intersections of <span class="math-container">$g$</span> with square <span class="math-container">$ABCD$</span>. Then this segment ... | A variation on @C.F.G: suppose <span class="math-container">$M$</span> is not in <span class="math-container">$g$</span>. Take the line <span class="math-container">$g'$</span> parallel to <span class="math-container">$g$</span> which does contain <span class="math-container">$M$</span>. <span class="math-container">$M... | https://math.stackexchange.com |
8,657 | [
"https://cardano.stackexchange.com/questions/8657",
"https://cardano.stackexchange.com",
"https://cardano.stackexchange.com/users/5844/"
] | Hash functions are often called one way functions however this means that you should not be able to undo them. So why and how are SHA256 and SHA512 used in blockchains if they should be irreversible.
Also I noticed that Plutus has some unhasing functions how do these work?
| The Cardano code does not use SHA256 or SHA512, but rather uses 2 different versions of the Blake2 hash functions (but Plutus may use SHA hashes).
Hash functions are used in several places. Two simple examples are block ids (ie the hash of the block) and transaction ids (the hash of the transaction). For these two exam... | Cardano does not use SHA256 hashing. There are <strong>BLAKE2b</strong> cryptographic hashing algorithms in Cardano, and the following table represents three of them:
<hr />
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Hashing Algorithm</th>
<th>Referred as</th>
<th>Used for</th>
</tr>
</the... | https://cardano.stackexchange.com |
8,734 | [
"https://scicomp.stackexchange.com/questions/8734",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/3821/"
] | CS people:
The title is the question, as I will explain. As everyone reading this probably knows, if $A$ is a square matrix of real or complex numbers, then $e^A$, or $\exp(A)$, is the matrix of the same dimensions as $A$ defined by the obvious power series (the only thing that might not be obvious is that $A^0 =I$, ... | The matrix exponential has uses in the theory of systems of linear ordinary differential equations and in various applications in control theory, but these all lie beyond what would be discussed in an introductory course in linear algebra, and the topic is not needed to develop the rest of introductory linear algebra, ... | It's an important concept when developing numerical methods for ordinary differential equations, at least as long as they are linear. Consider, for simplicity, a homogenous system of the form $\dot x(t)=Ax(t), x(0)=x_0$, then the solution is $x(t)=e^{At}x_0$. This is easily extended to the case $\dot x(t)=Ax(t)+f(t)$.
... | https://scicomp.stackexchange.com |
135,608 | [
"https://softwareengineering.stackexchange.com/questions/135608",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/46506/"
] | Our team is developing a project using an Agile development process. All of our requirements are converted into product backlog items and task are broken down based on that. One of my team member suggested to maintain the High Level Document (HLD) and Low Level Document (LLD) for the requirement.
Do we need to have t... | No, Agile does not call for the need of HLD (or SRS, business requirements) document or LLD (or technical specification) to be associated with User Stories. These documents would be highly encouraged for the Waterfall process however.
Simply because Agile does not call for this doesn't mean that it shouldn't exist th... | Short answer no. Agile does not say much about what you must or must not do. It's mostly a set of values and a way of thinking.
However typically written requirements are pretty light in agile processes. Your HLD and LLD documents sounds heavier then what might be common.
Typically backlogs are filled with stories, s... | https://softwareengineering.stackexchange.com |
155,237 | [
"https://mathoverflow.net/questions/155237",
"https://mathoverflow.net",
"https://mathoverflow.net/users/24611/"
] | The axiom of constructibility $V=L$ leads to some very interesting consequences, one of which is that it becomes possible to give explicit constructions of some of the "weird" results of AC. For instance, in $L$, there is a definable well-ordering of the real numbers (since there is a definable well-ordering of the uni... | Yes, but it's not particularly nice: since $L$ has a definable well-ordering of the sets of reals (in fact, of all of $L$) coming from the $L$-hierarchy itself, there is a formula defining the "least" (in that well-ordering) ultrafilter, $U$.
(This $U$ isn't the only naturally definable ultrafilter in $L$; we could al... | Generally formulas in set theory are not "very nice". There is very little structure to work with.
We can define when $U$ is a filter over $X$, simply by saying that every element of $U$ is a subset of $X$, and $U$ is closed under superset (below $X$), and under finite intersections (recall that in set theory we can s... | https://mathoverflow.net |
210,785 | [
"https://dba.stackexchange.com/questions/210785",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/-1/"
] | We receive an order list, and validate it starts with certain prefixes, example if OrderNumber does not start with ABC, than display order list to user as error. We use exists, to search for first existence, don't want to consume much performance time. If none exist, then we can start conducting other task in code.
Is... | Unfortunately I'm afraid by trying to prevent repeating code you might end up in writing more code and making the query less readable.
But I believe this can be advantageous for you - take into account situations where in the test you would only have to search in a one or two tables, where in order to retrieve all the ... | Unfortunately, for a variety of reasons (not just legacy) SQL does not have nearly all of the code re-use options and features that most client languages have and some of them (like scalar UDFs) have significant problems. So to a large extent, if you want to be an effective SQL programmer, you have to resign yourself ... | https://dba.stackexchange.com |
11,592 | [
"https://astronomy.stackexchange.com/questions/11592",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/6965/"
] | Famously, when Eddington attempted to measure gravitational lensing during the Eclipse, it was the measured <em>magnitude</em> of the lensing that gave gravity [pun, obviously, intended] to General Relativity - not the measurement of lensing itself. That is, Newtonian physics also predicted a lensing deflection, but on... | A photon is an entity defined in the context of a relativistic field theory, and so it doesn't really make sense to talk about the Newtonian bending of a photon. Necessarily, we need to substitute an analogous question that's sensible in the Newtonian framework. To do so, we can imagine a classical <em>corpuscle</em> o... | Newtonian treatments of the bending of light go back to Laplace who, in 1798, wrote about light escaping from massive bodies, ie: black holes! See Appendix A of Hawking and Ellis "Large Scale Structure of Space-Time" where there is a nice translation of Laplace's paper.
Newtonian treatments cannot properly deal with... | https://astronomy.stackexchange.com |
73,692 | [
"https://physics.stackexchange.com/questions/73692",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/5265/"
] | So there I was resting me eyes thinking about rocket drives, and what-not. The thought struck me that, perhaps, even before Mr. Einstein interferes with the increasing velocity of the spacecraft Mr. Newton may have something to say.
Please poke me in the rib if my comprehension is wrong -
A rocket, basically a react... | <blockquote>
At this stage, does the rocket still accelerate the craft?
</blockquote>
If by "velocity of the exhaust" we are talking about its velocity measured in the frame of the rocket, then Yes. Let $\mathbf u$ be the exhaust velocity as measured in the rocket frame, then in free space, the non-relativistic roc... | The velocity of the rocket is irrelevant. The rocket can be considered as a frame of reference from which the exhaust gases are ejected at a certain speed - therefore the exhaust gases will always move away from the rocket at the same speed. If the rocket keeps producing thrust then it will keep accelerating, and the... | https://physics.stackexchange.com |
26,066 | [
"https://electronics.stackexchange.com/questions/26066",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3685/"
] | We use STM32F2 at work, I recently face with a strange problem. I do not expect a direct answer from the crowd but I hope some pointers where to look at for root cause.
I have a clock that is 1MHz in frequency, the clock works well except a shadow frequency behind. 40KHz (something between 40 to 42KHz to be exact, I c... | That looks like aliasing on the scope display to me. How many samples are there on the screen? What's the sample rate?
Wind up the timebase to show just a couple of clock cycles and see if looks better...
| Where does the clock come from - the timer then output from the uC pin?
The first thing I would look for is something on your board that might generate noise at that frequency.<br>
Have you got a switcher on the board?
Does the "shadow frequency" disappear if you drive it from a different power source?
Are you r... | https://electronics.stackexchange.com |
148,106 | [
"https://softwareengineering.stackexchange.com/questions/148106",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/44933/"
] | Context:
Student working through Class design in personal/side project for Summer. I've never written anything implemented by others or had to maintain code. Trying to maximize encapsulation and imagining what would make code easy to maintain.
Concept:
Tight/Loose Class design where Tight and Loose refer to access mod... | Keep your public API a small as possible. Don't expose setters to class members unless you absolutely have to. Don't implement features you think may become useful in the future (this often leads to feature bloat).
| Tight coupling is when a group of classes are highly dependent on one another.
Let us see tight coupling between java objects first, take an example..
<pre><code>class Traveler
{
Car c=new Car();
void startJourney()
{
c.move();
}
}
</code></pre>
and
<pre><code>class Car
{
void move()
{
... | https://softwareengineering.stackexchange.com |
1,672,539 | [
"https://math.stackexchange.com/questions/1672539",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/52259/"
] | How do I compute the Fourier transform of $-x^2e^{-\frac{1}{2}x^2}$?
I don't think I can just split this apart and say $\mathscr{F}(-x^2e^{-\frac{1}{2}x^2})=\mathscr{F}(-x^2)\cdot\mathscr{F}(e^{-\frac{1}{2}x^2})$. That seems too easy, but correct me if I'm wrong.
| Hint: there's a formula for the Fourier transform of a derivative.
| ${\cal F}[f(x)] = \int\limits_{-\infty}^\infty f(x) e^{2 \pi i t x} dx$.
${\cal F}[-x^2 e^{-x^2/2}] = (t^2 -1)e^{-t^2/2}$.
| https://math.stackexchange.com |
204,145 | [
"https://stats.stackexchange.com/questions/204145",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/110128/"
] | <strong>Background and Problem</strong>
I have a question concerning a meta-analysis combining effects from between- and within-subject designs using log-odds ratios (OR) as the metric of interest. I am familiar with conducting meta-analyses and will be undertaking my calculations in R (using the <code>metafor</code> ... | I'll focus in my answer purely on the question on how to compute a (log) OR based on a within-subjects design that is comparable to that from a between-subjects design.
Suppose you have a within-subjects design with these data:
<pre><code> condition2
decision1 d... | You have the individual participant data so you have two choices (a) a one step approach which since you use R can be implemented in <code>lme4</code> or (b) a two-step approach where you reduce each study to a single summary statistic and then meta-analyse them using, as you suggest <code>metafor</code>. If you do the... | https://stats.stackexchange.com |
525,542 | [
"https://stats.stackexchange.com/questions/525542",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/93121/"
] | Consider the following theoreom: If a random variable <span class="math-container">$X$</span> has CDF <span class="math-container">$F,$</span> then <span class="math-container">$F(X)\sim U[0,1]$</span> where <span class="math-container">$F(.)$</span> is the c.d.f of <span class="math-container">$X$</span>.
The demonstr... | The intuition is that if, for any <span class="math-container">$p \in (0,1)$</span> and any <span class="math-container">$x$</span> such that <span class="math-container">$F(x)=\mathbb P(X \le x) =p$</span>, you have <span class="math-container">$\mathbb P(F(X) \le F(x))=p$</span> and <span class="math-container">$\ma... | Think of probability density function of a standard uniform distribution, it is a rectangle. A flat line between zero and one is the probability destiny equal for all values on the <span class="math-container">$x$</span>-axis. The area under the curve is one. The cumulative distribution function tells us what is <span ... | https://stats.stackexchange.com |
108,001 | [
"https://electronics.stackexchange.com/questions/108001",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/40908/"
] | I’m a little confused on how complex numbers are used in circuit analysis . On one hand, complex numbers can only be used in linear circuits which do not involve any squares, square roots, and so forth of the voltage or current, or multiplication of one voltage or current by another. This way the real and imaginary par... | <blockquote>
On the other hand, we do divide complex numbers by each other
</blockquote>
That's true. The impedance of a circuit element is the phasor voltage divided the phasor current
$$Z = \frac{\vec V}{\vec I} $$
But note that the impedance is <em>not</em> a phasor - it does not represent the amplitude and ph... | The reason why complex numbers show up when doing only linear calculations is because the computations involve matrices. All systems of equations correspond to matrix equations and and all matrix equations correspond to systems of equations.
Now if you've taken a linear algebra course you should have encountered the ... | https://electronics.stackexchange.com |
353,713 | [
"https://electronics.stackexchange.com/questions/353713",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/52698/"
] | Regarding the Gerber files of a 4 layer PCB with 2 inner layers:
<ul>
<li>Top layer: Analog signals</li>
<li>Inner layer 1: Digital signals (SPI and I2C)</li>
<li>Inner layer 2: Power planes (+3.3V and +12V)</li>
<li>Bottom layer: GND plane</li>
</ul>
For better isolation between analogue and digital signals and to p... | The Gerber files do not specify the order of layers. As long as you don't use blind or buried vias, the layers can be stacked in any order.
The file names for the individual Gerber files may vary between different CAD systems, and may or may not imply the desired stack-up order.
I always included a "readme" file w... | To make sure that you didn't make mistake, install an external Gerber file viewer (not connected to or produced by KiCAD). Then, after renaming, view the project in this viewer and imagine what others would see. Assuming you corrected the vias accordingly, yes, you can rename the files the way you want in order to chan... | https://electronics.stackexchange.com |
527,354 | [
"https://electronics.stackexchange.com/questions/527354",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/22348/"
] | If I have an 8-bit high-speed interface say at 1GHz talking to memory and I want to do interface testing, I can send patterns like AA/55/00/FF.
When I send a pattern like 55 i.e 01010101, every even bit sees a rise transition.
In the case of AA - 10101010, every odd bit sees a rise transition.
In short, I can exercise ... | Both patterns are necessary.
AA/55 causes no net bus current in the transitions, pairs of lines are effectively differential, so there's no ground current in either driver or driven ICs. Alternating FF/00 causes maximum ground pin current, so is needed to test ground bounce.
If the tracks run parallel, then AA/55 excit... | From an electrical perspective AAh and 55h are preferred to test a worst case cross-talk in addition to delay effects.
Testing other patterns is also beneficial for instance FFh to 00h will consider thermal stress better than AAh to 55h.
| https://electronics.stackexchange.com |
69,214 | [
"https://chemistry.stackexchange.com/questions/69214",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/41761/"
] | The cis and trans isomers of $\ce{[CoCl2(NH3)4]Cl}$ are quite famous as one is purple and the other one is green which is a huge difference in color. Now I can't find any information to why this is the case?
I remember they told me in the lecture on organometallic chemistry when we were discussing substituted carbony... | If you search a library for a copy of Inorganic Chemistry by Miessler and Tarr, they have an excellent diagram showing which explains the phenomenon.
$\ce{Cl-}$ ligands have lone electrons that can donate into the metal, as you said yourself. The trick is to recognize what effect this has on the $t_\mathrm{2g}^*$ and ... | An easy rationalisation starts off with symmetry considerations — and indeed <em>any</em> rationalisation should start off with symmetry considerations. The <em>cis</em> and <em>trans</em> complexes have a notably different symmetry.
For $\ce{\textit{trans-}[CoCl2(NH3)4]Cl}$, the point group is $D_\mathrm{4h}$. This i... | https://chemistry.stackexchange.com |
153,844 | [
"https://mathoverflow.net/questions/153844",
"https://mathoverflow.net",
"https://mathoverflow.net/users/344/"
] | I think this is probably elementary, but some searching (and asking on the chatroom) hasn't turned up a result. Could anyone point me to a reference for (or counterexample to) the following statement?
<strong>Given categories $\mathcal{C}, \mathcal{D}, \mathcal{E}$ and comonadic adjunctions $\mathcal{C} \rightleftar... | This is not true in general. Note that by passage to the opposite category, your question is equivalent to asking that a composite of monadic functors is monadic. A counterexample for that is the following:
The category $\mathbf{Cat}$ of small categories is monadic over the category $\mathbf{Grph}$ of (directed) graph... | As Daniel Schäppi pointed out, this is the same as asking whether the composite of two monadic functors is monadic. The answer, unfortunately, is no.
Consider locally presentable categories. By the classification theorem, every locally presentable category can be embedded as a reflective subcategory of some presheaf ... | https://mathoverflow.net |
516,817 | [
"https://physics.stackexchange.com/questions/516817",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/167281/"
] | My understanding of entropy is that it is a measure of the available states a system can take on. In this context, if the total entropy in the universe always increases, how can it lead to a configuration where everything is at absolute zero? This has an entropy of 0, as there is only 1 possible configuration of the un... | <blockquote>
the total entropy in the universe always increases
</blockquote>
The total entropy of any isolated system increases until equilibrium is obtained. Then entropy stops increasing. If the system is the entire universe, then entropy will increase until the heat death.
<blockquote>
how can it lead to a co... | You may be confusing "heat death" with "energy death". Absolute zero can imply energy death as temperature is a measure of kinetic energy. But heat is energy transfer due to temperature difference. Which is another way of saying heat is energy transfer due to thermal disequilibrium. Natural processes, ones that increa... | https://physics.stackexchange.com |
81,169 | [
"https://mathoverflow.net/questions/81169",
"https://mathoverflow.net",
"https://mathoverflow.net/users/15887/"
] | This problem occured to me, when trying to find a Morita invariant for finite dimensional algebras.
Suppose $\Lambda$ and $\Gamma$ are two self-injective $k$-algebras ($k$ being a field) which are Morita equivalent. The Morita equivalence should be given by the $\Lambda-\Gamma$-bimodule $P$ and the $\Gamma$-$\Lambda$-... | Proposition 5.2 in J. Rickard's paper "Derived Equivalences as Derived Functors" seems to show what you want to show, however for standard derived equivalences and the left derived Nakayama functors. I.e., Rickard claims $$D\Gamma \otimes_\Gamma^{\mathbb L}Q \otimes_\Lambda^{\mathbb L}- \cong Q \otimes_\Lambda^{\mathbb... | I'm sure you've already considered this, but it is trivially true if $\Lambda$ and $\Gamma$ are symmetric (i.e. group algebras), since we then have isomorphisms $D\Gamma \cong \Gamma$ and $D\Lambda\cong \Lambda$.<br>
I will have a bit more of a think, but I'd bet it does hold for self-injective algebras in general.
| https://mathoverflow.net |
41,397 | [
"https://softwareengineering.stackexchange.com/questions/41397",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/12081/"
] | My question is whether I should test code that I know will be changed in a short time. I'm doing TDD in ruby, and I often meet with this question. I'm interested about best practices about this, pro and contra. Thanks.
<strong>Update</strong>
Clarification: My question is basically how do you compare the 'cost of wr... | Yes.
That way you know that your change hasn't broken the code.
You should be testing to the interface/API so you can change the underlying methods without having to rewrite the tests. Then, when the tests turn green again you know you've sucessfully refactored/rewritten the code.
New tests can be added to test new ... | If the code will be in used, it should be tested.
| https://softwareengineering.stackexchange.com |
131,474 | [
"https://electronics.stackexchange.com/questions/131474",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/31380/"
] | I've been doing some research on switched reluctance motors, and the papers are always talking about driving them with inverters. Why would you use an inverter as opposed to just using a single switching element to turn the coils on and off?
| The thing about SR machines is you need to decay the current in the coil fast at the point of commutation otherwise you will be generating torque that will attempt to impede rotation.
<img src="https://i.stack.imgur.com/v17Sr.png" alt="enter image description here">
If you were to fire each phase of an SR machine wit... | In this context "Inverter" just means a DC to AC converter. A specific implementation is not implied.
| https://electronics.stackexchange.com |
1,494,876 | [
"https://math.stackexchange.com/questions/1494876",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/258051/"
] | Let $f(x)=x+\frac{x^2}{2}+\frac{x^3}{3}+\frac{x^4}{4}+\frac{x^5}{5}$ and let $g(x)=f^{-1}(x)$.Find $g'''(0)$.<br><br>
My attempt:As $g(x)=f^{-1}(x)\Rightarrow fog(x)=x\Rightarrow f'(g(x)).g'(x)=1$<br>
$g'(x)=\frac{1}{f'(g(x))}$ .Similarly i found,$g''(x)=-\frac{f''(g(x))}{(f'(g(x)))^3}$ and Similarly i found<br> $g'''(... | If $f(x)$ and $g(x)$ are Inverse of each other, Then $$\displaystyle f(g(x)) = g(f(x)) = x$$
Now $$\displaystyle g'(f(x))\cdot f'(x) = 1.......................................(1)$$
Now Given $$\displaystyle f(x) = x+\frac{x^2}{2}+\frac{x^3}{3}+\frac{x^4}{4}+\frac{x^5}{5}\;,$$ So $\displaystyle f'(x) = 1+x+x^2+x^3+x^4... | Say $f(y) = y+y^2/2+y^3/3+y^4/4+y^5/5 = x$, then $f^{-1}(x) = y = g(x)$.
So $g(x)+g(x)^2/2+g(x)^3/3+g(x)^4/4+g(x)^5/5 = x$
First note that $g(0) = 0$.
Now doing implicit differentiation with chain rule, you would be able to obtain
$g'(x)(1+4g(x)) = 1.$
Plug in $0$ and you can get $g'(0) = \frac{1}{1+4g(0)} = 1 $... | https://math.stackexchange.com |
87,024 | [
"https://mathoverflow.net/questions/87024",
"https://mathoverflow.net",
"https://mathoverflow.net/users/18183/"
] | A coherent sheaf $V$ on a say noetherian scheme is called reflexive if the canonical map $V \rightarrow \mathcal Hom_{\mathcal O_X}(\mathcal Hom_{\mathcal O_X}(V,\mathcal O_X),\mathcal O_X)$ is an isomorphism of sheaves.
In principle, one can define this notion also for quasicoherent sheaves, and this is what my quest... | I'll add another example to the mix even in the ring setting (as opposed to the sheaf setting).
Fix a DVR $(R, \langle x \rangle)$. Then the fraction field $K(R) = \bigcup_n (x^{-n}R)$, is an ascending union of free (reflexive) modules. But clearly $K(R)$ is not itself reflexive.
On the other hand, under mild condit... | Let $O$ be the valuation ring of a valuation $v$ having a subgroup of the reals different from the integers as its value group. Let $v_1>v_2>\ldots >0$ be a monotonously decreasing sequence of values converging to $0$ and chose elements $x_i\in O$ such that $v(x_i)=v_i$. Then $O x_1\subset O x_2\subset\ldots \... | https://mathoverflow.net |
286,330 | [
"https://softwareengineering.stackexchange.com/questions/286330",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/183072/"
] | We are looking to find the best way to store user options (skills, degrees, industries, languages, etc.) for drop downs. The options are between a JSON file we can store on the server file system or in the db (MongoDB).
What are the pros and cons of each method and how will they affect server performance under heavy ... | In order to make this more on-topic, this is a way to go about determining which one is better for a particular situation. Note: you may find that the best solution could change over time as your application's requirements change.
<strong>Do Both:</strong> Sorry, if you want to really find out the best solution, I rec... | There are very good arguments for and against each option. If you were speaking with regards to configuration data I would think a longer and more in-depth discussion would be warranted.
Since you're talking about <em>application data</em>, I would be inclined to believe that unless you know for certain that these da... | https://softwareengineering.stackexchange.com |
24,225 | [
"https://dba.stackexchange.com/questions/24225",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/-1/"
] | Apologies for a basic question, but I’m having difficulties determining the multiplicity constraints for a database I’m trying to design.
Our team undertakes a number of services/projects...each involve (at least one) activity (prototyping, evaluations, design). The database is intended to record details of each proje... | I think your design could be stated more formally as:
<pre><code>One company has many projects.
One project belongs to one company.
One project has one or more activities.
One activity has exactly one activity type (prototyping, design).
One activity belongs to exactly one project.
</code></pre>
So, if that's true,... | Your question is one of analysis, and not design. You can design a database for either answer to your question.
What's the cost of getting it wrong? If you design it for many to many, and it's really one to many, you end up with an extra table and slightly slower joins. If you design it for one to many and it's r... | https://dba.stackexchange.com |
2,228,749 | [
"https://math.stackexchange.com/questions/2228749",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/360475/"
] | Is it true that $$\lim_{x\to 0}\lim_{y \to 0}f(x,y) = \lim_{x\to 0}f(x,x)?$$
I have no idea how to disprove or prove it, but it seems intuitively like it must be true.
| No. Consider this counter example:
$$\lim_{x\to 0}\lim_{y\to 0} \frac{y^2}{xy}=\lim_{x\to 0}0=0$$
while $$\lim_{x\to 0}\frac{x^2}{x^2}=1.$$
| In general it is not true because you talking about two different variables because if you consider the function
$$f(x,y) = \frac{xy-xy^2}{x-y}$$
then you see that $$\lim{x\to 0}\lim{y\to 0}f(x,y)$$ gives defined value if you want to replace x with y then function is not defined
So it may be true in few cases but not ... | https://math.stackexchange.com |
640 | [
"https://mathoverflow.net/questions/640",
"https://mathoverflow.net",
"https://mathoverflow.net/users/290/"
] | This question comes along with a lot of associated sub-questions, most of which would probably be answered by a sufficiently good introductory text. So a perfectly acceptable answer to this question would be the name of such a text. (At this point, however, I would strongly prefer a good intuitive explanation to a ri... | Most of these links aim to give some geometric intuition for what homology does, so I'll try to briefly explain the algebraic intuition in case that's also useful.
A very common operation in algebra (e.g. algebraic combinatorics, representation theory) is to study a set by considering the free abelian group (or free k... | I think the most intuitive way to look at topology is as a way to make precise the following idea. A warning: the idea by itself <strong>does not define homology</strong>, but something much scarier. Homology is what you get when you give up studying the scary but intuitive thing, and try to get something similar, but ... | https://mathoverflow.net |
1,917,860 | [
"https://math.stackexchange.com/questions/1917860",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/366952/"
] | Can you help me to prove this equality?
$$|xy|=|x|\cdot |y|$$
I don't know how to start proving the equality.
| Using the fact that $\lvert a \rvert = \sqrt{a^2}$ for all $a \in \mathbb{R}$, we obtain
$$
\begin{array}{rcl}
\lvert xy \rvert
&=& \sqrt{ (xy)^2 } \\
&=& \sqrt{ x^2 \cdot y^2 } \\
&=& \sqrt{ x^2 } \cdot \sqrt{y^2} \\
&=& \lvert x \rvert \cdot \lvert y \rvert
\end{array}
$$
for a... | If $x$ and $y$ are both positive it is obviously true, and the case of one or both being zero is equally trivial.
If one of them is negative (say $y$), you have $$|xy|=x(-y)=x|y|=|x||y|.$$
If both are negative, you have $$|xy|=(-x)(-y)=|x||y|,$$
which exhausts the possibilities.
| https://math.stackexchange.com |
315,565 | [
"https://stats.stackexchange.com/questions/315565",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/58450/"
] | Let's say our data set contains 1 million examples, i.e., $x_1, \ldots, x_{10^6}$, and we wish to use gradient descent to perform a logistic or linear regression on these data set.
What is it with the gradient descent method that makes it inefficient?
Recall that the gradient descent step at time $t$ is given by:
$$... | It would help if you provided a context to the claim that the gradient descent is inefficient. Inefficient relative to what?
I guess that the missing context here is the comparison to stochastic or batch gradient descent in machine learning. Here's how to answer the question in this context. You are optimizing the par... | First let me suggest an improvement to your notation. In particular, let's denote the loss function by $L(w)$ rather than $f(x)$. Using the letter $L$ is simply a personal preference of mine since it reminds me that we're dealing with the <strong>L</strong>oss. The more substantive change is making it clear that the lo... | https://stats.stackexchange.com |
169,205 | [
"https://electronics.stackexchange.com/questions/169205",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/-1/"
] | I have mechanically damaged a capacitor on an old motherboard and it made a PFFFT sound like some gas went out of it and then some liquid leaked. What is that? Is it toxic? I hope that it was not mercury!
The capacitor is of a cylindric shape with two wires at bottom, about 7mm in diameter.
| <h2>Yes it's toxic; No it's not mercury; Yes you'll live :)</h2>
If it was a "wet" capacitor type, then most likely that was sulfuric acid or some organic or inorganic solvent. If it was a solid, then perhaps manganese dioxide.
Whatever it was it isn't good for you so don't breath it, take a bath in it, or move to a... | Whether it is toxic or not, you should <strong>treat it as though it is toxic</strong>! But there is no need to get paranoid about it. For some reason you seem to be more paranoid about mercury than the one you should worry about - lead.
If you are going to repair the board, I recommend that you cut & remove the r... | https://electronics.stackexchange.com |
46,144 | [
"https://biology.stackexchange.com/questions/46144",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/18728/"
] | I read somewhere (I can't find where) that there is no scientific consensus whether sponges should be considered multicellular organisms.
It seems I don't understand where is the line between unicellular and multicellular life.
I am not able to find a more elaborate explanation of that doubt. What are the reasons for... | Sponges are generally considered as colonial organisms because there is little cell specialization and little separation of function/role. All cells do pretty much the same thing; it looks more like a pile of individual cells than an actual multicellular organism. In reality it is a little bit in between.
In any case,... | A collection of cells can maintain their individuality, and have almost nothing in common but their location. No doubt all multicellular organisms today are descended from such collections.<br>
To start doing anything useful for survival, the cells of such a collection can begin to specialize: some for locomotion, som... | https://biology.stackexchange.com |
355,936 | [
"https://mathoverflow.net/questions/355936",
"https://mathoverflow.net",
"https://mathoverflow.net/users/136553/"
] | <ol>
<li>Is it possible there are examples of where classical logic proves a theorem that provably is false within constructivism? Is so what are some examples?</li>
<li>What are some examples of most contrasting theorems provable in these two logics that does not fall in 1.?</li>
</ol>
| This is a very natural question, but as it happens one needs some more background to give a natural answer (is my humble opinion).
For clarity let me give a summary first indication:
As to your <strong>Question 1.</strong> : This is commonly thought of as not being possible in strict terms, because '<em>constructive... | There are several ways one could interpret the word "constructivism" here, and the answer depends on what you meant by it.
<strong>Bishop-style constructivism</strong> is a <em>generalization</em> of Brouwerian intuitionistim, Russian constructivism, and classical mathematics. It is mathematics done without excluded m... | https://mathoverflow.net |
76,681 | [
"https://mechanics.stackexchange.com/questions/76681",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/57338/"
] | I was recently replacing the brake pads and callipers on my 2002 Chevrolet Suburban 1500 (4WD), and after I’d finished the job but still had the wheels jacked up, I noticed that even though I had the vehicle in park, I was still able to freely spin all four of the wheels. I popped the SUV back down on its wheels and te... | When park is selected it is only the gearbox output shaft that is locked in place, the open differentials that are fitted to the car are still able to do their job and allow relative rotation of the wheels.
When the differential input is turned by the gearbox, the differential causes the wheels to rotate in the same d... | When the vehicle was in the air the differentials in the drive train allowed the wheels to rotate.
Once all four wheels were on the ground then each wheel was held stationary by friction relative to the ground and no one wheel could rotate as the other three were fixed.
The same idea works if the vehicle is 2wd as if... | https://mechanics.stackexchange.com |
2,553,939 | [
"https://math.stackexchange.com/questions/2553939",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/421580/"
] | Solve for $x \in \Bbb R$, given $$(x+m)^m-\binom{m}{1} (x+m-1)^m+\binom{m}{2}(x+m-2)^m + \cdots + (-1)^m \binom{m}{m} x^m=m!$$
| This is an Identity! Therefore, this is true $ \forall x \in \mathbb R$. I came to know about this today, that's why I am sharing this with you all. Let's prove this :
Let's find coefficient of $y^m$ in $e^{xy}(e^y-1)^m$.
Expanding $(e^y-1)^m$ through binomial in LHS and Taylor series of $e^y$ in RHS, we've $$\text... | Here is a slightly different variation on the proof that was given by
OP. Introduce
$$P(x) = \sum_{q=0}^m (-1)^q {m\choose q} (x+m-q)^m.$$
We evaluate
$$[x^p] P(x)$$
where clearly $0\le p\le m.$ We have the claim if this is zero
for $p\gt 0$ and $m!$ for $p=0.$
Extracting the coefficient yields
$$\sum_{q=0}^m (-... | https://math.stackexchange.com |
3,145,650 | [
"https://math.stackexchange.com/questions/3145650",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/544192/"
] | <blockquote>
Let <span class="math-container">$(X,d)$</span> be a metric space and <span class="math-container">$(x_n),(y_n)$</span> be two sequences in
<span class="math-container">$X$</span> such that <span class="math-container">$x_n \longrightarrow x$</span> and <span class="math-container">$y_n \longrightarrow... | Let <span class="math-container">$M\in\mathbb{N}, M \geq 1$</span> and let <span class="math-container">$u_0, u_1, u_2, ..., u_M \in \mathbb{R}^{M+1}$</span> form an affinely independent set.
Let us denote the convex hull of all <span class="math-container">$u_i$</span> by <span class="math-container">$S$</span>. Then... | Here's a geometric argument that convinces me.
Temporarily remove one of the <span class="math-container">$n+1$</span> facets. Position the simplex with the opposite vertex "down" and drop a small (hyper)sphere through the opening at the top. It will come to rest tangent to the other <span class="math-container">$n$</... | https://math.stackexchange.com |
413,371 | [
"https://math.stackexchange.com/questions/413371",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/47752/"
] | I read this in my textbook have tried working through it - I keep getting max 2-norm(Ax), which is just the magnitude of Ax.
How should I do this proof? (note, this is not for homework, I'm just trying to understand why as no proof is provided).
| From your question, I assume you mean the operator norm with respect to the 2-norm. Let $A = {\rm diag}(\lambda_1, \ldots, \lambda_n)$ a diagonal matrix. We have
\begin{align*}
\|A\| &= \max_{\|x\|_2 = 1} \|Ax\|_2\\
&= \max_{\|x\|_2 = 1} \left(\sum_{i=1}^n \lambda_i^2x_i^2\right)^{1/2}\\
&\l... | This also follows from the fact that for any diagonal matrix D, the elements on the diagonal are just the matrix's singular values and the 2-norm of any matrix can be shown to equal its largest singular value.
| https://math.stackexchange.com |
25,908 | [
"https://stats.stackexchange.com/questions/25908",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/10404/"
] | How does using 1 - correlation as the distance influence the determination of the number of clusters when doing kmeans?
Is it still valid to use the classical indices (Dunn, Davies-Bouldin...)?
| First. It is odd to use $1-r$ distance with K-means clustering, which internally operates with euclidean distance. You could easily turn <em>r</em> into true euclidean <em>d</em> by the formula derived from <em>cosine theorem</em>: $\sqrt{2(1-r)}$.
Second. I wonder how you manage to input distance matrix into K-means ... | Note that k-means is designed for Euclidean distance. The <em>mean</em> may or may not be an appropriate estimator for the cluster center with other distances. So be careful when using other distance functions with k-means. Consider using a more modern clustering algorithm!
| https://stats.stackexchange.com |
2,187,339 | [
"https://math.stackexchange.com/questions/2187339",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/422124/"
] | How to plot a graph of the equation
$12x^2-36x +15+ 16y^2 = 0$
I don't know how to plot that. Can you please give me the graph of this equation?
| You have an elipse generally of the form $$\frac{(X-X_0)^2}{a^2}+\frac{(Y-Y_0)^2}{b^2}=1$$ where $(X_0,Y_0)$ is the center of the ellipse, and a and b are the semi-axes. Somehow you have to get your problem into this form. But immediately you see that there is no Y term, so you know that $Y_0 = 0$.
Knowing that th... | Observe we have
\begin{align}
12x^2-36x+15+16y^2=&\ 12(x^2-3x+\frac{9}{4})-27+15+16y^2\\
=&\ 12\left(x-\frac{3}{2}\right)^2+16y^2-14=0
\end{align}
which means
\begin{align}
\frac{\left(x-\frac{3}{2}\right)^2}{14/12}+\frac{y^2}{14/16} = 1
\end{align}
i.e. you have an ellipse centered at $(3/2, 0)$.
| https://math.stackexchange.com |
367,659 | [
"https://softwareengineering.stackexchange.com/questions/367659",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/298682/"
] | I am working on a small application trying to grasp the principles of domain-driven design. If successful, this might be a pilot for a larger project. I'm trying to follow the book "Implementing Domain-Driven Design" (by Vaughn Vernon) and trying to implement a similar, simple discussion forum. I've also chec... | It's sometimes difficult to distinguish between real access control rules and domain invariants borderlining on access control.
Especially, rules that depend on data only available far into the course of a particular piece of domain logic might not easily be extractible out of the domain. Usually, Access Control is c... | Authentication and Authorisation is a bad example for DDD.
Neither of these things are part of a Domain unless your company creates security products.
The Business or domain requirement is, or should be, "I require role based authentication"
You then check the role before calling a domain function.
Where you have c... | https://softwareengineering.stackexchange.com |
129 | [
"https://mechanics.stackexchange.com/questions/129",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/105/"
] | I have a Honda Civic VTI, 1997 model, automatic transmission. When I turn the steering wheel all the way to the left or right, it gives me a loud "cluck" sound. What is it?
| I would say that it is most likely a balancing issue. In order to find out, I would:
<ol>
<li>Use the car's jack to clear each front wheel from the ground. Give the wheel a spin and <strong>check to see that the spinning tire does not vibrate</strong> (sideways and/or up-and-down). This could indicate a damaged rim or... | I had this same problem. In my case it was a warped brake disc. You can see if it's the same in your case by seeing how hot your brake disc is after driving. Don't driving any more than you have to though, because you may damage the calipers. If it's the same problem then change the brake disc as soon as you can.
| https://mechanics.stackexchange.com |
48,570 | [
"https://cs.stackexchange.com/questions/48570",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/41390/"
] | According to CLRS the master method requires the recurrence to be of form $T(n) = aT(n/b) + f(n)$ where $a \ge 1 $ and $b > 1$ are constants and $f(n)$ is asymptotically positive.
This makes it sound like even $a \not\in \mathbb{Z}_+$ is a legitimate value of $a$ as long as $a \ge 1$.
I have trouble visualising wh... | The first thing that comes to mind would be a divide-and-conquer method where, for some reason, 50% of the time you only need to do one subproblem, and the other 50% of the time you need to do both subproblems.
The recursion for the average case runtime would be
$$ T(n) = 0.5 \cdot T(n/2) + 0.5 \cdot (2 \cdot T(n/2))... | It makes no sense for $a$ to be non-integer, at least in the context of algorithms. This is because $a$ refers to the number of recursive calls, which clearly must be integer (unless you are doing something like average case analysis, but then it is not clear that the master method applies at all).
| https://cs.stackexchange.com |
263,514 | [
"https://softwareengineering.stackexchange.com/questions/263514",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/156110/"
] | I am exploring how a Minimax algorithm can be used in a connect four game. I was looking through a program and found this evaluation function.
<pre><code>private static int[][] evaluationTable = {{3, 4, 5, 7, 5, 4, 3},
{4, 6, 8, 10, 8, 6, 4},
... | The numbers in the table indicate the number of four connected positions which include that space for example:
<ul>
<li>the 3 in the upper left corner is for one each of horizontal, vertical, and diagonal lines of four which can be made with it.</li>
<li>the 4 beside it is for two horizontal (one including starting in... | This evaluation function is nothing but Gaussian normal distribution centered around the mean position of board. The one with more centered positions gets higher score from this eval func. If you plot this matrix in MATLAB, you'll find that the values form a tent and hence give bias to center position. However I must s... | https://softwareengineering.stackexchange.com |
69,214 | [
"https://electronics.stackexchange.com/questions/69214",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/23881/"
] | What is the minimum tolerable SNR in today's (digital) communication systems for successful recovery of the message? I've heard that regular commercial systems can recover the message with a SNR as small as -60 dB (using robust coding techniques). Is it correct? And if yes, how can you observe and distinguish even the ... | What your professor is almost certainly referring to is SSDS (Spread Spectrum Direct Sequence) encoding technicals (yes they are convolutional) and they trade off data rate for a given bandwidth for the ability to recover signal in deep noise. CDMA systems from Qualcomm use CDMA but not so much for signal in noise rec... | GPS has that kind of ability to recover from negative SNR; however, it does it by correlation. The signal is very repetitive and predictable, so <em>autocorrelation</em> is applied. This magnifies repeating elements of the signal and subtracts noise.
However, that yields a very low data rate and relies on the reciever... | https://electronics.stackexchange.com |
25,931 | [
"https://mechanics.stackexchange.com/questions/25931",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/13651/"
] | Title pretty much explains,
I change my oil every 4-6k miles depending on how generous I’m feeling, however will the oil dirty oil that’s already in the sump mix with the clean oil when topping up?
Normally I just top up but in this case I have had to drain about half a litre out on two occasions
First when I chan... | Mixing new with the old will cause you absolutely no issues. As long as you are using the same weight oil, it will mix up and you'd never know it. Continue to change your oil at the specified interval and you should be golden.
| Usually when changing the oil you won't be able to fully drain the old oil anyways and the old and new oils will mix, like it or not. Usually this is not a problem even if the weights are different, though it's safer to stick with the same brand, as some argue the components in the oil being incompatible may cause issu... | https://mechanics.stackexchange.com |
111,554 | [
"https://electronics.stackexchange.com/questions/111554",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/15637/"
] | I've been looking into sites (like Alibaba, etc...) for components, but they are usually at the price of the rain. How can someone know if a company or factory is not a scam and that those components really belong to said factory?
| Except for blantantly obvious counterfeits where the manufacturer name is misspelled (yes, that has actually happened), it is difficult for you to tell. The best way to avoid this problem is to use reputable suppliers, like Mouser, DigiKey, Element-14, etc.
There is no way I'd ever buy parts from Alibaba. There is a... | Except for the obvious it will be very hard to tell. But one of the best ways is to keep an open mind and don't fall into the trap of painting everyone with the same brush. That is the start of stereotyping which leads to worse things.
The fact is, if you purchase through Western distribution your are suffering from ... | https://electronics.stackexchange.com |
3,932,413 | [
"https://math.stackexchange.com/questions/3932413",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/784998/"
] | The function in question is:
<span class="math-container">$ \mathrm{e}^\frac{1}{\left(4x+3\right)^2-1} $</span> where <span class="math-container">$ x∈ (-1, -1/2) $</span>
I've tried graphing the derivatives and it seems that they explode as <span class="math-container">$ x \rightarrow -1/2 $</span>
| Write the density as <span class="math-container">$$f(x) = e^\eta (b \eta e^{bx}) \exp(-\eta e^{bx}).$$</span> Then with the substitution <span class="math-container">$$u = \eta e^{bx}, \quad du = b \eta e^{bx} \, dx,$$</span> we see <span class="math-container">$$\int f(x) \, dx = e^\eta \int e^{-u} \, du.$$</span> ... | Taking what was said
<span class="math-container">$$ \int e^{-u} du = -e^{-u} $$</span>
Substitute back in <span class="math-container">$u =\eta e^{bx}$</span>
<span class="math-container">$$ - e^{\eta}\cdot e^{-\eta e^{bx}} \Big|_{0}^{\infty} $$</span>
The negative will reverse it and we pull out <span class="math-co... | https://math.stackexchange.com |
135,461 | [
"https://softwareengineering.stackexchange.com/questions/135461",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/47157/"
] | Most of programmers who are involved into development of more or less large project(s) know how annoying the process of compilation can be. There are some other things which are dependent on compilation, for example unit tests. TDD requires tests to execute fast, otherwise developers tend to run them rarely.
The proce... | The most effective technique that I know of is to build referenced projects into compiled assemblies, so that you're only compiling the project you're currently working on, and not a dozen others.
Yes, you do lose access to the source code for those assemblies, but presumably they're not changing every five minutes, a... | Use the "unload project" feature to unload projects that you aren't ready to remove from the solution, but don't want to run/compile them everytime you need to debug or if you want to periodically click "compile solution" without hitting the slow project.
If you are using a distributed version control, you might want ... | https://softwareengineering.stackexchange.com |
13,184 | [
"https://physics.stackexchange.com/questions/13184",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/175/"
] | Obviously this is impossible in relativity; however, if we ignore relativity and use only Newtonian mechanics, is this possible? How (or why not)?
| The answer is yes in some unintersting senses: Take two gravitational attracting point particles and set them at rest. They will attract each other and their velocity will go to $\infty$ in finite time. Note this doesn't contradict conservation of energy since the gravitational potential energy is proportional to $-1/r... | If by "ignoring relativity", you mean ignoring the fact that nothing can move faster than the speed of light, then the answer is still no.
Since kinetic energy is proportional to the square of the speed, infinite speed would mean infinite energy, which you cannot provide, whatever the amount of time you are considerin... | https://physics.stackexchange.com |
11,834 | [
"https://quantumcomputing.stackexchange.com/questions/11834",
"https://quantumcomputing.stackexchange.com",
"https://quantumcomputing.stackexchange.com/users/1754/"
] | Given two 1-qubit rotations <span class="math-container">$U=R_n (\theta)$</span> and <span class="math-container">$V=R_m(\phi)$</span> with <span class="math-container">$n$</span> and <span class="math-container">$m$</span> vectors defining a rotation and <span class="math-container">$\theta, \phi$</span> angles, defin... | Let's start with expanding the calculation of <span class="math-container">$E$</span>:
<span class="math-container">$$
E(U,V)=\max_{|\psi\rangle}\sqrt{\langle\psi|(U-V)^\dagger(U-V)|\psi\rangle}.
$$</span>
Clearly, we want <span class="math-container">$|\psi\rangle$</span> to be the eigenvector with maximum eigenvalue ... | Use the fact that both distance measures are invariant under left- as well as right-multiplication (independently!) with an arbitrary unitary.
This way, you can map <span class="math-container">$U$</span> to <span class="math-container">$I$</span> and <span class="math-container">$V$</span> to <span class="math-contai... | https://quantumcomputing.stackexchange.com |
67,656 | [
"https://mathoverflow.net/questions/67656",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14514/"
] | Let $X$ be a projective surface and let $x\in X$ be a smooth point. Consider the blow up $Bl_{x}X$ of $X$ in $x$, and let $E$ be the exceptional divisor. Suppose we know that $E$ is the only (-1)-curve in $Bl_{x}X$, so that $\alpha(E) = E$ for any $\alpha\in Aut(Bl_{x}X)$. Then any automorphisms $\alpha\in Aut(Bl_{x}X)... | Let $\sigma:X\to X$ be an automorphism fixing a point $x\in X$. Then since the inverse image of $x$ is a Cartier divisor in both $Bl_x X$ and $Bl_x \sigma(X)$, by the universal property of blow-ups, we get an automorphism $\tilde{\sigma}$ of the blow-up $Bl_x X$. Since $\tilde{\sigma}$ restricts to $\sigma$ on the comp... | Another way to explain why $\sigma$ extends to an automorphism of the blow-up is the following. Note that the blowup of a point is the relative Proj of the sheaf of graded algebras $\oplus_{k=0}^\infty I^k$, where $I$ is the ideal of the point $x$. Now if $\sigma$ preserves the point $x$ then it also preserves the idea... | https://mathoverflow.net |
140,138 | [
"https://security.stackexchange.com/questions/140138",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/95922/"
] | The CSRF synchronized token makes sense up to certain point. Can someone explain the rest in a childish manner to where I can understand it.
When a user logs in they are given a session ID and a CSRF. The session ID is stored in session cookies and the CSRF token only stored on the page, preferably in a hidden field. ... | Though vulnerabilities can be chained, we need to look at vulnerabilities from an independent perspective too. Fixes for one vulnerability might help in fixing another one, but that is not usually the case.
CSRF is the attack in which an attacker manipulates the inherent browser-user trust. Anyone with a valid session... | CSRF tokens aren't a defense against other users logging into their account. CSRF tokens are a defense against CSRF attacks only. If anyone logs into an account (including an attacker), then they should get the CSRF token (along with all of the other content that's normally served to the user).
| https://security.stackexchange.com |
316,747 | [
"https://mathoverflow.net/questions/316747",
"https://mathoverflow.net",
"https://mathoverflow.net/users/95347/"
] | Let's denote a sentence <span class="math-container">$P$</span> as "<strong><em>weak Godel sentence of theory <span class="math-container">$T$</span></em></strong>", if and only if
<span class="math-container">$$[\neg (T \vdash P) \wedge \neg (T\vdash \neg P)] \wedge [Con(T)=Con(T+P) \wedge Con(T)=Con(T+ \neg P)] $$</s... | Unless I'm missing something, every sentence is equivalent to a simple sentence. To see this, take a sentence <span class="math-container">$\varphi$</span> and produce an equivalent sentence <span class="math-container">$\psi$</span> by the following procedure: Let <span class="math-container">$x$</span> be a variable ... | Partial answer:
If there is such a theory <span class="math-container">$T$</span>, it would mean that every simple sentence that's independent of <span class="math-container">$T$</span>, must decide Con(<span class="math-container">$T$</span>).
Note that every <span class="math-container">$\Pi^0_1$</span> sentence is... | https://mathoverflow.net |
446,301 | [
"https://physics.stackexchange.com/questions/446301",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/213752/"
] | Hawking wrote,
<blockquote>
Exhaust speed of chemical rockets is 3 kilometer/second. By dropping 30 percent of their mass, they can achieve speed of about 0.5 kilometer per second and then slow down again.
</blockquote>
So, I would like to know does "0.5" mean delta v (change of velocity)? I think it is about Tsi... | You've used the equation correctly, including the natural logarithm. Have another look at the quote:
<blockquote>
Exhaust speed of chemical rockets is 3 km/s. By jettisoning 30 % of their mass, they can achieve speed of about 0.5 km per second <strong>and then slow down again</strong>.
</blockquote>
So that's usin... | The original calculation, giving <span class="math-container">$\Delta v=1.07$</span> km/s, is correct. The crucial part is that the rocket is assumed to speed up <em>and then slow down again</em>. The rocket uses 0.5 km/s of <span class="math-container">$\Delta v$</span> to reach a speed of 0.5 km/s, and then uses anot... | https://physics.stackexchange.com |
7,518 | [
"https://cs.stackexchange.com/questions/7518",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/5137/"
] | Given following grammar:
$$
\begin{align}
S \rightarrow &A1B \\
A \rightarrow & 0A \mid \varepsilon \\
B \rightarrow & 0B \mid 1B \mid \varepsilon \\
\end{align}
$$
How can I show that this grammar is unambiguous? I need to find a grammar for the same language that is ambiguous, and demonstrate it.
I kno... | To show a grammar is unambiguous you have to argue that for each string in the language there is only one derivation tree.
In this particular case you can observe that $A$ only generates $0$'s, so the $1$ generated by the start symbol $S$ must be the first $1$ in the string.
Any grammar can be made ambiguous by addi... | This grammar is equivalent with
$$
\begin{align}
S \rightarrow &0A1B\mid 1B \\
A \rightarrow & 0A \mid \varepsilon \\
B \rightarrow & 0B \mid 1B \mid \varepsilon \\
\end{align}
$$
and so <em>like</em> a simple grammar we can show that this grammar is not ambiguous. Of course this grammar is not simple.
| https://cs.stackexchange.com |
108,309 | [
"https://softwareengineering.stackexchange.com/questions/108309",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/13639/"
] | I had an interview yesterday with a member of our organization who wanted to create a system to help him to do his job, the problem I had with him was that he had only a general idea about what he want. I tried to get more information from him by asking him specific questions which he had no answer to, such as what he ... | There are a couple of different ways I'd suggest approaching this:
<ol>
<li>Job shadowing -> This is basically watching him do his job so that you know what he is doing and what connections are there between the systems and processes he uses to get his job done. This is totally observation from your end where questio... | Ask them how they do their job now. Presumably they know that. From their description of their job, listen for clues that they collect information from someone. They might currently be writing in on post it notes, remember it in their head or if you're lucky, filling in an existing paper form, or if you are really luck... | https://softwareengineering.stackexchange.com |
8,783 | [
"https://mechanics.stackexchange.com/questions/8783",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/4498/"
] | I have a 2007 Hyundai Santa Fe with just over 90,000 KMs and recently the fuel gauge started to fluctuate wildly. I had the sensor's replaced and filled the tank and it only showed half full. So one of the new sensors was faulty, so that was replaced and all seemed good. The vehicle worked fine during this time, but ... | The sensor should not cause the engine to stall. All of the accessories not working (power steering and brakes) would be normal with a stalled engine. What I would be looking at is the fuel pump might be going bad. A mechanic can easily check this by placing a fuel pressure sensor on the fuel line to check the pressure... | I agree with Paulster2
Or maybe you have two different issues:
Fuel sensors or related wiring
Something else that causes your car to die.
The car only dies when the gauge shows empty?
| https://mechanics.stackexchange.com |
186,884 | [
"https://physics.stackexchange.com/questions/186884",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/64422/"
] | I have a simple problem that I am not quite sure how approach:
<blockquote>
Consider a spatially nonuniform magnetostatic field expressed in terms of a Cartesian coordinate system by
$\textbf{B}(x,z) = B_0[\alpha z\hat{x} + (1 +\alpha x)\hat{z}]$
Determine the equation of a magnetic flux line.
</blockquote... | Magnetic flux lines are a useful concept for visualization, but in my opinion should not be taken too seriously (in other words, I would not consider it especially useful to compute magnetic flux lines).
But I understand the question as follows: You have to find equation for "integrals" of the field, that is curves, w... | Any flux line seems ok, From x=0, z=0. The flux line would same magnitude of B=B0
| https://physics.stackexchange.com |
121,238 | [
"https://mathoverflow.net/questions/121238",
"https://mathoverflow.net",
"https://mathoverflow.net/users/31275/"
] | Let $\xi_{tn}(\theta),t=1,\dots,n$ be a real-valued martingale difference array indexed by a parameter $\theta \in \Theta \subset R$, where the set $\Theta$ is compact. Now, for all fixed $\theta \in \Theta$, the law of large numbers,
$\sum_{t=1}^n \xi_{tn} (\theta) \rightarrow 0$ in probability,
is assumed to hold... | Even if $\xi$'s are independent (a specific case of your martingale-difference stitation), uniform LLN sometimes holds and sometimes it does not. This type of questions has been studied in Machine learning and, specifically, in Vapnik-Chervonenkis theory. The Glivenko-Cantelli theorem (see wikipedia) describes one situ... | An extension of the uniform Glivenko-Cantelli notion to martingale differences can be found here: www-stat.wharton.upenn.edu/~rakhlin/papers/emp_proc_dep.pdf
| https://mathoverflow.net |
1,477,748 | [
"https://math.stackexchange.com/questions/1477748",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/197944/"
] | it might seem a little bit elementary. $f$ is defined on $\Bbb R$ and it is differantiable. and is not equal to zero.
if $xf(x)-yf(y)=(x-y)f(x+y)$ then find what is $f'(2x)$ equal to?. $(f'(x),2f'(x),xf'(x),4f'(x)$ or $8f'(x)?)$
from that equation
$\dfrac {f\left( x+y\right) -f\left( y\right) } {x}=\dfrac {f\left( x... | It's obvious that every function of the form <span class="math-container">$f(x)=ax+b$</span> satisfies the equation:
<span class="math-container">$$xf(x)-yf(y)=(x-y)f(x+y)\tag0\label0$$</span>
It can be shown that those are the only solutions indeed. To show that, let <span class="math-container">$a=f(1)-f(0)$</span> a... | The Identity function satisfies problem conditions and you sure that one of these 5 solutions are correct so the only possible one is $f'(2x)=f'(x)$ :) this is not a proof but answer your question if it is correct problem.
| https://math.stackexchange.com |
293,496 | [
"https://softwareengineering.stackexchange.com/questions/293496",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/184070/"
] | In my C++ project I am relying on some libraries that do memory management for me. I make wrapper classes, for ease of use and memory safety, for example the class below. Note that this is a much simplified example, to demonstrate my problem.
<pre><code>#include <library>
class Wrapper {
private:
lib_type* ... | I think these implementations are reasonable and a generally good solution. <strong>Adding an appropriate move constructor and move assignment may help deal with your copy concerns</strong> - the default should be appropriate with the shared wrapper.
Some may argue (or advise) that you do not need to wrap the Standard... | Just use <code>shared_ptr</code> directly, with your custom deleter. Maybe typedef it if you prefer.
This way you get correct move & copy constructors and assignment operators <em>with no typing</em>. You also get <code>weak_ptr</code> for free, if you want it.
Unless your code will add some actual functionality ... | https://softwareengineering.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.