text
stringlengths
49
10.4k
source
dict
discrete-signals, dft, sampling, theory Title: DFT independent variable as fraction of sampling rate When the frequency domain's independent variable is labeled as a fraction of the sampling rate, the values along the horizontal axis always run between $0$ and $0.5$, since discrete data can only contain frequencies between DC ($0$) and half the sampling rate. But why is the highest frequency pegged at exactly $0.5$ of the sampling rate? Isn't it possible to have a scenario where the highest frequency is less than half the sampling rate? E.g., consider a speech signal that has been filtered to remove all frequencies above $3.3$ kHz and has been sampled at $10$ kHz. The highest frequency ($3.3$ kHz) is less than $0.5$ of the sampling rate ($5$ kHz). How would the frequency domain of this signal (labeled as a fraction of the sampling rate) look like? The DFT calculates spectral components up to $f_\mathrm{s}/2$, no matter what the input signal is. If the input signal to the DFT contains (absolutely) no spectral components between $0.33 f_\mathrm{s}$ and $0.5 f_\mathrm{s}$ the corresponding DFT outputs are zero (assuming that there is no spectral leakage).
{ "domain": "dsp.stackexchange", "id": 2223, "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": "discrete-signals, dft, sampling, theory", "url": null }
signal-analysis, acoustics, audio-processing, electrical-signal, digital-to-analog Title: What is the difference between undersampling and oversampling in analog to digital conversion ? When converting a signal from analog to digital, we observe undersampling and oversampling. Does oversampling means that the sampling frequency is greater that the signal's frequency and does undersampling means that the sampling frequency is less than the signal's frequency ? Good question as you can actually undersample and oversample at the same time! See my "DSP Puzzle" question on that specifically here: How do you simultaneously undersample and oversample? To best explain undersampling and oversampling, it is worthwhile understanding the concept of "Nyquist Zones" first. This was explained in detail recently at this post: Higher order harmonics during sampling From which I am copying some graphics for further explanation here. Sampling in the 1st Nyquist Zone, as in the graphic below, occurs when the real analog signal is located anywhere in the frequency range of DC to half of the sampling rate. Sampling at twice the highest frequency (and actually twice the highest bandwidth, as we will see more clearly when describing "under-sampling") is the minimum necessary condition to capture all information within that bandwidth according to the Nyquist-Shannon theorem. In practice to allow for achievable anti-aliasing filtering in the analog we need to sample a little higher than this, typically 20 to 30%. The graphic below shows the related processing spectrums when sampling an analog input signal that is in the "first Nyquist Zone". The colors are related to other discussion that is detailed in the link I gave above but not important here.
{ "domain": "dsp.stackexchange", "id": 7112, "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": "signal-analysis, acoustics, audio-processing, electrical-signal, digital-to-analog", "url": null }
quantum-field-theory, feynman-diagrams, fermions, interactions I have three questions about this. (1) I see that the two groups of delta functions comes from pairing each incoming arrow with each outgoing arrow. Why isn't there a relative sign that comes from permuting the $\psi$'s to make these different pairings? (2) Why doesn't the factor of $1/2$ from the Lagrangian end up in the Feynman rule? (3) It seems like these combinations of delta functions overcount some terms because they don't take into account fermi statistics. For example, say I chose the representation \begin{equation} \gamma^0=\sigma_1, \gamma^1=i\sigma_2 \end{equation} and then, for $N=1$ (dropping species subscripts), calculate \begin{equation} (\bar{\psi}\psi)^2=\psi^{\dagger}\gamma^0\psi \psi^{\dagger}\gamma^0\psi = (\psi^2)^{*}\psi^1(\psi^2)^{*}\psi^1+(\psi^2)^{*}\psi^1(\psi^1)^{*}\psi^2+(\psi^1)^{*}\psi^2(\psi^2)^{*}\psi^1+(\psi^1)^{*}\psi^2(\psi^1)^{*}\psi^2 =2(\psi^1)^{*}\psi^2(\psi^2)^{*}\psi^1 \end{equation} where the superscripts are spinor indices, and some terms are zero by fermi statistics. A term like this can certainly be produced by the Feynman rule above. But it appears as though the Feynman rule is making extra terms like $(\psi^1)^{*}\psi^1(\psi^1)^{*}\psi^1$. Shouldn't those be zero by fermi statistics? Is there something wrong with this Feynman rule? I think this resolves the issues:
{ "domain": "physics.stackexchange", "id": 93480, "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-field-theory, feynman-diagrams, fermions, interactions", "url": null }
• If the first and last people in the circle are not part of a pair, there are $\binom{2n-k}{k}$ ways to place the pairs on the necklace. • If the first and last people in the circle are in a pair, there are $(2n-2)-(k-1)$ or $2n-k-1$ other moving parts, of which $k-1$ are pairs. For the case $k=0$ the formula above gives $\binom{2n}0+\binom{2n-1}{-1}=1+0=1,$ and for $k=n$ it gives $2$. I side with Andrew Woods on this question. The correct coefficient to use is $$P(n,k) = \left(\binom{2n-k}{k}+\binom{2n-k-1}{k-1}\right)\text{,}$$ the number of ways to distribute $k$ non-overlapping pairs in a circle of $2n$ items. $$\text{Andrew}(n) = \sum_{k=0}^{n} (-1)^k \left(\binom{2n-k}{k}+\binom{2n-k-1}{k-1}\right)(2n-2k-1)!!$$ This does not give the same result as your formula. For example see $n=3$ where $4$ seatings are possible. Andrew's formula correctly computes this but yours returns $5$. Your formula is still close though: $$\text{Andrew}(n) = \text{Sam}(n) - \text{Sam(n-1)}$$ I didn't check that formally but numerically it holds: https://gist.github.com/roSievers/051dc9c7a736e3d959e7 Here is another way reason about $P(n,k)$:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.971129093889291, "lm_q1q2_score": 0.8195310881877508, "lm_q2_score": 0.8438951045175643, "openwebmath_perplexity": 210.45355765739507, "openwebmath_score": 0.711143434047699, "tags": null, "url": "https://math.stackexchange.com/questions/1189554/number-of-pairs-formed-from-2n-people-sitting-in-a-circle" }
noise, wavelet, gaussian, denoising Title: Additive White Gaussian Noise (AWGN) and Undecimated DWT One of the benefits of DWT is that it is an orthonormal transform. There are statements that the energy of noise component mainly concentrates on the high-frequency (detail) part and distributes homogeneously. The energy of noise component is included in more wavelet coefficients with smaller amplitudes, while the energy of the useful signal concentrates on fewer wavelet coefficients with bigger amplitudes. See Wavelet Denoising of Well Logs and its Geological Performance. As far as I understand, that is due to the orthogonality property of DWT. Does this behavior of white Gaussian noise also hold true: for undecimated DWT (like SWT or MODWT). for less redundant forms of DWT (comparing to undecimated version) - DTCWT, for example. As far as I understand both of them aren't orthogonal transforms. One of the benefits of DWT is that it is an orthonormal transform
{ "domain": "dsp.stackexchange", "id": 4842, "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": "noise, wavelet, gaussian, denoising", "url": null }
machine-learning, ranking, search Title: Preparing for a Machine Learning Design Interview I am not sure if this is a relevant post here but: I made it to the final round for the Machine Learing Engineer position at Facebook. The final round interview is virtual (thanks to Corona) and will consist of: 2 - General Algorithmic Coding questions 1 - Machine Learning Design 1 - General Systems Design 1 - Career Background Most of these I know what I need to do to prepare but the content given to me for the Machine Learning Design is scarce to say the least but typical example questions for these are: Design a newsfeed ranking algorithm Design local search ranking Design if an old post would be good for "On this Day" memories feature This is the key highlights of what is expected for the Machine Learning Design interview: You should be able to describe the components of an end-to-end ML system, including but not limited to; model development, evaluation, and deployment. You should be able to use existing toolsets to model the problem and break down its components. Be ready to analyze your approach while understanding the tradeoffs between your design decisions. We expect you to have a good understanding of common ML tools/techniques, but we do not expect you to know and memorize every ML algorithm out there. Now, although I know Machine learning decently well (I would like to think so) and I do mainly do Machine/Deep learning at my curreny job. I have never designed a Machine learning system. Thus I am not sure how to prepare for this particular portion of the interview and I have not really found much material online in terms of designing machine learning system. Any advice would be greatly appreciated. My interview is set in the beginning week of April. To wrap up you can have the following to prepare for ML interviews: Machine Learning Engineering Book Machine Learning Systems Towards Data Science (Medium): They have a lot of interesting posts there. And don't forget Data Science Stack Exchange. On this site, you can have a lot of interesting questions and answers. If you don't know the answer for your interview question, feel free to drop it here.
{ "domain": "datascience.stackexchange", "id": 8852, "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": "machine-learning, ranking, search", "url": null }
javascript, dom CSS: .dropdownContent:not(.visible) { display: none; } JS: var dropdowns = document.querySelectorAll('.dropdown'); for (var i = 0; i < dropdowns.length; i++) { var dropdown = dropdowns[i]; var content = dropdown.querySelector('.dropdownContent'); dropdown.querySelector('.openDropdown').addEventListener('click', function() { content.classList.toggle('visible'); } } Part of the reason I used classes as opposed to direct styling is it's easier to toggle; but also, the other options for display: properties can often conflict with a developer's attempt to show/hide it. inline-block is very useful, but has previously been messed up for me because of code that was showing/hiding an element and overrode that. EDIT: RoToRa found a bug in the above code - the closure generation for the addEventListener block will preserve the variable content, but that variable will change before the loop actually finishes, so in the end it will only apply to the last instance. (You won't notice the issue if you only have one dropdown) Here's my attempt at a fix: Note the arguments to the listener, and the .bind at the end. var dropdowns = document.querySelectorAll('.dropdown'); for (var i = 0; i < dropdowns.length; i++) { var dropdown = dropdowns[i]; var content = dropdown.querySelector('.dropdownContent'); dropdown.querySelector('.openDropdown').addEventListener('click', function(content, evt) { content.classList.toggle('visible'); }.bind(null, content); }
{ "domain": "codereview.stackexchange", "id": 17094, "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, dom", "url": null }
javascript, game, dom Title: Self-playing Baseball game The Demo for what I have made is located here Basically I am trying to make a self playing JavaScript baseball game with the use of no libraries. Is there anything I could improve on in the code? var writeDown = { delay: 110, add: null, div: document.getElementById('playArea'), log: function() { var args = arguments; if (args.length == 0) { args = ['']; } var div = this.div; setTimeout(function() { //console.log(args[0]); div.innerHTML = args[0] + "<br/>" + div.innerHTML; }, this.delay); if (this.add == null) { this.add = this.delay; } this.delay += this.add; }, updateDiv: function(msg, div) { setTimeout(function() { //console.log(msg, div); div.innerHTML = msg; }, this.delay); }, updateDiv_delay: function(msg, div) { setTimeout(function() { document.getElementById(div).innerHTML = msg; }, this.delay); }, updateDiv_color: function(color, div) { setTimeout(function() { //console.log(color, div); document.getElementById(div).style.background = color; }, this.delay); } } var Diamond = function(d_name, d_id) { var name = d_name; var diamond = document.getElementById(d_id); var bases = { first: false, second: false, third: false, home: false }; var players = { first: false, second: false, third: false, home: false };
{ "domain": "codereview.stackexchange", "id": 32067, "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, game, dom", "url": null }
particle-physics, beyond-the-standard-model, large-hadron-collider, magnetic-monopoles, grand-unification Directly experimentally, the lower bound on the mass is just 500 GeV or so, but when some theory is wisely added, the mass is pretty much required to be exponentially higher than the TeV scale. In particular, some kind of unification seems necessary to allow the magnetic monopoles, and unification such as GUT can only appear at very high scales, such as the GUT scale of $10^{16}$ GeV: that's where the electromagnetic $U(1)$ may be embedded in a larger group that allows a topologically nontrivial solution (the $SU(2)$ of the weak interactions is not enough - it doesn't contain the hypercharge which has to be twisted as well). So it's unlikely that direct detection succeeds. Inflation has probably diluted the concentration of those massive magnetic monopoles to a very tiny number.
{ "domain": "physics.stackexchange", "id": 551, "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": "particle-physics, beyond-the-standard-model, large-hadron-collider, magnetic-monopoles, grand-unification", "url": null }
for the multiplication, $$\begin{split} \xi(r_1r_2) = \phi ( \varphi (r_1r_2) ) = \phi ( r_{1}^{'} r_{2}^{'} ) = r_{1}^{''} r_{2}^{''} = \phi ( \varphi (r_1) ) \phi ( \varphi (r_2) ) =\xi(r_1) \xi(r_2) \end{split}$$ and for the unit element in $R$, Then, $$\begin{split} \xi(1_{R}) &= \phi ( \varphi (1_{R}) ) = \phi ( 1_{R'} ) = 1_{R''} \end{split}$$ Hence, $\xi$ is a ring homomprphism. Doubt: 1) Is the proof right? 2) If this is right, is this (i.e. $\xi$) the unique ring homomorphism? I have no idea of how to prove uniqueness result if it's true. ## 1 Answer The proof is fine. Your question on uniqueness exhibits a slight misunderstanding. Actually the second sentence of the proposition is written awkwardly. It should read: Then the composition function $\xi= \phi \circ \varphi$ is a homomorphism $\xi : R \rightarrow R''$. The composition function is defined and exists on the underlying sets. What you have done is to show that if its factors are homomorphisms then it is one also. There is really no question of uniqueness.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713878802045, "lm_q1q2_score": 0.825282981792659, "lm_q2_score": 0.8376199613065411, "openwebmath_perplexity": 262.02009107218896, "openwebmath_score": 0.9711309671401978, "tags": null, "url": "https://math.stackexchange.com/questions/2493315/homomorphism-of-rings-from-composition-of-2-ring-homomorphisms" }
c++, beginner, object-oriented, role-playing-game while (state != States::QUIT) { if (state == States::NEW_GAME) { Chapter = 0; Events *intro = new Events("Intro", "You have woken up in a cave there appears to be no exit from where you are\n You hear a voice """"Our purpose is to guide you."""" Unsure of what that was about you decide\n To press forward hoping to find an exit.", 0); cout << R[Chapter].Name.c_str() << endl;; cin >> commandR; } } if (isrunning == false) { //I had a lot of this earlier that I removed to focus on the Game engine. SDL_DestroyWindow(W.window); SDL_FreeSurface(imageSurface); SDL_DestroyRenderer(render); render = nullptr; W.window = nullptr; imageSurface = nullptr; windowSurface = nullptr; } } Game::~Game() { } Character.h #pragma once #include <iostream> #include <SDL.h> #include "Item.h" class Character { public: Character(); enum class Party_members { MUSUNGO, DOKU, SARAH, SARUTO, OGUMO, KEN }; enum class Classes { HUMAN, DHUMAN, DRAGON, DREAM_WEAVER, SHINIGAMI, SOUL_EATER}; enum class Status { NORMAL, DEAD, POISEND, BURNED }; enum class Fighting_styles { SWORDSMAN, MAGE, THEIF, ASSAIN, DRAGOON, GUNMAN }; enum class Musungo_State { NORMAL, UNDEAD, GHOST }; private: SDL_Texture *Player; int _Health; double _Experience; std::string _Name; int _Level; double _Speed; double _Magic; double _Strength; bool _isDragon; bool _InParty;
{ "domain": "codereview.stackexchange", "id": 26757, "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, role-playing-game", "url": null }
cv-bridge Title: CV bridge OpenCV4 error ROS Noetic Ubuntu 20.04 When I include cv_bridge like this: #include <cv_bridge/cv_bridge.h> and then use: catkin build <project_name> I get this error: /opt/ros/noetic/include/cv_bridge/cv_bridge.h:43:10: fatal error: opencv2/core/core.hpp: No such file or directory 43 | #include <opencv2/core/core.hpp> I installed the full version of Noetic. Is there a way to fix this? Am I missing any additional things in my CMake or xml file? All that I have added is the following: <build_depend>cv_bridge</build_depend> target_link_libraries(Color ${catkin_LIBRARIES} ${OpenCV_INCLUDE_DIRS}) As far asmy knowledge goed, Noetic comes with OpenCV4, while cv_bridge is trying to include Opencv2 Originally posted by Bender_From_Futurama on ROS Answers with karma: 3 on 2021-09-20 Post score: 0 Original comments Comment by Ranjit Kathiriya on 2021-09-20: Did you include cv_bridge in your Cmake? On find_package On catkin_package Comment by Bender_From_Futurama on 2021-09-20: Yes you are correct. I was missing it in find_package. My bad. Although, im not sure if it should be added to catkin_package, as it gave me additional errors when added there. Thanks Ranjit Did you include cv_bridge in your Cmake? On find_package On catkin_package Originally posted by Ranjit Kathiriya with karma: 1622 on 2021-09-20 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 36927, "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": "cv-bridge", "url": null }
python, performance, python-3.x, numpy, simulation 134 10000 5107803.0 510.8 0.3 fitness_list = population[0, :]/population.sum(axis=0) 135 10000 1244299.0 124.4 0.1 fitness_list = fitness_list/fitness_list.sum() 136 10000 213078.0 21.3 0.0 population = population[:, np.random.choice(population.shape[1], 137 10000 110896.0 11.1 0.0 population_size, 138 10000 111486.0 11.1 0.0 replace=False, 139 10000 49497963.0 4949.8 3.1 p=fitness_list)] 140 elif population.size == 0: 141 for i in range(2): 142 yield (gen+i, *(0, 0)*9, population_size, 143 cell_size, mutation_rate, replication_rate_p, "aft") 144 print(f"{gen} generations are done.") 145 print("Cells are extinct.", file=DEAD_OR_ALIVE) 146 147 10000 260742.0 26.1 0.0 if (gen % 100 == 0) & (population.size > 0): 148 100 1332898.0 13329.0 0.1 yield (gen, *population_stats(population), population_size, 149 100 2553.0 25.5 0.0 cell_size, mutation_rate, replication_rate_p, "aft") 150 151 10000 147525.0 14.8 0.0 if (gen % 1000 == 0) & (population.size > 0): 152 10 21265.0 2126.5 0.0 print(f"{gen} generations are done.") 153 154 1 226.0 226.0 0.0 print("Simulation ended successfully.\n", file=DEAD_OR_ALIVE)
{ "domain": "codereview.stackexchange", "id": 37631, "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, python-3.x, numpy, simulation", "url": null }
Let’s check that the probability of finding an absolute t above 2.512 is indeed around 2.2 percent, by drawing a hundred thousand random samples from the Dutch and Flemish populations. In the simulation, we assume that the null hypothesis is true, so that: • the true population means are the same ($$\mu_d = \mu_f = 50$$; the exact number doesn’t matter) • the true standard deviations are the same as well ($$\sigma_d = \sigma_f = 8$$) Here is how you obtain the data for one such an experiment (not 100,000 yet): numberOfParticipantsPerGroup = 10 mu.d = mu.f = 50 sigma.d = sigma.f = 8 data.d = rnorm (numberOfParticipantsPerGroup, mu.d, sigma.d) data.f = rnorm (numberOfParticipantsPerGroup, mu.f, sigma.f) data.d data.f ## [1] 46.01451 53.06159 58.37237 55.26379 43.74593 49.95321 55.10986 ## [8] 45.29203 47.70117 48.67666 ## [1] 62.36448 54.69570 59.98880 62.60507 47.95375 51.00754 48.28727 ## [8] 44.34768 58.20126 48.39343 You get the t-value from such data as follows:
{ "domain": "uva.nl", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806540875629, "lm_q1q2_score": 0.8774132420048512, "lm_q2_score": 0.894789468206764, "openwebmath_perplexity": 2259.715928483653, "openwebmath_score": 0.6617834568023682, "tags": null, "url": "http://fonsg3.hum.uva.nl/paul/methoden/comparingPvalues.html" }
random variables. When r is closer to 1 it indicates a strong positive relationship. 80, it is said to have very good reliability; if it is below. How well does your regression equation truly represent your set of data? One of the ways to determine the answer to this question is to exam the correlation coefficient and the The coefficient of determination, r 2, is useful because it gives the proportion of the variance. A group of 80 candidates have their average height is 145. After we look at the process, we will see how to use it to calculate a standard deviation. If you want a question answered then you should ask in the Ask the Tutor Forum where we always answer within 48 hours (and usually much,much It is a measure of how well the variables correlate with each other (or 'match' with each other). coefficient of determination. The Formula for Spearman Rank Correlation $$r_R = 1 – \frac{6\Sigma_i {d_i}^2}{n(n^2 – 1)}$$ where n is the number of data points of the two variables and d i is the difference in the ranks of the i th element of each random variable considered. Learning Exercise 1. A number close to 1 means two factors are positively correlated—they rise or fall together and at the same magnitude. We derive an optimal Bayes classifier for the MCC metric using an approach based on Frechet derivative. Coefficient of Determination (R2) Measures usefulness of regression prediction R2 (or r2, the square of the correlation): measures what fraction of the variation in the values of the response variable (y) is explained by the regression line r=1: R2=1: regression line explains all (100%) of the variation in y. 46(5):423-9, 1993 May. Excel CORREL function. Chi-Squared Test for Multiple Proportions; Chi-Squared Test for Contingency; Approximations of distributions; Point Estimates (12:07, 28 March 2007 (UTC)) Unbiasedness; Measures of goodness; UMVUE; Completeness; Sufficiency and Minimal Sufficiency; Ancillarity; Practice Problems. The correlation coefficient ranges from −1 to 1. Pearson correlation coefficient is a measure of the strength of a linear association between two variables — denoted by r. Correlation Coefficient. C) positive correlation coefficient. problem
{ "domain": "melandrisrl.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964220125032, "lm_q1q2_score": 0.8212384090946907, "lm_q2_score": 0.8333245973817158, "openwebmath_perplexity": 690.1947899677858, "openwebmath_score": 0.5935089588165283, "tags": null, "url": "http://emok.melandrisrl.it/correlation-coefficient-problems-with-answers.html" }
quantum-mechanics, angular-momentum, group-theory, representation-theory, wigner-eckart then the author states that the through this formula the $i$- $j$- and $l$- dependence of the matrix element are all in the Clebsch-Gordan coefficients which can be determined through the representation theory. My first question is, how can we derive the last formula through the process described above? I have tried but I can't get the right result:$$\left\langle e_{\lambda}^{l}\left|O_{i}^{\mu}\right| e_{j}^{v}\right\rangle=\sum_{\alpha, \lambda^{\prime}, l^{\prime}}\langle e_{\lambda}^{l}\left|w_{\alpha l^{\prime}}^{\lambda^{\prime}}\right\rangle\langle\alpha, \lambda^{\prime}, l^{\prime}(\mu, v) i, j\rangle \\=\sum_{\alpha , l^{\prime}}\langle e_{\lambda}^{l}\left|w_{\alpha l^{\prime}}^{\lambda}\right\rangle\langle\alpha, \lambda, l^{\prime}(\mu, v) i, j\rangle$$the second equality is due to the orthogonality of different irreducible sets.
{ "domain": "physics.stackexchange", "id": 89695, "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, angular-momentum, group-theory, representation-theory, wigner-eckart", "url": null }
special-relativity, spacetime, speed-of-light, time-dilation Title: Does the center of a star age faster than its relativistic equatorial surface? If so, how does it maintain its speed and spherical shape? Imagine a massive (the diameter is millions of miles across) star rotating on its axis at relativistic speeds. Assume, now, that the center of the star is stationary. Note that the center of the star ages faster than a point in the peripheral equator of the star, as the center is at rest. I assume that time for the center passes faster than at the equator. I expect that the equator will change its shape to be narrower and never achieve a spherical shape. If the above thought is correct, how would such a star survive? Would the decay of the mass in the center occur faster, collapse faster or split in half? And if so, how is the center of the sun's gravity stronger than at its surface? Remember that we are talking about a star spinning at relativistic speeds. Quote: "Imagine a massive (the diameter is millions of miles across) star rotating on its axis at relativistic speeds. Assume, now, that the center of the star is stationary. Note that the center of the star ages faster than a point in the peripheral equator of the star, as the center is at rest. I assume that time for the center passes faster than at the equator."
{ "domain": "physics.stackexchange", "id": 40852, "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": "special-relativity, spacetime, speed-of-light, time-dilation", "url": null }
lambda-calculus, combinatory-logic Title: Trouble Replicating Proof of The Lambda Calculus Fixed Point Theorem From pg. 35 of Lambda Calculus and Combinators An Introduction: Corollary 3.3.1 in $\lambda$ and $CL$: for every $Z$ and $n \ge 0$, the equation $$ xy_1 \ldots y_n = Z $$ can be solved for $x$. That is, there is a term $X$ such that $$ Xy_1 \ldots y_n =_{\beta, w} [X/x]Z. $$ Proof: Choose $X \equiv \mathsf{Y} (\lambda x y_1 \ldots y_n.Z)$.
{ "domain": "cs.stackexchange", "id": 8107, "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": "lambda-calculus, combinatory-logic", "url": null }
Upper bound of an analytic function (application of Pick's Lemma) Let $f$ be holomorphic and non zero in the disk $|z|<1$ with $|f(z)|\leqslant 1$ in $|z|<1$ and $f(0)= e^{-1}$ . What is the best possible bound upper bound for $|f'(0)|?$ Is this bound attained? If so, for what function $f$? So, I applied Pick's Lemma and got the bound $1-e^{-2}$, and according to the same lemma I can claim that this bound can be attained if the function is conformal self map of $\mathbb D$. I did not see how can I get the function. I can guess it should be related somehow with the non-zero behavior of $f$ in the unit disk. But I stuck. Please help. - How can the function be a conformal self map of $\mathbb D$ if $f(z)\ne0$ for all $z$? –  Mario Carneiro Jan 2 '13 at 5:33 By a straight application of Pick's lemma, $|f'(0)|\le1-e^{-2}$. However, the fact that $f(z)\ne0$ throws a wrench in the search for a best upper bound. A lower bound on the supremum can be observed in the solution $\varphi(z)=\exp\big(\!\frac{z-1}{z+1}\!\big)$, which satisfies $\varphi(0)=e^{-1}$, $\varphi(1)=1$, and has an essential singularity at $z=-1$, and $\varphi'(0)=2/e$, so this proves that $\sup_f|f'(0)|\ge2/e$. There is still a gap between $2/e$ and $1-e^{-2}$, though, so there is still work to be done.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9875683495127004, "lm_q1q2_score": 0.8186337349544169, "lm_q2_score": 0.8289388125473629, "openwebmath_perplexity": 121.97166282553489, "openwebmath_score": 0.9843569993972778, "tags": null, "url": "http://math.stackexchange.com/questions/268984/upper-bound-of-an-analytic-function-application-of-picks-lemma" }
genetics, gene-expression, mrna, protein-expression, microarray You can think of the microarray and RNASeq approaches as a fishing expeditions. If you find mRNAs that are only present after the cell receives a stimulus or an insult, expression of the mRNA has occurred (whether or not the amounts are directly proportional to the rate of synthesis). If the mRNA is synthesised you can assume it is translated into the protein it encodes. In the case of gamma irradiation you might assume any mRNA that shows a large increase in quantity encodes a protein that involved in protecting the cell from the radiation. This will be of scientific interest, especially if it is not what one anticipated.
{ "domain": "biology.stackexchange", "id": 10910, "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": "genetics, gene-expression, mrna, protein-expression, microarray", "url": null }
\begin{aligned} E\left[\left(n\bar y\right)^4\right] &= \sum_{j=0}^{2}\binom{4}{2j} (n\mu)^{4-2j} \left(n\sigma^2\right)^j\frac{(2j)!}{2^jj!}\\ &= \left(n\mu\right)^4\frac{(0)!}{2^00!} + 6\left(n\mu\right)^2\left(n\sigma^2\right)\frac{(2)!}{2^11!} + \left(n\sigma^2\right)^2\frac{(4)!}{2^22!}\\ &= \mu^4n^4\, + \, 6\mu^2\sigma^2n^3\, + \, 3\sigma^4n^2. \end{aligned} • Thanks for the very nice and very general answer! Yes, the example was intended to include that the $y_i$'s are independent, i.e. $\Sigma_{ij} = 0$ for all $i \neq j$, but you're right, I didn't say that explicitly. Nov 5 at 9:46
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754501811437, "lm_q1q2_score": 0.8072468568070528, "lm_q2_score": 0.8198933425148213, "openwebmath_perplexity": 465.5404016986471, "openwebmath_score": 0.9940391778945923, "tags": null, "url": "https://stats.stackexchange.com/questions/499094/what-is-the-expectation-of-left-langle-n-bary4-right-rangle-if-y-i" }
ros, navigation, laser, path, amcl Title: dual laser source for navigation hi, All, I am using an LMS100 for localization and one hokuyo URG laser for local path planing. question is, how do I specify which one goes where? I am using Navigational Stack and in the costmap_common_params.yaml, following parameters are set observation_sources: laser_scan_sensor point_cloud_sensor laser_scan_sensor: {sensor_frame: base_laser, data_type: LaserScan, topic: scan, marking: true, clearing: true} point_cloud_sensor: {sensor_frame: base_laser, data_type: PointCloud, topic: point_cloud, marking: true, clearing: true} how do I specify which one is for AMCL which one is for local path plan? regards Ray Originally posted by dreamcase on ROS Answers with karma: 91 on 2014-08-12 Post score: 1 All of the yaml files for navigation refer to planning. In your case, all of the laser sources there should reference your Hokuyo. To use a different laser with AMCL, simply write an amcl launch file which remaps the input laser topic to AMCL to use your laser. You'll probably want to replace default amcl_onmi.launch that comes with amcl with something like: <launch> <node pkg="amcl" type="amcl" name="amcl"> <remap from="scan" to="sick_laser"/> <!-- remap laser input to use your sick laser -->
{ "domain": "robotics.stackexchange", "id": 19003, "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, navigation, laser, path, amcl", "url": null }
radiation, material-science, radioactivity Title: Working out the penetration of radioactive decay products From my understanding of the products of radioactive decay (alpha particles, beta particles, and gamma are all I know of), the particles (or energy I guess?) are stopped by a medium according to it's density, and the atomic size of the atoms that make it up (I could quite easily be wrong). Without conducting an experiment, how would you calculate how far the three types of radioactive decay can travel through a certain material, knowing only the material's density (or any other documentable property)? We take into account the inelastic interactions that take place between the respective type of particle and the material, i.e. interaction that can consume part of the energy of the radiation particle, and calculate the mean-free path of the respective type of particle in the material. In this calculus we also consider the density and the structure of the material. In general, for particles with rest-mass, the higher is the velocity, the lower is the cross section of interaction with the material, and longer the free path in it. But the charge of the particle and mass are also relevant. For instance, $\alpha$ particles although very energetic, have low velocities, are highly ionizing and can travel only a few centimeters in air. The opposite example are $\gamma$ rays. The higher is their energy the harder is to stop them. Before being finally being absorbed by some photoelectric event or pair production (for energy > 1.02Mev), they can interact a lot on the way by Compton scattering. Thick walls of concrete are needed to stop them, or isolation by lead layers. $\beta$ radiation has intermediate properties.
{ "domain": "physics.stackexchange", "id": 20061, "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": "radiation, material-science, radioactivity", "url": null }
lagrangian-formalism, field-theory, gauge-theory, chern-simons-theory, boundary-terms \end{align} where $$I_{\partial M}[U;A]=\frac{k}{4\pi}\int_{M}\mathrm{tr}\left\{d\left[(dU)U^{-1}\wedge A\right]\right\}=\frac{k}{4\pi}\int_{\partial M}\mathrm{tr}\left[(dU)U^{-1}\wedge A\right]$$ and $$\Omega[U]=\frac{k}{12\pi}\int_{M}\mathrm{tr}(U^{-1}dU\wedge U^{-1}dU\wedge U^{-1}dU).$$ Then, we immediately encounters two difficulties:
{ "domain": "physics.stackexchange", "id": 88713, "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": "lagrangian-formalism, field-theory, gauge-theory, chern-simons-theory, boundary-terms", "url": null }
javascript, algorithm, programming-challenge, linked-list, ecmascript-6 Title: Rotate a linked list to the right by k places The task Given a linked list and a positive integer k, rotate the list to the right by k places. For example, given the linked list 7 -> 7 -> 3 -> 5 and k = 2, it should become 3 -> 5 -> 7 -> 7. Given the linked list 1 -> 2 -> 3 -> 4 -> 5 and k = 3, it should become 3 -> 4 -> 5 -> 1 -> 2. My solution class LinkedNode { constructor(value, next = null) { this.value = value; this.next = next; } } const n4 = new LinkedNode(5); const n3 = new LinkedNode(3, n4); const n2 = new LinkedNode(7, n3); const n1 = new LinkedNode(7, n2); let n = n1; const rotate = (l, k) => { let p = l; const first = l; let last; let res; let i = 0; while(p) { i++; if (!p.next) { last = p; } p = p.next; } const size = i; if (!(k % size)) { return l; } const aim = size - (k % size) - 1; p = l; i = 0; while (p) { if (i++ === aim) { res = p.next; p.next = null; last.next = first; return res; } p = p.next; } }; n = rotate(n, 0); while (n) { console.log(n.value); n = n.next; } There are a few places that you could have simplified.
{ "domain": "codereview.stackexchange", "id": 34314, "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, algorithm, programming-challenge, linked-list, ecmascript-6", "url": null }
gazebo Originally posted by Javi V on Gazebo Answers with karma: 57 on 2017-01-20 Post score: 1 Hello Javi: Thanks for the report, the problem is in our repository. What happened was that the gazebo 5.4.0 i386 build finishes just fine but the gazebo 5.4.0 amd64 failed. All the architectures shared the gazebo-common package this is why you find a mixture of gazebo 5.4.0 for gazebo-common and 5.3.0 for the rest of them. The buildfarm is building the gazebo5 amd64 packages again, the problem should be fixed in less than two hours. Originally posted by Jose Luis Rivero with karma: 1485 on 2017-01-20 This answer was ACCEPTED on the original site Post score: 3 Original comments Comment by Jose Luis Rivero on 2017-01-20: The problem should be now solved. Please comment if you see another problem. Thanks! Comment by Javi V on 2017-01-23: @jose Luis Rivero Gazebo 5.4.0 up and running, thanks a lot! Comment by Javi V on 2017-01-23: @Jose Luis Rivero Gazebo 5.4.0 up and running, thanks a lot!
{ "domain": "robotics.stackexchange", "id": 4041, "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": "gazebo", "url": null }
c++11 customer.SetLoanType(shortTerm.GetLoanType()); ChooseTakeOutLoan(customer, shortTerm.GetMaximumLoan()); customer.SetLoanLength(shortTerm.ChoosePaybackPeriod(customer)); OverallCost(customer, &shortTerm); } else if (customer.GetAge() > 18 && customer.GetSalary() >= 12000) { Emergency emergency; emergency.DisplayLoan(); customer.SetLoanType(emergency.GetLoanType()); ChooseTakeOutLoan(customer, emergency.GetMaximumLoan()); customer.SetLoanLength(emergency.ChoosePaybackPeriod(customer)); OverallCost(customer, &emergency); } } }; void GetCustomerInformation(Customer &customer) { std::string name = ""; int age = 0; double salary = 0; std::cout << "Enter your name: "; std::getline(std::cin >> std::ws, name); customer.SetName(name); std::cout << "Enter your age: "; std::cin >> age; customer.SetAge(age); std::cout << "Enter your salary: "; std::cin >> salary; customer.SetSalary(salary); } int main() { LoanSystem loanSystem; Customer customer; GetCustomerInformation(customer); std::cout << "Your name is: " << customer.GetName() << "\n"; std::cout << "Your age is: " << customer.GetAge() << "\n"; std::cout << "Your salary is: " << customer.GetSalary() << "\n";
{ "domain": "codereview.stackexchange", "id": 40152, "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++11", "url": null }
sql, postgresql Title: PostgreSQL: Grouping and Aggregating on multiple columns Problem Statement: I am working on this simple dataset from Kaggle. I have provided a snippet of data with only required columns in below table. Dataset is quite simple, it has all IPL (cricket) matches listed with teams who played each match (team1 and team2) along with winner of that match. Now I am trying to get total matches played by all teams along with matches won by each team, I have again provided a snippet of output below the code. Same can be performed by "finding all occurrences of a particular team in column team1" + "finding all occurrences of a particular team in column team2". While the code does give proper result, I can sense this is not the best approach. I would like to know some better way to do it along with good practices and naming conventions to follow. Dataset: team1 team2 winner Royal Challengers Bangalore Kolkata Knight Riders Kolkata Knight Riders Kings XI Punjab Chennai Super Kings Chennai Super Kings Delhi Daredevils Rajasthan Royals Delhi Daredevils Mumbai Indians Royal Challengers Bangalore Royal Challengers Bangalore Kolkata Knight Riders Deccan Chargers Kolkata Knight Riders Rajasthan Royals Kings XI Punjab Rajasthan Royals Code: SELECT t1.team1 AS team, c_t1 + c_t2 AS played, c_w AS won, CAST(c_w AS FLOAT) / (c_t1 + c_t2) * 100 AS won_percentage FROM (SELECT team1, count(team1) AS c_t1 FROM ipl_m GROUP BY team1) AS t1 JOIN (SELECT team2, count(team2) AS c_t2 FROM ipl_m GROUP BY team2) AS t2 ON t1.team1 = t2.team2 JOIN (SELECT winner, count(winner) AS c_w FROM ipl_m GROUP BY winner) AS w ON t1.team1 = w.winner OR t2.team2 = w.winner ORDER BY won_percentage DESC; Resulting Table: team played won won_percentage Chennai Super Kings 178 106 59.55056179775281 Mumbai Indians 203 120 59.11330049261084 Delhi Capitals 33 19 57.57575757575758 Sunrisers Hyderabad 124 66 53.2258064516129
{ "domain": "codereview.stackexchange", "id": 42302, "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": "sql, postgresql", "url": null }
digital-communications, digital-filters Title: what is the frequency selective channel and doubly-selective channel Could anyone please help me to explain the frequency-selective channel and doubly-selective channel and the difference between them in brief and easy way. I have tried to check on internet, I couldn't get a clear explanation about them. For more explanation, you can check this link https://www.cs.tut.fi/kurssit/TLT-5806/Invocom/p3-7/fading_channel/ thanks
{ "domain": "dsp.stackexchange", "id": 6348, "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": "digital-communications, digital-filters", "url": null }
python, beginner, web-scraping Title: Web Scraping Newspapers Wrote a python script to web scrape multiple newspapers and arrange them in their respective directories. I have completed the course Using Python to access web data on coursera and I tried to implement what I learned by a mini project. I am sure there would be multiple improvements to this script and I would like to learn and implement them to better. import urllib.request, urllib.error, urllib.parse from bs4 import BeautifulSoup import ssl import requests import regex as re import os from datetime import date, timedelta today = date.today() ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE def is_downloadable(url): """ Does the url contain a downloadable resource """ h = requests.head(url, allow_redirects=True) header = h.headers content_type = header.get('content-type') if 'text' in content_type.lower(): return False if 'html' in content_type.lower(): return False return True
{ "domain": "codereview.stackexchange", "id": 38370, "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, beginner, web-scraping", "url": null }
python, pandas, pdf, dataframe <line xMin="119.979240" yMin="289.985537" xMax="280.527575" yMax="296.706653"> <word xMin="119.979240" yMin="291.466793" xMax="135.947700" yMax="296.696463">104,</word> <word xMin="142.709120" yMin="289.985537" xMax="173.492858" yMax="296.706653">Growth</word> <word xMin="180.112720" yMin="290.186420" xMax="194.929725" yMax="296.656512">and</word> <word xMin="201.835580" yMin="290.507652" xMax="248.161377" yMax="296.576332">Maturation</word> <word xMin="254.632200" yMin="291.134718" xMax="262.975505" yMax="296.599582">of</word> <word xMin="268.155040" yMin="291.184486" xMax="280.527575" yMax="296.587160">the</word> </line> <line xMin="101.996740" yMin="300.430246" xMax="227.297649" yMax="307.941749"> <word xMin="101.996740" yMin="301.665407" xMax="142.998566" yMax="307.633450">Neocortex</word> <word xMin="147.312640" yMin="302.506008" xMax="163.426111" yMax="307.783170">109,</word>
{ "domain": "codereview.stackexchange", "id": 44225, "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, pandas, pdf, dataframe", "url": null }
Give kudos and appreciate if you think its worthwhile SVP Joined: 12 Sep 2015 Posts: 2159 Re: A pharmaceutical company received $3 million in royalties [#permalink] ### Show Tags 10 Apr 2016, 10:43 2 This post received KUDOS Expert's post Walkabout wrote: A pharmaceutical company received$3 million in royalties on the first $20 million in sales of the generic equivalent of one of its products and then$9 million in royalties on the next $108 million in sales. By approximately what percent did the ratio of royalties to sales decrease from the first$20 million in sales to the next $108 million in sales? (A) 8% (B) 15% (C) 45% (D) 52% (E) 56% First$20 million: royalties/sales ratio = 3/20 = 36/240 Next $108 million: royalties/sales ratio = 9/108 = 1/12 = 20/240 Noticed that I rewrote both with the SAME DENOMINATOR. So, now all we need to is determine the percent change from 36 to 20. To do so, we could use some more lengthy calculations [e.g., 100(36-20)/36] HOWEVER, notice that, if we start at 36, a 50% decrease would give us 18. So going from 36 to 20, must be a decrease that's LESS THAN 50% (but also pretty close to 50%) Only one answer choice works. Answer: C Related Resource The following free video covers the concepts/strategies that are useful for answering this question: Cheers, Brent _________________ Brent Hanneson – Founder of gmatprepnow.com Target Test Prep Representative Status: Head GMAT Instructor Affiliations: Target Test Prep Joined: 04 Mar 2011 Posts: 2166 Re: A pharmaceutical company received$3 million in royalties [#permalink] ### Show Tags 03 May 2016, 09:27 2 KUDOS Expert's post A pharmaceutical company received $3 million in royalties on the first$20 million in sales of the generic equivalent of one of its products and then $9 million in royalties on the next$108 million in sales. By approximately what percent did the ratio of royalties to sales decrease from the first $20 million in sales to the next$108 million in sales?
{ "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.870597270087091, "lm_q2_score": 0.870597270087091, "openwebmath_perplexity": 3873.8104959385996, "openwebmath_score": 0.6309756636619568, "tags": null, "url": "https://gmatclub.com/forum/a-pharmaceutical-company-received-3-million-in-royalties-143985.html" }
rosbridge Title: Rosbridge: How to read value in from rostopic and set javascript variable Hi, I am trying to figure out how to fetch the values coming back from a ros topic over the rosbridge. Below is the output of the topic when I echo it. I want to grab the width and height of the image output and assign them to javascript variables that I can later use to set a canvas width and height dynamically. Thanks in advance for help. -Scott Here is the line I am using to try to subscribe to the topic over rosbridge connection.callService('/rosjs/subscribe', {data: ['/camera/rgb/camera_info', 2000]}); topic name: /camera/rgb/camera_info Topic output on echo: header: seq: 377284 stamp: secs: 1332175927 nsecs: 249637808 frame_id: /openni_rgb_optical_frame height: 480 width: 640 distortion_model: plumb_bob D: [0.0, 0.0, 0.0, 0.0, 0.0] K: [525.0, 0.0, 319.5, 0.0, 525.0, 239.5, 0.0, 0.0, 1.0] R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] P: [525.0, 0.0, 319.5, 0.0, 0.0, 525.0, 239.5, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 0 binning_y: 0 roi: x_offset: 0 y_offset: 0 height: 0 width: 0 do_rectify: False
{ "domain": "robotics.stackexchange", "id": 8634, "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": "rosbridge", "url": null }
\quad \text. Chapter 3 Numerical Methods 3. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. You are encouraged to solve this task according to the task description, using any language you may know. Assuming heat is lost only due to radiation, the differential equation for the temperature of the ball is given by. 1 Problems Tested 72. This is called the Fourth-Order Runge-Kutta Method. 1) Enter the initial value for the independent variable, x0. Putting 𝑛 = 0 in Runge-Kutta’s formula for fourth order, we get 𝑦1 = 𝑦0 + 1 6 𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 where 𝑘1 = ℎ𝑓 𝑥0, 𝑦0 = 0. Here we will learn how to use Excel macros to solve initial value problems. By judiciously choosing this coefficients AB and sigma, you can go to orders up to m in approximation for an m-step method. Runge (1856–1927)and M. We can also estimate the derivative of as a weighted average of at moment and at moment :. 500,0000 675,0000 850,0000 1025,0000 1200,0000 0 125 250 375 500 emperature, Time, t (sec) Analytical Ralston Midpoint Euler Heun θ (K). A Three-Stage Fifth-Order Runge-Kutta Method for Directly Solving Special Third-Order Differential Equation with Application to Thin Film Flow Problem M. Babul Hossain). 1) Enter the initial value for the independent variable, x0. m that we wrote last week to solve a single first-order ODE using the RK2 method. FUDZIAH ISMAIL Department of Mathematics Universiti Putra Malaysia Serdang 43400, Selangor MALAYSIA [email protected] Learn more about runge kutta. Because Heun's method is O(h 2), it is referred to as an order 1-2 method. Shooting Method Matlab code for this 2nd order ODE using Euler's method: h=. We'll use a computer (not calculator) to do most of the work for us. Abstract: In this paper, the explicit Accelerated Runge-Kutta Nystrom (ARKN) method for numerical integration of autonomous second-order ordinary differential equations is developed. In order to simplify the analysis, we begin by examining a single
{ "domain": "freccezena.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9873750529474512, "lm_q1q2_score": 0.8072526373313896, "lm_q2_score": 0.817574471748733, "openwebmath_perplexity": 695.2215890655395, "openwebmath_score": 0.7012003660202026, "tags": null, "url": "http://gwqt.freccezena.it/runge-kutta-2nd-order-method-solved-examples.html" }
If a ≥ 0 then. The method of calculating the sums of squares. RSS) method should be your preferred statistical function. Now we will use the same set of data: 2, 4, 6, 8, with the shortcut formula to determine the sum of squares. In general, a model fits the data well if the differences between the observed values and the model's predicted values are small and unbiased. For a combination of factor levels in an interaction term, the least squares mean is the same as the fitted value. You just need to square the previous result and sum up the elements of the vector using the sum() function. Thus solving the two squares problem for n= pwill yield the answer for general n2N, and here is the answer. For example, see x 4 –y 4 as (x 2) 2 –(y 2) 2, thus recognizing it as a difference of squares that can be factored as (x 2 –y 2)(x 2 +y 2). In a factorial design with no missing cells, this method is equivalent to the Yates' weighted-squares-of-means technique. Sum of squares is used in statistics to describe the amount of variation in a population or sample of observations. , then the sum of squares has all the factors of the triangle. Our minimum sum of squares is going to be equal to 4 squared, which is 16 plus negative 4 squared plus another 16, which is equal to 32. SS(A) is the Sum of Squares associated with A SS(A|B) is the sum of squares for A given that B is already in the model R(A,B,C) is the residual sum of squares for a model when A, B, and the C terms are in the model. Factoring the Sum of Two Squares 1 - Cool Math has free online cool math lessons, cool math games and fun math activities. Please input the data for the independent variable. The second array or range of values. 241; Shanks 1993, p. Validate the input data. This is not influenced by the number of measurements we take to determine our standard uncertainty and there is no division by the number of measurements involved. The weighted sum of the squares shows the spread between the weighted data points and the weighted mean. squares(1:10) [1] 82. In this example, this value is 400 + 36 + 25 + 144 + 49 =
{ "domain": "nauticalsas.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822876992225168, "lm_q1q2_score": 0.8098588108753705, "lm_q2_score": 0.8244619285331332, "openwebmath_perplexity": 608.7188237523523, "openwebmath_score": 0.7077962160110474, "tags": null, "url": "http://hgcj.nauticalsas.it/sum-of-squares.html" }
ros, simulation, installation, turtlebot Originally posted by Ritchie on ROS Answers with karma: 16 on 2017-07-04 Post score: 0 I guess I found the problem first problem by myself. I enter the follwong command export TURTLEBOT_GAZEBO_WORLD_FILE=~/turtlebot_ws/src/turtlebot_simulator/turtlebot_gazebo/worlds/playground.world And now it starts. Best regards R. Originally posted by Ritchie with karma: 16 on 2017-07-04 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 28282, "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, simulation, installation, turtlebot", "url": null }
c#, asp.net-mvc return Json(new { buttonADictionary, buttonBDictionary, aHasData, bHasData }, JsonRequestBehavior.AllowGet); } It's evident at this point that your code at the top and at the bottom is effectively identical, only differing on a value passed into two queries and then on variable names. Inside this single method, you are violating the DRY principle: don't repeat yourself. So let's make the first extraction and create the method here: private Dictionary<string, string> GetButtonDictionary(int planId, string value) { planning resultSet = db.planning.Where(t => t.PlanId == planId).Join(db.matching_image, p => p.MatchingImageId, i => i.Id, (p, i) => new { planning = p, i.View }).Where(j => j.View == value).Select(j => j.planning).FirstOrDefault(); structure st = db.structure.FirstOrDefault(s => s.PlanId == planId && s.Type == value); Dictionary<string, string> buttonDictionary = new Dictionary<string, string>(); buttonDictionary.Add("C", resultSet.CorrespondingId != null ? "disabled" : "enabled"); buttonDictionary.Add("R", resultSet.ResponseId != null ? "disabled" : "enabled"); buttonDictionary.Add("S", (st != null && st.Point_x != null) ? "disabled" : "enabled"); buttonDictionary.Add("D", resultSet.DistalId != null ? "disabled" : "enabled"); buttonDictionary.Add("P", resultSet.ProximalId != null ? "disabled" : "enabled"); return buttonDictionary; }
{ "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 }
quantum-field-theory, renormalization, dimensional-analysis, regularization I believe that Zee is discussing two different scenarios in a very general way, without entering in details and without discussing renormalization of fields
{ "domain": "physics.stackexchange", "id": 45266, "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-field-theory, renormalization, dimensional-analysis, regularization", "url": null }
general-relativity, metric-tensor, volume Title: Meaning of Einstein's condition on the metric tensor Quote from Nothing but coincidences: the point-coincidence and Einstein’s struggle with the meaning of coordinates in physics by Marco Giovanelli: On November 11, 1915, Einstein returned to a set of generally covariant vacuum field equations that he had introduced in 1913:$$R_{\mu\nu} = \kappa T_{\mu\nu},$$where $R_{\mu\nu}$ is what we now call the Ricci tensor. He replaced the restriction imposed by the conservation laws with the requirement that the determinant of the metric satisfied the condition $\sqrt{-g}=1$.
{ "domain": "physics.stackexchange", "id": 89620, "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, metric-tensor, volume", "url": null }
ros, ros-kinetic, ur10, universal-robots <arg name="reverse_port" default="50001" doc="Port that will be opened by the driver to allow direct communication between the driver and the robot controller."/> <arg name="script_sender_port" default="50002" doc="The driver will offer an interface to receive the program's URScript on this port. If the robot cannot connect to this port, `External Control` will stop immediately."/> <arg name="tf_prefix" default="" doc="tf_prefix used for the robot."/> <arg name="controllers" default="joint_state_controller scaled_pos_traj_controller speed_scaling_state_controller force_torque_sensor_controller" doc="Controllers that are activated by default."/> <arg name="stopped_controllers" default="pos_traj_controller" doc="Controllers that are initally loaded, but not started."/> <arg name="controller_config_file" default="$(find ur_robot_driver)/config/ur10_controllers.yaml" doc="Config file used for defining the ROS-Control controllers."/> <arg name="robot_description_file" default="$(find ur_description)/launch/ur10_upload.launch" doc="Robot description launch file."/> <arg name="kinematics_config" default="$(find ur_description)/config/ur10_default.yaml" doc="Kinematics config file used for calibration correction. This will be used to verify the robot's calibration is matching the robot_description."/>
{ "domain": "robotics.stackexchange", "id": 34402, "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, ros-kinetic, ur10, universal-robots", "url": null }
quantum-mechanics, mathematical-physics, operators, hamiltonian, time-evolution Title: Why does time evolution operator have the form $U(t) = e^{-itH}$? Let's denote by $|\psi(t)\rangle$ some wavefunction at time $t$. Then let's define the time evolution operator $U(t_1,t_2)$ through $$ U(t_2,t_1) |\psi(t_1)\rangle = |\psi(t_2)\rangle \tag{1}$$ and the Schrödinger equation $$ H |\psi(t)\rangle = i\frac{\partial}{\partial t} |\psi(t)\rangle \tag{2}$$ with Hamiltonian operator $H$. (We have set $\hbar = 1$.) Question. What is the relation between $U$ and $H$, assuming that $H$ doesn't depend explicitly on $t$? Attempts. It is well-known that the answer is $U(t_2,t_1) = c \cdot e^{-i(t_2-t_1)H}$ for some scalar $c$. Some sources postulate it follows from operator equation $HU = i \frac{\partial}{\partial t} U$ but we cannot integrate it like we could an ordinary differential equation $f(x)g(x) = \frac{\partial}{\partial x} g(x)$ (at least I don't know how to integrate operators!).
{ "domain": "physics.stackexchange", "id": 23723, "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, mathematical-physics, operators, hamiltonian, time-evolution", "url": null }
c++, optimization, performance, graph circle[0] = it1->second->getWord(); circle[1] = (*it2)->getWord(); circle[2] = (*it3)->getWord(); circle[3] = (*it4)->getWord(); circle[4] = (*it5)->getWord(); m_results.push_back(circle); } } } } } } } I think this question is not subjective because I've found many good things on the Internet yet: I use only vectors which is much faster (the not reserved too) because of the cache. You cannot see here, but I use only inline function in vertex class. I tried to reduce the numbers into uint 32 bit. But I still miss good trick because its time is lifetime. For example, do you think I can make better compiler settings? Or it's also very useful if you say I cannot make it much faster because in that case I don't waste more energy into finding a better solution. Since you've only posted partial code, all we can do is offer some suggestions: Google suggests that the performance of stdext::hash_map might be improved by adding #define _SECURE_SCL 0. See this MSDN article for background. Your if's look like they might become victim to branch misprediction. This StackOverflow answer explains that better than I ever could. If you haven't done so already, take care to allocate your vertices (and their internal data) contiguously. The simplest way to do that is usually to shove everything into a vector.
{ "domain": "codereview.stackexchange", "id": 11447, "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++, optimization, performance, graph", "url": null }
python, python-3.x async def __aenter__(self) -> ClientResponse: return await self._retry.retry(self._request, self._url, **self._kwargs) async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: if self._response is not None: if not self._response.closed: self._response.close()
{ "domain": "codereview.stackexchange", "id": 37205, "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, python-3.x", "url": null }
Similarly, we can find the area of a parallelogram using vector product. If the parallelogram is formed by vectors a and b, then its area is $|a\times b|$. All the steps, described above can be performed with our free online calculator with step by step solution. Area of a Parallelogram Given two vectors u and v with a common initial point, the set of terminal points of the vectors su + tv for 0 £ s, t £ 1 is defined to be parallelogram spanned by u and v. We can explore the parallelogram spanned by two vectors in a 2-dimensional coordinate system. Solution Begin a geometric proof by labeling important points You may have to extend segment AB as you draw the height from C. Call the rectangle that is formed by drawing the heights from vertices D and C, EDCF. Free Parallelogram Area & Perimeter Calculator - calculate area & perimeter of a parallelogram step by step This website uses cookies to ensure you get the best experience. Dot product of two vectors on plane, Exercises. 5.5. c. -6.0. d. none of above. So the area of your parallelogram squared is equal to the determinant of the matrix whose column vectors construct that parallelogram. The area of a parallelogram farmed from the vector A = i - ­ 2 j + 3k and vector B = 3 i ­- 2 j + k as adjacent side is asked Oct 8, 2019 in Vector algebra by KumarManish ( 57.6k points) vector algebra The area of triangle as cross product of vectors representing the adjacent sides. Cross product of two vectors (vector product), Online calculator. Dot product of two vectors in space, Exercises. Length of a vector, magnitude of a vector in space. Contacts: support@mathforyou.net. Addition and subtraction of two vectors in space, Exercises. The other multiplication is the dot product, which we discuss on another page. If you want to contact me, probably have some question write me email on support@onlinemschool.com, Online calculator. Or if you take the square root of both sides, you get the area is equal to the absolute value of the determinant of A. The area of a parallelogram is also equal to the magnitude of the vector cross product of two adjacent sides. $\vec
{ "domain": "poznan.pl", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.989986427013312, "lm_q1q2_score": 0.8719771444067899, "lm_q2_score": 0.8807970701552504, "openwebmath_perplexity": 302.8607392057107, "openwebmath_score": 0.7798196077346802, "tags": null, "url": "http://bip.pks.poznan.pl/oa7pud9/area-of-parallelogram-in-vector-7821f3" }
machine-learning, training, keras, overfitting, underfitting Title: Is my GRU model under-fitting given this plot of the training and validation loss? I was running my gated recurrent unit (GRU) model. I wanted to get an opinion if my loss and validation loss graph is good or not, since I'm new to this and don't really know if that is considered underfitting or not When ever you are buliding a ML Model don't take accuracy seriously(Mistake done by Netflix that cost them alot), you should try to get the hit scores as they will help you to know how many times your model worked on real world users.However, if your model must have to measure the accuracy try it with the RMSE score as it will penalise you more for being more out of the Line. Here is the link for more information on it RMSE Its hard to predict if its overfitting or underfitting as your graph is vague(for example what does graph lines representing). However, you can solve underfitting by following steps: 1) Increase the size or number of parameters in the ML model. 2) Increase the complexity or type of the model. 3) Increasing the training time until cost function in ML is minimised. For overfitting you can try Regularization methods like weight decay provide an easy way to control overfitting for large neural network models. A modern recommendation for regularization is to use early stopping with dropout and a weight constraint.
{ "domain": "ai.stackexchange", "id": 1850, "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": "machine-learning, training, keras, overfitting, underfitting", "url": null }
machine-learning, supervised-learning, softmax But why would we want to "avoid this restriction"? $f_c$ is a probability, so the restrictions $0 \le f_c \le 1$ for each $c$ and $\sum_{c = 1}^C f_c = 1$ are necessary by definition. Also, why would we do this and then require the model to return log-probabilities only to then use the softmax function to convert it back into a probability? Your intuition is correct. The restrictions you wrote down are necessary by definition. The author means that it is hard to build a machine learning model that gives probability by design ( returns $f_c$ directly). However we know very well how to model a function that outputs some real number. So the way to go is to create a model that gives some unnormalised log-probability ( essentially any number ) first and then transform it into $f_c$ by softmax function. Hope it helps.
{ "domain": "ai.stackexchange", "id": 4155, "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": "machine-learning, supervised-learning, softmax", "url": null }
and nine-point center are all the same ( but not very commonly called! Lie on the straight line if the area formed by the triangle is one of! Called the trigon ; So where does the formula come from nine-point center are all the same.! Angle formed at the vertex { s\sqrt { 3 } } { 3 }... Area = 3/2 * √3 * a², where a is the regular hexagon side ; where! Triangle of these three points is zero BAC, ABC and ACB meet the circumcircle of the triangle s... 3 } circumcircle of equilateral triangle formula { 3 } 3 s 3 3 \frac { {!, centroid and nine-point center are all the same may be the same the calculator above meet! These three points lie on the circumcircle of the triangle shown in the calculator above the polygon variables used in!, ABC and ACB meet the circumcircle of the polygon lie on the straight line the., some of which may be the same point very commonly ) called the trigon \frac s\sqrt... And nine-point center are all the same at the vertex variables used are in reference to the triangle is 3-sided. Is: bisectors of angles BAC, ABC and ACB meet the circumcircle of the is! The variables used are in reference to the angle at the vertex:... At points P, Q and R respectively ABC and ACB meet the circumcircle the. Acb meet the circumcircle of the polygon 3-sided polygon sometimes ( but not very commonly ) the. The trigon ( but not very commonly ) called the trigon, and the is... These three points is zero ; So where does the formula come from, and the semiperimeter easily... = 3/2 * √3 * a², where a is the regular hexagon side ; So where does formula. Nine-Point center are all the same point is supplementary to the angle formed at vertex. Are all the same point is s 3 3 \frac { s\sqrt { }. Of the orthocenter is supplementary to the triangle these three points is zero or not the same area by!,
{ "domain": "connectwelch.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561703644736, "lm_q1q2_score": 0.805258074425389, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 583.606358095966, "openwebmath_score": 0.8464050889015198, "tags": null, "url": "http://www.connectwelch.com/qicgg/circumcircle-of-equilateral-triangle-formula-0b4a70" }
had been first... Differentiating a Riemann integral superior notations until the early 1800 's: //teespring.com/de/stores/papaflammy Help me create more content...: v - https: //teespring.com/de/stores/papaflammy Help me create more free content Rule. U ( t ) have derivatives of ( n+1 ) th order Newton and Leibniz developed calculus an... By their followers ensued over credit for the development of these functions Newton. The fundamental theorem of calculus by Leibniz and Newton 1664–1666, while a student Cambridge... X ), newton leibniz theorem is continuous on a segment [ a, b ] ( x ), which continuous. Major advance in integration came in the 17th century with the independent discovery the! Discovered his fundamental ideas in 1664–1666, while a student at Cambridge University fundamental... Any function f ( x ), which newton leibniz theorem continuous on a segment [ a, b.... Been the first to invent calculus case the following is a reasonably useful condition for differentiating Riemann. Dispute between Leibniz and Newton, fueled by their followers ensued over credit for development. Continuous on a segment [ a, b ] the fundamental theorem of calculus by Leibniz and Newton most mathematicians... Mathematicians continued to NewtonÕs fluxions and fluents, avoiding avoided LeibnizÕs superior notations until the early 's... Rule formula and can be proved by induction Riemann integral o n. Merch: v - https: //teespring.com/de/stores/papaflammy me! Vector case the following is a reasonably useful condition for differentiating a Riemann integral differentiating Riemann! The major advance in integration came in the 17th century with the independent discovery the. Development of these functions fundamental theorem of calculus by Leibniz and Newton, fueled by their followers ensued over for... [ a, b ] 1800 's ( n+1 ) th order invent calculus the following is a reasonably condition... For the development of these ideas for any function f ( x ), which is continuous on segment... There was an ongoing and very vitriolic controversy raging over whether Newton or Leibniz had been the to... 1600S, in 1699 formula and can be proved by induction functions
{ "domain": "com.au", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.970239907775086, "lm_q1q2_score": 0.8167728460525376, "lm_q2_score": 0.8418256551882383, "openwebmath_perplexity": 2101.896262519603, "openwebmath_score": 0.8977207541465759, "tags": null, "url": "https://scentregroup3rdquarter15.interactiveinvestor.com.au/9lhwa/fa288e-newton-leibniz-theorem" }
5. ## Re: Cubic Equation Thank you very much. I will work on your method. Regards. 6. ## Re: Cubic Equation Originally Posted by Honore Find all positive integer roots of the equation $1 + n + n^2 + n^3 = A^2$ You can factorise it as $(1+n)(1+n^2) = A^2.$ The factor $1+n^2$ clearly cannot be a perfect square. So at least one of the squared prime factors in $A^2$ must be shared between the two factors on the left side. But the only possible common factor of $1+n$ and $1+n^2 = (1+n)^2-2n$ is 2. So we can write $n+1 = 2s^2$ and $n^2+1 = 2t^2$ for some natural numbers $s,t.$ Therefore $(2s^2-1)^2 + 1 = 2t^2$ which, with a bit of reorganisation and after cancelling the factor 2, can be written as $(s^2-1)^2 + s^4 = t^2.$ This shows that the set $(s^2-1, s^2, t)$ is a Pythagorean twin triple. There are infinitely many Pythagorean twin triples, but we want one in which the middle element is a perfect square. The triples (0,1,1) and (3,4,5) satisfy that condition, leading to the values n=1 and n=7. The next triples are (20,21,29), (119,120,169) and (696,697,985), but none of those has a perfect square as the middle element. After that, the numbers increase very rapidly, as you can see from the listing at A046090 - OEIS. My guess is that there are no more perfect squares in that sequence, but I have to admit that I don't begin to see how to prove that. 7. ## Re: Cubic Equation Thanks a lot. That is much better and efficient than what I have been able to do so far. Regards.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9924227569392726, "lm_q1q2_score": 0.801944294159847, "lm_q2_score": 0.8080672158638527, "openwebmath_perplexity": 555.4791121613041, "openwebmath_score": 0.7615230679512024, "tags": null, "url": "http://mathhelpforum.com/algebra/189969-cubic-equation.html" }
roscore Title: How do you kill roscore/master? I ask because ps aux | grep roscore returns nothing. But if I try to run roscore it says it is already running. Originally posted by absolutelyNoWarranty on ROS Answers with karma: 1 on 2013-01-19 Post score: 0 Select the console that is running roscore and press Cntrl+c Originally posted by dptsrk with karma: 140 on 2013-01-19 This answer was ACCEPTED on the original site Post score: 3
{ "domain": "robotics.stackexchange", "id": 12488, "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": "roscore", "url": null }
navigation, robot-localization, transform Title: Quaternion to Euler angle convention in TF In reference to this question , the desired conversion is the opposite direction. That is using tf.transformations.euler_from_quaternion function, taking the result from robot_localization of /odometry/filtered topic, my attempt is to unravel the quaternion from the ENU convention to NED convention. The end result should be pitch, yaw, and roll using the aviation (NED) convention. My interpretation is that one must first change back (from ROS ENU) the signs of y and z, followed by “unwinding” the quaternion to euler from 'rzyx' to 'rxyz' per the documentation for euler_from_quaternion definition and the question response: “q = tf.transformations.quaternion_from_euler(yaw, pitch, roll, 'rzyx')” My question: Is my interpretation correct? Any insight is greatly appreciated. B2256 Originally posted by b2256 on ROS Answers with karma: 162 on 2016-07-17 Post score: 2 See also this question: http://answers.ros.org/question/50113/transform-quaternion/ The easiest way to convert to yaw-pitch-roll is to take the quaternion and create a Matrix3x3: Let q be the quaternion of the current odom transform tfScalar yaw, pitch, roll; tf::Matrix3x3 mat(q); mat.getEulerYPR(&yaw, &pitch, &roll); (Note that the tfScalar type is usually typedef'd to double in scalar.h. Also see http://docs.ros.org/api/tf/html/c++/classtf_1_1Matrix3x3.html.) Originally posted by Mark Rose with karma: 1563 on 2016-08-02 This answer was ACCEPTED on the original site Post score: 3 Original comments Comment by antoineniotna on 2018-10-02: Perfect! Thank you so much!
{ "domain": "robotics.stackexchange", "id": 25265, "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, transform", "url": null }
centrifugal-force, centripetal-force if centrifugal force is the only force acting on the object, why doesn't it collapse into the center? I am pretty sure this has to do with the object's inertia Again, assuming you mean centripetal. As mentioned above, the centripetal force is perpendicular to the motion. What happens when you move in one direction and is pulled to the side? This pull will pull you towards the center (towards the origin of the pull), only if you are standing still. If you are moving, then the pull will make you move towards the center, but at the same time you still move straight ahead. Your net movement is therefor not towards the center, but rather around it. When you ask the question, you are making the mistake of connecting speed $\vec v$ directly with force $\vec F$. But remember that it should rather be $\vec a$ that is connected to $\vec F$. That means, force and velocity are not going in the same direction necessarily, only force and the change of velocity. And in this case, you change the radial velocity component, but keep the tangential velocity component constant - there is only acceleration (change of velocity) in the radial direction, but the net velocity is point in another way. Also, what keeps the string taut during the swinging? The explanation that the string is always taught is simple: The object doesn't move towards the center. When the centripetal force (the tension in the string) tries to pull the object closer, the object actually doesn't get closer. It only changes direction. If you pull harder, then it will gain a larger radial acceleration, but since the speed must be kept constant (as there is no tangential acceleration to change the speed), the radius will change according to $$a_{rad}=\frac{v^2}{r}$$ and the object comes closer. But if the force is just kept constant, then there is no change of radius during the motion. There has to be some force countering the centripetal force that keeps the string tight.
{ "domain": "physics.stackexchange", "id": 24937, "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": "centrifugal-force, centripetal-force", "url": null }
vba, excel, file-system I've not had much experience writing to external files (other than other office applications) so I'm looking to see if there are any more efficient ways to achieve this than the way I have with FSOs. General housekeeping is welcomed too, so any improvements in the way it's written; order of the code, efficiencies elsewhere etc. The comments are aimed at someone who has very little VBA experience as as far as I know I'm the only person familiar with it in the office. Public Sub WriteNamesInRangeToPCSFile() 'Description of operations: '---------------------------------------------------------------------------------------------------------- ' 'First the sub finds the last row of column B. 'Then the range containing the extensions and names is created using these variables. ' 'A file system object is created and a new .pcs file is created (represented by variable 'objScriptFile' 'The file path for the .pcs file is defined by the user on Sheet1 in cell C1 ' 'The range is put into an array as this is more efficient than reading directly from each cell in the range. 'The output string is built by concatanating itself with each array element contatining a name. ' Each iteration has a carraige return/line feed (chr(9)) at the end of the string so it's written on a new line ' 'The OutputText string is then written to the .pcs file. '
{ "domain": "codereview.stackexchange", "id": 38322, "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": "vba, excel, file-system", "url": null }
We can then invoke dot from the command-line on the generated file: $dot -Tpng -o lattice.png -v lattice1.dot The resulting graph looks like the following: Binomial Lattice (no labels) If we want to add labels to the lattice vertices, we can add the labels attribute: > x<-capture.output(dotlattice(genlattice(N=8, u=1.1, d=0.9), labels=TRUE)) > cat(x, file="/tmp/lattice1.dot") Binomial Lattice (labels) Statistical Arbitrage II : Simple FX Arbitrage Models In the context of the foreign exchange markets, there are several simple no-arbitrage conditions, which, if violated outside of the boundary conditions imposed by transaction costs, should provide the arbitrageur with a theoretical profit when market conditions converge to theoretical normality. Detection of arbitrage conditions in the FX markets requires access to high-frequency tick data, as arbitrage opportunities are usually short-lived. Various market inefficiency conditions exist in the FX markets. Apart from the basic strategies outlined in the following sections, other transient opportunities may exist, if the trader or trading system can detect and act on them quickly enough. Round-Trip Arbitrage Possibly the most well-known no-arbitrage boundary condition in foreign exchange is the covered interest parity condition. The covered interest parity condition is expressed as: $(1+r_d) = \frac{1}{S_t}(1+r_f)F_t$ which specifies that it should not be possible to earn positive return by borrowing domestic assets at$$$r_d$$ for lending abroad at $$r_f$$ whilst covering the exchange rate risk through a forward contract $$F_t$$ of equal maturity. Accounting for transaction costs, we have the following no-arbitrage relationships: $(1+r_d^a) \geq \frac{1}{S^a}(1+r_f^b)F^b$ $(1+r_f^b) \geq S^b(1+r_d^b)\frac{1}{F^a}$
{ "domain": "theresearchkitchen.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308786041316, "lm_q1q2_score": 0.8124304614636026, "lm_q2_score": 0.8221891239865619, "openwebmath_perplexity": 2287.870760814901, "openwebmath_score": 0.6073945760726929, "tags": null, "url": "http://www.theresearchkitchen.com/blog" }
quantum-mechanics, homework-and-exercises, operators, second-quantization &= \sum_{{\vec r}\vec r^\prime} \vec{r}\vec{r}^\prime a^{\dagger}_{\vec{r}}(\delta_{\vec{r},\vec{r}^\prime}\pm a^{\dagger}_{\vec{r}^\prime}a_{\vec{r}}) a_{\vec{r}^\prime}\\ &=\sum_{\vec r} \vec{r}^2 a^{\dagger}_{\vec{r}}a_{\vec{r}} \pm \sum_{{\vec r}\vec r^\prime} \vec{r}\vec{r}^\prime a^{\dagger}_{\vec{r}} a^{\dagger}_{\vec{r}^\prime} a_{\vec{r}} a_{\vec{r}^\prime} \qquad (3) \end{align} $$ which disobeys eq.(2). Why is this happenning? How comes the second term of eq.(3)? The ambiguity already exists in first quantization. Say you have $n$ particles with each of them their position operator $\hat r_1…\hat r_n$. While it makes sense to define: $$ \hat r=\sum_i\hat r_i $$ you have to possible definitions for defining $\hat r^2$. The one corresponding to (2) is: $$ \hat{r^2}=\sum_i\hat r_i^2 $$ and the one corresponding to (3) is: $$ \hat r^2=\left(\sum_i\hat r_i\right)^2 $$ which differ in a similar way by twice the dot product. The relevance of one operator over the other depends on the problem at hand. Hope this helps.
{ "domain": "physics.stackexchange", "id": 91700, "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, homework-and-exercises, operators, second-quantization", "url": null }
c++, performance, memory-management std :: cout << "The adjacency list representation of the graph you entered is as follows : " << std :: endl; freinds->displayGraph(); return 0; } As mentioned, I'm not sure about the performance aspects. I think if you were to profile it, you could see where the slowdowns were and address them then. However, I do see some things that I think could make this better. Here are my thoughts. searchPresence() seems like a convoluted name. How about just find()? Or maybe, since you're not returning the found value, just contains()? Also, in the same method, rather than manually stepping through all values in the set with an iterator, why not just use std::set::find() to get the element and return true if the result does not equal adjacentNodes.end()? It's less code for you to write and maintain. Something like this: // this function searches for a node with a specific value if its already // present in the adjacency list of "this" node template<typename T> bool GraphNode<T> :: contains(T nodeValue) { typename std :: set< GraphNode<T>* > :: iterator it; it = this->adjacentNodes.find (nodeValue); if (it == adjacentNodes.end()) { return false; } return true; }
{ "domain": "codereview.stackexchange", "id": 13812, "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, memory-management", "url": null }
quantum-mechanics, atomic-physics, atoms Title: Understanding Zeeman Splitting I'm reading a standard modern physics history book ("Inward Bound" by A. Pais), and I realized I don't really understand Zeeman splitting well. In the section I'm reading, there's a short discussion of the $D_1$ and $D_2$ spectral lines in sodium, which correspond to the $2P_{1/2}\rightarrow 2S_{1/2}$ and $2P_{3/2}\rightarrow 2S_{1/2}$ transitions in sodium respectively. It goes on to say that,in the presence of an external magnetic field, the $D_1$ line splits into $2\times 2=4$ components and that the $D_2$ line splits into $4\times 2-2=6$ components. I would like a detailed explanation for these splitting rules. If you can point to a helpful piece of standard literature, please do so. First off, in modern notation the $D_1$ and $D_2$ lines correspond to the $3P_{1/2}\rightarrow 3S_{1/2}$ and $3P_{3/2}\rightarrow 3S_{1/2}$ respectively. Two's were used because those are the numbers that would be showing up in the Balmer formula (for hydrogen).
{ "domain": "physics.stackexchange", "id": 31834, "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, atomic-physics, atoms", "url": null }
finite-automata, regular-expressions Title: Is regex with backreference still able to be implemented by finite automata? I recently learned that regex support backreference which enables referring to a matched group in the pattern itself. E.g. a regex (.)\1{2,} matches two or more consecutive appearances of the same character like 'aa', '...', '------', etc. However, such feature seems exceeds the capability of finite state machine which is the underlying implementation of regex. It seem like it needs to remember the matched part and match with it again, but the matched part its self have infinite possible values. I'm just speculating but have no idea to prove or disprove it. My doubt is, does the regex with backreference still have finite number of states? No, it doesn't. With backreferences, it is trivial to write a regex that matches exactly the standard textbook example of a non-regular language, $\{ a^nb^n \mid n \in \mathbb{N} \}$. A finite number of states can only distinguish between finitely many different prefixes in $a^*$, so it won't do.
{ "domain": "cs.stackexchange", "id": 16386, "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": "finite-automata, regular-expressions", "url": null }
electric-circuits, electric-current, electrical-resistance, capacitance, inductance All that the non-conservative field can do is slow down the rate at which the current changes; it can never stop the current changing as then it (the non-conservative field) would no longer exist. For this example in which a battery is applied across an inductor, the current $I = \dfrac{V_{\rm s}}{L}\,t$. Now if an alternating current is applied to the inductor you find that the ratio of the peak voltage, $V_{\rm peak}$, to the peak current, $I_{\rm peak}$, is $\omega L$ where $\omega$ is the frequency. Thus you will see that, for a given peak voltage, the magnitude of the inductance plays a part in determining the magnitude of the peak current. In the case of a series $LCR$ circuit in which the current through each component is the same, it is the phases of the voltages across each of the components which are important as the sum of the voltages must equal the applied voltage. The fact that the voltages across the capacitor and the inductor are $\pi$ out of phase with one another means that they have "opposite effects" on the circuit which can materially affect the current flowing in the circuit.
{ "domain": "physics.stackexchange", "id": 95318, "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, capacitance, inductance", "url": null }
newtonian-mechanics, reference-frames, inertial-frames, centrifugal-force Title: Why do we consider a non-inertial frame of reference for rotational motion but not for linear motion? When we consider a body rotating around a central point, we say that pseudoforce acting outwards in the non inertial frame of reference keeps the body at rest in the frame of reference. If we consider a body to be moving in linear motion and a frame of reference that follows the body, the body is at rest with respect to the frame of reference, then there must be a pseudoforce acting on it in that frame of reference. Why then do we only consider a pseudoforce in case of circular motion and not consider one in case of linear motion? "Pseudoforces" such as centrifugal force only arise when you are using co-ordinates fixed in a non-inertial reference frame. In the case of a object rotating about an axis, a reference frame in which the object is at rest is non-inertial because the object (and hence also the reference frame) is accelerating. If an object is moving in a straight line at a constant speed then a reference frame in which that object is at rest is an inertial reference frame and so no pseudoforces arise. However, if an object is moving in a straight line but not at a constant speed then a reference frame in which that object is at rest is not an inertial reference frame and so pseudoforces will again arise if you are working in that reference frame. A typical example is an object on the floor of a lift that is accelerating with acceleration $a$. To account for the object being at rest in the lift we have to introduce a pseudoforce $ma$ that increases (or decreases) the apparent weight of the object.
{ "domain": "physics.stackexchange", "id": 98727, "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, reference-frames, inertial-frames, centrifugal-force", "url": null }
scala Title: Finding Duplicate (Key, Value) in Map I wrote a function for checking if a Map[(String, String)] contains an element with a matching key and value: def findDupes(map: Map[String, String], key: String, value: String): Option[(String, String)] = { val dupes = map.collect { case (x, y) if(x == key && y == value) => key } dupes match { case Nil => None case x :: _ => Some(key, value) } } Testing scala> map res10: scala.collection.immutable.Map[String,String] = Map(1 -> HELLO, 2 -> WORLD) scala> findDupes(map, "1", "HELLO") res8: Option[(String, String)] = Some((1,HELLO)) scala> findDupes(map, "1", "FOO") res9: Option[(String, String)] = None Use map get key contains value, to test if a given key-value-pair is already part of a Map. Your solution is extremely inefficient, because you iterate through the entire Map (with collect) just to find one value. get returns an Option which can be checked for the containing value.
{ "domain": "codereview.stackexchange", "id": 8831, "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": "scala", "url": null }
# Multiplying an infinite series by a sum of two terms I am reading some paper and I am slightly confused about the way the following product has been simplified by the author: $$(1-x)\ln(1-x) = (1-x)\left[-x-\frac{x^2}{2}-\frac{x^3}{3}-\frac{x^4}{4}-\cdots\right]$$ He then converts this into: $$-x + \sum\limits_{l=1}^{\infty}\frac{x^{l+1}}{l(l+1)}$$ To obtain this, I tried multiplying the terms on R.H.S. in the first equation. However, I can apparently do it in two ways. First I can multiply by $1$ in the first bracket by the whole infinite expansion and then by second term ($-x$) to obtain: $$-x-\frac{x^2}{2}-\frac{x^3}{3}-\frac{x^4}{4}-\cdots +x^2+\frac{x^3}{2}+\frac{x^4}{3}+\frac{x^5}{4}+\cdots$$ Or I can multiply each term in the infinite series by $(1-x)$ to obtain: $$-x+x^2-\frac{x^2}{2}+\frac{x^3}{2}-\frac{x^3}{3}+\cdots$$ Which when simplified, gives the expression written by author. My question is, what makes the first way illegal and the second one legal? Or is it possible to show that both these methods are in fact the same thing? As a side note, first method seems illegal to me because the first series would never end.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9752018398044144, "lm_q1q2_score": 0.8288934561350655, "lm_q2_score": 0.8499711775577736, "openwebmath_perplexity": 279.1869379026821, "openwebmath_score": 0.8481487035751343, "tags": null, "url": "https://math.stackexchange.com/questions/2125542/multiplying-an-infinite-series-by-a-sum-of-two-terms" }
general-relativity, curvature, tidal-effect, wormholes Another issue is the throat length and time : if we drop the thin-shell assumption, which isn't terribly realistic, there is still some way to travel between the two mouthes. The length of the throat is related to the amount of negative energy required (long throats require less negative energy), which means that a more reasonable worhole may have very long travel times to actually cross. The perceived time is also an issue, as the travel time could be very short for the person crossing it but very long from the outside perspective (this is related to the redshift function which brings up a whole bunch of other potential problems). Then if we actually assume a time machine scenario, things get much much worse. To simplify matters somewhat, you might be aware that you can describe the quantum vacuum as a gallore of virtual particles (wrong yes, but let's go with that for now). As a wormhole approaches time machine formation, there are more and more virtual particles forming almost-loops, which has the bad side effect of blue-shifting them, increasing their energy. Those become actual loops when the time machine is actually formed, which has the result of making the stress-energy tensor diverge : the quantum vacuum has infinite energy, which probably bad results if this was possible. It's quite likely that the wormhole collapses before this happens.
{ "domain": "physics.stackexchange", "id": 47075, "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, curvature, tidal-effect, wormholes", "url": null }
performance, vba, excel How to use it: VLOOKUPK(lookup_value,lookup_vector,[result_vector],[count_num],[case_sens]) lookup_value (required) The value to search for. lookup_value can be used with wildcards like *. lookup_vector (required) The Range to look in. It needs to contain only one row or column if the result_vector is submitted. If no result_vector is set and the lookup_vector contains only 1 row/column, the result_vector will be set to the lookup_vector. If no result_vector is set, and the lookup_vector contains 2 columns while holding more then 2 rows, the first column will be set as lookup_vector while the second column will become the result_vector. (and vice versa) Having a range of 2x2 will result in an error. result_vector (optional) The range where the value to output is located. Needs to contain only one row or column. Does not need to be the same type (row/column) like the lookup_vector count_num (optional) Indicates the kth match to work with. if not submitted, the first occurrence will be submitted. case_sens (optional) if set to TRUE the search will be case sensitive. Edit There was a big fail in the code I didn't noticed till now: It compared with = instead of Like. Really sorry. :( What's special about 2023? CVErr(2023) Introduce a constant so Mr(s). Maintainer knows what this error code means. This is a lot of logic to parse for something so simple. If count_num - 1 <> Abs(Round(count_num - 1)) Then Exit Function ' no natural Number or 0 => exit function Extract a private method. If IsNegative(count_num) Then Exit Function
{ "domain": "codereview.stackexchange", "id": 17485, "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": "performance, vba, excel", "url": null }
special-relativity, speed-of-light, photons, reference-frames You could say that the world line itself is fixed in spacetime. But that's not a particularly useful statement to make, because there's no separate time outside of spacetime, so it's not like the world line can actually move. Besides, even if you did say the world line is fixed in spacetime, that applies equally well to massive particles and to photons. You can pick any two points on a world line and figure out how much time elapses, by your clock, between those two points. It's just $t_2 - t_1$. You can also figure out how much time elapses, by some other observer's clock, between those two points: it's $\frac{t_2 - t_1}{\sqrt{1 - v^2/c^2}}$, where $v$ is the relative velocity between you and the other observer. And you can even try to apply this calculation treating the particle itself as the observer, which lets you figure out how much time passes for the particle between those two points. It works out to $\sqrt{(t_2 - t_1)^2 - (x_2 - x_1)^2/c^2}$. This works just fine for a massive particle. But for a photon, no matter which two points you pick, the answer you get is zero. This is why we say that photons don't experience time. I don't think it's accurate in general to say that photons are fixed in time, though. That might be a useful thing to say to make a particular point in a particular argument, but in most cases, it's probably more misleading than not.
{ "domain": "physics.stackexchange", "id": 3382, "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": "special-relativity, speed-of-light, photons, reference-frames", "url": null }
Which of the following relations $f: {\mathbb Q} \rightarrow {\mathbb Q}$ define a mapping? In each case, supply a reason why $f$ is or is not a mapping. 1. $\displaystyle f(p/q) = \frac{p+ 1}{p - 2}$ 2. $\displaystyle f(p/q) = \frac{3p}{3q}$ 3. $\displaystyle f(p/q) = \frac{p+q}{q^2}$ 4. $\displaystyle f(p/q) = \frac{3 p^2}{7 q^2} - \frac{p}{q}$ Hint ##### Exercise18 Determine which of the following functions are one-to-one and which are onto. If the function is not onto, determine its range. 1. $f: {\mathbb R} \rightarrow {\mathbb R}$ defined by $f(x) = e^x$ 2. $f: {\mathbb Z} \rightarrow {\mathbb Z}$ defined by $f(n) = n^2 + 3$ 3. $f: {\mathbb R} \rightarrow {\mathbb R}$ defined by $f(x) = \sin x$ 4. $f: {\mathbb Z} \rightarrow {\mathbb Z}$ defined by $f(x) = x^2$ Hint ##### Exercise20 1. Define a function $f: {\mathbb N} \rightarrow {\mathbb N}$ that is one-to-one but not onto. 2. Define a function $f: {\mathbb N} \rightarrow {\mathbb N}$ that is onto but not one-to-one. Hint ##### Exercise22 Let $f : A \rightarrow B$ and $g : B \rightarrow C$ be maps. 1. If $f$ and $g$ are both one-to-one functions, show that $g \circ f$ is one-to-one.
{ "domain": "pugetsound.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126438601956, "lm_q1q2_score": 0.8176982934818676, "lm_q2_score": 0.8354835289107309, "openwebmath_perplexity": 221.69644107580123, "openwebmath_score": 0.9972699880599976, "tags": null, "url": "http://mathbook.pugetsound.edu/examples/sample-book/html/appendix-2.html" }
python, python-3.x, multithreading, reinventing-the-wheel, server Title: Basic web server in Python 3 This project is intended to function as a basic web server with a command-line interface for easy use. It's written in Python 3, with the help of the cmd module for the CLI itself and the _thread module (I know, I know) to run the listening/responding process without interfering with the CLI. I am wondering (with the exception of _thread, which I do intend to fix very soon) how well it conforms to best practices and how readable it is. Performance is not a big issue. import socket import cmd import os.path import _thread # TODO: Switch from _thread to threading import json version = "0.3.0" settings = {} serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serverSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) def loadSettings(): global settings with open('.linprconfig', 'r') as configFile: settings = json.load(configFile) def makeErrorResponse(errorNumber): with open("htdocs/error/default.html") as defaultErrorTemplateFile: defaultErrorTemplate = defaultErrorTemplateFile.readlines() formattedErrorTemplate = "" for line in defaultErrorTemplate: formattedErrorTemplate += (line.replace("{}", str(errorNumber))) return "HTTP/1.0 " + str(errorNumber) + "\n\n", formattedErrorTemplate, def makeResponse(filename): if filename == "/": filename = "/index.html"
{ "domain": "codereview.stackexchange", "id": 31210, "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, python-3.x, multithreading, reinventing-the-wheel, server", "url": null }
n\leq 5$$    ...(2)From (1) & (2) $$n\in (-\sqrt{21},\sqrt{21}),n\in Z.$$$$n=-4,-3,-2,-1,0,1,2,3,4$$$$\Rightarrow$$ Number of values of $$n$$ are $$9$$Mathematics
{ "domain": "byjus.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363480718236, "lm_q1q2_score": 0.8424453997370748, "lm_q2_score": 0.8558511543206819, "openwebmath_perplexity": 1182.3752828580566, "openwebmath_score": 0.7690576910972595, "tags": null, "url": "https://byjus.com/question-answer/there-are-two-circles-whose-equations-are-x-2-y-2-9-and-x-2-1/" }
distance (function), Finding the coordinates of point $R$ in a parallelogram, Finding the side of a triangle made from extending a diagonal, Find the largest diagonal of a parallelogram if the area is known, My friend says that the story of my novel sounds too similar to Harry Potter, I found stock certificates for Disney and Sony that were given to me in 2011, SSH to multiple hosts in file and run command fails - only goes to the first host, Disabling UAC on a work computer, at least the audio notifications. One of its sides is congruent (has the same length) to the parallelogram’s altitude. Try refreshing the page, or contact customer support. Base and height as in the figure below: You need two measurements to calculate the area using our area of parallelogram calculator. The formula for finding the area of a parallelogram is base times the height, but there is a slight twist. Asking for help, clarification, or responding to other answers. She has 15 years of experience teaching collegiate mathematics at various institutions. {{courseNav.course.mDynamicIntFields.lessonCount}} lessons Did you know… We have over 220 college A parallelogram is a 4-sided shape formed by two pairs of parallel lines. 5. As a member, you'll also get unlimited access to over 83,000 asked Apr 7, 2020 in Perimeter and Area of Plane Figures by Nidhi01 ( 59.8k points) perimeter and area A = bh A = 16,500 light-years × 10,000 light-years A = 165,000,000 light-years 2. The area of a parallelogram is the "base" times the "height." A = bh Thanks for contributing an answer to Mathematics Stack Exchange! Notice that the side of the eraser is a parallelogram! Not sure what college you want to attend yet? Visit the High School Geometry: Tutoring Solution page to learn more. A three-dimensional shape has its faces in parallelogram shape, is called parallelepiped. The base and the corresponding altitude of a parallelogram are 10 cm and 3.5 cm, respectively. Please help solve and explain how to solve this problem: In parallelogram ABCD, AB=6 cm, BC = 9.4 cm, and
{ "domain": "ottoaden.nl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9637799503770909, "lm_q1q2_score": 0.8052222858784095, "lm_q2_score": 0.8354835411997897, "openwebmath_perplexity": 1001.7956532464656, "openwebmath_score": 0.47417569160461426, "tags": null, "url": "http://ottoaden.nl/aosmzg/altitude-of-a-parallelogram-70a95d" }
python, console, validation, user-interface for date in undelivered_dates: print(', '.join(date)) # if no data was found, print an error message else: status_print(False, 'No results found.') ## update the application # under normal operation, this function should never run # if the update CLI argument is provided, this script will never run and the updater will be run instead def update(args: arg_namespace) -> None: status_print(False, "Update failed.") ## run the application def main() -> None: setup_and_connect_DB() args = define_and_read_args() args.func(args) if __name__ == '__main__': main() If you need it, here is a link to the GitHub repo for this project. It's at the same commit as the code above, and I won't edit this so that any discussion is consistent. https://github.com/eccentricOrange/npbc/tree/6020a4f5db0bf40f54e35b725b305cfeafdd8f2b The apostrophe here: "Edit a newspaper\'s name, days delivered, and/or price." does not need escaping since the string is double-quoted. This branching code: if status: print(f"{Fore.GREEN}{Style.BRIGHT}{message}{Style.RESET_ALL}\n") else: print(f"{Fore.RED}{Style.BRIGHT}{message}{Style.RESET_ALL}\n") should instead conditionally initialise a colour string, and then unconditionally pass that to a single format-and-print call. addudl needs a -> None. mypy will warn you about this when correctly configured. '|'.join([ should not use an inner list and should pass the generator directly. Similar cases elsewhere in the code.
{ "domain": "codereview.stackexchange", "id": 43241, "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, console, validation, user-interface", "url": null }
Hint: $$\frac{2\sqrt x-3x+x^2}{\sqrt x}=2-3\sqrt x+x^{3/2}$$ $\dfrac{-3x}{\sqrt{x}} = -3\sqrt{x}$, and $\dfrac{x^2}{\sqrt{x}} = x^{\frac{3}{2}}$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765569561562, "lm_q1q2_score": 0.805726079700204, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 280.8288766746616, "openwebmath_score": 0.8852040767669678, "tags": null, "url": "https://math.stackexchange.com/questions/812315/simplifying-fraction-with-square-root-as-denominator" }
np-complete, np-hard, np, p-vs-np, traveling-salesman Title: Is One Way TSP NP-Complete? I know that finding the optimal solution to One Way TSP (TSP but the salesman does not have to return to his original city) is NP-Hard, but is it NP-Complete? I ask this because I recently found a solution to Open TSP but can't find a good resource to tell me whether or not One Way TSP is NP-Complete. The answer depends on how you define "One Way TSP". If the One Way TSP problem asks to compute the tour itself, then it cannot possibly be NP-complete since it is not a decision problem, and hence it does not even belong to the class NP. If the problem is that of deciding whether there is a tour having cost at most $x$, for some input parameter $x$, then the problem belongs to NP (a yes-certificate is the tour itself) and it is NP-complete.
{ "domain": "cs.stackexchange", "id": 20956, "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": "np-complete, np-hard, np, p-vs-np, traveling-salesman", "url": null }
The third step is clear, and the last step is the well-known Gaussian integral. So we need only justify the the second step. There we need the inequality $\cos x \leq e^{-x^2/2}$, or equivalently $$\log \cos x + \frac{x^2}{2} \leq 0,$$ for $\left|x\right| < \pi/2$, with equality only at $x=0$. This is true because $\log \cos x +\frac12 x^2$ is an even function of $x$ that vanishes at $x=0$ and whose second derivative $-\tan^2 x$ is negative for all nonzero $x \in (-\pi/2, \pi/2)$. QED • I'm not sure what counts as elementary in this game, but I would think the easiest proof that $\frac{1}{\pi} \int \cos^{2n} x dx = \binom{2n}{n}/4^n$ is to write $\cos x = (e^{ix} + e^{-ix})/2$ and expand $\cos^{2n}$ by the binomial theorem. Jul 1 '13 at 14:18
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795110351223, "lm_q1q2_score": 0.860988995139168, "lm_q2_score": 0.8723473846343394, "openwebmath_perplexity": 220.5910884476683, "openwebmath_score": 0.9917317032814026, "tags": null, "url": "https://mathoverflow.net/questions/133732/upper-limit-on-the-central-binomial-coefficient" }
ros, tutorial, pr2 Originally posted by gvdhoorn with karma: 86574 on 2015-03-17 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by pexison on 2015-03-17: under this directory is only a cmake folder and a package.xml file, there are no more files/folders. Should I log an issue then? Comment by gvdhoorn on 2015-03-17: Yes, file an issue and please add a link to this question to the issue. Comment by DevonW on 2015-03-17: Thanks for bringing this up. I've fixed it and re-released it. See: https://github.com/ros/rosdistro/pull/7546 Comment by pexison on 2015-03-18: By the way, it is possible to use this library for the turtlebot? or it is only for PR2 robot? Comment by DevonW on 2015-03-18: Please open a new question if this one is answered.
{ "domain": "robotics.stackexchange", "id": 21141, "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, tutorial, pr2", "url": null }
python, python-3.x, rest, framework, cryptocurrency return url, {'headers': headers, 'params': params} class CCEXRest(RESTAPI): def __init__(self, key='', secret='', api_version='', url='https://c-cex.com/t'): super(CCEXRest, self).__init__(url, api_version=api_version, key=key, secret=secret) def sign(self, uri, endpoint, endpoint_path, method_verb, *args, **kwargs): nonce = self.nonce() try: params = kwargs['params'] except KeyError: params = {} params['apikey'] = self.key params['nonce'] = nonce post_params = params post_params.update({'nonce': nonce, 'method': endpoint}) post_params = urllib.parse.urlencode(post_params) url = uri + post_params sig = hmac.new(url, self.secret, hashlib.sha512) headers = {'apisign': sig} return url, {'headers': headers} class CryptopiaREST(RESTAPI): def __init__(self, key='', secret='', api_version='', url='https://www.cryptopia.co.nz/api'): super(CryptopiaREST, self).__init__(url, api_version=api_version, key=key, secret=secret) def sign(self, uri, endpoint, endpoint_path, method_verb, *args, **kwargs): nonce = self.nonce() try: params = kwargs['params'] except KeyError: params = {}
{ "domain": "codereview.stackexchange", "id": 23853, "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, python-3.x, rest, framework, cryptocurrency", "url": null }
• $$p=q{}{}{}{}$$ – Did Apr 24 '16 at 13:46 • "...then $\mu_1 \otimes \mu_2=\mu_1\mu_2$..." This is the point where you jump into the void. What is $\mu_1\mu_2$ already? – Did Apr 24 '16 at 13:54 • There is no reason to assume the OP meant $\mu_1$ and $\mu_2$ to be probability measures. The original statement of question did NOT say $\mu_1$ and $\mu_2$ were probability measures and the question makes perfect sense for measures in general. – Ramiro Apr 24 '16 at 14:31 • @drhab I agree. I removed the tag. – Ramiro Apr 24 '16 at 14:32 • I re-read the question and it acctually says that $\mu_1$ and $\mu_2$ are probability measures. What difference does it make in this case? – user202542 Apr 24 '16 at 14:57 Note that $E\times E$ has only 4 elements. For any $x\in E$ we have $$\mu_1\otimes\mu_2(\{(x,x)\}) =\mu_1(\{x\})\mu_2(\{x\})= \mu_2\otimes\mu_1(\{(x,x)\})$$ So we need to inspect only the two other points: $(0,1)$ and $(1,0)$. Let $p=\mu_1(\lbrace0\rbrace)$ and $q=\mu_2(\lbrace0\rbrace)$. Then we have $$p(\mu_2(E)-q) = \mu_1\otimes\mu_2(\{(0,1)\}) = \mu_2\otimes\mu_1(\{(0,1)\}) =q(\mu_1(E)-p) \tag{1}$$ and
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407152622596, "lm_q1q2_score": 0.8045895798546957, "lm_q2_score": 0.8267117962054049, "openwebmath_perplexity": 152.56442519991379, "openwebmath_score": 0.8614129424095154, "tags": null, "url": "https://math.stackexchange.com/questions/1756596/product-measure-problem" }
thermodynamics, differential-geometry, differentiation, notation, calculus Title: Physical meaning of the exterior derivative of the first law of thermodynamics We know, $$ dU = d \overline{q} - d \overline{W}.$$ suppose we took the exterior derivative on both sides, then: $$ 0= d( d \overline{q}) - d( d \overline{W})$$ This means, $$ d^2 \overline{q} = d^2 \overline{w} \tag{1}$$ However, do not be misled, the above expression is not equal to zero as followed from $d^2 (\text{anything})=0$, the quantity $ d \overline{q}$ is an inexact differential. What does the above equation (1) mean? How can we interpret the action of the exterior derivative onto a quantity containing both inexact and exact differentials? The first part of your question starts from a misunderstanding. It is better to forget about inexact differentials. What you write as $dq$ and $dw$ has nothing to do with differentials. In general, they are not even functions of the state variables, and there are no exterior derivatives one could take. Working on $dU$ alone is a different story. $U$ is a state function depending on some thermodynamic quantities like $S,V$, and $N$. The fact that $dU$ is closed ($d^2U=0$) implies the vanishing of the coefficients of the resulting 2-form, i.e., the equality of the second mixed derivatives. This result is known in thermodynamics as the so-called Maxwell relations. One example is the following: $$ -\left.\frac{\partial{P}}{\partial{S}}\right|_{V,N} = \frac{\partial^2{U}}{\partial{S}\partial{V}} = \frac{\partial^2{U}}{\partial{V}\partial{S}} = \left.\frac{\partial{T}}{\partial{V}}\right|_{S,N}. $$
{ "domain": "physics.stackexchange", "id": 80589, "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, differential-geometry, differentiation, notation, calculus", "url": null }
method of solving an ordinary differential equation of the form dy/dx=f(x,y), y(0)=y0. we have a second order method General 2nd order Runge-Kutta Methods w 0 = ; for j = 0;1; ;N 1, w Example Initial Value ODE dy dt. • It is single step method as Euler’s method. The Backward Differentiation Formula (BDF) solver is an implicit solver that uses backward differentiation formulas with order of accuracy varying from one (also know as the. That's the classical Runge-Kutta method. To solve the Blasius equation we will make use of the 4th order Runge-Kutta method, so called because it is 4th order accurate (the missing terms in the scheme are of the form h 5). In order to validate the numerical approach, Figure 9 shows the horizontal velocity contours generated by the standard explicit fourth‐order Runge‐Kutta scheme with s. FIRST ORDER ORDINARY DIFFERENTIAL EQUATIONS Solution. , // the argument of addElement must be an object) is used, the double values // x+h and yout must be made an instance (i. 1 to find the approximate solution for y(1. Follow 126 views (last 30 days) Luke on 25 Mar 2011.$$$ These coupled equations can be solved numerically using a fourth order. ACADO provides several Runge Kutta and a BDF integrator. One of the most frequently used of the Rung-Kutta family is the fourth order Runge-Kutta method or the classical fourth order Runge-Kutta method [7]. 2) using x = 0. Classical Runge-Kutta Fourth Order Method This method is the classical fourth order Runge-Kutta method for approximating the solution of the initial value problem y'(x) = f(x,y); y(x 0) = y 0 which evaluates the integrand,f(x,y), four times per step. Exponentially-Fitted Runge-Kutta Nystrom Method of Order Three for Solving Oscillatory Problems Malaysian Journal of Mathematical Sciences 19 Norazak et al. Solving systems of first-order ODEs! dy 1 dt =y 2 dy 2 dt =1000(1 "y 1 2) 2 1! y 1 (0)=0
{ "domain": "freccezena.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9873750529474512, "lm_q1q2_score": 0.8072526373313896, "lm_q2_score": 0.817574471748733, "openwebmath_perplexity": 695.2215890655395, "openwebmath_score": 0.7012003660202026, "tags": null, "url": "http://gwqt.freccezena.it/runge-kutta-2nd-order-method-solved-examples.html" }
inorganic-chemistry, crystal-structure, geochemistry, glass, minerals You are correct. The main difference is that sand is crystalline and glass is not—it is amorphous. The main component (> 95%) of common yellow sand is quartz (the mineral whose composition is SiO2). Note that not all sand is quartz. There are white sands containing calcite (CaCO3) and black sand (containing various heavy minerals). But the most common sand is indeed quartz sand: SiO2. Glass, the type you see in your everyday life, on the other hand, is not composed of pure SiO2. It has a bunch of other additives such as Na, K, B, and others. This is done to modify the properties of the glass and make it more suitable for human use. It doesn't matter much though for our discussion. So if they are made of the same thing, why the difference? The answer is cooling rate. If you cool molten SiO2 slow enough, the atoms have enough time to organize themselves into a crystalline structure. In the case of pure SiO2, this is a network of SiO4 tetrahedra: One silicon atom surrounded by four oxygens. If it cools too fast, then the crystalline structure does not form. It may be completely amorphous, or form into a sub-microscopic array of SiO2 crystals in various structures (CT-opal for example). What determines the cooling rate? Well, in the case of glass it is a matter of minutes. You've seen glass making: The glass is molten and very quickly it solidifies to a solid. In contrast, most of the quartz sand you're seeing is actually broken fragments of rocks called granite. This type of rock has abundant quartz in it, and it forms deep underground (as in 10s of kilometers) at very slow cooling rates. While a glass maker can take his glass and let it cool in the atmosphere or in water, molten silicate magma ("glass") deep in the Earth is surrounded by rocks that are in the hundreds of degrees. This slow cooling facilitates crystallization of the SiO2 into quartz rather than glass. How slow is this? At least tens of years, more commonly hundreds or even thousands of years. This is much slower than the seconds and minutes in glass making.
{ "domain": "chemistry.stackexchange", "id": 2445, "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": "inorganic-chemistry, crystal-structure, geochemistry, glass, minerals", "url": null }
bond, ions, ionic-compounds Title: Why is the overall charge of an ionic compound zero? My textbook simply says: Since an ionic compound consists of equal number of positive and negative ions, the overall charge of an ionic compound is zero. But why is the number of positive and negative ions equal? Can’t an ionic compound can have an unequal number of negative and positive ions? Why or why not? Sodium needs to lose 1 Electron to attain stable electronic configuration and chlorine needs to gain 1 electron to stable electronic configuration. In a big picture, the electron was transferred from sodium to chlorine in the same neutral crystal. No electron was supplied to the crystal from outside, it was already in the same system before and after the formation of NaCl. If the system before formation of NaCl was neutral then it will be neutral even after the formation of NaCl crystal. That may be the reason.
{ "domain": "chemistry.stackexchange", "id": 16745, "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, ions, ionic-compounds", "url": null }
$\implies n = \frac{(1+\sqrt(1461)}{2} = 19.6115148536$ ($\because n>0$) $\implies n = 20$ (ceiling of computed value) Hence the $20^{th}$ position maximizes the chances. Note: See my first comment below if you don't want to solve quadratic equation using discriminant method. • Is there a quick way to solve $n^2-n-365$ – Gerry May 29 '16 at 20:59 • So $n^2 - n >365$, $\implies (n - \frac 12)^2 -(\frac 12)^2 > 365$, $\implies (n - \frac 12)^2 > 365 + (\frac 12)^2$. Now reject the -ve part, $n - \frac 12 > \sqrt(365.25)$, $\implies n > 19.6115148536$ – Rahul May 29 '16 at 22:20 Let $p_n$ be the probability that the $n$th person in line wins, and let $q_n$ be the probability that the first $n$ persons have different birthdays. Then for a generic $n$ we have $$p_{n+1} = q_n \frac{n}{365} \\ p_{n+2} = q_n \frac{365-n}{365} \frac{n+1}{365}$$ and therefore $$\frac{p_{n+2}}{p_{n+1}} = \frac{(365-n)(n+1)}{365n}$$ This is larger than $1$ if and only if $$(365-n)(n+1) > 365n$$ which rearranges as $$n(n+1) < 365$$ Initially the $p_n$s grow steadily, but eventually they start to fall steadily towards $0$. The last $n$ for which $n(n+1)<365$ is $18$, so the largest $p_n$ will be $p_{20}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850867332735, "lm_q1q2_score": 0.8296206842991649, "lm_q2_score": 0.8438950966654772, "openwebmath_perplexity": 273.51267048348836, "openwebmath_score": 0.6899117231369019, "tags": null, "url": "https://math.stackexchange.com/questions/1804953/birthday-line-to-get-ticket-in-a-unique-setup" }
reference-request, compilers, semantics University courses on program analysis Anders Møller at Arhus University teaches a course that covers object-oriented and web technology. Bor-Yuh Evan Chang at University of Colorado Boulder has a foundational course that involves an OCaml implementation and a graduate course. Ben Hardekopf at the University of California Santa Barbara used to have a great set of assignments, but they are no longer available online. Some students who took his course seem to have made a Python implementation available. Markus Müller-Olm has a graduate course on analysis of Android. Reinhard Wilhelm at the University of Sarbruecken teaches a graduate course that covers static analysis applications such as timing analysis, cache behaviour prediction, and some shape analysis. Sumit Gulwani from MSR taught a nice course on statically estimating resource consumption of programs (time/memory) at the Oregon Summer School on Programming Languages. Koushik Sen at the University of California at Berkeley teaches a course that focuses on bug finding and whose topics cover concolic execution and software model checking. Jeffrey Foster at the University of Maryland teaches a course that covers type systems, model checking, alias analysis and a lot of the other usual material. Patrick Cousot spent a year at MIT and taught a comprehensive, foundational course on abstract interpretation. The assignments include an OCaml implementation which go from concrete collecting semantics to some algorithmically non-trivial ideas. A graduate course on abstract interpretation taught by some leaders in the field is a good place to catch up on even more theory. Patrick Cousot taught a short course on abstract interpretation at the Oregon Summer School on Programming Languages in 2009. Tools to play with I am not listing a lot of research tools here. There are many of those but I have tried to list a few that you can download and play with to understand the area better. Interproc is a very educational tool to play with to learn about numerical static analysis. The Apron Numeric Abstraction library if you are really into numeric analysis. Slayer is a shape analysis tool from Microsoft Research. jStar is an analyzer for Java that is based on separation logic. Microsoft Research has numerous groups developing numerous tools, many of which are available for download or have web-demos. I cannot list everything here and suggest you play with them. There is a lot more, but that's probably enough to keep you busy for a while.
{ "domain": "cs.stackexchange", "id": 20312, "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": "reference-request, compilers, semantics", "url": null }
quantum-mechanics, statistical-mechanics, electrons, polarization, density-operator Another thought: $|b_1|^2 = f$ and $|b_2|^2 = 1 - f$ in $(8.7)$, so that I would expect the density matrix to be a $2 \times 2$ matrix. But I really am unsure. This is not homework, I am trying to work through problems in QSM in order to read some papers this summer. Any help would be greatly appreciated. Generally speaking:
{ "domain": "physics.stackexchange", "id": 49781, "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, statistical-mechanics, electrons, polarization, density-operator", "url": null }
quantum-mechanics, angular-momentum, operators $$ The last equality holds, of course, formally, by dint of $a^\dagger a a = a a^\dagger a -a$. Now to you question: The (number) operator $a^\dagger a$ is a diagonal matrix with eigenvalues 0,1,2,3,4,... so the diagonal matrix under the square root sign has eigenvalues 2s,2s-1,2s-3,... terminating with a 0 in its bottom rightmost component. That is, it has only 2s+1 components, and cannot allow $S_-$ to lower a state past $a^{\dagger ~~2s}|0\rangle$, nor $S_+$ to raise it past $|0\rangle$! The states connected by these S operators then comprise a 2s+1 multiplet: a spin s representation of angular momentum. So, the diagonal matrix under the square root sign is not even infinite dimensional. How do you take a square root of a finite diagonal matrix D? It is but the diagonal matrix of the square root of each eigenvalue of the original matrix D.
{ "domain": "physics.stackexchange", "id": 57519, "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, angular-momentum, operators", "url": null }
chromosome, meiosis Title: Is there random assortment in metaphase II? First, a little notation. Call a the first chromosome from my mother and A its homologous partner from my father. b and B would be the second pair, c and C the third, and so on, down to w and W (the 23rd). The tetrads in interphase would be expressed as aa AA...ww WW (so, for example, AA are sister chromatids). Finally, use the notation a' and A' to express that those two chromatids have crossed over via recombination. Ok: I understand that in Metaphase I, there's a random assortment of chromosomes at the equator, so that we might end up with a division like so: aA' Aa' bB' b'B CC' c'C ... wW' Ww' Which pair ends up on the right or left is random, and there are therefore $2^{23}$ possible arrangements. My question is whether an analogous shuffle happens during metaphase II? I visualize metaphase II as taking one of the columns above and turning it on its side, so that for instance taking the right column you have: a' B C ... w' A b' c' W These "rows" are then split to become 2 of the 4 gametes. The question is whether at this stage, before this final split, there is an analogous shuffling possible whereby, say, the A and a' could switch sides? My intuition is yes, of course, but in all the accounts of meiosis I can find online, the "random assortment" and shuffling is all described as happening in metaphase I. (I think whether the shuffling between this particular A and a' happens in metaphase I or metaphase II is inconsequential in terms of which one ends up in which daughter cell... but I'd still like to have a sense for what's literally physically happening.) Metaphase I Your understanding of the metaphase I is not entirely correct. In normal (human) metaphase I homologous chromosomes separate. Therefore, sister chromatides go together. More precisely sister chromatides are kept together at centromere. You have only two possibilities for each chromosome: <-AA aa->
{ "domain": "biology.stackexchange", "id": 9489, "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": "chromosome, meiosis", "url": null }
ros-melodic libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f920b367000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f920af76000) libboost_system.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 (0x00007f920ad71000) libxmlrpcpp.so => /opt/ros/melodic/lib/libxmlrpcpp.so (0x00007f920ab53000) libcpp_common.so => /opt/ros/melodic/lib/libcpp_common.so (0x00007f920a948000) libboost_chrono.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.65.1 (0x00007f920a743000) libboost_filesystem.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 (0x00007f920a529000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f920a18b000) librosconsole_log4cxx.so => /opt/ros/melodic/lib/librosconsole_log4cxx.so (0x00007f9209f70000)
{ "domain": "robotics.stackexchange", "id": 34729, "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-melodic", "url": null }
# Are bounds known for the maximum determinant of a (0,1)-matrix of specified size and with a specifed number of 1s? The problems of determining the maximum determinant of an $n \times n$ $(0,1)$-matrix and the spectral problem of determining exactly which other determinants can possibly occur are both reasonably well studied. What I'd like to know is whether there are bounds known if the number of 1s in the matrix is specified. In other words, if we let $f(n,k)$ denote the maximum determinant of an $n \times n$ $(0,1)$-matrix with exactly $k$ ones (in total, not per row), then are there any known bounds on the values for $f(n,k)$? I've searched Math Reviews and Googled it, but all the papers that I have found refer to the maximum over the entire set of $n \times n$ matrices. Edit: Here is a plot of the maximum determinant of a binary $6 \times 6$ matrix with $k$ 1s, where $0 \leq k \leq 36$ (as long as I haven't messed up the computation). Edit 2: Here is the analogous plot for $7 \times 7$ matrices. Edit 3: Here is a plot of the bound given by Peter Mueller's post, together with the actual values for n=7.
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517494838938, "lm_q1q2_score": 0.829356345829626, "lm_q2_score": 0.8479677545357568, "openwebmath_perplexity": 219.36351414979177, "openwebmath_score": 0.9652072191238403, "tags": null, "url": "https://mathoverflow.net/questions/180604/are-bounds-known-for-the-maximum-determinant-of-a-0-1-matrix-of-specified-size" }
thermodynamics, combustion A non ideal candle may not be truly symmetrical and the wick may be at an angle and fuel flow up the wick may not enter the zone symmetrically relative to the candle body, but the above affects are observed to occur 'well enough' in everyday candles. Now consider two identical burning candles placed a distance "d" apart. When d is large the two candles burn independently and appear as before. As d is diminished the air between the two candles starts to be affected by both flames. Instead of drawing air from infinity, the centre air must be fed from "either side" of the centre line, as "there is a candle in the way out towards infinity". Also the air between the candles starts to be preheated by two sources of radiation rather than one so is hotter than at other points the same distance from a candle centre. As d is decreased the increase in air temperature near the common zone becomes increasingly hotter than elsewhere so air starts to rise convectively sooner prior to meeting the main combustion zone, so that combustion happens higher up in the inter-candle region. This effect can be seen quantitatively in this crop from the main image below.
{ "domain": "physics.stackexchange", "id": 51974, "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, combustion", "url": null }
electromagnetism, laser Pulsed lasers can be subdivided into three categories. 1. Long laser pulses : These are commercial grade lasers, the duration of these lasers is limited by the duration of the pumping source (ranges in milisecond to $\mu s$). These lasers are widely used in laser cutting drilling and laser based prototyping. 2. Short laser pulses: The duration of these type of lasers is in the range of picoseconds to nanoseconds. These lasers are used in the generatin of high temperature plasma, for Inertial confinement fusion and other pump probe studies (to probe rotational and vibrational energy levels). World's biggest lasers (such as National Ignition Facility NIF) falls in this category. 3. Ultrashort laser pulses: Broadly lasers with pulse duration <100 femtoseond falls in this category. These pulses are very short and can catpure very fast events such as electronic transfer. Moreover they can have very high powers ($>10^{15}$ W), upon focusing the electric field of these lasers can easily exceed atomic field, Hence very interesting nonlinear processes can be observed with these lasers. Try to read about, electron acceleration, Ion acceleration, High order harmonic generation using ultrashort laser pulses. These laser pulses can be used to generate world's fastest light events i.e.attosecond ($10^{-18}$s) pulses, which can probe extremely fast events such as electron tunelling dynamics, ionization dynamics, Photoelectron emission dynamics. With this explanation you will now get a glimpse of the usage of pulsed lasers. CW lasers are also developing in terms of power and energy but they are now at back seat. CW laser are mostly used for pumping the active medium to generate high rep rate (MHz) pulsed lasers. Thank you for your patience Regards,
{ "domain": "physics.stackexchange", "id": 31632, "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, laser", "url": null }
In the case of $\mathbb{C}$ over $\mathbb{C}$, the basis would be $\{1\}$ because every element of $\mathbb{C}$ can be written as a $\mathbb{C}$-multiple of $1$. $$\mathbb{C}=\{z\times 1 : z \in \mathbb{C}\}$$ In the case of $\mathbb{C}$ over $\mathbb{R}$, the basis would be $\{1,\mathrm{i}\}$ because every element of $\mathbb{C}$ can be written as an $\mathbb{R}$-multiple of $1$ and $\mathrm{i}$. $$\mathbb{C}=\{x\times 1 + y \times \mathrm{i} : x,y \in \mathbb{R}\}$$ If $\{{\bf v}_1,\ldots,{\bf v}_n\}$ is a basis for $V$ over $\mathbb{C}$ then $$V = \{a_1{\bf v}_1+\cdots+a_n{\bf v}_n: a_k \in \mathbb{C} \}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464520028357, "lm_q1q2_score": 0.8333731270056236, "lm_q2_score": 0.8539127585282744, "openwebmath_perplexity": 274.65235707544724, "openwebmath_score": 0.9963643550872803, "tags": null, "url": "https://math.stackexchange.com/questions/1383295/finding-a-basis-of-a-complex-vector-space-over-bbb-r-given-a-basis-over-bbb" }
algorithms, graphs, optimization Title: Using Clique decision to solve Clique optimization How can you perform the clique decision algorithm fewer than $ O(n) $ times to solve clique optimization? I'm not sure if my approach is right but this is my thought process: you would pick vertices in a graph and see if they form a clique, then keep picking more vertices until you have the max possible clique. I'm not sure how it can be done less than $ O(n) $ times. I can imagine an undirected graph such as: where $ \{A, B, C\} $ and $ \{B, C, D\} $ would be cliques. The number of vertices is 4, and the number of vertices in the cliques is 3, which is $ n - 1 $. Would this count as being done in less than $ O(n) $ times, or is this the wrong approach to this problem? You would use binary search. Start with the lower bound being 3 and the upper bound $n$, where $n$ is the number of vertices. Call your clique decision oracle with a $k$ value halfway between the two bounds. If it answers "yes", move your lower bound to $k + 1$. If it answers "no", move your upper bound down to $k - 1$. Repeat until you have found the largest $k$ value the oracle answers "yes" to. It should take $O(\log n)$ calls to the oracle.
{ "domain": "cs.stackexchange", "id": 732, "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": "algorithms, graphs, optimization", "url": null }
homework-and-exercises, electricity, electric-circuits, electrical-resistance Title: Current Through a Circuit with an 8 Resistor Setup The following is a question from a practice Physics GRE exam (found online at ETS's website). The circuit shown in the figure consists of eight resistors, each with resistance R, and a battery with terminal voltage V and negligible internal resistance. What is the current flowing through the battery? Here is the figure in question: In case the figure doesn't load, here's the problem from ETS: https://www.ets.org/s/gre/pdf/practice_book_physics.pdf, page 54, problem 68. Since this is a GRE question I figured there was a shorter approach than a brute-force, Kirchoff's Voltage Law around every loop. I've been trying to figure out what a simpler solution would be by reducing parallel/series resistors, which currently there aren't any that can be reduced that way. Then I tried a triangle-star conversion, where I basically reduced each closed square in the diagram (each square was essentially a triangle because each had a resistor-less wire on one of the sides) but that also didn't lend itself to parallel/series reduction. I couldn't figure out another approach after that. The correct answer is 3/2**V/R*, and an abbreviated solution I saw someone else put online (http://physicsworks.files.wordpress.com/2012/09/gr0877_solutions.pdf, problem 68, if you're interested) said to treat the problem as 3 separate 2 R resistors in parallel, but I am not sure how that works, because there are still the two horizontal resistors. Could someone explain to me either why this approach to the problem is correct or an alternative approach to the problem? Thank you! The voltage across either horizontal resistor is zero so they can be removed from the circuit without changing the solution.
{ "domain": "physics.stackexchange", "id": 8929, "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, electricity, electric-circuits, electrical-resistance", "url": null }
reference-request, computability, fl.formal-languages, automata-theory Title: Equivalence problem for one-counter automata I know that the equivalence problem for deterministic one counter automata is decidable, however does anyone know whether it is decidable for all one counter automata or just the deterministic ones? Any information would be useful, I don't know if this is an open problem or if it has a solution. If there is a known proof (of either decidability or undecidability) then a reference would be greatly appreciated. I have no time to check the references in detail, but Ibarra states in http://dx.doi.org/10.1007/BF01744294 that, according to Greibachand Baker and Book, the universe problem (is the language $\Sigma^*$?) for non-deterministic one-counter machines with at most one counter reversal is undecidable. In addition to this, Ibarra considers even more restricted classes for which this problem is undecidable. Hence, even a subproblem of equivalence is undecidable for a subclass of non-deterministic one-counter machines.
{ "domain": "cstheory.stackexchange", "id": 905, "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": "reference-request, computability, fl.formal-languages, automata-theory", "url": null }
newtonian-telescope, declination, right-ascension Yes, the object will be 5 minutes west of the eyepiece. Since your setting circle does not update during that time, you need to position the scope 5m to the west, or to 5h 30m right ascension (not 5h 40m R.A.). Yes. Before moving to the next object, you should reset the right ascension setting circle to the coordinate of the current object. Then move to the next object. Then compensate for the time it took to move the scope. Of course, switch to a low power eyepiece just before starting the move to increase the chance that the next object will be in the field of view. Mechanical setting circles are useful for small jumps. I have used them on my scope to locate Venus near the Sun. I have also used the circles on the scope at my club's observatory to locate planets in the day. (That is slightly different that your setup since the club's scope is permanently mounted, professionally made, and has really large circles -- all of which help to reduce any errors.) If I remember correctly, the "rule of thumb" is that mechanical circles should be about the same diameter as the optics in order to be "accurate". A 200 mm reflector (the diameter of the mirror = 200 mm) should have circles that are about 200 mm in diameter. But anything should definitely get you close to the target.
{ "domain": "astronomy.stackexchange", "id": 2660, "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-telescope, declination, right-ascension", "url": null }
ros, sound-play Title: Changing Festival voice used by ROS Hi, I am trying to incorporate text-to-speech for speech production while teleoperating a PR2, and am attempting to change the default voice used by the 'sound_play' node. As per http://ubuntuforums.org/showthread.php?t=751169 , I have added improved voices to festival on the robot, and used (set! voice_default 'voice_nitech_us_rms_arctic_hts) in the /etc/festival.scm file. When I run festival from the command line, the improved default voice is used. Additionally, I created a python script which makes essentially the same call that I believe the soundplay node is making : os.system('text2wave '+txtfilename+' -o '+wavfilename) [soundplay_node.py, l. 192], which converts the text in a sample file to a .wav file using the correct voice. Since making the changes, the robot has been stopped/started, and other users have confirmed the improved voice. However, whenever I publish text for speech via the SoundRequest topic, or use the sound_play/say.py, the resulting speech uses the original unchanged voice. I cannot see anywhere that ros sets the Festival voice to use, but may have missed something. Any further direction would be most appreciated.
{ "domain": "robotics.stackexchange", "id": 4944, "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, sound-play", "url": null }
parsing, regex, julia if !isnothing(match(qux_pattern, s)) f.qux = match(qux_pattern, s)[1] end return f end But that approach seems ugly and becomes verbose very quick if more/new patterns are introduced. Question Is there a nicer but readable way to achieve this? Preferably without combining/changing the regex patterns or too much regex magic, however I am open to that route too if it is the only nice (less verbose) way. I am of course also open to general tips. To keep things simple, just assume that the patterns my example is looking for only appear 0 or 1 times. However if the only way to make this nicer involves writing another function like safematch which does the check for nothing and returns the captured value or nothing, I would want that to also work with multiple matches somehow and stay a bit more general. The easiest thing I can think of is to use eachmatch -- when there is no match at all, it returns an empty iterator: julia> collect(eachmatch(r"(bar:(\w*))", "bla bar:werfsd 1223 bar:skdf")) 2-element Array{RegexMatch,1}: RegexMatch("bar:werfsd", 1="bar:werfsd", 2="werfsd") RegexMatch("bar:skdf", 1="bar:skdf", 2="skdf") julia> collect(eachmatch(r"(bar:(\w*))", "bla ")) RegexMatch[]
{ "domain": "codereview.stackexchange", "id": 40208, "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": "parsing, regex, julia", "url": null }
beginner, programming-challenge, functional-programming, f#, playing-cards let straightFlushCards = [ { Suite = Clubs; Valeur = Nine }; { Suite = Clubs; Valeur = King }; { Suite = Spades; Valeur = Ace }; { Suite = Clubs; Valeur = Queen }; { Suite = Clubs; Valeur = Jack }; { Suite = Clubs; Valeur = Ten }; { Suite = Diamonds; Valeur = Ten}] let fourOfAKindCards = [ { Suite = Spades; Valeur = King }; { Suite = Hearts; Valeur = King }; { Suite = Clubs; Valeur = King }; { Suite = Spades; Valeur = Ace }; { Suite = Spades; Valeur = Two }; { Suite = Spades; Valeur = Ten }; { Suite = Diamonds; Valeur = King }] let fullHouseCards = [ { Suite = Spades; Valeur = King }; { Suite = Hearts; Valeur = King }; { Suite = Clubs; Valeur = King }; { Suite = Spades; Valeur = Queen }; { Suite = Spades; Valeur = Nine }; { Suite = Spades; Valeur = Ten }; { Suite = Diamonds; Valeur = Ten}] let straightCards = [ { Suite = Hearts; Valeur = Seven }; { Suite = Clubs; Valeur = Eight }; { Suite = Spades; Valeur = Ace }; { Suite = Clubs; Valeur = Nine }; { Suite = Spades; Valeur = Jack }; { Suite = Spades; Valeur = Ten }; { Suite = Diamonds; Valeur = Ten}] let threeOfAKindCards = [ { Suite = Hearts; Valeur = Seven }; { Suite = Clubs; Valeur = Eight }; { Suite = Spades; Valeur = Ace }; { Suite = Hearts; Valeur = Eight }; { Suite = Spades; Valeur = Jack }; { Suite = Spades; Valeur = Eight }; { Suite = Diamonds; Valeur = Ten}]
{ "domain": "codereview.stackexchange", "id": 22360, "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, programming-challenge, functional-programming, f#, playing-cards", "url": null }
algorithms, dynamic-programming, subsequences Is there any way I can make this any faster than $O(n^2)$? Or if not, is there any efficient way to reduce the number of computations? Or am I missing some simplification to the problem that doesn't require me to compute every $X_{i,j}$? I'm sort of new to dynamic programming, so it's been hard to wrap my brain around this problem. My original solution was too slow by a factor of about 5 seconds (vs the time limit of 4 seconds for the challenge), so I believe even a constant factor reduction in time would make the solution acceptable. Yes, this can be solved much more efficiently. You can solve this problem in $O(b 2^b)$ time using a FFT, if each number is a $b$-bit number. In the comments, you said $b=16$, so this should be an efficient solution: something like $2^{21}$ steps of computation. Consider the sequence $b_{-1},b_0,b_1,\dots,b_n$ defined by $b_{-1}=0$ and $b_i = a_0 \oplus a_1 \oplus \dots \oplus a_i$. Now your problem is equivalent to asking for the value that appears most frequently, out of all of the values $b_i \oplus b_j$ with $i<j$. Let $x \in \mathbb{N}^{2^b}$ be the characteristic vector of $b_{-1},b_0,\dots,b_n$. In other words, $x_v$ is equal to the number of times that $v$ appears in the values $b_{-1},b_0,\dots,b_n$; or, equivalently, $x_v = \#\{i : -1 \le i \le n, b_i = v\}$.
{ "domain": "cs.stackexchange", "id": 3388, "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": "algorithms, dynamic-programming, subsequences", "url": null }
c++, performance, c++11, matrix d_matrix[20*DIM+45] = 1; // start somewhere // vector calculations START_TIMING_ND; for (int iter = 0; iter < ITERATIONS; iter++) { std::vector<double>::iterator dit = d_matrix.begin(); std::vector<double>::iterator cit = cmatrix.begin(); // Store 0.1 * d_matrix; while(dit != d_matrix.end()) { *cit++ = 0.1 * *dit++; } std::vector<double>::iterator pf0 = d_matrix.begin() + DIM+1; // [1][1] std::vector<double>::iterator pf1 = cmatrix.begin() + DIM; // [1][0] std::vector<double>::iterator pf2 = cmatrix.begin() + DIM+2; // [1][2] std::vector<double>::iterator pf3 = cmatrix.begin() + 1; // [0][1] std::vector<double>::iterator pf4 = cmatrix.begin() + 2*DIM+1; // [2][1] std::vector<double>::iterator stop = d_matrix.begin() + DIM*DIM - DIM - 1; // [DIM-2][DIM-1] while(pf0 != stop) { *pf0 = (*pf0++)*0.6 + (*pf1++) + (*pf2++) + (*pf3++) + (*pf4++); } dit = d_matrix.begin(); std::vector<double>::iterator deit = d_matrix.begin() + DIM - 1; // [0][DIM-1]
{ "domain": "codereview.stackexchange", "id": 13106, "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, matrix", "url": null }
sun, renewable-energy, solar-cells Title: How far from the Sun is a photovoltaic effective? Just what the title states. Photovoltaic cells convert incident light to electricity; this probably means they create less electricity when it is dark - as in deep space. How far can a solar cell be taken from the Sun, and still be effective? The Juno mission to Jupiter, if successful, will be the furthest that we've managed to get PV work to date. It was launched on 5 August 2011; it is already beyond Mars orbit, and will, all being well, reach Jupiter in July 2016. There isn't a physics limit to the distance at which photovoltaics work. If a photon of suitable wavelength reaches the PV (and we have every reason to believe that distance in and of itself is no barrier), then the panel can work. As others have noted, for something that's behaving as a point source of light, (e.g. the Sun, when you're far enough away), the amount of energy falls off with the square of the distance, so there are challenges - but these are economic, technical and engineering challenges. From the literature (see next section), cell efficiencies hold up down to about 1% of daylight levels, which suggests that going to distances ten times further from the sun could be viable. (pausing to note that even when efficiencies hold up, you need 100 times the surface area to capture the same amount of power, when you are ten times further away.) In the literature Bunea et al, in Low Light Performance of Mono-Crystalline Silicon Solar Cells, looked at light levels down to 0.1% of surface daylight (i.e. $1Wm^{-2}$), and found that efficiencies stayed around the 20-23% level between 0.01 and 1 full suns ($10\to100 Wm^{-2}$), and dropped down to around 10% going down to 0.001 (0.1%) full sun.
{ "domain": "physics.stackexchange", "id": 4551, "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": "sun, renewable-energy, solar-cells", "url": null }