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
178,295
[ "https://mathoverflow.net/questions/178295", "https://mathoverflow.net", "https://mathoverflow.net/users/3891/" ]
Let $M(n)$ be the vector space of $n\times n$ matrices over a local non-archimedian field $K$. Let $\mathcal S$ denote the space of locally constant compactly supported functions on $M(n)$. Similarly, let $\mathcal S ^0$ denote the space of locally constant compactly supported functions on the group $GL(n)$ (which is ...
Actually, the answer is indeed negative and the explanation is very simple. Namely, for $n=2$ let $\phi$ be the delta-function of the space of matrices whose second row is zero (considered as a distribution). Then its Fourier transform is the delta-function of matrices whose first column is zero. Hence this is a distri...
Can one try to show the negative answer for n=2 as follows. The question is equivalent to existence of a nonzero distribution σ on a 4 dimensional space $K^4$ such that both both σ and FT(σ) are supported on the quadric ab=cd (where a,b,c,d are coordinates on $K^4$). For a quadric in $K^3$ (a.k.a. the nilpotent cone in...
https://mathoverflow.net
501,320
[ "https://math.stackexchange.com/questions/501320", "https://math.stackexchange.com", "https://math.stackexchange.com/users/61691/" ]
At high school, the solution method to almost all mathematical exercises is to apply some technique or algorithm you have learned before. At the university, the situation is fundamentally different. Many exercises have the flavor of little research problems, where it is not obvious at all how to start. This new experie...
<blockquote> 5 points are placed on a sphere. Show that there is a (closed) hemisphere which contains at least 4 points. </blockquote> You can give a hint of "If we blindly take any cut of the sphere, by the pigeonhole principle, one of these hemispheres must contain at least 3 points." <blockquote class="spoiler"...
The <strong>locker puzzle</strong>: <blockquote> In a hallway there are 100 closed lockers. Now 100 persons pass the hallway. The first one changes the state (open or closed) of every locker. The second one changes the state of every second locker, the third person of every third locker and so on. Which ...
https://math.stackexchange.com
16,680
[ "https://engineering.stackexchange.com/questions/16680", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/12431/" ]
Quite often while calculating angular velocity we come across the quantity radians per second. How do I treat radian dimensionally?
radian is a <em>derived unit</em>, defined as the ratio of arc length to radius. As the ratio of two lengths it is dimensionless.
Radians are a <strong>fundamental</strong> unit of measurement, as are metres, grams, seconds, ampere, kelvin, candela, steradian &amp; mol. <ul> <li>Metre is the fundamental unit for length</li> <li>Gram is the fundamental unit for mass (kilograms in SI units)</li> <li>Second is the fundamental unit for time</li> <li...
https://engineering.stackexchange.com
241,996
[ "https://electronics.stackexchange.com/questions/241996", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/2713/" ]
I am trying to enabling an embedded system built around Intel D1000 MCU. I am mainly from a software background and just starting to catch up with some hardware knowledge. I am trying to build connection between an <code>EEPROM</code> and the <code>MCU</code>. My target is to enable this path: <ol> <li>User burns the...
Those are three different types of serial interfaces. SPI has a master clock and synchronous master-in-slave-out and master-out-slave-in data: a total of 3 wires plus ground/power and optional chip-select. Data is transferred simultaneously in and out, typically 8 bits at a time. Data can be MSB-first or LSB-first, d...
I'm sure you already have some experience with USB already, they are all 'serial' as the data is sent one bit at a time down one lane (conga line, one lane highway etc.), as opposed to being split up across several lanes at once (parallel data). SPI is good for embedded stuff as it is just a shift register and not mu...
https://electronics.stackexchange.com
207,893
[ "https://softwareengineering.stackexchange.com/questions/207893", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/-1/" ]
I'm using bits of javascript on my website for an image gallery, smooth scrolling, etc. These scripts are not used on every page (not every page has an image gallery for example). However, the scripts aren't very big and most users will have to download them eventually (the image gallery is very central to the website)...
I do not know what considerations you have made. My recommend would be that you load into each page only what you need to load that page. And then lazy load everything. Make the lazy loading something you can switch on and off easily. This will make initial page load as fast as possible on the first page you encoun...
If they're a bunch of small scripts, just roll them into one. Loading a few small files is slower than loading one file with equal size. The sum of size of all the files might be even smaller if they're compressed (i.e. by the http server). It's easier for both the server and the clients to use one file. Another consi...
https://softwareengineering.stackexchange.com
40,874
[ "https://physics.stackexchange.com/questions/40874", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/12905/" ]
first time I've been on physics.se but have used the math and cs before... Anyway, here's my question: If we have a damped pendulum described by the equation $$y'' + ay' + b = 0 , a&gt;0$$ Using the conversion $x_0=y$ and $x_1=y'$ we can convert this into a set of first-order ODEs as follows: $$ x_0'=x_1$$ $$x_1'=-...
Let me expand on Art's observation a bit. In the equation, $b$ should be replaced by $by$, it's the restoring force of user1631, too. There is no "vector term" in the matrix equation anymore: the equation or set of equations is linear. The matrix is $$ \pmatrix{0&amp;1\\ b &amp; -a} $$ The eigenvalues are solutions to...
Your equation's wrong for an oscillator: b is not a constant term but instead a coefficient of the position function y.
https://physics.stackexchange.com
281,566
[ "https://mathoverflow.net/questions/281566", "https://mathoverflow.net", "https://mathoverflow.net/users/60913/" ]
Consider the following theorem by Aupetit. <blockquote> Let $A$ and $B$ be two von-Neumann algebras and let $\phi$ be a spectrum-preserving linear mapping from $A$ onto $B$. Then $\phi$ is a Jordan isomorphism. </blockquote> The statement can be relaxed further by allowing $B$ be to be any semi-simple Banach algebr...
The answer depends on how much symmetry of $PGL(2)$ you want to retain. If the compactification is to be equivariant for left and right multiplication then, indeed, $\mathbb P^3$ is the only normal compactification. This follows easily from the embedding theory of spherical varieties. If no symmetry is to be preserve...
You can obtain other compactifications by blow ups. Namely the boundary divisor is given by the determinant hypersurface $\mathrm{det}(x)=0$. This is stratified by matrices of lower rank, and these strata are invariant under the action of $PGL_2$. Therefore blowing-up one of the higher codimension strata gives a new c...
https://mathoverflow.net
4,150,927
[ "https://math.stackexchange.com/questions/4150927", "https://math.stackexchange.com", "https://math.stackexchange.com/users/116490/" ]
Let <span class="math-container">$f\in C^2(\mathbb R^n)$</span> be a function with compact support. Can we recover all of the partial derivatives <span class="math-container">$f_{x_i x_j}$</span> just from knowing the Laplacian <span class="math-container">$\sum_{i=1}^n f_{x_i x_i}$</span>? This sounds absurd, but the ...
Let us consider the 2d case only. This is only due to my laziness in typing and is not a fundamental obstruction. So, we have a function <span class="math-container">$f\colon \mathbb R^2\to \mathbb C$</span> which is smooth and compactly supported. We denote its Fourier transform by <span class="math-container">$$ \hat...
As @SolubleFish wrote in a comment, <span class="math-container">$\Delta f$</span> determines the whole function <span class="math-container">$f$</span> because there are no harmonic functions with compact support.
https://math.stackexchange.com
127,144
[ "https://physics.stackexchange.com/questions/127144", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/33482/" ]
<img src="https://i.stack.imgur.com/ofJjE.jpg" alt="enter image description here"> I would like if someone could clarify this issue for me: When dealing with a current <span class="math-container">$I$</span> running in a loop with radius <span class="math-container">$R$</span> and looking for the magnetic field in the...
The Biot Savart law is $${\bf B} = \frac{\mu_0}{4\pi} \oint \frac{ I\, d{\bf l} \times {\bf r}}{|{\bf r}|^3}$$ In this case $d{\bf l} \times {\bf r} = dl\,|r|$ directed along the loop axis and integrating around the closed loop leads to a B-field magnitude $ B = \mu_0\, I/2R$ as you suggest. However, I think there ...
You probably misapplied Ampere's law. This law is usually used to find magnetic field only in special cases when the contour integral can be found as a function of single field value based on symmetry. Magnetic field of a circular current loop is not so simple and Ampere's law cannot be easily used to find it. In such...
https://physics.stackexchange.com
248,798
[ "https://physics.stackexchange.com/questions/248798", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/62211/" ]
Poynting's theorem: $$\int_V\left(\vec{E}\cdot\vec{J}\right)\,\mathrm dV = -\dfrac{\partial}{\partial t}\int_V\dfrac{1}{2}\left(\epsilon_0 E^2 + \dfrac{1}{\mu_0}B^2\right)\,\mathrm dV - \dfrac{1}{\mu_0}\oint_S \left(\vec{E}\times\vec{B}\right)\cdot\,\mathrm {d\vec S}$$ My question is with regards to how this proves c...
Let the electromagnetic field has <span class="math-container">$u$</span> as its energy density (amount of energy per unit volume in the field) and let <span class="math-container">$\bf S$</span> represents the <em>energy flux</em>- the amount of energy per unit time flowing across a unit area perpendicular to the flow...
Poynting's theorem is the work-energy theorem in electrodynamics. The equation tells us that the total power (or energy) carried by an electromagnetic wave is equal to the decrease in the energy stores in the field (first term) minus the energy radiated out from the filed (second term). The radiated energy will never c...
https://physics.stackexchange.com
31,658
[ "https://quant.stackexchange.com/questions/31658", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/25869/" ]
I have a theoretical question concerning NPV calculation of financial products. I know how to calculate it when future flows have to be estimated, but I am wondering how to calculate past flows. In fact, I am even wondering if it makes sense to calculate past flows for NPV of a financial product as it is generally use...
In basic instruments, one can ignore the past fixings and price purely on the future cashflows. Hence the term Net Present Value. With more exotic stuff such as range accruals, the past fixings are used to calculate the future payoff. In this case, to find the NPV at an intermediate date between the start date and ex...
The idea of considering past cash flows into an NPV calculation is rather adventurous, in my opinion. If an investor wants to invest money into a financial instrument that has already generated positive cash flows before making his investment (e.g. investing into a bond when some interest payment dates have already pas...
https://quant.stackexchange.com
125,842
[ "https://dba.stackexchange.com/questions/125842", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/45662/" ]
I want to get a sequence number according to the Indian fiscal year. I tried to write a function using SQL built-in function: <code>DATEPART(DAYOFYEAR,'2015-04-01')</code> but I am facing a challenge to get day number throughout the financial year. For the financial year 2015: First Day is '2015-04-01' and Last Day...
You can write a function to call from <code>SELECT</code> statement. Below is function definition. Parameter @FYear stands for financial year. <pre><code>CREATE FUNCTION [dbo].[FiscalDayNum](@currentDate Date,@FYear Int) Returns smallint AS Begin DECLARE @Q4days Int IF (@FYear % 400 ) = 0 OR ((@FYear % 4 ) = 0 AND (@F...
The sequence number of a day in a year that begins on april 1 can be calculated this way: <pre><code>SELECT 1+ DATEDIFF(day, DATEFROMPARTS( DATEPART(year, DATEADD(month, -3, [Date])), 4, 1), [Date]) AS FYdayNumber FROM tableWithDates; </code></p...
https://dba.stackexchange.com
83,130
[ "https://stats.stackexchange.com/questions/83130", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/6961/" ]
The speed of convergence in MSE is typically dominated by the variance. Consider the ML estimator of the variance: Its variance decays as $\mathcal{O}(1/n)$ and the bias term decays as $\mathcal{O}(1/n^2)$. Would it be true to assert that the variance will always be the dominant term in the convergence rate?
I am answering your first two questions together through example. <pre><code>library(multcomp) Group &lt;- factor(c("A","A","B","B","B","C","C","C","D","D","D","E","E","F","F","F")) Value &lt;- c(5,5.09901951359278,4.69041575982343,4.58257569495584,4.79583152331272,5,5.09901951359278,4.24264068711928,5.09901951359278...
You are correct, there is a random number generation involved, and it makes the calculations vary from run-to-run. The culprit is actually not Dunnett's procedure, but the multivariate t distribution required for the single-step adjustment. The following code shows an example calculating $P(X&lt;0)$ with a 5-dimension...
https://stats.stackexchange.com
233,147
[ "https://dba.stackexchange.com/questions/233147", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/67971/" ]
I have set <code>--replicate-ignore-db=mysql</code> in MySQL slave, but still it is replicating any users I create on the master. Is there a way to stop the slave from replicating users?
For statement-based replication(the default for mixed binary logging format), <code>--replicate-ignore-db=foo_db</code> works only when <code>foo_db</code> is explicitly used as in <code>USE foo_db</code>. In a <code>GRANT</code> or <code>REVOKE</code> statement, <code>USE mysql</code> is not executed, as can be seen f...
You can use --Replicate_Ignore_table=mysql.user, because while modifying, creating, deleting user it modifies mysql.user table.
https://dba.stackexchange.com
9,263
[ "https://stats.stackexchange.com/questions/9263", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4054/" ]
I am using SPSS and having some trouble with a research question which is analogous to the hypothetical question: <em>Is there a longitudinal Relationship between Happiness and Chocolate Consumption?</em> Let’s say I take a sample of people and contact them when they are aged 14 and aged 18 and ask them: a) What is...
You may need to clarify what you mean by <blockquote> "accounting for the fact that I have taken repeated measures..." </blockquote> You say that <blockquote> "I would like to know if the mean chocolate consumption per day is higher among happy people than those who are not happy..." </blockquote> This sugg...
You may think about happiness as the dependent variable, and you could use logistic regression with chocolate consumption as a predictor. Some people may be generally happier or less happy independently from chocolate consumption. This can be modelled by including subject id as a random effect categorical predictor. Ag...
https://stats.stackexchange.com
1,783,886
[ "https://math.stackexchange.com/questions/1783886", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Let $X$ be a non-empty subset of irrational numbers such that sum of any two elements of $X$ is rational ; then is there any possible upper bound for the cardinality of $X$ ? Can $X$ be infinite ?( I know that $|X|$ can be $2$ ) . Please help . Thanks in advance
If $X$ had three distinct elements, say $a,b,c$, then, since $a+b$ and $a+c$ are rational, so is their difference $b-c$. But $b+c$ is also rational, and therefore so is $(b+c)+(b-c)=2b$. But then $b$ is rational, contrary to hypothesis.
Suppose that $x,y,z\in X$. Let $q=x+y$ and $r=x+z$. Then $y=q-x$, $z=r-x$, and $y+z=q+r-2x$. If $q$ and $r$ are rational, and $x$ is irrational, can $q+r-2x$ be rational?
https://math.stackexchange.com
280,108
[ "https://mathoverflow.net/questions/280108", "https://mathoverflow.net", "https://mathoverflow.net/users/90655/" ]
Let $(M^n,g)$ be a Riemannian manifold that admit a unit Killing vector field $X$. i.e., $\mathscr{L}_Xg=0$. Is it possible that there exist a smooth function $f$ on $M$ such that $X=\mathrm{grad}f$? A good reference will be very appreciated.
It is possible for this to happen (for example, the unit translation vector fields in $\mathbb{R}^n$), but it does not necessarily hold (for example, there are unit Killing vector fields on the stanard Riemannian $3$-sphere, but, obviously, none of them could be gradients, since they never vanish and the $3$-sphere is ...
The Killing condition $\nabla_a X^\flat_b + \nabla_b X^\flat_a = 0$, together with the gradient condition (really, the closedness condition for a $1$-form) $\nabla_a X^\flat_b - \nabla_b X^\flat_a = 0$, imply that $X$ is covariantly constant, $\nabla_a X^b = 0$. Note that I'm using the relation $X^\flat(-) = \langle X,...
https://mathoverflow.net
17,265
[ "https://electronics.stackexchange.com/questions/17265", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5111/" ]
I have some devices which have purple LED's in them. I need to make another one, but don't know anything else about the LED to buy more. How can I determine the forward voltage and maximum current in order to get similar LEDs?
Like for any other diode forward voltage varies slightly with current: <img src="https://i.stack.imgur.com/WkQTd.gif" alt="enter image description here"> You could say it's a constant voltage plus the voltage drop over a resistor. \$V_F\$ is usually specified at the <strong>nominal current</strong>, which is oft...
Well for forward voltage you could power it from a voltage supply in series with a very large potentiometer. Slowly decrease the pot while measuring the voltage drop over the pot. Once the voltage becomes somewhat stable then your VCC - Vpot is your Vf. As for maximum current... get a constant current sinking driver a...
https://electronics.stackexchange.com
16,375
[ "https://astronomy.stackexchange.com/questions/16375", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/11792/" ]
Can any one explain to me What will happen to Earth if its has two moons? Same Distance &amp; two sides of earth (North &amp; south)? Will it be good for humans or bad?
If we had two moons in opposition of each other the only short term effect would be amplified tides. Long term it will accelerate the decay of Earth's rotational period.
An orbit as you describe is not stable. Even if the two moons are intially exactly the same distance from the Earth, small perturbations from the sun and other planets will cause one of them to speed up and the other to slow down. Eventually either one of them will hit the other, or one of them will hit the Earth. Whic...
https://astronomy.stackexchange.com
80,125
[ "https://mathoverflow.net/questions/80125", "https://mathoverflow.net", "https://mathoverflow.net/users/4048/" ]
Prove/ Disprove: Let $n$ be a positive integer. Let $A$, $B$ be two $n \times n$ square matrices over the complex numbers. If $AB = BA$ and $\ker A = \ker A^2$ and $\ker B = \ker B^2$ then $\ker AB = \ker A + \ker B$. (Recall that $\ker A$ is the set of all vectors $v$ such that $Av = 0$.) Background: I am teaching ...
Since $\ker A = \ker A^2$, the map $\bar{A} : V/\ker A \to V/\ker A$ is injective. Since $V/\ker A$ is finite dimensional, this map is surjective. So for any $x \in V$ we can find $y \in V$ and $z \in \ker A$ such that $x = Ay + z$. Now suppose $ABx = 0$ and let $x = Ay + z$ as above. Then $0 = ABx = ABAy + ABz = A^2B...
Here is a proof. First notice that the space of all matrices of size $n$ is finite dimensional. Therefore matrices $A,...,A^{m}$ are linearly dependent for a sufficiently large $m$ (this is instead of Hamilton-Cayley). Hence there exists a polynomial $f(x)$ such that $f(A)=0$, $f(0)=0$. Represent $f(x)$ as $x^kg(x)$ wh...
https://mathoverflow.net
65,184
[ "https://softwareengineering.stackexchange.com/questions/65184", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/4615/" ]
So, I was tasked by client to help him convert his wp menu to javascript dropdown. I did on my development server. He did see the change and I was paid. I deliver the code he deploy it. But, no change on his server. So, I have to spent hours debugging it on his server. It turns out, his other plugin is not compatible w...
There is a third option here where you could charge him for the fix (ie, finishing the job), but not charge him for the debug time which only occurred because you did not do your <em>BEST</em> possible job as a programmer. Don't get me wrong; <strong>you did what most developers would do</strong> with a contract job. ...
On one hand, I think you're within your rights. If he didn't give you all the information you needed to do the job successfully (ie. the other plugin), how could you be expected to? On the other hand, is there likely to be more work from this source, or through his friends? If so then you might want to seriously consi...
https://softwareengineering.stackexchange.com
399,975
[ "https://softwareengineering.stackexchange.com/questions/399975", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/349287/" ]
I have an API that return list of <strong>Employee</strong>. This API will have an <em>offset</em> and <em>limit</em> for pagination purpose. On the frontend, I use Single-Page Framework (Vue/Angular/React..). This SPA have a Employee List Page that can create new <strong>Employee</strong> using AJAX. And now the que...
<blockquote> Should I return only OK message when server successfully created Employee object and then GET the updated list from server? </blockquote> This. When you create the new Employee you should return 201 CREATED and possibly a representation of that newly created user in JSON or XML or what ever. This cre...
Go for the first option. GET and POST are independent operations. In particular, whatever filtering and pagination parameters were given to the GET request for the list are not available in the POST request, so combining them does not make sense. What makes sense, though, is returning the created object in the POST r...
https://softwareengineering.stackexchange.com
97,301
[ "https://cs.stackexchange.com/questions/97301", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/93761/" ]
I'm having troubles understanding the following proof: $$ \begin{align*} &amp;\text{Proof: } \forall \epsilon \in \mathbb{R}^+, \forall a \in \mathbb{Z}^+, n^\epsilon \gg \log_a(n) \\ &amp;\Longrightarrow \ln(a(n)) = \log_2(e)\ln^2(n) \ll n^{0.01} = \ln(d(n)) \\ &amp;\Longrightarrow a(n) \ll d(n) \end{align*} $$ The to...
That's not $\in$ but $\epsilon$: that is, a lowercase Greek letter epsilon. It's normally written $\varepsilon$ instead for clarity, but this author chose to use the "lunate" form for unknown reasons. In this case, epsilon is being used as a shorthand for "an arbitrarily small but positive real number". This should pr...
It's a variable name, like any other. In your property you could rename it to (e.g.) $b$, turning $$\forall \epsilon \in \mathbb{R}^+, \forall a \in \mathbb{Z}^+, n^\epsilon \gg \log_a(n)$$ into $$\forall b \in \mathbb{R}^+, \forall a \in \mathbb{Z}^+, n^b \gg \log_a(n)$$ That's it. <hr> Why calling it $\epsilon$, ...
https://cs.stackexchange.com
196,222
[ "https://security.stackexchange.com/questions/196222", "https://security.stackexchange.com", "https://security.stackexchange.com/users/37242/" ]
In a hypothetical website, there are two types of users, admin users and normal users. Normal users can change their own password, and in keeping with best practices are required to provide their current password when doing so. Admin users can change the password of any user. Should they be required to confirm their...
This is an anti-pattern of least privilege principle. In common case, a "reset password" button should be enough, which will lead a target user to password reset form. But if you need exactly "set new password" button, then you shold consider two relevant attack vectors - CSRF and XSS. If you'll mitigate them well - t...
The decision is likely to come down to the admin user profile. For dedicated admin teams there may be other supplemental controls such as restrictions on the devices that can be used, device hardening and access controlled ops rooms to reduce the risk of attacks. These supplemental controls may remove the need to requi...
https://security.stackexchange.com
118,201
[ "https://mathoverflow.net/questions/118201", "https://mathoverflow.net", "https://mathoverflow.net/users/30430/" ]
i'm trying to define modular forms for the full modular group for a general audience and want to make it as simple as possible. please tell me if this is correct: definition of a modular form $f$: <ol> <li>holomorphic function $f$ from upper half plane to $\mathbb{C}$.</li> <li>$f(z)$ bounded as Im($z$) tends to infi...
(Edited/corrected/amplified) "Bounded at infinity" is a condition that includes not only cuspforms but also Eisenstein series. If by "holomorphic at infinity" one means exactly holomorphy of $f(z)$ on the quotient by translations $z\rightarrow z+1$, then this is the same as "bounded at infinity". On another hand, if o...
This is not exactly an answer to the question as asked, but I was recently confronted to the same problem: how to define, for a general audience, a modular form for the full modular group in a way which is both correct and quick? Here is a solution I used: A modular form of weight $k$ (and level 1) is a <strong>formal...
https://mathoverflow.net
270,526
[ "https://mathoverflow.net/questions/270526", "https://mathoverflow.net", "https://mathoverflow.net/users/24078/" ]
Is it possible to give an example of $n$ dimensional manifold with the property that the tangent bundle $TM$ cannot be expressed as Whitney sum of two subbundles? It is certain true for two sphere; it is certainly not true for three dimensional manifold since every three manifold is parallelizable. You can always split...
To expand on my comment above, suppose that $TS^{2k}\cong\xi\oplus\eta$ for some non-trivial vector bundles $\xi$ and $\eta$ over $S^{2k}$ of dimensions $m$ and $\ell$, respectively. Hence $0&lt;m,\ell&lt;2k$. Since $S^{2k}$ is simply-connected, both $\xi$ and $\eta$ are oriented, hence possess Euler classes $$ e(\xi)\...
I like to play around with projective spaces for these type of questions. The tangent bundles of real projective spaces have stiefel whitney class $(1+a)^{n+1}$. So for example for $n=4$, we have stiefel whitney class $1+a+a^4$. This polynomial is irreducible hence the tangent bundle does not split. EDIT: The commen...
https://mathoverflow.net
282,576
[ "https://dba.stackexchange.com/questions/282576", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/221390/" ]
Looking for some advice before I follow my gut on this and rebuild the nonclustered index to lead with our partition key. This is an insert-only table which is never updated or deleted, we keep a sliding window my truncating/merging periods on the left and adding new periods on the right. The nonclustered index is con...
<blockquote> I'm wondering what the best way would be to keep a nonclustered index for looking by accountId without all the fragmentation </blockquote> You've got the partition key in the nonclustered index, so it's on the partition scheme (by default), and only the head partition is going to get inserts and additional...
The problem here is that your secondary nonclustered index is not partiotion aligned so when a new record is added it generates fragmentation because that index follow a different order. New records don't generate fragmentation for the clustered index and this is very good. You can't prevent fragmentation on indexes or...
https://dba.stackexchange.com
8,494
[ "https://dsp.stackexchange.com/questions/8494", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/471/" ]
Is there a verb for removing the mean or DC component of a signal? I am trying to name a flag for doing just that. "Normalize" can mean many things, so I don't think that would be a good choice.
I've heard this referred to as <em>demeaning</em> a signal, or applying a <em>DC notch</em> (or, in some more hardware-related domains, a <em>DC block</em>). More generally, it might be called just <em>highpass filtering</em> the signal to remove the DC component.
I've heard the word <em>centering</em> for setting the mean of a signal to 0.
https://dsp.stackexchange.com
17,840
[ "https://quant.stackexchange.com/questions/17840", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/7161/" ]
For a short volatility strategy using option strangles, is it better to target a fixed premium to earn? Or a fixed vega? Objective is to maximise the return/risk (sharpe) of the strategy. Any help is much appreciated.
Pring was (probably) simply referring to the fact that most indicators are function of price -- lots of different ways to twist and contort prices to define trends, reversal points, etc. Volume is another parameter entirely, as it doesn't depend on price; the market or share price can have an up day on average, high, o...
So lets test if volume and price are independent. We can estimate this by using mutual information. When x and y are independent, their mutual information is 0 so measures of mutual information entropy should be zero. Lets calculate this for the IBM case with 10 years of daily closing price and data volumen. libra...
https://quant.stackexchange.com
821,759
[ "https://math.stackexchange.com/questions/821759", "https://math.stackexchange.com", "https://math.stackexchange.com/users/106102/" ]
Let $N$ be a subgroup of $G$, One can show that, $N$ is normal in $G$ if and only if for all $xy\in N$, $yx\in N$. Above proposion can be proved by elemantary methods. I wonder the following; Let $H$ be a subgroup of $G$ with following property, If $xyz \in H$ then all possible product of $x,y,z$ in $H$, i.e $xzy...
If $xyz \in H$ and $xzy \in H$ then $(xyz)^{-1}(xzy)=z^{-1} y^{-1} z y = [z,y] \in H$. Since for every $y,z \in G$ there is some $x=(yz)^{-1}$ so that that $xyz \in H$, we get that every such $H$ contains $[G,G]$. Conversely if $H$ contains $[G,G]$, then looking at the abelian group $G/H$ one gets the condition. Conj...
If you just cycle the products, then is again the same answer: it's equivalent. But if you take all the ordered products, than is the same (passing to the quotient) of a group where if $xyz=1$ than the properties remain true permuting the factors. Is easy to prove that this implies that G is abelian. So you're detecti...
https://math.stackexchange.com
212
[ "https://computergraphics.stackexchange.com/questions/212", "https://computergraphics.stackexchange.com", "https://computergraphics.stackexchange.com/users/158/" ]
When computing ray-object intersections against a transformed object, most raytracers apply the inverse transform to each ray and compute the intersection against a non-transformed object. Wouldn't applying the forward transform, putting the object into a flat world-space, be faster and more efficient, because you onl...
Most raytracers do both! Have you ever seen a ray-triangle intersection test where the triangle is transformed so that one vertex is at the origin and the triangle is flat along one of the axes? That would simplify the test, but storing the inverse transformation to apply it to the ray takes more space than the triang...
Most ray intersection algorithms can be greatly simplified if you can assume the shape you're intersecting is at the origin, unrotated and with unit size. There are a few exceptions (Like spheres, which have rotational symmetry.) but the more general versions of the algorithms mathematically usually end up basically tr...
https://computergraphics.stackexchange.com
103,197
[ "https://math.stackexchange.com/questions/103197", "https://math.stackexchange.com", "https://math.stackexchange.com/users/15183/" ]
I.e. $\displaystyle\int_{\mathbb{R}} \frac{1}{a^2+(x-y)^2}\cdot\frac{1}{a^2+y^2} dy=\frac{2\pi /a}{4a^2+x^2}$. If anyone feels like giving me a brief hint about how to get started on this I'd be grateful.
A standard technique to attack this is through Fourier analysis. Consider the function $f$ defined by $$f(s)=\frac{1}{a^2+s^2}$$ We wish to show $$(f*f)(x) = \frac{2\pi/a}{4a^2 +x^2} = \frac{2\pi/a}{4(a^2 +(x/2)^2)} = \frac{\pi}{2a}f(x/2) $$ <hr> <em>A note on the Fourier transform...</em> There are different choi...
If I am understanding the problem correctly, you want to integrate the slightly complicated function of $x$ and $y$ from $y=-\infty$ to $y=\infty$. It is doable, but unpleasant. As usual with this sort of rational function (of $y$), we can use <em>partial fractions</em>. So try to express your integrand as $$\frac...
https://math.stackexchange.com
81,935
[ "https://electronics.stackexchange.com/questions/81935", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9983/" ]
I'm trying to use an Arduino to enable/disable a 12V solenoid. I used an H-bridge and got that working fine. Then, I decided to simplify things and get a single mosfet instead of a multi-channel H-bridge and have gotten myself very confused. I'm trying to understand the proper way to use a P-channel (or N-channel) mosf...
Compare the actions of a P and N channel MOSFET in your circuit. (I've left the junction transistor in to aid comparison.) <img src="https://i.stack.imgur.com/ezKgb.png" alt="enter image description here"> The PIC output does not like being connected to 12V so the transistor acts as a buffer or level switch. Any ou...
The bipolar transistor is present as a driver for the MOSFET. Although to DC, MOSFETS have a very high resistance and so look like open circuits, they actually capacitive. In order to turn on, charge has to be transferred into them, and doing that fast requires current driving. The BJT (and the overall circuit design)...
https://electronics.stackexchange.com
176,779
[ "https://mathoverflow.net/questions/176779", "https://mathoverflow.net", "https://mathoverflow.net/users/56304/" ]
For small values of $n$ ($2\leqslant n\leqslant 5$), the coefficients $a_k = (-1)^k{n\choose k}{n+k\choose k}$ of the shifted Legendre polynomial $\tilde{P}_n(x)$ satisfy the identity $\displaystyle\sum_{k=1}^n \frac {ka_k}{(n+k)(2k+1)} = \frac{(-1)^n}{4n^2-1}.$ Does that identity hold for all $n$? If so, how might one...
If we write the right side of Robert's identity as $$(-1)^n\frac{(\nu-2)(\nu-4)\cdots(\nu - 2n+2)}{(\nu+2)(\nu+4)\cdots(\nu+2n)},$$ we see that the identity is a partial fraction expansion of a proper rational function. (This is a littler simpler if we replace $\nu$ with $2\nu$.)
Somewhat more generally, Maple 18 says that $$ \sum_{k=1}^n \dfrac{(-1)^k k}{(n+k)(2k+v)} {n \choose k} {{n+k} \choose k} = -{\frac {\Gamma \left( v/2+2 \right) \Gamma \left( n-v/2 \right) }{ \left( v+2 \right) \Gamma \left( 1-v/2 \right) \Gamma \left( 1+v/2+ n \right) }} $$ which for $v=1$ gives you the desired...
https://mathoverflow.net
106,745
[ "https://mathoverflow.net/questions/106745", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
Are there non-trivial (i.e. excluding concepts that can be defined only for $p&gt;0$) statements in algebraic geometry that hold for all fields of characteristic $p$ for all prime $p$ but are known to be false in characteristic zero?
Here are two examples. The moduli space of dimension $g$ principally polarized abelian varieties $A_g$ contains complete codimension $g$ subvarieties in any positive characteristic $p$ (for instance, the locus of abelian varieties with no nontrivial $p$-torsion points), but not in characteristic $0$ (by Keel and Sadun...
One other example: in characteristic $p&gt;0$ there exist non trivial embeddings of the affine line $\mathbb{A}^1$ into the affine plane $\mathbb{A}^2$ (i.e. embeddings that are not equal to the composition of $x\mapsto (x,0)$ with an automorphism of $\mathbb{A}^2$). For example, $x\mapsto (x^{p^2},x^{p^2+p}+x)$ is ...
https://mathoverflow.net
4,609,983
[ "https://math.stackexchange.com/questions/4609983", "https://math.stackexchange.com", "https://math.stackexchange.com/users/315531/" ]
Let <span class="math-container">$A,B,C,D$</span> positive numbers, <span class="math-container">$g$</span> be a positive function, <span class="math-container">$\alpha\in(0,1)$</span> and the condition <span class="math-container">$Ag(x)+B\le g(x)^{\alpha}$</span> holds. Then the following is true: <span class="math-c...
Edit: I found a mistake in my solution (step 1), which I will describe there. <strong>Step 1:</strong> Proving <span class="math-container">$AC+DB\le \min\left[ Cg(x)^{\alpha-1},Dg(x)^{\alpha} \right]$</span>. Equivalently, <span class="math-container">$$ AC+DB\le \begin{cases} Cg(x)^{\alpha-1}\le Dg(x)^{\alpha}, &amp...
This is only an observation / clarification that is too long for a comment.A solution has already been provided in the answer of @DavidRaveh. I will assume that the numbers <span class="math-container">$A,B,C,D$</span> are restricted to be strictly positive. Otherwise we could choose <span class="math-container">$B=0$<...
https://math.stackexchange.com
110,461
[ "https://mathoverflow.net/questions/110461", "https://mathoverflow.net", "https://mathoverflow.net/users/19593/" ]
I would like to know a simple proof of isometric injectivity of $L_\infty$. The proof I've found in Topics in Banach space theory. F. Albiac, N. Kalton uses two deep result. <ul> <li>$L_\infty$ as commutative unital $C^*$ algebra is isometrically isomorphic to $C(K)$ for some compact $K$.</li> <li>Every $C(K)$ space ...
Write $L_\infty$ as the closure of a net (directed by inclusion) of finite dimensional $\ell_\infty$ spaces. Compose the operator into $L_\infty$ with norm one projections onto these subspaces and extend. Use weak$^*$ compactness of the unit ball of $L_\infty$ to pass to a limit of a subnet of these operators. $$ $$ ...
I am not sure whether the following would meet your requirements but I vaguely remember having heard it in a course many years ago and I think that it is sufficiently distinct from the above proofs to justify a brief mention. The crucial common property of the three spaces in question---the real line, the sequence spa...
https://mathoverflow.net
92,447
[ "https://biology.stackexchange.com/questions/92447", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/58971/" ]
The ancestral solution to oxygen transport is with hemoglobin (or, similar proteins) dissolved in blood (or, "hemolymph", but, basically, dissolved in water. ) What was the advantage of enclosing the oxygen-transport proteins in cells?
I suspect your problem is grasping what is a deleterious recessive allele. Wikipedia and textbooks explain it much better but I will try to illustrate with respect to your question. <blockquote> I have to merge somebody else's code into my code, there would be a heck of a lot of merge conflicts and errors. </blockqu...
You say <blockquote> cells basically create copies of DNA all the time in our body. There may be a few mutations/errors, but it works out fine. </blockquote> and <blockquote> Why does merging two similar things cause more problems </blockquote> Well, it doesn't, at least not in the way you seem to understand...
https://biology.stackexchange.com
66,588
[ "https://cs.stackexchange.com/questions/66588", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/48241/" ]
I am trying to come up with a proof for the following: <blockquote> For any language $A$, there exists a language $B$ such that $A \le_{\mathrm{T}} B$ but B $\nleq_{\mathrm{T}} A$. </blockquote> I was thinking of letting $B$ be $A_{\mathrm{TM}}$, but I realize that not all languages are Turing reducible to $A_{\mat...
A B-tree has one significant disadvantage on the fastest deep cache machines, it depends on pointers. So as the size grows each access have a greater and greater risk of causing a cache-miss/TLB-miss. Effectively getting a K value of z*x, x=sum(cache/TLB-miss per access, L1-TLB misses are typically size of tree / tota...
Consider the following general question: <blockquote> Here is an $O(n\log n)$ sorting algorithm. Why use quicksort (or timsort, or whatever is used in some library) rather than my algorithm? </blockquote> There are several possible types of answers: <ol> <li>Your algorithm is worse than quicksort in some sense, sa...
https://cs.stackexchange.com
244,048
[ "https://stats.stackexchange.com/questions/244048", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/134978/" ]
I am comparing classification algorithms on different data-sets. For some of the algorithms, there are reasons to believe they don't work well with class imbalance unless some kind of adjustment is made. If the adjustments work well, the experiments on the imbalanced sets should show that the adjustment helps and the b...
<blockquote> Potential measures that came to my mind where the ratio between the prevalence of the most and the least common class. </blockquote> I think this is the right idea. Actually, I would suggest that you use two numbers instead of just one, and simply present the prevalence of the most and least common clas...
Yes, I support that answer. Simply represent imbalance as the <strong>percent in the minority class</strong>. It's simple and everyone understands it. Do not represent it as a ratio-- this gets highly non-linear and doesn't generalize to multi-class problems. A perfectly balanced binary-class dataset would be 50%. ...
https://stats.stackexchange.com
92,719
[ "https://softwareengineering.stackexchange.com/questions/92719", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/25681/" ]
I have a project on my resume in which we had used <code>MVC Architecture</code> and <code>Java, JSP and MySQL</code>. Hence during the interviews if the position requires experience about MVC Architecture, I have to face the question like "<code>Explain this project.</code>" What exactly is the interviewer is expectin...
It's a little easier to explain what we <em>don't</em> want to hear as an answer to that sort of question. Don't recite the Wikipedia definition of MVC. Don't talk about what "they" did to implement the architecture. Talking about what "we" did is better, but I'm really looking for what "I" did. What was your personal ...
From my personal experience, I think they just want to hear: <blockquote> Our JSP pages were observers of our business model. The model would communicate the changes to the view this way (observer pattern) and the view would also call the model when appropriate. When we saw it fit or requirements demanded the ...
https://softwareengineering.stackexchange.com
171,319
[ "https://electronics.stackexchange.com/questions/171319", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/76327/" ]
Is there any easy and safe way to convert the high voltage AC (60Hz, 10kV, such as the voltage on the overhead line) to 5V DC that can be used to power up a micro controller (around 1W power)? We do have a ground in the AC system. What is the easiest way? Are there any COTS products or components available?
The answer is economy. The optimal processes for CPU and RAM are different, so when both are on the same chip some compromise must be found. For a small chip (not that much RAM) this does not hurt so much, less than adding an external RAM and using a lot of IO pins to interface to it. For a large RAM (currently the ...
DRAM modules need a memory controller in order to both trigger refreshes and arbitrate access. That controller comes at a cost in wafer real estate, power consumption, and pin count. SRAM modules do exist, but lose out to DRAM on both capacity (SRAM cells need 6 transistors versus DRAM's one transistor and one capacit...
https://electronics.stackexchange.com
13,013
[ "https://dsp.stackexchange.com/questions/13013", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/5253/" ]
I know that the Fourier Transform of the autocorrelation function is the Power Spectral Density. But how can we arrive at such a result intuitively? Is it just a theorem?
$$\begin{align} R_x(\tau) &amp;=\int_{-\infty}^\infty x(t)x^*(t-\tau)\,\mathrm dt\\ &amp;= \int_{-\infty}^\infty \left[\int_{-\infty}^\infty X(f)e^{j2\pi ft}\,\mathrm df\right]x^*(t-\tau)\,\mathrm dt\\ &amp;= \int_{-\infty}^\infty X(f) \left[\int_{-\infty}^\infty x^*(t-\tau) e^{j2\pi ft}\,\mathrm dt\right]\,\mathrm df\...
Here's the story up to constant factors. Correlation is the same as convolution with a time reversed kernel. Autocorrelation is therefore convolution with the time reversed function itself. Convolution can be represented as a product in frequency domain, time reversal as complex conjugation. That means the autocorrelat...
https://dsp.stackexchange.com
131,293
[ "https://electronics.stackexchange.com/questions/131293", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/54240/" ]
I am trying to get an understanding of white noise and how it can be filtered out, etc. For that I'd like to understand correlation. What would the autocorrelation of white noise look like? If I am not mistaken, it should look like a delta function at t=0 since at all other values there is no correlation at all. Is t...
<blockquote> What would the autocorrelation of white noise look like? If I am not mistaken, it should look like a delta function at t=0 since at all other values there is no correlation at all. Is this correct? </blockquote> This is correct. Of course if you calculate the autocorrelation from samples taken over a no...
<blockquote> How is white noise removed using correlation? I know this is a broad question but I'm just trying to gain a basic understanding of it. </blockquote> In a simple example, if you recorded 10 seconds of audio and transmitted it through a noisy medium (or added white noise to it) the received audio may be...
https://electronics.stackexchange.com
142,281
[ "https://cs.stackexchange.com/questions/142281", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/139470/" ]
Why the Kth largest element of a Min Heap of size K is always root element of the Min Heap ? How to prove this ?
Let's assume that the heap <span class="math-container">$k$</span>-th largest element is unique otherwise your assertion is false (consider an heap consisting of only two identical elements). The <span class="math-container">$k$</span>-th largest element of a min-heap of size <span class="math-container">$k$</span> is ...
Consider the following increasing sorted sequence with size <span class="math-container">$k=4$</span> <span class="math-container">$$ \langle 1,2,3,4 \rangle$$</span> <span class="math-container">$1^{th}$</span> largest element is <span class="math-container">$4$</span>, and <span class="math-container">$2^{th}$</span...
https://cs.stackexchange.com
137,178
[ "https://physics.stackexchange.com/questions/137178", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/20260/" ]
If we change the temperature of a given system, there will be a relation between its entropy and temperature S(T). Is S(T) the same in a canonical ensemble and a grand canonical ensemble? If not, is there any example in which S(T) is qualitatively different in different ensembles?
The statistical ensembles differ in the constraints imposed to them. In the canonical ensemble, the number of particles $N$, the volume $V$ and the temperature $T$ are fixed. In the grand-canonical ensemble, the number of particles is not fixed, it is determined by the chemical potential $\mu$, which plays the same rol...
There is a very nice property that works, in practice, for most systems that is that of <strong>equivalence between the Gibbs' ensembles</strong> in the thermodynamic limit. The prototypical example is that of the equivalence between the canonical ensemble and the microcanonical ensemble. One way to state it is to say...
https://physics.stackexchange.com
3,597,096
[ "https://math.stackexchange.com/questions/3597096", "https://math.stackexchange.com", "https://math.stackexchange.com/users/753381/" ]
I am having trouble finding the eigenvalues and eigenspaces of symmetric symbolic matrices. The matrices given are as follows: <blockquote> <span class="math-container">$$ A = \begin{pmatrix} α &amp; -β &amp; -β \\ -β &amp; α &amp; -β \\ -β &amp; -β &amp; α \end{pmatrix} ,\qquad B = \begin{pmatrix} α &amp; -β &amp; -β ...
A couple of shortcuts. Looking at A. All of the rows sum to <span class="math-container">$\alpha - 2\beta$</span> <span class="math-container">$\begin{bmatrix} 1\\ 1\\1 \end {bmatrix}$</span> is an eigenvector, with <span class="math-container">$\alpha - 2\beta$</span> as the corresponding eigenvalue. And consider ...
If <span class="math-container">$\beta=0$</span>, then the <span class="math-container">$\alpha$</span> is the only eigenvalue and any non-zero vector is an eigenvaector. Now, we can focus on <span class="math-container">$\beta \ne 0$</span>. The row sums is the same, hence <span class="math-container">$\alpha - (n-...
https://math.stackexchange.com
127,710
[ "https://chemistry.stackexchange.com/questions/127710", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/88775/" ]
I know that the short answer is that "from bond formation" but as I think electron promotion occurs before formation of bonds between atom. So it seems like a paradox.
Hybridation has an advantage : it is visual and it explains perfectly the geometry of the molecules. But hybridation is not necessary to explain these structures. You can explain the geometry of the molecules without hybridation, although it is more difficult to calculate.
I think you can find plenty of discussion of the pros and cons of hyrbidization elsewhere on this site, so I'm going keep it fairly short. First, the premise of your question shows confusion between the paper exercise of first creating hybrid orbitals and then filling them with bonding electrons and the physical event...
https://chemistry.stackexchange.com
477
[ "https://engineering.stackexchange.com/questions/477", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/369/" ]
What are the most popular and the most efficient ways to machine a fillet on an external edge of an object? If I were to use a CNC mill, what tools can I use for it, and how would the method change with the radius of the fillet? I could imagine that internal fillets can be easily achieved by a ball-end to a mill, but ...
<img src="https://i.stack.imgur.com/AQxSu.jpg" alt="enter image description here"> Depending on whether that's one-off or something to repeat, a properly shaped bit with "negative curve" will be the most efficient (single pass) and neat (no grooves from multiple passes) solution. I don't have a photo of the tool in ...
On a mass manufactured part, one solution is to cast the piece and shape the die (with an inside fillet) to form an outside fillet. Of course, if you want your casting to have an inside fillet, you'll need an outside fillet on your die. Assuming you're not casting, and working with a commonly machinable material, exte...
https://engineering.stackexchange.com
542,886
[ "https://physics.stackexchange.com/questions/542886", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/36793/" ]
In physics, exponentials such as <span class="math-container">$\exp(-r/\xi) $</span> typically come with a natural length scale <span class="math-container">$\xi$</span> while power laws such as <span class="math-container">$\sim 1/r^n$</span> don't have a definite length scale (at least not readily identifiable). At t...
You pretty much answered your own question. What you are perhaps looking for is for a reason why people say that all length scales are present. In a second order phase transition, the correlation length goes to infinity sending <span class="math-container">$e^{-r/\xi} \to 1$</span>, and only the polynomial decaying pie...
<blockquote> Is having no definite length scale in a power-law is the same as having all length scales present? </blockquote> Yes. In this case “definite” means <em>unique</em> length scale. There are correlations at all length scales, so there’s no <em>single</em> length that you can pick out as the “most important” o...
https://physics.stackexchange.com
156,103
[ "https://physics.stackexchange.com/questions/156103", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/68840/" ]
I'm trying to figure out how to derive the transformation matrix for the Lorentz boost. Consider two inertial frames A and B, and let B move at a constant velocity V with respect to A. All the derivations I've seen assume that this implies that A moves at a velocity -V with respect to B. This does not seem obvious to m...
Intuitively, you are comparing the velocities of two frames. If there were unit masses moving in those frames, then there would be a center of mass frame. That center of mass frame of the fictitious masses exists regardless of whether there are masses there. And this frame sees each of the other frames moving in equ...
A snappy but unsatisfying answer is that relative velocity just means the difference in velocity, and difference denotes subtraction. And x - y is the opposite of y - x; in other words if z = x - y, then y - x = -z. A picture that might help is this: You are on train A, moving north at 40 m/s. On a parallel track is t...
https://physics.stackexchange.com
659,660
[ "https://physics.stackexchange.com/questions/659660", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/181717/" ]
I am currently working on my bachelor's thesis and I am trying to derive Bernoulli's equation which can be used for changing temperatures. Let's say I got a pipe with inflow-area <span class="math-container">$A_1$</span> and outflow-area <span class="math-container">$A_2$</span>. I also know the heat I am feeding into ...
Bernoulli does <em>not apply</em> when heat is being added, or when there is friction. It does apply compressible fluids whose temperature is changing due to compression. Bernoulli's theorem uses the specific enthalpy <span class="math-container">$h$</span> (i.e <span class="math-container">$U+PV$</span> per unit mas...
Bernoulli's equation focuses only on mechanical energy while the first law focuses on every kind of energy (including mechanical). Also, unless you specially include the effects of viscous drag in Bernoulli'e equation, it will not properly nclude all the different kinds of mechanical energy. Once the mechanical energy...
https://physics.stackexchange.com
9,645
[ "https://chemistry.stackexchange.com/questions/9645", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/4734/" ]
I know, by nature, normally atoms are stable. But I wonder, if it is possible to compress an atom, say the Hydrogen atom, to infinite density by applying external force? <em>After all, electrons and protons would attract each other by electrostatic forces and nuclear forces are also there at least up-to a certain dista...
We do not know. Physicists THINK that there ought to be a fundamental limit in scale for space-time that occurs near $10^{-33}$ centimeters and $10^{-43}$ seconds; often called the Planck Scale. There is also a unit of mass associated with this scale which is about $10^{-5}$ GRAMS or $10^{19}$ Billion Electron Volts (B...
<h2>No, because under enough compression <em>atoms stop being atoms</em>.</h2> After a certain point, a proton will - under enough pressure - react with an electron and become a neutron and an electron-neutrino. This happens in the formation of a neutron star; the atoms are compressed so much by gravity that all the pr...
https://chemistry.stackexchange.com
605,033
[ "https://electronics.stackexchange.com/questions/605033", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/305551/" ]
When twisting two cables (imagine f.e. something like a twisted pair cable), does the rotation of both cables have any importance? I.e., is it important that each cable rotates around its own axis as both cables are twisted together, or should it be kept &quot;unrotated&quot; so to be sure that possible side effects ha...
The rotation of each cable around its center axis is unimportant electrically, though if it's extreme it could be important mechanically. The reasons for twisting conductors together are to minimize inductance and to reject common-mode noise in differential applications (Noise incident on both cables is rejected by a d...
The important part is to have an uniform and symmetrical twist between the two wires of a pair for the pair to be useful. It keeps the inductance and capacitance per unit length constant, which means it acts as a transmission line with certain impedance. It also keeps the wire lengths equal, which means there will be n...
https://electronics.stackexchange.com
157,720
[ "https://softwareengineering.stackexchange.com/questions/157720", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/2158/" ]
I have lots of ideas for products to be built. The problem is that I have less than a year of professional work experience and I am afraid of getting <strong>judged negatively in the future</strong> based on what I produce now. I have no clue if my code is any good. I am not familiar with any of the coding patterns. A...
After 30 years of professional software development, I still create bugs. I still find patterns I don't know. I still learn from my colleagues, and encounter stuff I don't know every day. Most experienced developers will judge you on how you respond to issues and criticism, whether you learn from your mistakes and imp...
We find people with high knowledge in the Open Source field. That's true, and also intimidating for new comers. But they are also very good in providing help for good projects, even if the main developer does not reflect the actual requirements for the software to reach a high quality. You already know yours limitatio...
https://softwareengineering.stackexchange.com
230,650
[ "https://physics.stackexchange.com/questions/230650", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/101257/" ]
I have met a question in a high school physics book which I think is incorrectly formulated. The question is this: In order to reach boiling temperature, a certain liquid requires twice the amount of energy compared to water. At what temperature does it boil? The book says the answer is 200 Celsius. It seems wrong t...
The book is wrong in the sense that it has made a lot of assumptions without actually accounting for all of them. So you are right that the question has incomplete information. The inaccuracies in the question are as follows: <ol> <li>In such questions, you must refer to the principle of calorimetry. $$m_1s_1t_1=H=m_...
I'd say the book is 50% wrong. For this problem, you have to assume that the specific heat is the same (or that the boiling point is the same). But either way, the problem is badly formulated. In order to solve it, you have to use the fact that this is a textbook problem and therefore must be solvable (and that's a rea...
https://physics.stackexchange.com
97,738
[ "https://electronics.stackexchange.com/questions/97738", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/23906/" ]
From my own experience, burning microcontrollers is quite easy. Put the 5V at ground, GND at V<sub>CC</sub> and in an instant your chip is burned. What exactly goes on internally that causes it to stop functioning entirely? For instance, if I were magically able to open a chip and rearrange all its semiconductor conne...
Most commercial IC circuits are isolated from the substrate material by a reverse-biased P-N junction (including CMOS parts). The substrate is usually tied to the voltage expected to be most negative. If it isn't, then that junction becomes forward biased and can conduct a great deal of current, melting metal or heati...
<strong>What releases the magic blue smoke when you exceed working voltages or reverse the supply voltage?</strong> Applied to any 'chip' Excessive current producing excessive power dissipation (\$I^2 R\$) and/or excess voltage causing insulation breakdown due to high internal field strengths coupled with the lack o...
https://electronics.stackexchange.com
326,211
[ "https://mathoverflow.net/questions/326211", "https://mathoverflow.net", "https://mathoverflow.net/users/127803/" ]
Let me preface this by saying I'm not someone who has every studied mathematical logic or philosophy of math, so I may be mangling terminology here (and the title is a little tongue in cheek). I (and probably most of us) would define a linear subspace, <span class="math-container">$W$</span> of <span class="math-conta...
Your question almost answers itself, but this may not be so obvious. So I will try to give a short and clear answer. Regarding 1) of your question: As a mathematician well-schooled in intuitionistic and constructive mathematics, I would always consider more than one constructive notion of 'linear subspace'. Your fir...
To answer question 2 (although perhaps not under a “system of axioms”), here is a simpleminded example showing that if the definitions are equivalent (even just for <span class="math-container">$n=1$</span>), then <span class="math-container">$p\lor\neg p$</span> is <span class="math-container">$\top$</span> for any tr...
https://mathoverflow.net
3,329,733
[ "https://math.stackexchange.com/questions/3329733", "https://math.stackexchange.com", "https://math.stackexchange.com/users/607566/" ]
For <span class="math-container">$c_0, \ldots, c_n$</span> pairwise distinct complex numbers. Show that the polynomials <span class="math-container">$((X-c_i)^n)_{0 \leq i \leq n}$</span> are linearly independent. I need to prove it without induction. Any help would be appreciated.
By the Binomial theorem, <span class="math-container">$$\sum_{k=0}^n p_k(x-c_k)^n=\sum_{k=0}^n p_k\sum_{j=0}^n\binom njc_k^jx^{n-j}=\sum_{j=0}^n\binom nj\sum_{k=0}^n p_kc_k^j\,x^{n-j}.$$</span> Identifying to the zero polynomial, <span class="math-container">$$\sum_{k=0}^n p_kc_k^j=0.$$</span> This is a Vandermonde ...
The requirement that the numbers are pairwise distinct is redundant as all polynomials have a different degree and thus must be linearly independent. Note that any scalar of a polynomial
https://math.stackexchange.com
4,076,640
[ "https://math.stackexchange.com/questions/4076640", "https://math.stackexchange.com", "https://math.stackexchange.com/users/620355/" ]
So on a certain GRE subject problem they define for a given a subset <span class="math-container">$Y$</span> of a topological space <span class="math-container">$X$</span> <span class="math-container">$$Y' = \{x \in X : x \in \text{cl}(Y \setminus \{x\})\}$$</span> Where <span class="math-container">$\text{cl}$</span> ...
Yes, this is clear after you know that <span class="math-container">$\operatorname{cl}(Y)= \{x \in X: \forall O \text{ open }: (x \in O) \to (O \cap Y \neq \emptyset) \}$</span> for all <span class="math-container">$Y \subseteq X$</span> the closure of <span class="math-container">$Y$</span> is the set of points <span ...
Yes. This is known as the <em>derived set</em>, and is typically denoted with a 'prime'. If the space is <span class="math-container">$T_1$</span>, one can say that <span class="math-container">$Y'$</span> consists in those points <span class="math-container">$x $</span> for which there exists a non-trivial <em>net</e...
https://math.stackexchange.com
360,960
[ "https://softwareengineering.stackexchange.com/questions/360960", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/229116/" ]
This often happens in my projects. Sometime I have this part of code that is very similar to this other part, yet a few lines makes it complicated to keep the code clean and without duplication. Here is an example of a recent project. I am working on a program which can do 2 things : A will generate an image projected...
DRY absolutely does not mean "use minimum number of lines possible", or "do not write code that looks like other code" DRY refers to having code that does the same thing in two different places. But same doesn't mean "code looks the same" but rather "does the same conceptual task". How the code looks is irrelevant, ...
@JacquesB's answer is fine, however, in C# there is an equivalent approach if you want to keep the loop over all images in your your generalized <code>generateImage</code>. In context A, just pass the lambda expression <pre><code> (x,y,image) =&gt; projectPixel(x,y) </code></pre> as the function parameter into <code...
https://softwareengineering.stackexchange.com
179,381
[ "https://mathoverflow.net/questions/179381", "https://mathoverflow.net", "https://mathoverflow.net/users/5034/" ]
My research area is mainly pro-$p$ groups and profinite groups. However, in the last few year I became also interested in discrete groups. Therefore, it seems to me a natural problem to look for examples of finitely generated groups such that their profinite completion is a pro-$p$ group. One trivial example is when th...
We can just manipulate $C$ in the usual way by row operations: Subtract the last "row" from all the other "rows" (this is really several traditional row operations done at once). This produces $$ \begin{pmatrix} A- B &amp;0&amp; 0 &amp; \ldots &amp; 0 &amp;B-A \\ 0 &amp; A-B &amp;0 &amp;\ldots &amp; 0 &amp; B-A\\ &amp;...
Subtracting the last row of blocks from the first $k-1$ rows of blocks, we obtain $$\begin{bmatrix}A-B &amp; O &amp; O &amp; \dots &amp; O &amp; B-A\\ O &amp; A-B &amp; O &amp; \dots &amp; O &amp; B-A\\ O &amp; O &amp; A-B &amp; \dots &amp; O &amp; B-A\\ \vdots &amp; \vdots &amp; \vdots &amp; \ddots &amp; \vdots &amp;...
https://mathoverflow.net
190,981
[ "https://math.stackexchange.com/questions/190981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/39240/" ]
I'm starting my Discrete Math class, and I was taught proving techniques such as proof by contradiction, contrapositive proof, proof by construction, direct proof, equivalence proof etc. I know how the proving system works and I can understand the sample proofs in my text to a sufficient extent. However, whenever I tr...
I do not consider myself "good" at proving things. However, I know that I have gotten better. The key to writing a proof is understanding what you are trying to prove, which is harder than it may seem. Know your definitions. Often, I have been hampered or seen students hampered by not really knowing all of the defini...
While you mention proof <em>methods</em>, what you seem to need are proof-finding <em>strategies</em>. That's a large field. Here are just a few hints: <ul> <li>Make yourself acquated with the premises. How can the statement fail if a single premise is left out?</li> <li>Find yourself a specific numerical example of t...
https://math.stackexchange.com
129,353
[ "https://mathoverflow.net/questions/129353", "https://mathoverflow.net", "https://mathoverflow.net/users/17764/" ]
Recall that an abelian group $G$ is $Z$-torsionless if for all $a\in G$ ($\neq 0$) there is a homomorphism of $\phi\in Hom(G,Z) = G^*$ so that $\phi(a)\neq 0$ Suppose $S$ is a subgroup of <em>torsionless</em> (edit) abelian $A$ so that $A/S$ is torsionless, and $T$ is a large summand of $S$, say $S=T\oplus \langle s \...
I think your question is equivalent to asking whether there is an extension $0\to\mathbb{Z}\to B\to C\to 0$ of abelian groups where $C$ is torsionless but $B$ isn't. Given such an extension, take $A$ to be a free abelian group with a surjective map $A\to B$, let $T$ be the kernel of this map, and let $S$ be the kerne...
Take $B$ any torsionless abelian group, $T$ any abelian group, $S=T\oplus \mathbb Z/2$ and $A=B\oplus S$, then $A/T=B\oplus\mathbb Z/2$ is not torsionless.
https://mathoverflow.net
526,139
[ "https://physics.stackexchange.com/questions/526139", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/252145/" ]
<span class="math-container">$g^{ab}$</span> is the metric tensor (Minkowski) Im trying to understand if this is true: <span class="math-container">$g^{ab}g_{ab}=?=g^{aa}g_{aa}$</span> Have a nice day.
As a third, but equivalent, perspective to the existing answers: When in doubt, you can always put the summation back explicitly. (Just take it back out once you understand the answer and before getting evil looks from your peers for not having used Einstein summation!) In your case, you would have <span class="math-...
No. The right side of your equation is meaningless. You have to contract indices two at a time, not four at a time. Otherwise you don’t get a Lorentz-invariant result.
https://physics.stackexchange.com
254,503
[ "https://security.stackexchange.com/questions/254503", "https://security.stackexchange.com", "https://security.stackexchange.com/users/264644/" ]
I have certificate pinning implemented in my iOS and Android apps. But when apps were pen-tested, we got the report from the pentester saying SSL implementation is weak in both the apps and can be easily bypassed using an SSL by-pass tool. For iOS it was revealed that the SSL by pass tool was the notorious <code>SSL Ki...
Unless you specified that your software has to be secure against TLS interception even in the case of a jailbroken/rooted machine - which I hope you didn't, because that's impossible and a fool's errand to attempt - your pentester has... no idea what they're talking about and I hope you didn't pay them much for it. SSL...
You cannot prevent a determined reverse engineer from bypassing your controls. You can make it more difficult but cannot prevent it. Pinning a key won't help you in this case. Popular SSL pinning bypass tools can easily disable popular SSL pinning methods and they <em>usually</em> require root access. Your app can dete...
https://security.stackexchange.com
28,553
[ "https://electronics.stackexchange.com/questions/28553", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5872/" ]
I have an executable that crashes after <code>main</code> has finished all its instructions, and the last assembler instruction is executed. Just before the program crashes, I do <code>disas</code> on GDB: <pre><code> 0x2001c054 &lt;+84&gt;: movt r3, #16384 ; 0x4000 0x2001c058 &lt;+88&gt;: ldrh r...
Is this on a microcontroller? If so, you should never exit main() - use an infinite loop instead.
If this is an operating system or other app on the bare metal, <code>main</code> should never exit. If you really must exit, then your C startup code could reset the board after <code>main</code>.
https://electronics.stackexchange.com
72,848
[ "https://chemistry.stackexchange.com/questions/72848", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/15429/" ]
This question arises because: by giving classes in thermodynamics, I have observed that students are often confused between the different definitions (or applications) of the enthalpy concept. The enthalpy expression is obtained as follows: From the first law of thermodynamics: \begin{align*} U=Q+W \end{align*} Re...
<strong>Definition of internal energy:</strong> U is a function of state, representing the total kinetic and potential energy of the molecules. U = U(T,V) <strong>First Law of Thermodynamics:</strong>$$\Delta U=\delta Q+\delta W$$where the symbol $\Delta$ is used to represent the change in a (path-independent) funct...
I believe that motivating the definition of enthalpy via the Legendre transform <em>is</em> indeed useful, and would like to attempt to do that here. We start with the differential form of the first law, $\mathrm{d}U = T\,\mathrm{d}S - p\,\mathrm{d}V$. We see that $S$ and $V$ are the natural variables for $U$, in that...
https://chemistry.stackexchange.com
44,040
[ "https://dsp.stackexchange.com/questions/44040", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/29743/" ]
If $x(t)$ is a zero mean stationary Gaussian process and if $y(t)=x^2(t)$,then $\{y(t)\}$ is called a square law detector process. Now i want to find autocorrelation function $R_{yy}(t_1,t_2)$,that is $$R_{yy}(t_1,t_2)=E({y(t_1)y(t_2)})$$ $$=E(x^2(t_1)x^2(t_2))$$ Now after this step every books give the result like th...
Let $\sigma^2$ denote the common variance of the random variables comprising the zero-mean stationary Gaussian process $\{X(t)\}$. We want to find<br> $$R_{Y}(t,s) = E[Y(t)Y(s)] = E\big[(X(t))^2(X(s))^2\big].$$ Now, <em>given that</em> $X(t)=x$, \begin{align} E\big[(X(t))^2(X(s))^2\mid X(t)=x\big] &amp;= E\big[x^2(X(s...
$Cov(y(t1),y(t2)) = E(y(t1)y(t2)) - E(y(t1))E(y(t2))$. So, this means that $ Cov(x^2(t1)x^2(t2)) = E(x^2(t1)x^2(t2)) - E(x1^2(t1))E(x2^2(t2))$ Now move the last term on the RHS over to the LHS which gives: $E(x^2(t1)x^2(t2)) = Cov(x^2(t1)x^2(t2)) + E(x^2(t1))E(x^2(t2))$. So it comes down to sowing that $Cov(x^2...
https://dsp.stackexchange.com
100,474
[ "https://physics.stackexchange.com/questions/100474", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
My textbook says the field inside a conductor must be zero in order for the system to be equilibrium and therefore there must be no excess charge inside. Their proof: 1) Place a gaussian surface inside the conductor. Since the system is at equilibrium, all points on the surface must have an electric field of zero. 2...
Equilibrium in the sense of this question means there are no net forces on the objects that make up the system: the charges contained in the conductor. Note that we need a model of an ideal conductor here. A neutral ideal conductor is thought of as containing equal large amounts of unbound, infinitely small (not elec...
As Mostafa says, it is macroscopically at equilibrium, not necessarily microscopically. There may be one misunderstanding you have, which is about "surface". I will talk about it later. In my opinion, equilibrium should be understood as no electron moving. It is easily to show that the electric field in conductor is ...
https://physics.stackexchange.com
247,386
[ "https://softwareengineering.stackexchange.com/questions/247386", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/28994/" ]
Imagine I have the following code: <pre><code>class A: pass class B(A): pass class C(A): def __init__(self): self.b = B() </code></pre> Is the above code correct in terms of correct inheritance? I mean is it a good practice to reference another subclass in a subclass?
Bags and suitcases are both types of containers. You can also put bags inside suitcases, and vice versa. Containment doesn't care about inheritance, and inheritance doesn't care about containment. The two concepts are entirely orthogonal, and as such there is no 'best practice' here.
It depends. In some languages (like Java), you don't really have a choice because <em>every</em> class (except <code>Object</code>) is a subclass. If class <code>C</code> needs some functionality from class <code>B</code> to do its work, but you can't describe instances of class <code>C</code> as also being instances ...
https://softwareengineering.stackexchange.com
110,777
[ "https://softwareengineering.stackexchange.com/questions/110777", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/16851/" ]
I've been designing and developing with Wordpress for about two years (and I love it). Recently, a respectable designer told me that I could work for him. He works with Joomla! My job was to create a Joomla! template. I didn't feel myself comfortable using it. I don't like the back-end's UI, the way you add elements an...
In the technology world, if you want a job, learn something. If you want a career, learn everything you can. Because all technologies go away in time.
I would suggest learning it. Tying yourself to any language, technology, framework, or tool is just shooting yourself in the foot. It's perfectly fine to have favorites, but it's good to have options. Think about it this way: what would happen to your work if, tomorrow, WordPress just died? You would have to learn som...
https://softwareengineering.stackexchange.com
179,721
[ "https://electronics.stackexchange.com/questions/179721", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/80841/" ]
I should probably say that this a basic question, I don't know much about this stuff, please don't be too hard on me. Ok so I kind of thought it would be fun if I could light up 12V halogen lamps using 220V power supply, so I did a few calculations: The bulb is rated at 60W, so according to P=VI, it should draw 5A cur...
Your calculation is correct, however you also have to consider the power rating of the resistor. Power is \$I^2 \cdot R\$ which is 1040W. That's a physically huge and expensive resistor and your circuit would be wasting 95% of the energy that you put in before it even gets to the bulb. Here's a typical resistor sty...
The calculations are right mathematically but just see this: The voltage drop across the resistor is 208 V. So power dissipation is P=V<sup>2</sup>/R P= 1.04 kW !!!!!!!! Now that is some power you are wasting, 17.33 times what you actually need. So this is not a practically feasible method. Instead you can go for ...
https://electronics.stackexchange.com
52,177
[ "https://stats.stackexchange.com/questions/52177", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/12031/" ]
Disclaimer: This is for a homework project. I'm trying to come up with the best model for diamond prices, depending on several variables and I seem to have a pretty good model so far. However I have run into two variables that are obviously collinear: <pre><code>&gt;with(diamonds, cor(data.frame(Table, Depth, Carat.W...
Those variables are correlated. The extent of linear association implied by that correlation matrix is not remotely high enough for the variables to be considered collinear. In this case, I'd be quite happy to use all three of those variables for typical regression applications. One way to detect multicollinearity ...
Thought this diamond-cutting schematic might add insight to the Question. Can't add an image to a Comment so made it an answer.... <img src="https://i.stack.imgur.com/zGX2f.gif" alt="enter image description here"> PS. @PeterEllis's comment: The fact that "diamonds which are longer across the top are shorter from top ...
https://stats.stackexchange.com
549,898
[ "https://stats.stackexchange.com/questions/549898", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/64728/" ]
Suppose a model which predicts which location/landmark a walking tourist is going to visit next, based on two geographical input features: <ul> <li>the last neighborhood this person has walked through</li> <li>the second-to-last neighborhood this person has walked through (so, before the last one)</li> </ul> The distri...
Sometimes the simplest solutions are the one we think of last. I eventually removed the individual features <code>last-neighborhood</code> and <code>before-last-neighborhood</code>, to replace them with a single combined feature instead: <code>two-last-neighborhoods</code> (previous and last, in order). This way, the m...
I think your model might be too complicated. A simple logistic regression handles this just fine. <pre><code># Define previous location # previous_location &lt;- c(rep(&quot;Park&quot;, 10000), rep(&quot;Park&quot;, 16), rep(&quot;Wall&quot;, 90), ...
https://stats.stackexchange.com
502,128
[ "https://stats.stackexchange.com/questions/502128", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/216170/" ]
Suppose <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> are two random variables that have the same distribution. Does <span class="math-container">$$P[X \leq t \mid Y=a]$$</span> be necessarily equal to <span class="math-container">$$\;\ P[Y \leq t \mid X=a]?$$</span> Note that if <...
A simple counterexample: <span class="math-container">$$ P(X = 1, Y = 2) = \frac{1}{3}\\ P(X = 2, Y = 3) = \frac{1}{3}\\ P(X = 3, Y = 1) = \frac{1}{3} $$</span> Then <span class="math-container">$P(X \le 1 | Y = 2) = 1$</span>, but <span class="math-container">$P(Y \le 1 | X = 2) = 0$</span>.
How about <span class="math-container">$X=-Y = \begin{cases} 0 \\ 1 \end{cases}\quad$</span> each with probability <span class="math-container">$1/2.$</span>
https://stats.stackexchange.com
600,590
[ "https://physics.stackexchange.com/questions/600590", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/261800/" ]
I have a problem, I am not sure about. Assume there is a system of 4 springs with a mass resting/ supported by the springs. <ul> <li>the springs all have the same length, minimum deflection/ same distance of compression,</li> <li>same k value</li> <li>and are the same distance from each other.</li> </ul> what is the fo...
Since all have the same initial length, and the same deflection <span class="math-container">$x$</span>, then the load on each spring is simply <span class="math-container">$F = k x$</span>. The total load applied would then be <span class="math-container">$4 F = (4 k) x$</span> This leads to the rule of parallel sprin...
The tension in each spring will depend on their positions relative to the object’s centre of mass. To simplify things, suppose we have just two springs supporting a rod. If the springs are attached to the ends of the rod, at equal distances from its centre of mass, then each spring supports half of the weight of the ro...
https://physics.stackexchange.com
65,499
[ "https://security.stackexchange.com/questions/65499", "https://security.stackexchange.com", "https://security.stackexchange.com/users/53910/" ]
I have installed the "md5sum" utility on my Mac and there was also a "md5" binary pre-installed in /sbin.<br> My problem and question is this: "Isn't MD5 a standard algorithm?"<br> Because I get different hashes for a string using these utilities<br> Are there any differences in these utilities' implementations? Exampl...
By default, echo leaves a trailing newline. So you need to do: <pre><code>echo -n Hello | md5sum 8b1a9953c4611296a827abf8c47804d7 </code></pre>
Consider this: <pre><code>$ echo Hello | md5sum 09f7e02f1290be211da707a266f153b3 - $ echo -n Hello | md5sum 8b1a9953c4611296a827abf8c47804d7 - </code></pre> In the first case, you hash <em>six</em> bytes, for 'H', 'e', 'l', 'l', 'o' and a newline character (0x0A). In the second, you don't include the newline chara...
https://security.stackexchange.com
3,418
[ "https://cogsci.stackexchange.com/questions/3418", "https://cogsci.stackexchange.com", "https://cogsci.stackexchange.com/users/2908/" ]
<strong>Background:</strong> First of all, I'm not in any kind related to cognitive science, I'm a programmer. I'm not even sure that it's the right place for asking my question, but I'll try anyway. So, first of all, I'll describe the initial problem that motivated me to ask this question. There are some concrete exam...
I just completed an extensive study (and corresponding lit review) of how people learn. I think you are running into the classic difference between expert and novice users. <strong>Experts vs Novices</strong> It has been demonstrated that the knowledge structures in experts are different than those in novices. In p...
I don't know if this is helpful, but I would chime in as a programmer. I would argue that few people truly know all the parts of a large system by heart, instead they know how to find out/debug what's happening within the project quickly. <strong>A lot of large, complex programming projects are a mess.</strong> They ...
https://cogsci.stackexchange.com
3,663,241
[ "https://math.stackexchange.com/questions/3663241", "https://math.stackexchange.com", "https://math.stackexchange.com/users/784653/" ]
Prove that :<span class="math-container">$ \begin{array}{l}\sum _{n=0}^{\infty }\frac{\left(2k^2+2k+1\right)}{k^4+2k^3+k^2}\end{array}$</span> where <span class="math-container">$k=2n+1$</span> converges. Also find the value it converges to.
Hint: Use partial fraction decomposition. <span class="math-container">$$\sum_{n=0}^{\infty} \frac{1}{k^2} +\frac{1}{(k+1)^2} = \sum_{n=1}^{\infty} \frac{1}{n^2} = ?$$</span>
<strong>HINT</strong>: <span class="math-container">$$\frac{2 (2 n+1)^2+2 (2 n+1)+1}{(2 n+1)^4+2 (2 n+1)^3+(2 n+1)^2}=\frac{1}{(2n+1)^2}+\frac{1}{4(n+1)^2}\tag1$$</span>
https://math.stackexchange.com
50,934
[ "https://datascience.stackexchange.com/questions/50934", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/73150/" ]
I'm working on my first NN following a tensorflow tut and trying to use my own data. After about 80 attempts of formatting my data and trying to load it into a dataset to train I'm throwing the towel. Here is how my data currently looks <pre><code>syslog_data = [ [302014,0,0,63878,30,3,1], [302014,0,0,3891,0,0,0], [3...
There are a couple of problems and things you might want to add to your existing script. Below I separate your example data into two NumPy arrays: <ul> <li>input values <code>x</code></li> <li>labels <code>y</code></li> </ul> It is also important to make sure they are of type <code>float32</code>, because Tensorflow...
<pre><code>import keras import numpy as np full_data = np.array(syslog_data) X = full_data[:,:6] Y = full_data[:,6] # Convert labels to categorical one-hot encoding one_hot_labels = keras.utils.to_categorical(Y, num_classes=10) model.fit(X,Y, epochs=10, steps_per_epoch=30) </code></pre> Does this work? I think I migh...
https://datascience.stackexchange.com
14,021
[ "https://physics.stackexchange.com/questions/14021", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/4829/" ]
I have a rather strange question, let's say I can play with the temperature and atmospheric pressure conditions in a sealed room. What will I need to do to make the air's refraction coefficient <strong>greater then</strong> the glass' coefficient? $$n_{\text{air}} &gt; n_{\text{glas}} $$
If you're talking about the index of refraction at a visible wavelength, you can't do it. To increase the index of refraction of the air, you need to increase the density. But it's not so easy to do this indefinitely. As you increase the density (by increasing the pressure or decreasing the temperature), the air (mo...
The refractive index is a measure that determines the reduction of the speed of light as it propagates through a homogeneous medium. More precisely, the index of refraction is the phase change per unit length, ie the wave number in the middle (k) is n times larger than the wave number in vacuum (k0). The refractive in...
https://physics.stackexchange.com
11,828
[ "https://mechanics.stackexchange.com/questions/11828", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/6714/" ]
I recently bought a used 2003 Opel(Vauxhall) Astra G 1.4. I drove around 2000km's in the last few months (city and highway mixed), and I used about 200 litres of gasoline, which means a 10l/100km consumption. This seems a little bit too much, and it might be because I'm really a new to driving. According to other sites...
Yes, a reset <em>could</em> work, <em>if</em> the problem is that the ECU is used to the previous driver's driving style and his style was vastly different to your's. But it could also just be the way you drive. Do you drive more like Morgan Freeman or Vin Diesel? These cars are quite heavy on the juice in city driving...
I don't see it helping any. The long term fuel trims on modern cars will adapt to conditions within 15 minutes of driving, and even those only have a minor impact. The short term fuel trims that have the most impact adapt pretty much instantly (hence the "short term"). All that said, resetting the ECU is easy, so fe...
https://mechanics.stackexchange.com
292,024
[ "https://physics.stackexchange.com/questions/292024", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/59095/" ]
Consider two concentric spherical shells of radii $a$ and $2a$ respectively. Let the inner shell have potential $V_0$ and the outer shell be grounded. What is the potential $V(r)$ as a function of the distance to the center of the shells, and what are the charges on the shells? This is how I would approach the problem...
With the outer shell grounded once you pot a charge of $+Q_i$ on the outer side of the inner shell then a charge of $-Q_i$ will be induced on the inner side of the outer shell.<br> Think of it as no electric field inside a conductor so every electric field line which starts on a charge on the outside surface of the in...
Your definition of the field for$r&gt;2a$ is correct. But for $Q_i=-Q_0$ the field is zero. The charge induced on the inner surface of the grounded outer sphere must, by Gauss law, be $-Q_i=Q_0$ (there is no field in the metal). In addition, because of the outer sphere being at ground potential, there can be no field o...
https://physics.stackexchange.com
308,783
[ "https://physics.stackexchange.com/questions/308783", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/139067/" ]
I don't quite understand why external charges can be ignored when calculating the net flux of a Gaussian surface. I understand that $\nabla \cdot \vec{E}$ of any point charge equals $0$ and I can reason using equations, but I can't find an intuitive physical understanding. Most arguments I have heard mention that all e...
If a charge is kept near a sphere, the charge will not affect the flux of the sphere because flux is dependent on magnitude of electric field and area it pass through. So when the field enters the near end of the sphere the magnitude of electric field is high and the surface pass through is low but when the filed comes...
There is a more intuitive view. Each field line of the flux created by an internal charge crosses the surface only once. However, any external charge's line will either not pass over the surface or cross it twice. <ul> <li>If the line doesn't meet the surface, iit doesn't contribute. </li> <li>If the line crosses th...
https://physics.stackexchange.com
606,472
[ "https://math.stackexchange.com/questions/606472", "https://math.stackexchange.com", "https://math.stackexchange.com/users/114197/" ]
I need to find a counter example for the following:<br> Let $G$ be a group, and let $A,B\triangleleft G$ be two normal subgroups of $G$.<br> if $G/A\cong B$ then $G/B\cong A$. Here are my thoughts so far:<br> Suppose that $G/A\cong B$, and they are of finite order, it then follows that: $$|G/A|=|B|$$ $$\frac{|G|}{|A|}...
Let $G=D_4$, the Dihedral group of order $8$. Denote by $\sigma$ the rotation element. Take $A=&lt;\sigma&gt;$ and $B=&lt;\sigma ^2&gt;$. Note that $A$ is of order $4$, $B$ is of order $2$, and $B$ is the center of $G$. Now, $G/A$ is of order $2$ and thus $G/A \cong B$ (since there is only one group of order $2$ up ...
Take $\;G=Q_8=$ the group of quaternions and let $\;A=Z(G)\;$ be its center. Then $\;G/A\;$ is a non-cyclic group of order four (why?), yet $\;G\;$ doesn't even have non-cyclic subgroups of order $\;4\;$ ...
https://math.stackexchange.com
4,186,184
[ "https://math.stackexchange.com/questions/4186184", "https://math.stackexchange.com", "https://math.stackexchange.com/users/343671/" ]
I want to show that <span class="math-container">$f(x) = \left(\dfrac{x}{x+1}\right)^x$</span> is decreasing for <span class="math-container">$x &gt; 0$</span>; this is clear from plotting its graph. Taking its derivative, <span class="math-container">$$f'(x) = \frac{x^x}{(x+1)^{x+1}}\left(1+(x+1)\log\left(\frac{x}{x+1...
By taking a derivative, you can easily show that <span class="math-container">$$\log(1+y) \le y$$</span> for all <span class="math-container">$y &gt; -1$</span>, with equality iff <span class="math-container">$y=0$</span> (this is a standard inequality). In particular, since <span class="math-container">$-1&lt;-\frac{1...
Use the fact that <span class="math-container">$$ \left(\frac{x}{x+1}\right)^x=\frac{1}{\left(1+\frac{1}{x}\right)^x} \, . $$</span> Does the denominator look familiar to you?
https://math.stackexchange.com
60,876
[ "https://electronics.stackexchange.com/questions/60876", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/11339/" ]
I am trying to send over my code to my Arduino Ethernet board via the Adafruit FTDI friend. I am using the 1.0.4 version of the IDE and have the following settings: Tools -> Board -> Arduino Ethernet Tools -> Serial Port -> COM 3 The sketch is sent over to the board without problems or errors... however I am unable t...
On some routers the attached devices list only contains a list of devices that have requested a DHCP address. Try the following change to go back to using a DHCP address rather than a manual setup: <pre><code>Ethernet.begin(mac); //Ethernet.begin(mac, ip, gateway, subnet); //for manual setup </code></pre>
Most routers only show devices that have been granted a DHCP lease and since your Arduino has a static IP-address it won't show. You can see the device on your PC once you have contacted it at least once throught the ARP-table: Here is an example ARP-table (Linux, but Windows is similar): <pre><code>€ arp -a ? (192.1...
https://electronics.stackexchange.com
187,752
[ "https://physics.stackexchange.com/questions/187752", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/82852/" ]
I've been looking at some basic quantum mechanics all day in an attempt to better my understanding of the subject. While going over the proof that commuting operators are compatible, I started getting questions relating to <em>complete sets of commuting observables</em> (CSCO's). I apologize for the fact that these qu...
In most introductions to Special Relativity, students learn a special procedure for setting up coordinates which involves synchronizing clocks with light pulses. This leads to a natural definition of simultaneous events as events which occur at the same coordinate time. The notion of simultaneity basically stems from a...
While I'm not a relativist I think that the notion is perfectly well defined (if frame dependent). After all, Einstein told us how to synchronize space-like separated clocks presuming that they are mutually at rest and that these clocks define the time coordinate for that frame. Thus I don't see how you can avoid the ...
https://physics.stackexchange.com
81,730
[ "https://datascience.stackexchange.com/questions/81730", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/98121/" ]
When I add regularization techniques in my model like L1 or L2 do i need more epochs to properly converge my model. <pre><code>for r in (None,&quot;L1&quot;,&quot;L2&quot;): for max_iter in (30,45,60): classifier=SGDClassifier(loss=&quot;log&quot;,penalty=r,max_iter=max_iter,learning_rate=&quot;...
The convergence time is sensitive to the data you have and a random seed. Specifically, the convergence time is linear in expectation in all three cases. <code>SGDClassifier</code> uses the stochastic gradient descent for optimization. Since L1 loss is only subdifferential, the L1 penalty causes the algorithm to conver...
Penalty adds an additional term to the loss function. In your case, it made your model require more iterations to converge. When penalties are added, if you see the converged value of your original loss(log) only, it will be a lower value than the case with no penalty. Which shows the advantage, adding a penalty makes ...
https://datascience.stackexchange.com
3,118,057
[ "https://math.stackexchange.com/questions/3118057", "https://math.stackexchange.com", "https://math.stackexchange.com/users/223599/" ]
<blockquote> If <span class="math-container">$\cos x+\cos y+\cos z=0=\sin x+\sin y+\sin z$</span> then prove that <span class="math-container">$$\sin(2x-y-z)+\sin(2y-z-x)+\sin(2z-x-y)=0\\ \cos(2x-y-z)+\cos(2y-z-x)+\cos(2z-x-y)=0$$</span> </blockquote> <strong>My Attempt</strong> <span class="math-container">$$ e^{ix...
In fact I like your approachwith the exponentials. <span class="math-container">$\begin{cases} \cos(x)+\cos(y)+\cos(z)=0\\ \sin(x)+\sin(y)+\sin(z)=0\end{cases}\implies e^{ix}+e^{iy}+e^{iz}=0$</span> Let's call these terms respectively <span class="math-container">$a,b,c$</span> we have <span class="math-container">$a...
<span class="math-container">$$\sin(2x-y-z)+\sin(2y-z-x)+\sin(2z-x-y)=$$</span> <span class="math-container">$$=\sin(3x-x-y-z)+\sin(3y-x-y-z)+\sin(3z-x-y-z)$$</span> Let's take the transformation <span class="math-container">$x'=\frac{x}{3}$</span>, <span class="math-container">$y'=\frac{y}{3}$</span>, <span class="mat...
https://math.stackexchange.com
88,220
[ "https://mathoverflow.net/questions/88220", "https://mathoverflow.net", "https://mathoverflow.net/users/16321/" ]
Prove that there are infinitely many positive integers $a$, $b$, $c$ that are consecutive terms of an arithmetic progression and also satisfy the condition that $ab+1$, $bc+1$, $ca+1$ are all perfect squares. I believe this can be done using Pell's equation. What is interesting however is that the following result for...
Starting from the equations in my previous answer, we get, by multiplying them in pairs, $$(x-y)x(x+y)(x+2y) + (x-y)x + (x+y)(x+2y) + 1 = (z_1 z_6)^2\,,$$ $$(x-y)x(x+y)(x+2y) + (x-y)(x+y) + x(x+2y) + 1 = (z_2 z_5)^2\,,$$ $$(x-y)x(x+y)(x+2y) + (x-y)(x+2y) + x(x+y) + 1 = (z_3 z_4)^2\,.$$ Write $u = z_1 z_6$, $v = z_2 z_5...
Already for three-term progressions it's somewhat surprising that there are infinitely many solutions, because the usual probabilistic guess for the expected number of solutions leads to a convergent sum: a random number of size $M$ is a square with probability about $M^{-1/2}$, so we're summing something like $1/(abc)...
https://mathoverflow.net
618,695
[ "https://physics.stackexchange.com/questions/618695", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/285789/" ]
I was wondering why the voltage drop were the same over resistors in parallel and I got the explanation that <span class="math-container">$\nabla\times E=0$</span> for the field in the circuit. This means that the field is conservative, so a closed line integral over it is zero. I looked for a proof of this and I found...
I like your proposed definition as an intuitive explanation but not as a definition of angular momentum, primarily because: <ol> <li>Angular momentum is more fundamental than torque, so defining it in terms of torque is presenting these in a confusing order. </li> <li>Of conserved quantities in mechanics (momentum, ene...
Keep everything scalar and discuss components only. <ol> <li>Translational momentum is <span class="math-container">$p = m\,v$</span></li> <li>Rotational momentum is <span class="math-container">$L = d\,p$</span>, where <span class="math-container">$d$</span> is the moment arm (the perpendicular distance of the line of...
https://physics.stackexchange.com
541,569
[ "https://electronics.stackexchange.com/questions/541569", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/32982/" ]
We're routing a PCB for a LM5085 buck controller of 8 pin WSON package with a maximum input of 75V. My questions are for the relatively high input voltage <ul> <li>0603 is the smallest input decoupling cap I can use since the distance between uncoated pads is 0.6 mm as per IPC2221 standard says the distance between unc...
Eaton HS model is not a regular supercapacitor, but it is a hybrid supercapacitor. It is a hybrid of regular supercapacitor and lithium-ion cell. So same restrictions apply due to the lithium-ion cell technogy - the lithium-ion part of the hybrid capacitor will get damaged when it is discharged below safe voltage.
Boost converters have a high surge start current unless you design it to soft start with PWM or choose one with soft start built in. You will extend the life significantly of the Lithium oxide by staying within 3.3 to 3.7 V Start with design specs for Zout and Z surge load for load regulation effects.
https://electronics.stackexchange.com
2,226,767
[ "https://math.stackexchange.com/questions/2226767", "https://math.stackexchange.com", "https://math.stackexchange.com/users/376651/" ]
Suppose we have a matrix $A$ over $\mathbb{Q}$ with $A^8=I$ but $A^4\ne I$. Then I know $m_A(x) \mid x^8-1$, but $m_A(x)\nmid x^4-1$, where $m_A(x)$ is the minimal polynomial. Now, I want to say that since $x^8-1=(x^4+1)(x^4-1)$, it follows that $m_A(x)\mid x^4+1$. This seems obvious, but in order to justify this, do...
This is very very far from being true. For a simple example, there is a chain map $S_*(X)\to S_*(Y)$ that is just $0$ in every degree. This map cannot be induced by any map $X\to Y$ if $X$ is nonempty, since any map $S_*(X)\to S_*(Y)$ induced by a map $X\to Y$ is nonzero on every singular simplex in $X$ (namely, it m...
Given a topological space $X$, its group of singular $n$-chains $S_n(X)$ comes equipped with a particular basis, namely the basis of singular $n$-simplices $\sigma : \Delta^n \to X$. Given two topological spaces and a continuous map $f : X \to Y$, the induced homomorphism $f_* : S_n(X) \to S_n(Y)$ takes each basis ele...
https://math.stackexchange.com
566,526
[ "https://physics.stackexchange.com/questions/566526", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/269886/" ]
Suppose two atoms collide (considering one atom to be at rest), in a way such that the energy loss during their collision is more than sufficient to excite the atom (which is at rest) but the remaining energy is not sufficient to excite the first one. My doubt is, if the energy is completely transfered to the atom at ...
(a) The title of your question. The concept of coefficient of restitution is useful for macroscopic bodies, but not for microscopic bodies like atoms. The exception is those head-on collisions between atoms when no kinetic energy is lost (elastic collisions). The relative velocity of separation is then equal and opposi...
Yes, we can find the remaining energy distribution by applying conservation of momentum to the problem. Remembering the energy used to change the energy level of the atom.
https://physics.stackexchange.com
359,111
[ "https://physics.stackexchange.com/questions/359111", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/154626/" ]
I'm having some trouble understanding one part of the derivation of path integral formulation of QM, say I have the propagator, then we can break it up in N parts s.t. $$[x',t_1;x_0,t_0]=[x';e^{i\textbf{H}\Delta t/\hbar}...._{N\ times}....e^{i\textbf{H}\Delta t/\hbar};x_0], \tag{1}$$ defining $[a;b]$ to be bra-kets, ...
When you insert the identity operator in between each of your infinitesimal propagators, you need to integrate over all intermediate states. In other words, $$\langle x_N|e^{-iH\Delta t} e^{-iH \Delta t} \ldots e^{-iH\Delta t}|x_0\rangle =$$ $$ \langle x_N|e^{-iH\Delta t}\left(\int dx_{N-1}|x_{N-1}\rangle\langle x_{N...
I believe that you have a problem in <em>step 2</em>. The $|x_{N-1} \rangle$ that comes out of nowhere in your derivation, actually appears because we use completeness relation (as in your <em>step 4</em>). We insert this integral between two $e^{i\mathbf{H}\Delta t/\hbar}$. The states are normalized: $\langle i| i \r...
https://physics.stackexchange.com
245,808
[ "https://security.stackexchange.com/questions/245808", "https://security.stackexchange.com", "https://security.stackexchange.com/users/199998/" ]
My question is prompted by the fact that WinHost.com has some really cheap shared hosting for SQL Server where you don't need to manage your own Virtual Private Server. Unfortunately there is no firewall so you can access the server from anywhere on the net as long as you know the username and password. Personally, I'm...
First hoping that IP address control can add strong security is kind of a brave assumption. IP theft should always be considered as a possible attack. Next, if there is no firewall at all in front of a SQL server, the most serious risk is not legimitimate requests (i.e. with a correct username and password) coming from...
There are many vulnerabilities associated with database management systems. Basic security issues include: <ol> <li>Deployment security issues.</li> <li>Application level (DBMS) security issues.</li> <li>Abuse of database features</li> <li>Zero day attacks</li> <li>Data leaks</li> </ol> When your application is develop...
https://security.stackexchange.com
790,466
[ "https://math.stackexchange.com/questions/790466", "https://math.stackexchange.com", "https://math.stackexchange.com/users/149325/" ]
How is it possible to prove that $P \Leftrightarrow Q$ is the same as $ (\lnot P \lor Q) \land (\lnot Q \lor P)$ using logic laws?
$$\begin{align} p \iff q &amp; \equiv (p \rightarrow q) \land (q\rightarrow p)\\ \\ &amp; \equiv (\lnot p \lor q) \land (\lnot q \lor p)\end{align}$$ The first step is definitional. In the second step, I use, twice, the fact that $$a \rightarrow b \equiv \lnot a \lor b$$
Use truth tables to prove that (!p OR q) &lt;-> p -> q and (!q OR p) &lt;-> q -> p. Recall that p -> q is defined as such: p q p -> q T T T T F F F T T F F T So prove that ~p or q is equivalent to the above Hmm...is p &lt;-> equivalent to (p -> q) and (q -> p) by definition? If so, QED. ...
https://math.stackexchange.com
75,175
[ "https://cs.stackexchange.com/questions/75175", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/27273/" ]
There are <span class="math-container">$N$</span> sticks. <span class="math-container">$N$</span> is an integer greater than zero. I want to divide it among <span class="math-container">$M$</span> boys. <span class="math-container">$M$</span> is also a positive integer. Partitioning <span class="math-container">$N$</sp...
<pre><code># Divide perfectly homogeneously, as large as possible for i = 0 to M array[i] = N / M # integer division, resulting in floor # Divide remainder for i = 0 to N modulus K array[i] += 1 </code></pre>
Give some of the boys $\lfloor N/M \rfloor$ sticks (i.e., divide and round down), and some of them $\lceil N/M \rceil$ sticks (divide and round up). Once you fix those two numbers, that uniquely determines how many boys get $\lfloor N/M \rfloor$ sticks and how many get $\lceil N/M \rceil$ sticks -- do some simple arit...
https://cs.stackexchange.com