text stringlengths 1 1.11k | source dict |
|---|---|
formal-languages, regular-languages, regular-expressions, pumping-lemma
Title: Prove that the language $\{a^ib^i | i\geq 0\}$ is not regular? (Do we just consider $a^nb^n$, where $n$ is the pumping length? I think to prove that $\{a^ib^i | i\geq 0\}$ is not regular, we just have to consider the string $a^nb^n$ (which is in the language) and apply the pumping lemma. But I'm not sure how to proceed using the pumping lemma (even though I know it applies with our choice of string, since the string is at least $n$ long). To apply the pumping lemma for regular languages:
You assume some pumping length $p > 0$: Suppose a pumping length $p$.
You pick a string $s$ such that $|s| \geq n$: Indeed, $a^pb^p$ is a good one since $|a^pb^p| = 2p \geq p$.
Now, you have to consider all the partitions of $s$ as $xyz$, such that
$|y|>0$ and
$|xy| \leq p$. | {
"domain": "cs.stackexchange",
"id": 15581,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "formal-languages, regular-languages, regular-expressions, pumping-lemma",
"url": null
} |
acoustics
A sound wave moving through a material operates in a similar way, although the nature of the restoring force varies across material classes (entropic for gases, enthalpic for condensed matter). There's a slight change from an ideal frequency of $\omega=\sqrt{k/m}$ to an ideal speed of $v=\sqrt{E/\rho}$, where $E$ is an elastic modulus and $\rho$ is the density, but the general form is the same: a stiffness term divided by an inertial term.
At this point, we have to examine the constraints of this ideal case: $k$ and $m$ (or $E$ and $\rho$) remaining constant. We don't expect the mass to vary for a uniform material moving at nonrelativistic speeds, so that takes care of inertial variation. How about stiffness variation that would tend to alter $v$? | {
"domain": "physics.stackexchange",
"id": 79299,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acoustics",
"url": null
} |
c++, performance, multithreading, bioinformatics
Here is the testfile I´m using: http://privatfrickler.de/70000000.txt The main operation is substitution via a small table, which is also what _mm_shuffle_epi8 does. The low 4 bits of the indexes clash though, and I could not find an easy way to remap them. The clash can also be worked around by remapping the A..O (4x range) and P..Z (5x range) ranges separately with a shuffle for each, then conditional-select based on which range the input character was in. The lower case letters can be handled easily by upper casing them first, which without special characters or validation can be done with just a bitwise AND.
I could not find a way to gracefully handle newlines with SSE, but they can be detected and then handled with scalar code. That slows the code down significantly around a newline though, since a single newline can cause a dozen scalar iterations, which are now also slower than usual since every iteration checks whether it might be the start of a newline-free 16 byte block yet. | {
"domain": "codereview.stackexchange",
"id": 31671,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, performance, multithreading, bioinformatics",
"url": null
} |
measurements, energy, metrology
You start with a prior distribution for the rate of use of energy, based on preceding work.
And then create probability distributions for the ways that errors can happen: a meter reset, a dropped decimal point in recording; a dropped digit; a completely junk reading. Add in a distribution for the measurement error of the meter itself: they've usually got either a datasheet or an accredited standard which has an error range defined.
The statistics should account for things like a real usage spike and a reset coinciding. You might need to specify a joint distribution if they are linked: for example, a power cut could conceivably result in a meter reset and a power surge, as things like heaters, fridges and freezers would all come back on at full power when power is restored.
And then you calculate a posterior distribution for actual energy use, which is the thing you're interested in.
Pros and cons | {
"domain": "engineering.stackexchange",
"id": 351,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "measurements, energy, metrology",
"url": null
} |
k-mer, c++
//now lookup the kmers
inFile.open(argv[1]);
t1 = high_resolution_clock::now();
int lookup;
while (getline(inFile,thisline)){
if (thisline[0] != '>'){
seq = thisline;
//now lookup the kmers
for (int j=0; j< thisline.size() - k + 1; j++){
lookup = kmer_map[seq.substr(j,j+k)];
}
}
}
std::cout << " - looked at " << i << " seqs.\n";
inFile.close();
t2 = high_resolution_clock::now();
time_span = duration_cast<duration<double>>(t2 - t1);
std::cout << time_span.count() << " seconds to lookup the kmers." << '\n';
} | {
"domain": "bioinformatics.stackexchange",
"id": 785,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "k-mer, c++",
"url": null
} |
c++
int spaceLeft();
vector<int> wnBound(); //returns rectangles within upperbound of initial rectangle
vector<int> pp(); //returns the Index of possible rectangles which can be placed
vector<int> pc(int i); //even index = top left x, odd index=y, can figure out rest of coords of rectangle from this information.
void display();
}; | {
"domain": "codereview.stackexchange",
"id": 32419,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++",
"url": null
} |
information
The point, at least historically, of compressing digital information on computers is space limitation. Lossless compression involves re-coding the information in a more compact form. For example, instructions in the PostScript language can substitute ‘d’ for draw, ‘s’ for stroke. Gif or tiff image compression can substitute 20x(256,0,0) for repeating (256,0,0) — a red pixel — twenty times. Such compressed information must generally be decompressed when it is used (e.g. when the gif file is displayed in a web browser). | {
"domain": "biology.stackexchange",
"id": 9772,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "information",
"url": null
} |
$R_{1+}$ = # runs with 1 head + # runs with 2 heads + ... + # runs with 5 heads
...
$R_{4+}$ = # runs with 4 heads + # runs with 5 heads
# flips = # flips in runs with 0 heads + # flips in runs with 1 head + ... + # flips in runs with 5 heads
# flips in runs with 0 heads = # runs with 0 heads
# flips in runs with 1 head = 2 x # runs with 1 head
...
# flips in runs with 4 heads = 5 x # runs with 4 heads
# flips in runs with 5 heads = 5 x # runs with 5 heads | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808724687407,
"lm_q1q2_score": 0.8408536609891899,
"lm_q2_score": 0.8577680995361899,
"openwebmath_perplexity": 439.89580526319247,
"openwebmath_score": 0.8999800086021423,
"tags": null,
"url": "https://math.stackexchange.com/questions/364038/expected-number-of-coin-tosses-to-get-five-consecutive-heads"
} |
javascript, jquery
I wouldn't rely on $.noConflict to protect your code from other libraries that use the $ as well.
- Click Event Handler: As was mentioned before, there are several ways to set up your events. The ones that were mentioned were .click() and .on("click"). The .click() method simply calls the .on() method and passes in the click. The .on() method is incredibly useful since you can use it to set up almost any kind of event - not only clicks. So yes, the one you are using now is "the best" because it saves you a function call. Now saving a single function call in your app won't be a significant increase in performance and you probably won't even notice it. Although arguing over such a small and possibly insignificant changes is really what we developers do best.
Using the .on() method directly is hands down going to be faster, but there are many other things you could be spending your time on that will generate more significant performance results. | {
"domain": "codereview.stackexchange",
"id": 3807,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery",
"url": null
} |
symmetry, group-theory, superconductivity
In fact, these are pseudoscalar and pseudovector functions, meaning they are even under parity transformations. The wavevector $\mathbf{k}$ is of course odd under parity.
If $g$ is an element of the transformation group, then the action on the $d$-vector is specified as
$g \rightharpoonup \vec{d}(\mathbf{k}) = R_\mathrm{s}(g) \vec{d}(R_\mathrm{o}\mathbf{k})$
Here $R_\mathrm{o}$ is the orbital representation and $R_\mathrm{s}$ the spin representation, which are odd and even under parity respectively. This notation is from slide 27 of this presentation by the same author as in your link.
To understand how the representative functions, like $k_x \hat{x} - k_y \hat{y}$, transform, recognize that the unit vectors are basis vectors of the $d$-vector, and therefore transform as pseudovectors, while the $k$-components transforms as vectors. | {
"domain": "physics.stackexchange",
"id": 76151,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "symmetry, group-theory, superconductivity",
"url": null
} |
statistical-mechanics, feynman-diagrams, partition-function
\begin{align}
\mathcal{Z}(\mu,V,T)=\sum_Nz^NZ(N,V,T),\tag{p.58}
\end{align}
with $z=e^{\beta\mu}$. Substituting in the above definition of $Z(N,V,T)$, we find
\begin{align}
\mathcal{Z}(\mu,V,T)&=\sum_Nz^N\frac{1}{\lambda^{3N}}\sum_{\{m_l\}}\prod_l\frac{U_l^{m_l}}{(l!)^{m_l}m_l!}\\
&=\sum_N\sum_{\{m_l\}}\prod_l\left(\frac{z}{\lambda^{3}}\right)^N\frac{1}{m_l!}\left(\frac{U_l}{l!}\right)^{m_l}\\
&=\cdots\\
&=\sum_{m_l=0}^\infty\prod_{l=1}^\infty\left(\frac{z}{\lambda^{3}}\right)^{m_ll}\frac{1}{m_l!}\left(\frac{U_l}{l!}\right)^{m_l}.\tag{p.58}
\end{align} | {
"domain": "physics.stackexchange",
"id": 94015,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, feynman-diagrams, partition-function",
"url": null
} |
c++, performance, c++11
Use standard algorithms
You might want to use std::next_permutation to accomplish this. It would make the code much simpler, and you're already including the required header. | {
"domain": "codereview.stackexchange",
"id": 19024,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, performance, c++11",
"url": null
} |
Similar questions to practice:
all-of-the-stocks-on-the-over-the-counter-market-are-126630.html
if-a-code-word-is-defined-to-be-a-sequence-of-different-126652.html
the-simplastic-language-has-only-2-unique-values-and-105845.html
a-4-letter-code-word-consists-of-letters-a-b-and-c-if-the-59065.html
a-5-digit-code-consists-of-one-number-digit-chosen-from-132263.html
a-company-that-ships-boxes-to-a-total-of-12-distribution-95946.html
a-company-plans-to-assign-identification-numbers-to-its-empl-69248.html
the-security-gate-at-a-storage-facility-requires-a-five-109932.html
all-of-the-bonds-on-a-certain-exchange-are-designated-by-a-150820.html
a-local-bank-that-has-15-branches-uses-a-two-digit-code-to-98109.html
a-researcher-plans-to-identify-each-participant-in-a-certain-134584.html
baker-s-dozen-128782-20.html#p1057502
in-a-certain-appliance-store-each-model-of-television-is-136646.html
m04q29-color-coding-70074.html
john-has-12-clients-and-he-wants-to-use-color-coding-to-iden-107307.html | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.865224091265267,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 4363.7517871448235,
"openwebmath_score": 0.5398880839347839,
"tags": null,
"url": "http://gmatclub.com/forum/a-certain-stock-exchange-designates-each-stock-with-a-one-64685.html?sort_by_oldest=true"
} |
into rolle's theorem. For example, if we have a property of f0 and we want to see the efiect of this property on f, we usually try to apply the mean value theorem. Determine whether the MVT can be applied to f on the closed interval. Then . If a real-valued function f is continuous on a proper closed interval [a, b], differentiable on the open interval (a, b), and f (a) = f (b), then there exists at least one c in the open interval (a, b) such that ′ =. Rolle's theorem is the result of the mean value theorem where under the conditions: f(x) be a continuous functions on the interval [a, b] and differentiable on the open interval (a, b) , there exists at least one value c of x such that f '(c) = [ f(b) - f(a) ] /(b - a). We can use the Intermediate Value Theorem to show that has at least one real solution: Rolle's Theorem If f(x) is continuous an [a,b] and differentiable on (a,b) and if f(a) = f(b) then there is some c in the interval (a,b) such that f '(c) = 0. f0(s) = 0. f is continuous | {
"domain": "nadea.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138183570425,
"lm_q1q2_score": 0.8477128500866469,
"lm_q2_score": 0.8670357666736773,
"openwebmath_perplexity": 589.0232480949632,
"openwebmath_score": 0.8144292235374451,
"tags": null,
"url": "https://nadea.org/570gyl/de0c85-rolle%27s-theorem-pdf"
} |
asteroids
Details on orbits and basic physical parameters are sourced from the
Minor Planet Center and NASA JPL. Composition data is based on
spectral classification and size. | {
"domain": "astronomy.stackexchange",
"id": 2989,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "asteroids",
"url": null
} |
c++, beginner, object-oriented, game, playing-cards
Card::Card(int ct, int cn) : cardNum(cn), cardType(ct) {
if(cardNum == 1) {
value = 11;
} else if(cardNum >= 10) {
value = 10;
} else value = cardNum;
switch(cardNum) {
case 1 :
name = "ace";
break;
case 11 :
name = "jack";
break;
case 12 :
name = "queen";
break;
case 13 :
name = "king";
break;
default:
name = to_string(cardNum);
break;
}
switch(cardType) {
case 1 :
name.append(" of clubs");
break;
case 2 :
name.append(" of diamonds");
break;
case 3 :
name.append(" of hearts");
break;
case 4 :
name.append(" of spades");
break;
}
} | {
"domain": "codereview.stackexchange",
"id": 43308,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, object-oriented, game, playing-cards",
"url": null
} |
satisfiability, approximation
Title: MAXSAT approximation We have been studying a 1/2-approximation for MAXSAT which runs in expected polynomial time, by randomly assigning True/False to each variable and repeating until we reach an assignment with at least half of clauses satisfied.
I don't understand why the algorithm needs to be so complicated. Why does the following not give a 1/2-approximation for MAXSAT in guaranteed linear time?
Let $m$ be the number of clauses in the formula.
Set all variables to true. Count the number of satisfied clauses. If it's at least $m/2$ then return this assignment.
Set all variables to false. Return this assignment. | {
"domain": "cs.stackexchange",
"id": 13834,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "satisfiability, approximation",
"url": null
} |
asymptotics
Title: Solving recurrence How to solve the recursion:
$
T(n) =
\begin{cases}
T(n/2) + O(1), & \text{if $n$ is even} \\
T(\lceil n/2 \rceil) + T(\lfloor n/2 \rfloor) + O(1), & \text{if $n$ is odd}
\end{cases}
$
I think $T(n)$ is $O(\log n)$. Can somebody show a proof? Your function appears in Sung-Hyuk Cha, On Parity based Divide and Conquer Recursive
Functions.
Let us consider the following version:
$$
T(n) = \begin{cases}
0 & \text{if } n = 0,1, \\
2 & \text{if } n = 2, \\
T(n/2) + 1 & \text{if } n \geq 4 \text{ is even}, \\
T(\lfloor n/2 \rfloor) + T(\lceil n/2 \rceil) + 1 & \text{if } n \geq 3 \text{ is odd}.
\end{cases}
$$
You can calculate that
$$
T\left(\frac{7 \cdot 2^n - (-1)^n}{3}\right) = 2F_{n+4} - 2F_{n+1} - 2.
$$
For example, $T(2) = 2$, $T(5) = 6$, $T(9) = 10$ (these correspond to $n=0,1,2$).
This gives an infinite sequence of $n$'s such that
$$
T(n) = \Theta(n^{\log_2 \phi}),
$$
where $\phi$ is the golden ratio. Empirically, this sequence maximizes the exponent. | {
"domain": "cs.stackexchange",
"id": 15957,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "asymptotics",
"url": null
} |
c++, bitwise
//characters in the init_string will be subsittuted according to the string
//nome_seme and then after a space nome_valore
uint valore_offset = 1;
uint seme_offset = nome_valore.size() + valore_offset + 1;
for(uint i = 0; i < init_string.size(); ++i){
if(i >= valore_offset && i < nome_valore.size() + valore_offset){
init_string[i] = nome_valore[i - valore_offset];
}
if(i >= seme_offset && i <= nome_seme.size() + seme_offset - 1){
init_string[i] = nome_seme[i - seme_offset];
}
}
// update the main vector holding the string
v.push_back(init_string); | {
"domain": "codereview.stackexchange",
"id": 27789,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, bitwise",
"url": null
} |
java, performance, beginner, array, design-patterns
// Adding array slots
private void resize(int newSize){
T[] temp = (T[]) new Object[newSize];
System.arraycopy(items, 0, temp, 0, ((size < newSize) ? size : newSize) );
items = temp;
}
// Reverse array first<>last,
public void reverse(){
if(size == 0) return;
for(int i = 0, io = size - 1, c = size / 2; i < c; i++){
int ii = io - i;
T temp = items[ii];
items[ii] = items[i];
items[i] = temp;
}
}
// Swapping values of two indexes
public void swap(int indexOne, int indexTwo){
ensurePointer(indexOne);
ensurePointer(indexTwo);
T temp = items[indexOne];
items[indexOne] = items[indexTwo];
items[indexTwo] = temp;
}
// Shuffling random
public void shuffle(){
if(size == 0) return;
java.util.Random r = new Random();
for(int i = 0; i < size; i++){
int ii = r.nextInt(size);
int iii = r.nextInt(size);
T temp = items[ii];
items[ii] = items[iii];
items[iii] = temp;
}
} | {
"domain": "codereview.stackexchange",
"id": 17799,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, beginner, array, design-patterns",
"url": null
} |
electromagnetism, electricity, electromagnetic-induction
Title: Why does a rotating aluminium disc slow down when a current carrying coil with iron core is held above it? What I don't understand is it the Emf induced that slows down the disc or is it a force. The induced EMF in the disc produces a current - an eddy current. The current in the the magnetic field gives rise to a force that, in accordance with Lenz's law, opposes the inducing action. | {
"domain": "physics.stackexchange",
"id": 29770,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, electricity, electromagnetic-induction",
"url": null
} |
2. ## Re: Prove or disprove, if H,K<G => HuK<G
one counter-example is all it takes to disprove something. sometimes HUK is a subgroup, for example, this will always be true if one subgroup is contained in the other.
with sets, HUK is the set generated by H and K. it is the smallest subset of some set that contains both H and K (the "universe set") that contains both H and K.
by contrast, the smallest group containing both H and K is <HUK>, and it is easy to see that while for a given set S, <S> contains S, it need not equal S.
Z is a perfectly good place to observe this phenomenon.
we know that every subgroup of Z is cyclic, and therefore it has a generator. pick two positive numbers ≠1 in Z that are relatively prime, say k and m.
let's see if <k> U <m> is a subgroup. since k,m are relatively prime, we can find integers s,t such that sk + tm = 1.
now sk is in <k>, therefore in <k> U <m>, and tm is in <m> therefore in <k> U <m>, so if <k> U <m> is a subgroup, | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936050226357,
"lm_q1q2_score": 0.8263768215859999,
"lm_q2_score": 0.8397339616560072,
"openwebmath_perplexity": 739.6874723346675,
"openwebmath_score": 0.8200314044952393,
"tags": null,
"url": "http://mathhelpforum.com/advanced-algebra/190124-prove-disprove-if-h-k-g-huk-g.html"
} |
The following calculation shows why Martha’s result is identical to David’s. First, use the division property of radicals (Property 1) to take the square root of both numerator and denominator.
$\sqrt{\frac{1}{12}} = \frac{\sqrt{1}}{\sqrt{12}} = \frac{1}{\sqrt{12}}$
Next, use the “first guideline for simple radical form” and factor a perfect square from the denominator.
$\frac{1}{\sqrt{12}} = \frac{1}{\sqrt{4}\sqrt{3}} = \frac{1}{2\sqrt{3}}$
This clearly demonstrates that David and Martha’s solutions are identical.
Indeed, there are other possible forms for the solution of David and Martha’s home- work exercise. Start with Martha’s solution, then multiply both numerator and de- nominator of the fraction under the radical by 3.
$\sqrt{\frac{1}{12}} = \sqrt{\frac{1}{12} \cdot \frac{3}{3}} = \sqrt{\frac{3}{36}}$
Now, use the division property of radicals (Property 1), taking the square root of both numerator and denominator. | {
"domain": "libretexts.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9911526459624252,
"lm_q1q2_score": 0.8302092449775559,
"lm_q2_score": 0.8376199653600372,
"openwebmath_perplexity": 356.65065799553645,
"openwebmath_score": 0.9020271897315979,
"tags": null,
"url": "https://math.libretexts.org/Bookshelves/Algebra/Intermediate_Algebra_(Arnold)/09%3A_Radical_Functions/9.03%3A_Division_Properties_of_Radicals"
} |
control-systems, laplace-transform, feedback
Title: How can a system be unstable if $L(j\omega)$ is never exactly $-1$? Say we have a linear system with unity feedback, with loop transfer function $L(j\omega)$. The closed-loop transfer function from reference to output is $T(j\omega) = \frac{Y(j\omega)}{R(\omega)}=\frac{L(j\omega)}{1+L(j\omega)}$.
At frequencies for which $L(j\omega)$ approaches $-1$, clearly $|T(j\omega)| \rightarrow \infty$, so the system is unstable - if excited at this frequency, the output is unbounded.
But systems can be unstable even if $L(j\omega)$ never equals $-1$. From the Nyquist plot, we can show that $T(j\omega)$ can have poles in the right half plane if the contour encircles $-1$, even if $L(j\omega)$ never exactly reaches it. (However, I have very little intuition for why this is true - I just see it as a theorem from complex analysis that happens to be useful here). | {
"domain": "dsp.stackexchange",
"id": 4694,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "control-systems, laplace-transform, feedback",
"url": null
} |
assembly, x86
Title: Program to find the maximum number/factor in a list I have written the following basic assembly program to find the maximum number in a list divisible by a number. Here is what I have thus far:
# Program: given a list or integers and a factor
# Find the max number in the list that the factor divides
# For example: INPUT: [3,9,50,27], factor: 3 | OUTPUT: 27
.section .rodata
nums: .long 3,9,50,27,-1
factor: .long 3
.section .data
cur_value: .long -1
# first three args: %edi, %esi, %edx
.section .text
.globl _start
_start:
# SETUP
# %r8 will store the array index
# %r11 will store the max value
# %esi will store the factor/divisor.
mov $0, %r10d
mov $0, %r11d
mov factor, %esi
loop:
# get current value and store it in %rdi
# we'll also update our variable for `cur_value`
mov nums(, %r10d, 4), %edi
cmp $-1, %edi
je exit
movl %edi, cur_value | {
"domain": "codereview.stackexchange",
"id": 39364,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "assembly, x86",
"url": null
} |
density-matrix, nielsen-and-chuang
$$\mathbf{U}\rho\mathbf{U}^\dagger=\sum_ip_i\mathbf{U}\rho_i\mathbf{U}^\dagger$$
which means that the probability of measuring $|x\rangle$ is given by, using the linearity property of the trace:
$$\sum_ip_i\mathrm{tr}\left(|x\rangle\langle x|\mathbf{U}\rho_i\mathbf{U}^\dagger\right).$$
Hence, for any unitary $\mathbf{U}$ and any basis state $|x\rangle$, the probabilities of measuring $|x\rangle$ after having applied $\mathbf{U}$ on those systems are equal, hence their density matrices are identical. | {
"domain": "quantumcomputing.stackexchange",
"id": 2647,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "density-matrix, nielsen-and-chuang",
"url": null
} |
human-anatomy, neuroanatomy, neurophysiology
Title: Can an upper forearm amputee correctly control the Median and Ulnar nerves I'm an engineer who is looking to build a robotic hand for people without their upper forearm(from center of forearm in direction of hand), controlled by the Thalmic Myo(an EMG sensor). I am first checking for the idea's viability.
I was wondering if one who does not have their upper forearm can still send the correct nerve impulses for a desired hand movement through their Median and Ulnar nerves? Yes, severed nerves still convey neural responses from the brain.
In fact, nerve potential recordings in the ulnar and median nerves of the stumps of arm amputees have already been successfully applied to control arm prosthetics (Jia et al. 2007; Kuiken et al., 2007. | {
"domain": "biology.stackexchange",
"id": 3399,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-anatomy, neuroanatomy, neurophysiology",
"url": null
} |
electromagnetic-radiation, antennas, radio, radio-frequency
it. Well above 100GHz where phase coherent signals and their amplification are difficult to come by direct carrier modulation with on-off keying is still widely used as being the easiest thing to do. | {
"domain": "physics.stackexchange",
"id": 42485,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetic-radiation, antennas, radio, radio-frequency",
"url": null
} |
solar-eclipse, python
Title: Eclipses with SkyField I'm trying to compute solar eclipses for a long period of time, see Back-predicting solar eclipses
Initially, I wanted at several points on Earth whether an eclipse was visible at some point in time.
I have since changed the approach and I will now compute whether an eclipse could be seen from the center of the Earth at a given moment. Later, after knowing roughly the time of the eclipse, I will iterate over a grid on Earth to check where it could be actually seen.
So far, my first question is: is it right to check for eclipses at the center of the Earth?
Secondly, I wrote a small code in Python to test how good I am at predicting eclipses, checking against https://eclipse.gsfc.nasa.gov/SEsearch/SEsearchmap.php?Ecl=01501207
for these coordinates:
Lat.: 27.4782° N
Long.: 109.9299° W
#!/usr/bin/python
from skyfield.api import load, Topos
from skyfield.positionlib import ICRF
planets = load('Ephemerides/de422.bsp')
ts = load.timescale() | {
"domain": "astronomy.stackexchange",
"id": 2592,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "solar-eclipse, python",
"url": null
} |
## strongly connected graph in data structure
10 January 2021 / Non classé / no comments | {
"domain": "b-lingo.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.966914019704466,
"lm_q1q2_score": 0.8434849130465598,
"lm_q2_score": 0.8723473813156294,
"openwebmath_perplexity": 821.0807630324325,
"openwebmath_score": 0.3060733675956726,
"tags": null,
"url": "https://b-lingo.com/adande-thorne-havngo/1cab57-strongly-connected-graph-in-data-structure"
} |
climate-change, paleoclimatology, solar-terrestrial-physics
Summarizing, the IPCC consider solar irradiance variations, the timing of solar minimums and maximums. However, it consider also many other factors that also affect Earth's energy budget. Then, they do predictions based on the combined effect of all these factors. In contrast, some people tend to focus on just one factor (as solar activity) and erroneously assume that it will dominate over all the others.
For the particular case of solar activity, as you can see in the cites above. The IPCC acknowledge the possible occurrence of a solar minimum in the future, but combining all the models they conclude that there is a high confidence that its effects will be much smaller in magnitude than the projected increased forcing due greenhouse gases. | {
"domain": "earthscience.stackexchange",
"id": 1677,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "climate-change, paleoclimatology, solar-terrestrial-physics",
"url": null
} |
navigation, robot-localization
Original comments
Comment by Tom Moore on 2017-02-01:
Are you certain that the apriltags data is in the map frame, and not relative to the robot? How do you define the global pose of every apriltag? Is there some database that says what their poses in the map frame are?
Comment by haelannaleah on 2017-02-02:
I'm manually publishing the topic, so I know that I intend for it to be in the global frame.
The raw tag data is relative to the robot base, but I've been converting it manually for the time being. I need the tag data to tell me where the robot is, so there's an offset from the tag to the robot base
Comment by haelannaleah on 2017-02-02:
As to the position of the april tag in the map frame, yes, there is a database containing that information.
Comment by Tom Moore on 2017-03-01:
Can you post either a bag file or the code you're using to generate the apriltags -> map transform?
Comment by Jad on 2018-08-07:
Would you like to say the name of the package the you have used ? | {
"domain": "robotics.stackexchange",
"id": 26821,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, robot-localization",
"url": null
} |
java
});
}
}
}
List<BookPriceStats> bookPriceStats = new ArrayList<>();
statKeyPricingMap.keySet().stream().forEach(s -> {
BookPriceStats bookingPriceStat = new BookPriceStats();
bookingPriceStat.setBookStatKey(s);
bookingPriceStat.setPrices(statKeyPricingMap.get(s));
bookPriceStats.add(bookingPriceStat);
});
return bookPriceStats;
} | {
"domain": "codereview.stackexchange",
"id": 41814,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java",
"url": null
} |
-
You have done it, at least for $x^n$. For the next one, just multiply by $x$, substitute for the $x^n$ term you get. This is the heart of the induction step. In the same way, one shows that if $y^k$ is expressible as a linear combination, so is $y^{k+1}$. The uniqueness is easy, two polynomials of degree $\le n-1$ whose difference is divisible by $f$ must be the same. – André Nicolas Jul 9 '12 at 23:47
Hint: by the division algorithm $\rm\ g = q\, f + r\$ with $\rm\: deg\ r < deg\ f.\$ The existence and uniqueness of the remainder $\rm\,r\,$ (and quotient $\rm\,q)$ is analogous to that for division (with remainder) for integers. What do you mean by the coefficients "being somewhere else"? – Bill Dubuque Jul 9 '12 at 23:52 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429595026213,
"lm_q1q2_score": 0.8151311327102458,
"lm_q2_score": 0.8289387998695209,
"openwebmath_perplexity": 202.28694389187018,
"openwebmath_score": 0.9281410574913025,
"tags": null,
"url": "http://math.stackexchange.com/questions/168847/unique-expression-of-a-polynomial-under-quotient-mapping"
} |
ros, ros2, yaml, parameters, xacro
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, LogInfo
from launch.substitutions import LaunchConfiguration, Command, PathJoinSubstitution
from launch_ros.actions import Node
from launch_ros.descriptions import ParameterValue
from launch_ros.substitutions import FindPackageShare
def generate_launch_description():
this_pkg = FindPackageShare('test_package')
model_path = LaunchConfiguration('model_path')
params_path = LaunchConfiguration('params_path')
return LaunchDescription([
DeclareLaunchArgument(
'model_path',
default_value=PathJoinSubstitution([this_pkg,'xacro','model.xacro']),
description='Full path to model xacro file including filename and extension'
),
DeclareLaunchArgument(
'params_path',
default_value=PathJoinSubstitution([this_pkg,'params','model.yaml']),
description='Full path to parameter yaml file including filename and extension'
), | {
"domain": "robotics.stackexchange",
"id": 37743,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros2, yaml, parameters, xacro",
"url": null
} |
beginner, scheme, bioinformatics
Function names generally shouldn't end in -of. (That's a way to pronounce function call, but it's not part of the name.) complement is enough. (Although some Schemes have a predefined function by that name, and it would be nice to not collide with it.)
Beware of eq? — it's not reliable on characters. (It's the equivalent of Java's == on Character). Use eqv? instead unless you know what you're doing. (case uses eqv? internally.)
apply-complements
You can simplify apply-complements by using one of Chicken's libraries: (use (srfi 13)) to get string-map, which is like map but saves you having to convert to a list. That plus string-reverse makes apply-complements easy.
...but I wouldn't call it apply-complements, because that sounds like a reference to the apply function. It returns the reverse complement of its argument, so that should be its name: reverse-complement. | {
"domain": "codereview.stackexchange",
"id": 7528,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "beginner, scheme, bioinformatics",
"url": null
} |
reinforcement-learning, comparison, terminology, markov-decision-process, state-spaces
In the first quote, it appears as if the terminal state is just a term to describe the final state of an episode, but, from the second quote, I understand that the terminal state is the same no matter the outcome of the episode. If we consider the game of chess, what would we consider as a terminal state? Would it be the state that, if reached, will end the game (checkmate), no matter the result (win, loss)? But then how can we describe a state that would lead to draw? If we say about a state that leads to a draw that it's a nonterminal state since we can play an "infinite" number of turns without reaching a win or a loss hence without reaching the terminal state, aren't we implicitly supposing that reaching a draw isn't a result for which we should attribute a reward (e.g. 0)? And if we name a state that leads to a draw a terminal state, then what would be the difference between a normal state and a nonterminal state? Terminal state is always the same in the sense that it represents | {
"domain": "ai.stackexchange",
"id": 2864,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reinforcement-learning, comparison, terminology, markov-decision-process, state-spaces",
"url": null
} |
classical-mechanics, lagrangian-formalism, hamiltonian-formalism
So, if we shift $q$ but hold $\dot q$ fixed, we find that
$$ dL = \left(\frac{\partial L}{\partial q} \right)dq$$
while
$$ dH = \left[\left(\frac{\partial H}{\partial q} \right) + \left(\frac{\partial H}{\partial p}\right)\left(\frac{\partial p}{\partial q} \right)\right]dq$$
If $L(q,\dot q) = H(q,p(q,\dot q))$ as in the case of a free particle, then we would find that
$$dL = dH$$
so
$$\left(\frac{\partial L}{\partial q}\right)= \left(\frac{\partial H}{\partial q} \right) + \left(\frac{\partial H}{\partial p}\right)\left(\frac{\partial p}{\partial q} \right)$$ | {
"domain": "physics.stackexchange",
"id": 44117,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, lagrangian-formalism, hamiltonian-formalism",
"url": null
} |
ros
at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007fffed30102a in __GI_abort () at abort.c:89
#2 0x00007fffedb5b84d in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007fffedb596b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007fffedb59701 in std::terminate() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fffedb59919 in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff6843cf2 in cv::error(cv::Exception const&) ()
from /opt/ros/kinetic/lib/libopencv_core3.so.3.2
#7 0x00007ffff6843e83 in cv::error(int, cv::String const&, char const*, char const*, int) () from /opt/ros/kinetic/lib/libopencv_core3.so.3.2
#8 0x00007ffff68e7c9a in cv::_OutputArray::create(int, int, int, int, bool, int) const () from /opt/ros/kinetic/lib/libopencv_core3.so.3.2
#9 0x00007ffff6838eb9 in cv::Mat::copyTo(cv::_OutputArray const&) const () | {
"domain": "robotics.stackexchange",
"id": 29277,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
javascript, jquery, beginner
function sendCreateNewFolderRequestAndUpdateFilesTree()
{
if (validateCreateNewFolderDialog())
{
var new_folder_descriptor = {};
new_folder_descriptor.name = $('#new_folder_name').val();
new_folder_descriptor.color = $('#new_folder_color').val();
new_folder_descriptor.description = $('#new_folder_description').val();
new_folder_descriptor.userId = 'a358ab9d-d481-4bdd-8cb2-18ddc8898c78';
new_folder_descriptor.parentId = current_folder.attr('id');
createAjaxRequest("Manager/CreateNewLocation",
{
'name': new_folder_descriptor.name,
'color' : new_folder_descriptor.color,
'userId' : new_folder_descriptor.userId,
'parentId' : new_folder_descriptor.parentId,
'description' : new_folder_descriptor.description
}).done(function (res) { | {
"domain": "codereview.stackexchange",
"id": 1176,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, beginner",
"url": null
} |
general-relativity, acceleration, equivalence-principle
It's limited by the speed of light. So at some point or another the elevator will start to slow down.
This is incorrect. The speed of light limit doesn't say you will start to slow down once you get closer to the speed of light. The issue is that you are thinking in terms of absolute velocity, not relative velocity. The elevator cannot accelerate to move faster than the speed of light relative to something else. This doesn't affect the acceleration you would feel in the elevator though. If we had some magical infinite fuel source, then indeed you would feel the same acceleration in the elevator forever. The speed limit applies to an outside observer who would see your speed relative to them approach but not reach the speed of light. | {
"domain": "physics.stackexchange",
"id": 68197,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, acceleration, equivalence-principle",
"url": null
} |
This is really easy to see if you draw a Venn diagram. But going from line 1 to line 2, note that $B\cap C$ is contained in $A$ and since $A$ and $A^c$ are disjoint, so are $B\cap C$ and $A^c$.
Going from line 2 to line 3, note that if all operations are intersections then the order does not matter. So
$$(B\cap C)\cap A^c = B \cap C \cap A^c = B \cap A^c \cap C = B\cap ( A^c \cap A^c) \cap C = (B \cap A^c) \cap (C\cap A^c).$$
• How come A^c = (A^c intersects A^c)? – Alex May 20 '14 at 4:40
• The intersection of a set with itself is that set since any element of a set belongs to the set. ;) Recall that the definition of an intersection is the collection of points that belong to both sets. – JPi May 20 '14 at 9:59 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9609517078329177,
"lm_q1q2_score": 0.8129098279938124,
"lm_q2_score": 0.8459424353665381,
"openwebmath_perplexity": 262.54612729870985,
"openwebmath_score": 0.9924749135971069,
"tags": null,
"url": "https://math.stackexchange.com/questions/802349/if-b-cap-c-subset-a-then-c-setminus-a-cap-b-setminus-a-emptyset"
} |
the family of squares a type of parallelogram because its sides are.. Because you could prove this by Pythagoras since all four angles must be of equal length ( ! Used to prove that a parallelogram if and only if \ ( =! ( -2 - 6 ) ² + ( 5 - 1 ) =!, they have 90-degree angles here ABCD\ ) is not a square, diagonals., find all four angles must be an easy way to do this and I just n't. Where they cross is always 90 degrees prove that a quadrilateral with four equal.. It is not a square AD^2 + CD^2\ ) which quadrilateral are congruent/have equal lengths all..., a rhombus like this that comes in where the angles are all angles... I just do n't know it is a quadrilateral with all sides equal in and. Know how to prove that quadrilateral MATH is a quadrilateral is a quadrilateral with all sides equal in length all. Diamond-Shaped quadrilateral are the diagonals ( lines linking opposite corners ) bisect each other the! Must be congruent ( and thus 90°, or right, angles. cross is 90! You could | {
"domain": "travel2losangeles.us",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462183543601,
"lm_q1q2_score": 0.8030692016388975,
"lm_q2_score": 0.8128673269042767,
"openwebmath_perplexity": 890.4419924473979,
"openwebmath_score": 0.8449695706367493,
"tags": null,
"url": "http://travel2losangeles.us/pentago-game-obgm/how-to-prove-a-rhombus-is-not-a-square-bfe754"
} |
type-theory, dependent-types, curry-howard
Why does the categorical approach need products? Roughly speaking, an arrow $t\in\text{Hom}(A,B)$ corresponds to a term $x\!:\!A\vdash t:B$. So the issue is simply that we need some way of talking about arrows with more than one input. Products are one way, but an alternative, more direct approach would be to use (cartesian) multicategories. However, a more common approach is to split the adjunction characterizing function types in terms of product types into two adjunctions. Instead of having $-\times B\dashv (-)^B$ as described earlier, we can split this into $\Sigma_B\dashv p^*\dashv \Pi_B$ where $p : [\Gamma,B]\to [\Gamma]$ and $p^* : \mathcal{E}_\Gamma\to\mathcal{E}_{\Gamma,B}$. Here $\mathcal{E}_\Gamma$ can be thought of as a category of terms in context $\Gamma$. The machinery to do this is indexed or mostly equivalently fibered categories. $p^*$ is called a weakening functor and it corresponds to adding an unused variable (of type $B$) to the context. Now we can consider | {
"domain": "cs.stackexchange",
"id": 10150,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "type-theory, dependent-types, curry-howard",
"url": null
} |
The task appears here in its final state. Feel free to experiment using different solvers and options.
``` ```
### Helper Functions
This code creates the `plotobjconstr` helper function.
```function plotobjconstr [XX,YY] = meshgrid(-2:0.1:2,-4:0.1:2); ZZ = objconstr([XX(:),YY(:)]).Ineq; ZZ = reshape(ZZ,[size(XX),3]); h = figure; ax = gca; contour(ax,XX,YY,ZZ(:,:,1),[-1/2 0],'r','ShowText','on'); hold on contour(ax,XX,YY,ZZ(:,:,2),[-1/2 0],'k','ShowText','on'); contour(ax,XX,YY,ZZ(:,:,3),[-1/2 0],'b','ShowText','on'); hold off end```
This code creates the `objconstr` helper function.
```function f = objconstr(x) c(:,1) = (x(:,2) + x(:,1).^2).^2 + 0.1*x(:,2).^2 - 1; c(:,2) = x(:,2) - exp(-x(:,1)) + 3; c(:,3) = x(:,2) - x(:,1) + 4; f.Ineq = c; end```
This code creates the `surrout` helper function
```function stop = surrout(~,optimValues,~) stop = false; if optimValues.constrviolation <= 1e-6 % Tolerance for constraint stop = true; end end``` | {
"domain": "mathworks.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850852465429,
"lm_q1q2_score": 0.8234516890727812,
"lm_q2_score": 0.837619959279793,
"openwebmath_perplexity": 1540.7559124473937,
"openwebmath_score": 0.44319018721580505,
"tags": null,
"url": "https://la.mathworks.com/help/gads/feasibility-problem-based-optimize-let.html"
} |
keras, categorical-data, reference-request, loss-function
Output:
Using Theano backend.
Keras version: 2.0.4
Before: loss = 1.3843669414520263, acc = 0.2
History: loss = 1.3843669891357422, acc = 0.20000000298023224
Before: loss = 1.3834303855895995, acc = 0.2
History: loss = 1.3834303617477417, acc = 0.20000000298023224
Before: loss = 1.3824962615966796, acc = 0.3
History: loss = 1.3824962377548218, acc = 0.30000001192092896
Before: loss = 1.381564486026764, acc = 0.3
History: loss = 1.3815644979476929, acc = 0.30000001192092896
Before: loss = 1.380635154247284, acc = 0.3
History: loss = 1.380635142326355, acc = 0.30000001192092896
Before: loss = 1.3797082901000977, acc = 0.3
History: loss = 1.3797082901000977, acc = 0.30000001192092896
Before: loss = 1.378783941268921, acc = 0.2
History: loss = 1.378783941268921, acc = 0.20000000298023224
Before: loss = 1.3778621554374695, acc = 0.2
History: loss = 1.3778622150421143, acc = 0.20000000298023224
Before: loss = 1.3769428968429565, acc = 0.2 | {
"domain": "datascience.stackexchange",
"id": 3455,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "keras, categorical-data, reference-request, loss-function",
"url": null
} |
climate, climate-change, climate-models, greenland, isostasy
The enormous weight of the ice down-warped the land surface, causing the material underlying these land masses to slowly flow away. The physics are similar to the reasons a balloon deforms when you press down on it. In the same way that the balloon reshapes itself when you remove your hand, the land actually pops back up over several thousand years when the weight of expansive ice sheets no longer weighs down the underlying area. In Greenland, where the ice sheet is currently receding, the island is actively rebounding.
Given that there are already peaks of up to about 3.7km in altitude, my related questions are: | {
"domain": "earthscience.stackexchange",
"id": 367,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "climate, climate-change, climate-models, greenland, isostasy",
"url": null
} |
number-formats
This may be enough context for what is in the question here, but to understand this more completely, it would be best to look up (as mentioned) Exercise 31 of section 4.1 (Positional Number Systems), which is on page 213 of Volume 2. The exercise covers three-fourths of a page and is very instructive, but let me just quote part of it: | {
"domain": "cs.stackexchange",
"id": 12568,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "number-formats",
"url": null
} |
gravity, black-holes, big-bang
Title: How does the gravitational strength of the universe compare to that of a black hole? A bit of a weird question, but at the moment after the big bang, how much gravity would a person 'standing', say a metre away experience compared to one standing a metre away from the centre of a black hole (say the supermassive one at the centre of our galaxy). I know it's beyond the event horizon, so I would mean from a theoretical perspective.
at the moment after the big bang, how much gravity would a person 'standing', say a metre away experience
The Big Bang didn’t happen at a point, so you can’t be one meter away from it. The Big Bang model is one of a homogeneous and isotropic universe in which spacetime curvature invariants are the same at every spatial location. The curvature gets weaker with time, but not with distance, because there is no “center” to be distant from. | {
"domain": "physics.stackexchange",
"id": 69324,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, black-holes, big-bang",
"url": null
} |
filters, digital-communications, matched-filter
-------
But what about noise and SNR and stuff like that which is what the OP
was asking about?
If the signal $s(t)$ plus additive white Gaussian noise with
two-sided power spectral density $\frac{N_0}{2}$ is processed
through a filter with impulse response $h(t)$, then the output
noise process is a zero-mean stationary Gaussian process with
autocorrelation function $\frac{N_0}{2}R_s(t)$. Thus, the
variance is
$$\sigma^2 = \frac{N_0}{2} R_s(0) = \frac{N_0}{2}\int_{-\infty}^{\infty} |h(t)|^2\,\mathrm dt.$$
It is important to note that the variance is the same regardless
of when we sample the filter output. So, what choice of $h(t)$
will maximize the SNR $y(t_0)/\sigma$ at time $t_0$? Well, from the
Cauchy-Schwarz inequality, we have
$$\text{SNR} = \frac{y(t_0)}{\sigma}
= \frac{\int_{-\infty}^\infty s(t_0-t)h(t)\,\mathrm dt}{\sqrt{\frac{N_0}{2}\int_{-\infty}^\infty |h(t)|^2\,\mathrm dt}}
\leq \frac{\sqrt{\int_{-\infty}^\infty |s(t_0-t)|^2 \,\mathrm dt} | {
"domain": "dsp.stackexchange",
"id": 10496,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters, digital-communications, matched-filter",
"url": null
} |
navigation, ros-kinetic, robot-localization
Assuming I am correct, the only way to obtain a ground truth estimate will be through the use of some kind of external measurement system, e.g., a motion capture system or overhead camera system. If there was on "on robot" way to know the robot's true pose, there would be no need for state estimation packages, because you'd already have the robot's true pose.
As an alternative, does the manufacturer of your robot provide a Gazebo simulation of it? You could directly compare the output of the EKF or UKF with Gazebo's perfect ground truth of the robot's true state. However, it will likely require some effort to model effects like wheel slip.
Originally posted by Tom Moore with karma: 13689 on 2022-05-18
This answer was ACCEPTED on the original site
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 37513,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, ros-kinetic, robot-localization",
"url": null
} |
regular-languages, pumping-lemma, chomsky-hierarchy
It may be that the word is recognized by a parse tree where there is a subtree $\mathcal{T}_1$ which is recognized by the nonterminal $A$, and a subtree $\mathcal{T}_0$ of that subtree is recognized by the same nonterminal $A$. In that case, let $w$ be the part of the word that is recognized by $\mathcal{T}_0$ and $vwx$ be the part that is recognized by $\mathcal{T}_1$. You also get a valid parse tree if you replace $\mathcal{T}_1$ by $\mathcal{T}_0$ or vice versa. Furthermore, since $\mathcal{T}_1$ contains $\mathcal{T}_0$, after replacing $\mathcal{T}_0$ by $\mathcal{T}_1$, you can replace the copy of $\mathcal{T}_0$ inside $\mathcal{T}_1$ by $\mathcal{T}_1$, and so on. This means that you can replace $vwx$ by $w$, $v^2wx^2$, $v^3wx^3$, etc. and still get a word with a valid parse tree. | {
"domain": "cs.stackexchange",
"id": 11629,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "regular-languages, pumping-lemma, chomsky-hierarchy",
"url": null
} |
quantum-mechanics, hilbert-space, measurement-problem
Yes, absolutely. For example, with respect to the factorization (1), almost all wavefunctions $\psi(x,y,z,m)$ are entangled with respect to $x,y,z$. The only ones that aren't entangled are wavefunctions of the form $\psi(x,y,z,m)=\alpha(x)\beta(y)\gamma(z)\mu(m)$. The way the word is most often used, "entangled" just means that the given wavefunction (or state-vector) can't be factorized with respect to the given factorization of the Hilbert space. A wavefunction that is entangled with respect to one factorization may be non-entangled with respect to a different factorization. When we use a particular factorization of the Hilbert space, it's usually because we are implicitly saying something about the observables associated with those factors, and that's what makes entanglement interesting. | {
"domain": "physics.stackexchange",
"id": 56059,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, measurement-problem",
"url": null
} |
c, io, formatting
#include <stdio.h>
#define W_AS_TABS 4
#define MAXLINE 1000
int c;
int len ;
int getlinea ( char line [] );
void replace_tabs ( char tab [] );
int main ( void )
{
extern int len ;
len = 0 ;
extern int c;
char line [MAXLINE] ;
while ( ( len = getlinea ( line ) ) >= 0 ) //getlinea gives a new line or completes a line interrupted when getlinea exited because it found a tab.
if ( c == '\t')
replace_tabs ( line ) ;
else
if ( len != 0 )
{ //not an empty line
printf ("%s\n", line);//if it's the end of a line, show it! ...
len = 0 ; // gimme a new line
}
return 0;
} | {
"domain": "codereview.stackexchange",
"id": 12708,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c, io, formatting",
"url": null
} |
everyday-chemistry, cleaning
The theory is following: you apply the protective layer over your paint. When somebody applies any paint over it, you've got 3 layers. | {
"domain": "chemistry.stackexchange",
"id": 1954,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "everyday-chemistry, cleaning",
"url": null
} |
computer-architecture
Title: Calculating the probability of data loss of a RAID 1+0 system I have a task where a RAID 1+0 system (A RAID 0 connects two RAID 1's with two disks each = makes 4 disks in total) is given with no further details. Then let p be the probability that one disk shows signs of failure. The variable p is not further defined.
Now I've received the task to calculate the probability that there will be a data loss in this RAID 1+0 system and I have literally no idea how solve this. I know that RAID 1+0 systems can cope with failure of the 1st and 3rd disk without having any data loss.
Please enlighten me, thanks! A RAID 1 system with two disks fails if both disks fails. If each disk fails with probability $p$, then this happens with probability $p^2$.
The RAID 1+0 system fails if any of the two RAID 1 component systems fails. Since each of them fails with probability $p^2$, the probability that either fails is $2p^2 - p^4$ (using inclusion-exclusion). | {
"domain": "cs.stackexchange",
"id": 11741,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computer-architecture",
"url": null
} |
geometric-optics
Title: Can we take photo of a mirage? I do know that mirages are optical illusions . I know the phenomenon of its formation just tell me if we can ? I assume what you are asking is whether the phenomena which cause mirages are happening inside our head, as with some other optical effects, or whether they are 'out there' in the world. In the former case the image made by a camera would fail to objectively record the effect, although looking at it might still cause us to experience the same thing (this is the case, for instance, with the famous 'grey blob' effect that our visual system fools us into seeing in some chequerboard patterns: there's nothing there really, but you still see it in a photographic image).
And the answer to this is that mirages are quite definitely physical artifacts which are out there in the world and not artifacts of our visual system. And so cameras record them very happily: an image search will show many examples. | {
"domain": "physics.stackexchange",
"id": 31710,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "geometric-optics",
"url": null
} |
With the matrix A, I've solved two problems. Does that take twice as long? If I have the same matrix A but different right-hand sides, b and u, if I factor A into Lu, all the hard work is done there on the left side. All the work is done in finding Lu. And then I just back substitute to find the second solution.
This is so fundamental that I'm emphasizing it, that if you have multiple right-hand sides, you don't every time go back and work on the left side. The left side with the same matrix A, just would do the same stuff. The same rows and pivots and all that stuff will happen because it's the same A. You just attach-- you really just stick a second column-- really, the fast way to do it is A wz.
The two solutions come from the b and the u. I've just put the two problems together to emphasize that the matrix A is the same. This is where most of the work goes. But it only goes there once. That's the point. | {
"domain": "mit.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9904406003707396,
"lm_q1q2_score": 0.8231978213860589,
"lm_q2_score": 0.8311430499496096,
"openwebmath_perplexity": 655.5320509591014,
"openwebmath_score": 0.7949490547180176,
"tags": null,
"url": "https://ocw.mit.edu/courses/mathematics/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/video-lectures/lecture-14-low-rank-changes-in-a-and-its-inverse/"
} |
a) $$\frac{1}{40,000}$$ percent
b) $$\frac{1}{25,000}$$ percent
c) $$\frac{1}{15,000}$$ percent
d) $$\frac{1}{4,000}$$ percent
e) $$\frac{1}{40}$$ percent
Let x = the desired percent
In other words: 2.5 million is x percent of 10 billion
In other words: 2,500,000 = x% of 10,000,000,000
In other words: 2,500,000 = (x/100)(10,000,000,000)
Divide both sides by 100,000 to get: 25 = (x/100)(100,000)
Simplify to get: 25 = 1000x
Divide both sides by 1000 to get: x = 25/1000 = 1/40
Cheers,
Brent
_________________
Test confidently with gmatprepnow.com
Intern
Joined: 20 Jun 2019
Posts: 44
Location: United States (DC)
Schools: UVA Darden
GPA: 3.4
WE: Sales (Computer Software)
Re: 2.5 million is what percent of 10 billion? [#permalink]
### Show Tags
19 Mar 2020, 07:56
Having some issues figuring out what I did wrong. ScottTargetTestPrep or JeffTargetTestPrep care to share any light?
step 1] Set up equation
2,500,000 = $$\frac{x}{100} * 10,000,000,000$$ | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9489172630429475,
"lm_q1q2_score": 0.8027293823026759,
"lm_q2_score": 0.8459424373085146,
"openwebmath_perplexity": 7642.872539215317,
"openwebmath_score": 0.4491523802280426,
"tags": null,
"url": "https://gmatclub.com/forum/2-5-million-is-what-percent-of-10-billion-318851.html"
} |
analytical-chemistry, titration, conductivity
$$ \chi = c \dfrac{n}{V_i + V_a} $$
while the correct conductivity in absence of dilution is given by the formula
$$ \chi_{\text{eff}} = c \dfrac{n}{V_i} $$
so
$$ c \cdot n = \chi_{\text{eff}} \cdot V_i $$
replacing
$$ \chi = \dfrac{\chi_{\text{eff}} \cdot V_i}{V_i + V_a} $$
$$ \chi \cdot (V_i + V_a) = \chi_{\text{eff}} \cdot V_i $$
we get
$$ \begin{equation} \chi_{\text{eff}} = \chi \cdot \dfrac{V_i + V_a}{V_i} \end{equation} $$ | {
"domain": "chemistry.stackexchange",
"id": 14179,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "analytical-chemistry, titration, conductivity",
"url": null
} |
c++
shapes[4]->print();
cout << shapes[2]->getID() << " --";
shapes[2]->print();
}
init2 = true;
break;
case 4:
if (selection == 1) {
compareArea(&shapes[4], &shapes[3]);
}
else if (selection == 2) {
compareVolume(&shapes[4], &shapes[3]);
}
else {
cout << shapes[4]->getID() << " --";
shapes[4]->print();
cout << shapes[3]->getID() << " --";
shapes[3]->print();
}
init2 = true;
break;
case 5:
if (selection == 1) {
compareArea(&shapes[4], &shapes[4]);
} | {
"domain": "codereview.stackexchange",
"id": 17301,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++",
"url": null
} |
bond, elements
Title: Elements other than carbon that can form many different compounds by bonding to themselves? My textbook says the following:
Unique among the elements, carbon can bond to itself to form extremely strong two-dimensional sheets, as it does in graphite, as well as buckyballs and nanotubes.
Is carbon the only element that can do this?
If not, then what are the other elements can also do this? Is there a term to describe such elements?
What is the chemical characteristic that allows this to occur?
I would greatly appreciate it if people could please take the time to clarify this.
Is carbon the only element that can do this?
No, carbon is not the only element with such characteristics.
If not, then what are the other elements can also do this?
There is a whole number of elements such as silicon, arsenic, germanium.
Is there a term to describe such elements?
At least I'm unaware of such a term, which might be furnished by our far wiser community. | {
"domain": "chemistry.stackexchange",
"id": 15480,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bond, elements",
"url": null
} |
heisenberg-uncertainty-principle, error-analysis
Title: Is uncertainty uncertain? I was thinking about uncertainty and wondered if uncertainty is inherently uncertain. I know in the uncertainty inequality for position and momentum, $\Delta x \Delta p \ge \hbar/2$, the presence of the greater than or equal to sign implies that the quantities are not fully known. This leads me to ask: Is uncertainty uncertain? How accurate is our knowledge of how much we know about a system? How accurate can this knowledge be? Note that this does not ask if the uncertainty principle is just a limitation of our knowledge, but if there is uncertainty in uncertainty itself. Let's consider the wave function of the ground state of the harmonic oscillator
$$
\psi_0(x) =
N_x\;
e^{- \frac{x^2}{2\sigma_x^2}}
$$
where the normalisation constant $N_x$ is defined by the relation $\int_{-\infty}^{\infty}dx |\psi_0(x)|^2 = 1$. The uncertainty of the position wave function is
$
\Delta x %= \sqrt{E[x^2] - (E[x])^2}
= \sigma_x | {
"domain": "physics.stackexchange",
"id": 66833,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "heisenberg-uncertainty-principle, error-analysis",
"url": null
} |
catkin-make, cmake
Originally posted by dornhege with karma: 31395 on 2015-09-23
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Morpheus on 2015-09-23:
When I run the command, I get: Unable to locate package ros-hydro/indigo.
Comment by dornhege on 2015-09-23:
You need to put in your ROS version only.
Comment by Mago Nick on 2015-09-23:
In your case is
sudo apt-get install ros-hydro-cmake-modules
Comment by Morpheus on 2015-09-24:
I still get the same CMake Error: Could not find a configuration file for package cmake_modules.
Comment by Morpheus on 2015-09-24:
I found the problem, I had a package that was causing the problem. I removed the package, and now catkin_make works fine. Thanks to all for your help.
Comment by filipposanfilippo on 2016-04-19:
Hi, which package did you remove to fix the issue? I have the same problem.
Comment by klindgren on 2019-06-24:
On kinetic, Mago Nick's comment worked for me.
sudo apt-get install ros-kinetic-cmake-modules | {
"domain": "robotics.stackexchange",
"id": 22695,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "catkin-make, cmake",
"url": null
} |
electric-circuits, electric-current, electrical-resistance, voltage, differentiation
Title: Is resistance the gradient in a $V/I$ graph? We have a circuit where there is a variable resistor, and we increase this resistance at a steady rate, while increasing current. Thus we have increasing voltage. The gradient is defined by $dy/dx$. Yet if we state that $R$ is the gradient, then $R$ can also be calculated by $V/I$, which does not involve limits! Thus, my question boils down to this: if $R$ is the gradient function of such a graph (as described above) then how can it be calculated by such mundane means as simply $V/I$, while in other situations this does not work and we have to differentiate? A resistor is defined as the circuit element for which the voltage across is proportional to the current through and the constant of proportionality is the resistance $R$:
$$V_R = R\cdot I_R $$
Clearly, for this linear relationship, it is also true that
$$\frac{dV_R}{dI_R} = R$$ | {
"domain": "physics.stackexchange",
"id": 26419,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-circuits, electric-current, electrical-resistance, voltage, differentiation",
"url": null
} |
for holding heavy material must be in the shape of a box with an open top and a square base. However, this benefit comes at the cost of high computational complexity. The marketing manager should be interested in revealing the complexities of an individual buyer, the dynamics of consumer behavior and should also try to. #N#function J = computeCost ( X, y, theta) #N#%COMPUTECOST Compute cost for linear regression. I want that " t and T must be greater than zero(not equal to zero) , t < T and C > 0. 15-2P = 15-2(3)= 15-6=9-6+5P=-6+5(3)=-6+15=9. If you produce a certain amount and let's say you bring in, I don't know,$10,000 of revenue and it costs you $5,000 to produce those shoes, you'll have$5,000 in profit. This study proposes a new framework to minimize the cost function of multi-objective optimization problems by using NSGA-II in economic environments. To delineate CVX specifications from surrounding Matlab code, they are preceded with the statement cvx_begin and followed with the | {
"domain": "centrosamo.it",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987568346219724,
"lm_q1q2_score": 0.8907083109416525,
"lm_q2_score": 0.90192067652954,
"openwebmath_perplexity": 1047.402508227663,
"openwebmath_score": 0.5647906064987183,
"tags": null,
"url": "http://centrosamo.it/fskn/minimize-a-cost-function.html"
} |
Another way is to do it is to perform the following transformation. Let \begin{align*} U&=\frac{X}{X+Y} \\ V&=X+Y.\end{align*} Then \begin{align*} x(u,v)&=uv\\y(u,v)&=v-uv. \end{align*} The determinant of the Jacobian of the transformation is $$\left| \begin{matrix} v & u\\ -v & 1-u \end{matrix} \right|=v.$$ Then, the joint pdf of $U$ and $V$ is $$f_{U,V}(u,v)=f_{X,Y}(uv,v-uv)|v|=ve^{-v}, \hspace{2mm} \text{for } v\geq0, 0\leq u\leq1.$$ Finally, "integrate out" the $v$ to obtain the marginal pdf of $U=X/(X+Y)$ as $$f_U(u)=\int_0^{\infty}f_{U,V}(u,v)dv=\int_0^{\infty}ve^{-v}dv=1, \hspace{2mm} \text{for } 0\leq u\leq 1.$$ Hence, as Michael Hardy showed, $X/(X+Y)$ is uniformly distributed on $[0,1].$
In other words, for each $a > 0$, you want to compute $P\left(\frac{X}{X+Y} < a \right)$.
Outline: Find the joint density of $(X,Y)$, and integrate it over the subset of the plane $\left\{ (x,y) : \frac{x}{x+y} < a \right\}$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241969600769,
"lm_q1q2_score": 0.807761700176517,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 199.21087376118024,
"openwebmath_score": 0.981741189956665,
"tags": null,
"url": "https://math.stackexchange.com/questions/412615/x-y-are-independent-exponentially-distributed-then-what-is-the-distribution-of-x/480323"
} |
thermodynamics, fluid-dynamics, fluid-statics
then after substitution:
$$P_3 = \frac{b*(T_2 - T_1) + k*P_1}{ k }$$
According to the ratio I obtained, $P_3$ does not depend on $P_2$, so I thought I was wrong. Let's assume that the volume V of the vessel is constant (neglecting expansion of the vessel itself). Let $\rho_0$ be the density of the liquid at T2 and P2, and, at arbitrary P and T, the density is $$\rho=\rho_0\exp{\left[\frac{(P-P_2)}{B}-\alpha(T-T_2)\right]}$$So the mass of liquid 2 in the tank is always $M_2=\rho_0V$. After the pressure rises to P1, the volume of liquid 2 in the tank is $$V_2(P_1,T_2)=\frac{M}{\rho_0}\exp{\left[-\frac{(P_1-P_2)}{B}\right]}=V\exp{\left[-\frac{(P_1-P_2)}{B}\right]}$$ So the volume of fluid 1 which enters the tank is $$V\left(1-\exp{\left[-\frac{(P_1-P_2)}{B}\right]}\right)$$ and the mass of fluid 1 in the tank is $$M_1= V\left(1-\exp{\left[-\frac{(P_1-P_2)}{B}\right]}\right)\rho_0\exp{\left[\frac{(P_1-P_2)}{B}-\alpha(T_1-T_2)\right]}$$
So the total mass in the vessel is now: | {
"domain": "physics.stackexchange",
"id": 79802,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, fluid-dynamics, fluid-statics",
"url": null
} |
applications. Exercise 1. Finite Math. We can transform the original data set so that the eigenvectors are the basis vectors amd find the new coordinates of the data points with respect to this new basis; Linear algebra review for change of basis; Graphical illustration of change of basis; Dimension reduction via PCA; Using Singular Value Decomposition (SVD. Computational Mathematics. 110) ENGR2300-003: LINEAR ALGEBRA FOR ENGINEERS Syllabus. We are looking for PhD students, so please consider applying! This blog is written in English. , en of Rn is completely arbitrary, and as such it is just a conven-tion invented by humans so that they can. 3 M a t r i x P r o d u c t s 6 9 2. Let R R be a commutative ring. is_full() rank equals degree (as module)? Y = GF(7)^4, T = Y. Browse other questions tagged linear-algebra change-of-basis or ask your own question. Statistics: Linear Regression. Linear transformations. Determinant of a product of two matrices. He (the determinant of a matrix, | {
"domain": "programex.pl",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765622193214,
"lm_q1q2_score": 0.8208479340997964,
"lm_q2_score": 0.8376199653600372,
"openwebmath_perplexity": 650.0741187823185,
"openwebmath_score": 0.6875345706939697,
"tags": null,
"url": "http://xbre.programex.pl/change-of-basis-linear-algebra-pdf.html"
} |
c#, asp.net-mvc
structure sB = db.structure.FirstOrDefault(s => s.PlanId == planId && s.Type == "B");
Dictionary<string, string> buttonBDictionary = new Dictionary<string, string>();
buttonBDictionary.Add("C", resultSetB.CorrespondingId != null ? "disabled" : "enabled");
buttonBDictionary.Add("R", resultSetB.ResponseId != null ? "disabled" : "enabled");
buttonBDictionary.Add("S", (sB != null && sB.Point_x != null) ? "disabled" : "enabled");
buttonBDictionary.Add("D", resultSetB.DistalId != null ? "disabled" : "enabled");
buttonBDictionary.Add("P", resultSetB.ProximalId != null ? "disabled" : "enabled");
bool bHasData = buttonBDictionary.ContainsValue("disabled");
return Json(new { buttonADictionary, buttonBDictionary, aHasData, bHasData }, JsonRequestBehavior.AllowGet);
} | {
"domain": "codereview.stackexchange",
"id": 13755,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, asp.net-mvc",
"url": null
} |
c, beginner, parsing, library
fgets(ids, MAX_STR_LEN, stdin);
if ((strlen(ids)>0) && (ids[strlen (ids) - 1] == '\n'))
ids[strlen (ids) - 1] = '\0';
id= atoi(ids);
if (id > MAX_BOOKS)
id = MAX_BOOKS;
for ( c = id - 1 ; c < MAX_BOOKS - 1 ; c++ )
books[c] = books[c+1];
fflush(stdin);
}
/*********************************************
* Function: writeBookFile()
*
* Description: writes the array of books[] to the file (overwrites)
*
* Parameters: none
*
* Return parameters: int, could the file be written? 1 = no, 0 = yes
* ********************************************/
int writeBookFile()
{
/* FileStream for the Library File */
FILE *bookFile;
if ( ( bookFile = fopen( PATH, "w" ) ) == NULL ) //Reading a file
{
printf( "File could not be opened.\n" );
return 1;
}
int i;
for(i = 0; i < MAX_BOOKS;i++)
{ | {
"domain": "codereview.stackexchange",
"id": 5775,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c, beginner, parsing, library",
"url": null
} |
deep-learning, neural-network, keras, image-classification, convolutional-neural-network
# point to a dir containing the images and not to the images themselves
path = aug_dir
save_path = 'base_dir/train_dir/' + img_class
# Create a data generator to augment the images in real time
datagen = ImageDataGenerator(
rotation_range=60,
width_shift_range=0.1,
height_shift_range=0.1,
#zoom_range=0.1,
shear_range= 0.2,
horizontal_flip=True,
vertical_flip=True,
brightness_range=(0.9,1.1),
fill_mode='nearest')
batch_size = 50
aug_datagen = datagen.flow_from_directory(path,
save_to_dir=save_path,
save_format='jpg',
target_size=(224, 224),
batch_size=batch_size) | {
"domain": "datascience.stackexchange",
"id": 5443,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "deep-learning, neural-network, keras, image-classification, convolutional-neural-network",
"url": null
} |
resonance
Title: Resonance in benzene: creation of current I am a student. I recently studied resonance in Benzene. I know that π electrons in Benzene are involved in resonance this means the electrons somewhat move in the process of resonance.
I have a question :
If electrons are moving in Benzene there should be a current?
However I have not seen any such fact in the books i am currently studying. Please tell me if this thing happens in Benzene or not. I can't comment, but benzene has a ring current and that creates a magnetic field perpendicular to the current. Conversely, a magnetic field will create an induced current (Ampere's Law) in the ring (delocalized electrons from the pi bonds). | {
"domain": "chemistry.stackexchange",
"id": 10929,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "resonance",
"url": null
} |
python, performance, numpy, simulation, numba
# Iterate through the spanwise vertex positions.
for spanwise_vertex_position in range(num_spanwise_vertices):
# Get the corresponding vertex from the first row.
wake_ring_vortex_vertex = next_wing.wake_ring_vortex_vertices[
0, spanwise_vertex_position
]
if prescribed_wake:
# If the wake is prescribed, set the velocity at this
# vertex to the freestream velocity.
velocity_at_first_row_wake_ring_vortex_vertex = (
self.current_freestream_velocity_geometry_axes
)
else: | {
"domain": "codereview.stackexchange",
"id": 40925,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, numpy, simulation, numba",
"url": null
} |
-
The metric $\epsilon$-$\delta$ definition of continuity is "local", i.e. it only speaks of continuity at a point in contrast to the topological definition. But there is of course also a topological notion of continuity of a function $f:X\to Y$ at a point $x \in X$: For all neighbourhoods $V$ of $f(x)$ there exists a neighbourhood $U$ of $x$ such that $f(U) \subseteq V$. And $f$ is continuous iff it's continuous at each $x\in X$. – kahen Jan 12 '13 at 11:14
@WantTobeAbstract: "it only speaks of continuity at a point", what's more to add? – Asaf Karagila Sep 19 '14 at 12:13
@WantTobeAbstract: (1) You can ask a new question, instead of repeatedly pinging someone in the comments. This amounts to harassment, and is frowned upon here. (2) The term local was qualified, and the idea is that it happens at a single point and not everywhere. – Asaf Karagila Sep 19 '14 at 12:17 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.970239908635611,
"lm_q1q2_score": 0.8147434119639916,
"lm_q2_score": 0.8397339716830606,
"openwebmath_perplexity": 351.2651261179596,
"openwebmath_score": 0.9457687139511108,
"tags": null,
"url": "http://math.stackexchange.com/questions/276258/open-balls-and-continuity"
} |
pl.programming-languages, type-theory
Title: Implicit vs explicit subtyping This page asserts that
many languages do not use implicit subtyping (structural equivalence), prefering explicit/declared subtyping (declaration equivalence) | {
"domain": "cstheory.stackexchange",
"id": 538,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pl.programming-languages, type-theory",
"url": null
} |
automata, regular-languages, finite-automata
We can't go over every word $x$ in $L_2$ and check if $\delta(q,x)\in F_1$
in the case when $L$ is infinite...
You are right that in general the construction is not effective. We just know how the final states are chosen, but we cannot definitely say which states are final. But in case $L_2$ is regular, we can determine which states are final, as regular languages are closed under intersection.
For any state $q$ change $M_1$ simply by setting $q$ as its new initial state (instead of $q_0$): $M_q = (Q,\Sigma,\delta,q,F_1)$. Now $q$ is final (in $F_2$) iff the intersection $L(M_q) \cap L_2$ is nonempty. Because any $x$ is the intersection is precisely an $x\in L_2$ for which $\delta(q,x)\in F_1$ as required. | {
"domain": "cs.stackexchange",
"id": 12874,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "automata, regular-languages, finite-automata",
"url": null
} |
newtonian-mechanics, harmonic-oscillator
Note that all of the reasoning in this answer supposes that the escapement provides a fixed impulse, but the problem statement never actually says that. If the escapement provides a fixed amount of energy, or applies a fixed force, the Oberth Effect doesn't apply. | {
"domain": "physics.stackexchange",
"id": 85701,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, harmonic-oscillator",
"url": null
} |
electrons, nuclear-physics, atomic-physics, orbitals
In that sense the red curve might describe the number of electron possitions at distance $r$ that can be occupied.
The blue curve resembles a distribution of electrons at some temperature $T$ (again, I dont have an experience to say that it really works like that also for electron orbitals.). | {
"domain": "physics.stackexchange",
"id": 55714,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrons, nuclear-physics, atomic-physics, orbitals",
"url": null
} |
The next pictures are a variation of the above argument that accompasses @Chilote smart answer:
Here we see the same topologist strategy to produce a bijection $A\to\mathbb R^2\setminus\{\alpha\}$.
Finally, a remark to add context to the problem. Suppose we can define a homeomorphism $f:C\to\mathbb R^n$ from a closed subset $C\subset\mathbb R^n$ onto $\mathbb R^n$. Then it extends to the Alexandroff one point compactifications $C^*\sim{\mathbb R^n}^*$. Now, that of $\mathbb R^n$ is the sphere $\mathbb S^n$ and that of $C$ is its closure in $\mathbb S^n$. But a sphere can't be homeo to a proper subset, hence the starting $f$ cannot exist. Consequently, the problem is
Is there a continuous bijection $C\to \mathbb R^2$?
Indeed, none that exists can be open, because then it would be a homeo. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9783846628255123,
"lm_q1q2_score": 0.8335375512193229,
"lm_q2_score": 0.8519527982093666,
"openwebmath_perplexity": 168.15719546406524,
"openwebmath_score": 0.9223070740699768,
"tags": null,
"url": "https://math.stackexchange.com/questions/1208457/find-fc-to-mathbbr2-continuous-and-bijective-but-not-open-c-subset-mathb"
} |
newtonian-mechanics, newtonian-gravity, work, vectors
One can notice that $h=|d|\cos(\alpha)$ is the height of the stairs.
In other words, if you project all the vectors on the vertical axis, it becomes $W=|f||d|\cos(\alpha)=|f|h$ | {
"domain": "physics.stackexchange",
"id": 52163,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, newtonian-gravity, work, vectors",
"url": null
} |
audio, source-separation
I need to change one of the drum hits. I don't need to recover it perfectly, because even if a bit of the old drum hit and a bit of noise is still there, the new drum hit that I'm going to replace it with will cover it. This is a source separation problem, which, in general is quite difficult to solve. One way to attack it is to use non-negative matrix factorization (NMF) with short-time Fourier analysis. Please see this question and a sample script here.
The overarching idea is to try to isolate your component sounds A, B, C,... using a time-frequency decomposition (or, perhaps, some other kind of subspace analysis using a different transform, like wavelet transform).
If the components don't always all play at exactly the same time, or have different onsets, you can hope to separate them temporally. If they don't all have identical frequency content, you have some hope of separating them in frequency. Or, a combination of both, which is what NMF of the STFT achieves. | {
"domain": "dsp.stackexchange",
"id": 5348,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "audio, source-separation",
"url": null
} |
ros, ros2, image-proc, image-transport
it would not be able to. Or at least not in any scalable way.
Could you link to the code (as in: specific lines)? I'm assuming you're looking at the default implementation, which is hosted in a Github repository.
Comment by clyde on 2021-10-22:
ROS2 version uses an image_transport::CameraPublisher and an image_transport::CameraSubscriber:
https://github.com/ros-perception/image_pipeline/blob/c8a1f4fea5902214d8bc4b7562e4199837b4b776/image_proc/src/resize.cpp#L53
Both of these call image_transport::getCameraInfoTopic:
CameraSubscriber: https://github.com/ros-perception/image_common/blob/b2d8d5cbaf3edad81f02c572f073368f7ce17615/image_transport/src/camera_subscriber.cpp#L125
CameraPublisher: https://github.com/ros-perception/image_common/blob/b2d8d5cbaf3edad81f02c572f073368f7ce17615/image_transport/src/camera_publisher.cpp#L92
image_transport::getCameraInfoTopic basically always returns "/camera_info": | {
"domain": "robotics.stackexchange",
"id": 37039,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros2, image-proc, image-transport",
"url": null
} |
electromagnetism, electric-circuits, maxwell-equations
Load modeling is taught in undergrad physics and electrical engineering as a linear combination of resistance ($R$), inductance ($L$) and capacitance ($C$). As I am currently learning in my grad program, load modelling in practice is more complicated than this and these circuit components are just ideal building blocks.
As an example, there might be a node on a power system which has a constant complex power, which is a mathematical simplification of the general power function in steady state AC circuits:
$$p(t)=V_{rms}I_{rms}\cos\Delta\theta(1+\cos2\omega t)+V_{rms}I_{rms}\sin\Delta\theta\sin2\omega t=\langle p \rangle(1+\cos2\omega t)+Q\sin2\omega t$$
This can be broken into its average component, $\langle p \rangle = P$, and a time-varying component which does not contribute to the average power, called reactive power or $Q$. | {
"domain": "physics.stackexchange",
"id": 82994,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, electric-circuits, maxwell-equations",
"url": null
} |
phonons
Title: What effects arises due to hybridisation of phonon branches? The phonon dispersion is usually given as the vibration frequency on its momentum space. Usually, there are 3 acoustic phonon modes and 3(N-1) optical modes, where 'N' is the number of atoms in the unit cell.
Usually, the optical modes appear at a higher frequency compared to the acoustical modes. However, in some crystals like bulk 2H-WS$_2$ (see figure below, Ref: Chem. Mater., 2014, 26 (22), pp 6628–6637), we observe three optical phonon modes which lies in the low frequency region. It can be seen that these low-lying optical modes are degenerate to the acoustic modes at certain points.
What could be the reason of such hybridisation of phonon branches? What are the probable effects of such phonon dispersion? The low-energy optical branch appears to cross the acoustic branch, but that doesn't mean that hybridization has occurred. In fact, it's an indication that hybridization has not occurred. | {
"domain": "physics.stackexchange",
"id": 30415,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "phonons",
"url": null
} |
linearly with rate 1/2. The bisection method starts with two guesses and uses a binary search algorithm to improve the answers. 1) compute a sequence of increasingly accurate estimates of the root. Consider a transcendental equation f (x) = 0 which has a zero in the interval [a,b] and f (a) * f (b) < 0. x bisection. Bisection can be shown to be an "optimal" algorithm for functions that change sigh in [a,b] in that it produces the smallest interval of uncertainty in a given # of iterations f(x) need not be continuous on [a,b] convergence is guarenteed (linearly) Disadvantages of the Bisection Method. This process involves finding a root, or solution, of an equation of the form f(x) = 0 for a given function f. View Notes - 08-Bisection-Method-4UP from MATH 2070 at University of Ontario Institute of Technology. A root is the value for which the function's plot intersects the axes origin (0, 0). The module is called bisect because it uses a basic bisection algorithm to do its work. | {
"domain": "ebildungsprojekt.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9904406020637528,
"lm_q1q2_score": 0.8317066244596371,
"lm_q2_score": 0.8397339756938818,
"openwebmath_perplexity": 442.0704401216738,
"openwebmath_score": 0.49852967262268066,
"tags": null,
"url": "http://pmkq.ebildungsprojekt.de/bisection-method.html"
} |
c++, c++11
Ok, I tried to compile your code with GCC, and it seems that you actually have errors that MSVC is not able to catch:
typename ValueType = std::decay<T>::type actually produces an error. It seems that MSVC does not properly handles the dependant names. You need to add typename before std::decay<>.
I also got a warning concerning the order of initialization of the class members in your move constructor: in idiomatic code, the members should be initialized in the order they were declared. The order of initialization should be as follows:
AnyValueSet( AnyValueSet&& other )
: m_set_index( std::move(other.m_set_index) )
, m_size_changed( std::move(other.m_size_changed) )
, m_size( std::move(other.m_size) )
{} | {
"domain": "codereview.stackexchange",
"id": 7122,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c++11",
"url": null
} |
c++, strings, c++11, reinventing-the-wheel
}
else if (funcName[1] == '4') // operator =
{
demangledName = className + "::" + funcName.substr(2) + "::operator=()";
}
else // The rest is currently ignored, but there's one for each num until 9 + A to Z.
{
std::size_t i;
for (i = 0; i < funcName.length(); ++i)
{
if (funcName[i] != '?' && funcName[i] != '_' && std::isalpha(funcName[i]))
{
break;
}
}
demangledName = className + "::" + funcName.substr(i) + "::???";
}
}
else
{
// Apparently this is a template class...
if (className.length() >= 2 && className[0] == '?' && className[1] == '$')
{
className = className.substr(2);
className += "<T>";
} | {
"domain": "codereview.stackexchange",
"id": 16762,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, strings, c++11, reinventing-the-wheel",
"url": null
} |
newtonian-mechanics, newtonian-gravity, reference-frames, free-body-diagram
Imagine your elevator in freefall example: people inside feel no gravitational force as you stated. Now imagine that the same elevator is given a momentary push perpendicular to its direction of motion, so that it now gains a horizontal component of velocity. It still is in freefall in the vertical direction, but now has a parabolic path.
As far as the vertical direction is concerned, both cases are identical. | {
"domain": "physics.stackexchange",
"id": 90589,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, newtonian-gravity, reference-frames, free-body-diagram",
"url": null
} |
neuroscience, vision
Title: If people with colorblindness lack one type of cone cells, shouldn't they be unable to recognize one particular color? The 3 types of cone cells in normal humans allow them to view 3 types of colors and any color made from mixing and matching those 3.
So, 2 types of cone cells should only allow to view just 2 types of colors and any colors made from those two.
But that is clearly not the case.
https://en.wikipedia.org/wiki/Color_blindness#Red.E2.80.93green_color_blindness
Protanopes, deuteranopes, and tritanopes are dichromats; that is, they can match any color they see with some mixture of just two primary colors (whereas normally humans are trichromats and require three primary colors). | {
"domain": "biology.stackexchange",
"id": 1233,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neuroscience, vision",
"url": null
} |
homework-and-exercises, rotational-dynamics, integration, moment-of-inertia, rigid-body-dynamics
$x = arsin\phi cos\theta$
$y = brsin\phi sin\theta$
$z = crcos\phi$
$\phi$ is the polar angle, $\theta$ is the azimuthal angle and $r$ is the radius of the sphere.
$0 \lt \phi, \theta \lt \frac{\pi}{2}$
$0 \lt r \lt 1$
(This is for the first quadrant only, the obtained answer can be multiplied 8 times corresponding to the whole space)
Step 2: The elements of the Tensor
$ I_{xy}=-\int_V\rho xy dV$
(I'm skipping the moments of inertia about the x, y, z axes here in this edit since I had no trouble calculating those)
$I_{xy} = -\iiint_V\rho xy dxdydz$
$dxdydz = r^2 abc sin\phi d\phi d\theta dr$
Step 3: Integration for $I_{xy}$
The integration is provided in the image provided herewith; | {
"domain": "physics.stackexchange",
"id": 83179,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, rotational-dynamics, integration, moment-of-inertia, rigid-body-dynamics",
"url": null
} |
$$P_k: \qquad 1+3+5+\dots+(2k-1)=k^2$$ Now we want to show that this assumption implies that $P_{k+1}$ is also a true statement: $$P_{k+1}: \qquad 1+3+5+\dots+(2k-1)+(2k+1)=(k+1)^2.$$ Since we have assumed that $P_k$ is true, we can perform operations on this equation. Note that the left side of $P_{k+1}$ is the left side of $P_k$ plus $(2k+1)$. So we start by adding $(2k+1)$ to both sides of $P_k$: \begin{align*} 1+3+\dots+(2k-1) &= k^2 &P_k\\ 1+3+\dots+(2k-1)+(2k+1) &= k^2+(2k+1) &\text{Add $(2k+1)$ to both sides.} \end{align*} Factoring the right side of this equation, we have $$1+3+\dots+(2k-1)+(2k+1) =(k+1)^2 \qquad P_{k+1}$$ But this last equation is $P_{k+1}$. Thus, we have started with $P_k$, the statement we assumed true, and performed valid operations to produce $P_{k+1}$, the statement we want to be true. In other words, we have shown that if $P_k$ is true, then $P_{k+1}$ is also true. Since both conditions in Theorem 1 are satisfied, $P_n$ is true for all positive integers | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987946222258266,
"lm_q1q2_score": 0.8565846932763611,
"lm_q2_score": 0.8670357494949105,
"openwebmath_perplexity": 166.37486381312206,
"openwebmath_score": 0.8577460646629333,
"tags": null,
"url": "https://math.stackexchange.com/questions/1645967/what-do-we-actually-prove-using-induction-theorem/1646299"
} |
matlab, fft, noise
Title: Removing noise from an audio file only in time domain? Hello I am doing some work for a course and I need to take an audio file and remove the noise from it. So far I've removed the noisy signal which is a 1000Hz pure tone using the frequency domain. I did some fourier transforms, found the ranges for my filter and voila its done.
However part of my assignment asks me to do this in two ways, implying that this can also be done in the time-domain. I'm confused as I just can't understand how I would remove a tone completely in the time domain without using frequencies.
My question is are there ways to remove noise from an audio file without using the frequency domain? | {
"domain": "dsp.stackexchange",
"id": 10741,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, fft, noise",
"url": null
} |
computer-networks, communication-protocols
Your second example's a little unclear to me as you don't state whether you're doing anything to establish reliable communication, such as acknowledgments and retransmit requests to ensure that the data gets through. You certainly need some kind of physical layer protocol because you need to agree a meaning for the behaviour of the medium (e.g., this kind of modulation of the radio wave means 0 or this voltage on the wire means 1). If you build anything on top of how to code and decode packets, that's a higher layer in the model. | {
"domain": "cs.stackexchange",
"id": 8213,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computer-networks, communication-protocols",
"url": null
} |
fluid-dynamics, computational-physics, cellular-automaton
References
(a) Uriel Frisch, Brosl Hasslacher and Yves Pomeau. Lattice-gas automata for the Navier-Stokes equation. Physical Review Letters 56, 14 (1986) 1505.
(b) Daniel H. Rothman and Stiphane Zaleski. Lattice-gas cellular automata: simple models of complex hydrodynamics. Vol. 5. Cambridge University Press, 2004.
(c)Yan, Bo, et al. "A lattice Boltzmann model for the eddy–stream equations in two-dimensional incompressible flows." Applied Mathematical Modelling 35.5 (2011): 2358-2365. Preface | {
"domain": "physics.stackexchange",
"id": 33279,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, computational-physics, cellular-automaton",
"url": null
} |
fluid-dynamics, turbulence
However, elastic turbulence in liquid polymers can occur when $Re$ is small, suggesting that the cause$\leftrightarrow$effect from above may not actually be correct, at least for the case of polymers. | {
"domain": "physics.stackexchange",
"id": 16605,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, turbulence",
"url": null
} |
homework-and-exercises, general-relativity, differential-geometry, metric-tensor, differentiation
Title: Why is the covariant derivative of the metric tensor with UPPER indices equal to zero? I've shown that $\nabla_{\lambda} g_{\mu\nu} = 0 $ rigorously by the following method:
$ \nabla_{\lambda} g_{\mu\nu} = \partial_{\lambda}g_{\mu\nu} - \Gamma^{\rho}_{\lambda\mu} g_{\rho\nu} - \Gamma^{\rho}_{\lambda\nu} g_{\mu\rho} $
$ = \partial_{\lambda}g_{\mu\nu} - \frac{1}{2}g_{\rho\nu}g^{\rho\sigma}(\partial_{\lambda}g_{\mu\sigma} + \partial_{\mu}g_{\sigma\lambda} - \partial_{\sigma}g_{\lambda\mu}) - \frac{1}{2}g_{\mu\rho}g^{\rho\sigma} (\partial_{\lambda}g_{\nu\sigma} + \partial_{\nu}g_{\sigma\lambda} - \partial_{\sigma}g_{\lambda\nu}) $
We have that $ g_{\rho\nu}g^{\rho\sigma} = \delta^{\sigma}_{\nu}$ and $ g_{\mu\rho}g^{\rho\sigma} = \delta^{\sigma}_{\mu} $ so, | {
"domain": "physics.stackexchange",
"id": 77217,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, general-relativity, differential-geometry, metric-tensor, differentiation",
"url": null
} |
xml
Title: Robot manipulator waypoint trajectory planning and execution
I would like to create a robot program that reads in a set of arm waypoints from a file and then executes a trajectory through those waypoints. It seems like this should already exist?
Assuming it doesn't I plan to use a planner to plan the segments individually and then apply a filter to the whole path. This will require multiple service calls and could take a while. Is there a better approach?
Also, is there an xml/yaml format and parser somewhere that I could use for this. Seems straightforward enough, but I would like to reuse code/formats if they already exist.
Originally posted by sedwards on ROS Answers with karma: 1601 on 2013-03-12
Post score: 0
What follows is based on the arm_navigation stack. A similar alternative might exist for MoveIt, but I'm not familiar with it. | {
"domain": "robotics.stackexchange",
"id": 13335,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "xml",
"url": null
} |
javascript, object-oriented, datetime, ecmascript-6
Notice what makes a good error message: it tells me exactly what I've screwed up.
It would be even better if it went on and explained what is a valid argument, but I'll go ahead and assume that it's obvious in this case for brevity.
In order to avoid repeating, you can extract the validation as a method.
The method would act as a no-op function in case everything is OK, but throw if something's wrong.
It's a good candidate for a static method, since it's clearly tightly coupled with the Duration class.
static throwIfError(arg, argName) {
if (!Duration.VALIDATION.test(arg)) {
throw new Error(`The "${argName}" argument (${arg}) is in wrong format.`);
}
return arg;
}
constructor(start, end) {
this.start = Duration.throwIfError(start, 'start');
this.end = Duration.throwIfError(end, 'end');
}
The second argument is just for a prettier message.
Now, when I try my example, new Date("12:00", "1300"), I get an error message saying this: | {
"domain": "codereview.stackexchange",
"id": 31808,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, object-oriented, datetime, ecmascript-6",
"url": null
} |
ros-indigo
I am using ROS Indigo on Ubuntu 14.04 LTS PC. Any workaround, please?
Originally posted by ravijoshi on ROS Answers with karma: 1744 on 2018-05-12
Post score: 0
You somehow expect the subscriber to magically guess how to transform a pcl::PointXYZRGB to an Eigen::MatrixXf. There is no obvious conversion from a colored point to a Matrix. (And even it there was some, publishers and subscribers and not meant for data conversion).
You have to subscribe with the correct datatype (namely what was published) and then afterwards you can run your custom conversion.
Originally posted by NEngelhard with karma: 3519 on 2018-05-12
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by ravijoshi on 2018-05-12:
Thanks a lot. I was just wondering if I have missed some portion of the documentation! | {
"domain": "robotics.stackexchange",
"id": 30806,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-indigo",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.