text
stringlengths
1
1.11k
source
dict
quantum-mechanics, schroedinger-equation, potential, scattering Solve the time-independent Schrodinger equation to find the energy eigenstates. There will be a continuous spectrum of energy eigenvalues. In the region to the left of the potential, identify a piece of the wavefunction that looks like $Ae^{i(kx - \omega t)}$ as the incoming wave. Ensure that to the right of the potential, there is not piece of the wavefunction that looks like $Be^{-i(kx + \omega t)}$, because we only want to have a wave coming in from the left. Identify a piece of the wavefunction to the left of the potential that looks like $R e^{-i(kx + \omega t)}$ as a reflected wave. Identify a piece of the wavefunction to the right of the potential that looks like $T e^{i(kx - \omega t)}$ as a transmitted wave. Show that $|R|^2 + |T|^2 = |A|^2$. Interpret $\frac{|R|^2}{|A|^2}$ as the probability for reflection and $\frac{|T|^2}{|A|^2}$ as the probability for transmission.
{ "domain": "physics.stackexchange", "id": 4440, "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, schroedinger-equation, potential, scattering", "url": null }
general-relativity, gravitational-waves, gauge $$ R^{\mu\nu} = 0. $$ If we choose $U$ and $V$ as $e^{i k^\mu x_\mu}$ (the wave equation then reduces to $k^\mu k_\mu = 0$) and add the rotated solutions (that is plane waves travelling in $x$ and $y$ direction), we get a complete basis set of wave states, from which we can construct physical solutions as wave packets. This is in complete analogy to the way physical wave packet solutions of the Maxwell equations can be Fourier developed in terms of unphysical plane wave solutions. A wave packet with finite extension in the $x$ or $y$ direction must include some non-zero $k_x$ and $k_y$ components by the uncertainty relation for the Fourier transform.
{ "domain": "physics.stackexchange", "id": 26961, "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, gravitational-waves, gauge", "url": null }
ros, calibration, camera-calibration, camera-info-manager This of course ignores radial (and other) distortion, which may also by influenced by the focal length (at least so do I think). Then I'd publish the updated camera matrix to the appropriate camera_info topic. What do you think about this approach? Has there already been something doing a similar task? Originally posted by peci1 on ROS Answers with karma: 1366 on 2016-04-26 Post score: 3
{ "domain": "robotics.stackexchange", "id": 24473, "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, calibration, camera-calibration, camera-info-manager", "url": null }
immune-system, antibody, antigen (b) Do the antibodies produced against a certain antigen differ between members of the same species or between species? Yes, in both cases. There is an important genetic variability surrounding immunoglobulins and T cell receptors. Reference: Karp, G. (2009). Molecular and Cellular Biology: Methods and Concepts. Wiley. New York.
{ "domain": "biology.stackexchange", "id": 10678, "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": "immune-system, antibody, antigen", "url": null }
python, performance, python-3.x, numpy N, M = 100, 50 x = np.arange(-N, N+1) X, Y = np.meshgrid(x, x) Z = z_noise * np.random.normal(size=X.shape) # use random Z noise for now positions = [X, Y, Z] A = np.linspace(0, 0.2, M) answers = [] for w_beam in (1, 2, 4, 8): E = [] tstart = time.time() for i, a in enumerate(A): EE = [] for b in A: e = E_ab(a, b, positions, w_beam, k0) EE.append(e) E.append(EE) print(w_beam, time.time() - tstart) answers.append(np.array(E)) if True: plt.figure() for i, E in enumerate(answers): plt.subplot(2, 2, i+1) plt.imshow(np.log10(np.abs(E)), vmin=0.0001) plt.colorbar() plt.show() I managed to make your script a bit faster. See the comments in the source code: import numpy as np import matplotlib.pyplot as plt import time # Makes it so numpy always outputs the same random numbers which is # useful during development. Comment out the line in production. np.random.seed(1234)
{ "domain": "codereview.stackexchange", "id": 37007, "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", "url": null }
php Oftentimes with dependency injection you will have a dependency injection container that handles the details for you, and these containers usually have a way of flagging classes as "singleton" classes, which means that the dependency injection container will never initialize more than one. At that point in time though, the classes don't implement the singleton pattern: they act like normal classes with a normal constructor, and rely on the DI container to make sure there is only one. Passwords in config files This is fairly common, and is normally fine. Just make sure that the file with your DB credentials isn't committed to your code repository. Public functions
{ "domain": "codereview.stackexchange", "id": 28084, "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": "php", "url": null }
as "$$h$$" in "$$\lim_{h \to 0} \lfrac{x(t+h)-x(t)}{h}$$". Finally, we permit the evaluation of the variables at a given point, so for example we might say "when $$x = 0$$, ..." which should be interpreted as "for every $$t$$ such that $$x(t) = 0$$, ...".
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399060540358, "lm_q1q2_score": 0.816772842678595, "lm_q2_score": 0.8418256532040708, "openwebmath_perplexity": 184.89961468617682, "openwebmath_score": 0.9146476984024048, "tags": null, "url": "https://math.stackexchange.com/questions/2117928/when-is-the-derivative-of-an-inverse-function-equal-to-the-reciprocal-of-the-der?noredirect=1" }
c++, catkin, roscore, rosrun, ros-groovy ## Generate added messages and services with any dependencies listed here # generate_messages( DEPENDENCIES std_msgs ) ## catkin specific configuration ## ################################### ## The catkin_package macro generates cmake config files for your package ## Declare things to be passed to dependent projects ## INCLUDE_DIRS: uncomment this if you package contains header files ## LIBRARIES: libraries you create in this project that dependent projects also need ## CATKIN_DEPENDS: catkin_packages dependent projects also need ## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( # INCLUDE_DIRS include # LIBRARIES beginner_tutorials # CATKIN_DEPENDS roscpp rospy std_msgs # DEPENDS system_lib ) ########### ## Build ## ########### ## Specify additional locations of header files ## Your package locations should be listed before other locations # include_directories(include) include_directories( ${catkin_INCLUDE_DIRS} )
{ "domain": "robotics.stackexchange", "id": 16304, "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++, catkin, roscore, rosrun, ros-groovy", "url": null }
python, performance, python-3.x, programming-challenge After I read further down, it became clear that the purpose of these two lines was to create type aliases for clearer annotations. However, you could maybe consider adding a comment above these two lines to explain what's going on. Alternatively, consider using typing.Annotated or typing.NewType. (Personally, I'm a fan of typing.Annotated.) For example, perhaps: from typing import Annotated EvenFibSum = Annotated[ int, "A positive integer representing the sum " "of all even Fibonacci numbers below some limit" ] Limit = Annotated[ int, "A positive integer representing the limit " "below which all even Fibonacci numbers are to be summed" ]
{ "domain": "codereview.stackexchange", "id": 41861, "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, programming-challenge", "url": null }
computability, programming-languages, decision-problem A model that is close to your definition of procedures is the RAM machine. It's also possible to define a model based more closely on imperative programming with variable names. Two models based on function calls are µ-recursive functions and the lambda calculus. Both of these models require more than the ability to call a function. With µ-recursive functions, there is a way to iterate calls to a function (the primitive recursion operator) and a way to call functions recursively until a condition is reached (the minimisation operator). Think of the primitive recursion operator as for loops and of the minimisation operator as while loops (building a general while loop requires more than the minimisation operator because that operator extracts only a specific part of the functionality). With the lambda calculus, functions can be defined and applied to other functions. This unbridled functionality allows building recursive functions and thus arbitrary computations.
{ "domain": "cs.stackexchange", "id": 6882, "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": "computability, programming-languages, decision-problem", "url": null }
Conic Has Coordinates Of (. Circles, ellipses, and hyperbolas are evaluated. By changing the angle and location of the intersection, we can produce different types of conics. By using this website, you agree to our Cookie Policy. (The axis of a conic is the line joining the foci and the (If the conic is not a hyperbola put y+1 on the (If the conic is not a hyperbola put y +1 on the Get more help from Chegg Get 1:1 help now from expert Precalculus tutors Solve it with our pre-calculus problem solver and calculator. The general form equation for all conic sections is:. If you are asked to graph a rotated conic in the form + + + + + =, it is first necessary to transform it to an equation for an identical, non-rotated conic. conic sections/ circles triangles/polygons 3D and higher polyhedra History/Biography Logic Measurement calendars/ dates/time temperature terms/units Number Sense factoring numbers negative numbers pi prime numbers square roots Probability Puzzles Ratio/Proportion
{ "domain": "cfalivorno.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.986777180580855, "lm_q1q2_score": 0.8044528262201186, "lm_q2_score": 0.8152324983301568, "openwebmath_perplexity": 643.8893938340042, "openwebmath_score": 0.4354986250400543, "tags": null, "url": "http://ngyp.cfalivorno.it/conic-sections-calculator.html" }
image-processing, convolution, separability endfunction How is conv2() so radically fast? Because loops in MATLAB/Octave are slow (mostly because they are interpreted languages not compiled) and such operations are typically implemented in C/C++ for performance reasons. You could even further speed these up by reverting to better C/C++ implementations and writing your mex wrappers.
{ "domain": "dsp.stackexchange", "id": 4557, "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": "image-processing, convolution, separability", "url": null }
electromagnetism, geophysics, metals, radio-frequency Title: Why are only the extremely low frequencies of electromagnetic radiation able to penetrate the earth and sea? Wikipedia classifies ELF (Extremely Low Frequency) radiation as between 3 Hz and 300 Hz, and ULF (Ultra Low Frequency) from 300 Hz to 3 kHz. Both ranges can penetrate the earth and sea. What is the physics behind why this is so? What would be the ideal frequency then to scan up to 500 feet underground for metal detection, a sort of underground metal detection radar? The physics of the attenuation is that of the physics in conductive materials. The skin depth is a conductor is (see Wikipedia at https://en.m.wikipedia.org/wiki/Skin_effect), $d = \sqrt(2/\mu_0\sigma\omega)$ See also a simple derivation online at http://farside.ph.utexas.edu/teaching/315/Waves/node65.html
{ "domain": "physics.stackexchange", "id": 41609, "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, geophysics, metals, radio-frequency", "url": null }
Equate [1] and [2]: . $X^{\log(Y)} \;=\;Y^{\log(X)}$ 4. Originally Posted by Soroban Hello, jimbutler83! You're on the right track . . . $\text{Let: }\:X^{\log(Y)} \:=\:P$ .[1] Take logs: . $\log\left(X^{\log(Y)}\right) \:=\:\log(P) \quad\Rightarrow\quad \log(Y)\!\cdot\!\log(X) \:=\:\log(P)$ We have: . $\log(X)\!\cdot\!\log(Y) \:=\:\log(P) \quad\Rightarrow\quad \log\left(Y^{\log(X)}\right) \:=\:\log(P)$ Hence: . $Y^{\log(X)} \:=\:P$ .[2] Equate [1] and [2]: . $X^{\log(Y)} \;=\;Y^{\log(X)}$ thanks so much, though i was wondering if it is possible to explain this step a bit more clearly.. why does $\log(X)\!\cdot\!\log(Y) \:=\:\log\left(Y^{\log(X)}\right)$ is this some kind of log property ? thanks again. 5. Originally Posted by jimbutler83 thanks so much, though i was wondering if it is possible to explain this step a bit more clearly.. why does $\log(X)\!\cdot\!\log(Y) \:=\:\log\left(Y^{\log(X)}\right)$ is this some kind of log property ? thanks again. Yes.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138144607745, "lm_q1q2_score": 0.8230645646852414, "lm_q2_score": 0.8418256472515684, "openwebmath_perplexity": 1116.636365066734, "openwebmath_score": 0.8803659677505493, "tags": null, "url": "http://mathhelpforum.com/pre-calculus/126081-need-help-solving-proof-logarithmic-function.html" }
exoplanet, trappist-1 The luminosity of a brown dwarf decreases with time and it this measured luminosity (along with the spectral type) that allows an estimate of the mass and a lower limit to the age using stellar evolutionary models. If I look at the Baraffe et al. (2015) low-mass evolutionary models and look at the locus of luminosity versus time for a $0.08\ M_{\odot}$ star like Trappist-1, you can see that the current luminosity implies an age of $\sim 500$ million years. But if you go back in time, the star was more luminous and for that reason, planets that are currently in the habitable zone (said to be planets e,f,g) were not so in the past. The details of a habitable zone (HZ) calculation can be complex, but basically the radius of the habitable zone scales as the square root of the luminosity. If planets d and h are not currently in the HZ then we can use these as a conservative definition of the HZ boundary.
{ "domain": "astronomy.stackexchange", "id": 2139, "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": "exoplanet, trappist-1", "url": null }
quantum-field-theory, quantum-electrodynamics, virtual-particles How do we know about these virtual photon exchanges given the fact that we can't observe them directly? How did we arrive at "electrons exchange virtual photons and that's the cause of the electromagnetic force between them" from merely observing electrons absorbing or emitting photons? If electrons throw photons at each other doesn't that mean that they should only scatter (repel)? If that is so why do magnets and opposite charged particles attract ?
{ "domain": "physics.stackexchange", "id": 10346, "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, quantum-electrodynamics, virtual-particles", "url": null }
c++, object-oriented, comparative-review, template, inheritance In terms of "what's different between these 2 Options", I have put a modified version of your code on godbolt. Modified only to be able to turn on -O3 without the compiler removing the programme. The inheritance code is the same. You can clearly see that Derived1 has a vtable, and Derived2 does not.
{ "domain": "codereview.stackexchange", "id": 37221, "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++, object-oriented, comparative-review, template, inheritance", "url": null }
python Title: Application to test my own website security I made a simple application to test your own website security for DDoSes in Python. Any suggestion is welcome. import random import socket import threading import time
{ "domain": "codereview.stackexchange", "id": 16255, "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", "url": null }
# Closed form for $\sum_{k=0}^{n} \binom{n}{k}\frac{(-1)^k}{(k+1)^2}$ How can I calculate the following sum involving binomial terms: $$\sum_{k=0}^{n} \binom{n}{k}\frac{(-1)^k}{(k+1)^2}$$ Where the value of n can get very big (thus calculating the binomial coefficients is not feasible). Is there a closed form for this summation? • Wolfram has a suggestion, which is beyond my comprehension. – Hendrik Jan Dec 9 '12 at 10:26 • The same answer with maple $\frac{\psi(n+2)+\gamma}{n+2}$. – Mhenni Benghorbal Dec 9 '12 at 10:57 • @Michael: can you add (as a one-liner) in what context you found the question? Just curious. – Hendrik Jan Dec 9 '12 at 16:21 Apparently I'm a little late to the party, but my answer has a punchline!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936068886642, "lm_q1q2_score": 0.8200694128199589, "lm_q2_score": 0.8333246015211008, "openwebmath_perplexity": 1000.7755797026364, "openwebmath_score": 1.0000076293945312, "tags": null, "url": "https://math.stackexchange.com/questions/254416/closed-form-for-sum-k-0n-binomnk-frac-1kk12" }
c++, caesar-cipher std::vector<std::string> encode(const std::vector<std::string> &str, int shift) { std::vector<std::string> tempMsg; for (std::string lines : str) { // std::transform(lines.cbegin(), lines.cend(), std::back_inserter(tempMsg), [&](char ch) -> char for (char &ch : lines) { if (ch == 'z' || ch == 'Z') { ch -= 25; } else if (isspace(ch)) { ch = ' '; } else { ch += shift; } } tempMsg.push_back(lines); } return tempMsg; } std::vector<std::string> decode(const std::vector<std::string> &str, int shift) { return encode(str, -1 * shift); } int main(int argc, char *argv[]) { int choice; std::cout << "What do you want to do? 1.Encrypt, 2.Decrypt: "; std::cin >> choice; int key; std::cout << "Enter desired shift: "; std::cin >> key;
{ "domain": "codereview.stackexchange", "id": 33781, "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++, caesar-cipher", "url": null }
electricity, electric-circuits, voltage, electrical-resistance, electric-current resistance is $R_i$ and the load resistance is $R_l$, with a open circuit potential difference of $V$, the current will be $I=\frac{V}{R_i + R_l}$. If you had a proper zero resistance load (a real short circuit), the difference of potential across the load would be exactly zero but, being the resistance also zero, you would not need a potential difference to support a current (think of electrons flowing frictionless in your load, so you don't need to provide energy to allow the electrons to win the friction, therefore current without difference of potential). In this case the current would be $I=\frac{V}{R_i}$.
{ "domain": "physics.stackexchange", "id": 5287, "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": "electricity, electric-circuits, voltage, electrical-resistance, electric-current", "url": null }
c#, parsing, math-expression-eval //cycles until the most recent ( is found. If not found, error. while (tokenStack.Count != 0) { temp = tokenStack.Pop(); if (temp.VALUE == "(") { found = true; return; } else { tokenQue.Enqueue(temp); } } if (!found) { Console.WriteLine("Error with '(' section of OperationHandler"); //error code } } else { Token temp = CreateToken(TokenType.Operand, opp.ToString());
{ "domain": "codereview.stackexchange", "id": 7360, "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#, parsing, math-expression-eval", "url": null }
must the... Are two Poisson processes, is on average 10 e-mails every 2 hours any 10 minute interval } 3.5^4 {... Models many real-world phenomena geometric refer to particular aspects of that space follows a Poisson process an! Is large and p is small facts as well as some related probability distributions lessons... Down the page for examples and Formula example 1 Superposition of independent Poisson processes operating,... 6 } 6^5 } { 5! probability distributions Poisson ( 1781-1840 ) distribution if is. Whole mechanism ; the names binomial and geometric refer to particular aspects of that mechanism long! N1 ( t ) and N2 ( t ), t every hour the. Assistant solves the same problem of events in an interval for a variable. The binomial distribution and the second arrival in N1 ( t ), t care him! Formula example 1 Superposition of independent Poisson processes with IID interarrival times particularly. Any 2-mile interval between 9pm and midnight s say you are a cashier at Wal-Mart
{ "domain": "lockxx.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517501236461, "lm_q1q2_score": 0.8107450542907677, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 666.5397362841131, "openwebmath_score": 0.709040641784668, "tags": null, "url": "https://lockxx.com/jf6s5/592166-poisson-process-problems" }
c#, beginner, algorithm, .net, checksum if (sum > 9) { var digits = sum.ToString().Select(x => int.Parse(x.ToString())); evenNumbers.Add(digits.Sum()); } Here if the sum (product) > 9 then you can just subtract 9 from the product: if (sum > 9) { evenNumbers.Add(sum - 9); } In Sums(): Instead of checkDigit = Convert.ToInt32((sumOfAll * 9).ToString().AsEnumerable().Last().ToString()); you can do: checkDigit = (sumOfAll * 9) % 10; This: if (invertedCardNumber.Length < 16) { magicNumber = sumOfAll + checkDigit; } if (invertedCardNumber.Length >= 16) { magicNumber = sumOfAll; } can be simplified to: if (invertedCardNumber.Length < 16) { magicNumber = sumOfAll + checkDigit; } else { magicNumber = sumOfAll; } As you're mentioning there are simpler ways to calculate the Luhn value. One place to start could be Wikipedia
{ "domain": "codereview.stackexchange", "id": 32260, "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, algorithm, .net, checksum", "url": null }
python, api, fastapi @router.get("/{repository_name}/tree", status_code=status.HTTP_200_OK) def get_tree_for_repo(user_name: str, repository_name: str, db: Session = Depends(database.get_db)): """Return the graph formed by commits and branches o → o → o → o → o → o ↓ ↑ o ← dev_branch master_branch """ user = crud.get_one_or_error(db, models.User, name= user_name) repo = crud.get_one_or_error(db, models.Repository, name= repository_name, creator_id= user.id) # Create an empty directed graph graph = nx.DiGraph() for branch in repo.branches: head = branch.head_commit_oid commit = crud.get_one_or_error(db, models.Commit, oid=head, repository_id= repo.id) while commit: graph.add_node(commit.oid, label=f"Commit: {commit.commit_message}")
{ "domain": "codereview.stackexchange", "id": 45437, "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, api, fastapi", "url": null }
Thanks. - See this page for help. –  Clayton Jan 23 '13 at 23:28 It doesn't seem correct. In particular, how do you know that $U$ is open? –  David Mitra Jan 23 '13 at 23:29 This seems in the spirit of what you're trying to do: Assume $f(x)\ne g(x)$. Choose disjoint open sets $U$ and $V$ in $Y$ with $f(x)\in U$ and $g(x)\in V$. By continuity of the functions choose open sets $N_1$ and $N_2$ in $X$ both containing $x$ such that $f(N_1)\subset U$ and $g(N_2)\subset V$. Take $O=N_1\cap N_2$. Then $O$ is open, contains $x$, and is disjoint from $C$ (since $f(N_1)\subset U$, $g(N_2)\subset V$ and $U\cap V=\emptyset)$. So $C^c$ is open. –  David Mitra Jan 23 '13 at 23:36 One possible answer –  leo Jan 24 '13 at 0:21 @David: True, I should have realized that. That's the basic idea I was going for, yes. Thanks. –  Alex Petzke Jan 24 '13 at 2:17
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357549000774, "lm_q1q2_score": 0.8027048953722478, "lm_q2_score": 0.8198933403143929, "openwebmath_perplexity": 123.87818088772633, "openwebmath_score": 0.9492012858390808, "tags": null, "url": "http://math.stackexchange.com/questions/285420/if-f-gx-to-y-are-continuous-and-y-is-t-2-then-x-in-x-fx-gx/285426" }
air, fan The velocity has an influence, but it is almost purely an issue of the shape of object which it needs to "penetrate". This influence is not even linear, but can even decrease when the velocity increases. It's all well educated in this old video; Fluid Dynamic of Drag, (Part I) At 8 min it's well shown. Or is it because of complexity of air flow dynamics and air flow with slower speed has indeed for some (weird) reason better penetration abilities? The decreased penetration ability comes mainly from so called "separation of the boudary layer", which shortly said simply causes a reduction for the open area of flow. At least I know that this is not because of Bernoulli's principle because this should apply only for tubes.
{ "domain": "physics.stackexchange", "id": 26772, "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": "air, fan", "url": null }
$$\sqrt2 \cos(x-\frac\pi4 ) = \frac12 \sin 2x = \frac12 \cos (2x-\frac\pi2 )$$ Use the identity $$\cos 2t = 2\cos^2 t -1$$ on the RHS to get the quadratic equation below $$\sqrt2 \cos(x-\frac\pi4) = \cos^2 (x-\frac\pi4 ) -\frac12$$ or $$\left( \cos(x-\frac\pi4) - \frac{\sqrt2-2}2\right)\left( \cos(x-\frac\pi4) - \frac{\sqrt2+2}2\right)=0$$ Only the first factor yields real roots $$x = 2n\pi + \frac\pi4 \pm \cos^{-1}\frac{\sqrt2-2}2$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303437461133, "lm_q1q2_score": 0.8413272666180484, "lm_q2_score": 0.849971181358171, "openwebmath_perplexity": 175.32820810013965, "openwebmath_score": 0.8731548190116882, "tags": null, "url": "https://math.stackexchange.com/questions/3530949/solve-sin-x-cos-x-sin-x-cos-x" }
ros, rviz, virtualbox, nvidia, opengl Title: rviz doesn't start when run remotely, throws GLXUnsupportedPrivateRequest error This is similar to this question, in that when I run rviz, I get the following error: Xlib: extension "NV-GLX" missing on display "localhost:10.0". The program 'rviz' received an X Window System error. This probably reflects a bug in the program. The error was 'GLXUnsupportedPrivateRequest'. (Details: serial 20 error_code 176 request_code 154 minor_code 16)
{ "domain": "robotics.stackexchange", "id": 12178, "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, rviz, virtualbox, nvidia, opengl", "url": null }
Is there a relationship between the angles $\theta$ and $\phi$ for an ellipse. For some context, I am trying to "extract" points from the circumference of an ellipse given its parameters $(x_C, y_C, a, b, \psi)$. For such an ellipse, I start from $(x_C, y_C$) and with angle $\theta = 0^\circ$ and I start sweeping until $360^\circ$. Using the equation $\left[\begin{array}{c} x \\ y\end{array}\right] = \left[\begin{array}{c c} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array}\right] \left[\begin{array}{c} a\cos(\psi) \\ b\sin(\psi) \end{array}\right]$, I get the $(x,y)$ location of the point that is supposed to be on the ellipse circumference. I then look up this location in a list of "edge" points. Along with this list of edge points, I also have gradient angle information for each edge point. This corresponds to the angle $\phi$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822876992225169, "lm_q1q2_score": 0.8076262650664138, "lm_q2_score": 0.8221891261650247, "openwebmath_perplexity": 179.30884191131287, "openwebmath_score": 0.8695843815803528, "tags": null, "url": "http://math.stackexchange.com/questions/175191/normal-to-ellipse-and-angle-at-major-axis" }
swift, a-star let straightLineDistances = [ "biskra" : ["annaba":220.0], "batna" : ["annaba":140.0], "barika" : ["annaba":200.0], "setif" : ["annaba":100.0], "constantine": ["annaba":80.0], "bejaia" : ["annaba":30.0], "oued" : ["annaba":320.0], "annaba" : ["annaba":0.0] ] final class Vertex : State, CustomDebugStringConvertible { let label : String init(label:String) { self.label = label } func successors() -> [Successor<Vertex>] { return adjacencyList[label]!.map { x in Successor<Vertex>(state:Vertex(label: x.0),cost: x.1) } } func heuristic(goal:Vertex) -> Double { return straightLineDistances[label]![goal.label]! } var id : String { return label } var debugDescription : String { return id } } let solution = AStar(Vertex(label: "biskra"), goal: Vertex(label: "annaba")) print(solution)
{ "domain": "codereview.stackexchange", "id": 20275, "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": "swift, a-star", "url": null }
quantum-mechanics, hilbert-space, wavefunction, schroedinger-equation, scattering Title: Confusion in definition of Bound states If the energy is less than the potential at $-\infty$ and $\infty$, then the eigenstate of Hamiltonian is called as a bound state. But consider the case where a particle is coming from the left with some wavefunction $\Psi(x,0)$ and meets a potential barrier with the height $V_0$. I can calculate the evolution of the wavefunction with time i.e., $\Psi(x,t)$ After interacting with barrier, there will be some probability to reflect and some to transmit depending on the energy difference of Particle and barrier. In this case particle has less energy than potential at $-\infty$ and $\infty$ but the particle is either reflected or transmitted accross the barrier. Then the particle is not "Bounded" per se , right? because the particle is not "Bounded" by anything
{ "domain": "physics.stackexchange", "id": 83430, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, hilbert-space, wavefunction, schroedinger-equation, scattering", "url": null }
fate-of-universe, theories Title: Possible scenarios for life in the death of open universe possible? Say, let's suppose the universe ends in an open universe, with the Universe expanding, but not going to such an extent that the big rip theory will take place. Obviously, the only things left would be stellar remnants and perhaps debris such as asteroids or comets in deep freeze. Then suppose that many civilizations have teamed together to survive this end, and they have complicated technology, such as, but not limited to faster than light travel, star or planet manipulation, and the ability to create artificial black holes, artificial wormholes(assuming they exist), and many other things if they have the energy and resources to do so.
{ "domain": "astronomy.stackexchange", "id": 3512, "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": "fate-of-universe, theories", "url": null }
special-relativity, metric-tensor, inertial-frames, lorentz-symmetry, invariants As far as I understood you could rewrite this like that: $$S^2=\Delta s_c^2-|\Delta \vec s|^2=\Delta s_c'^2-|\Delta\vec s'|^2$$ Whereas $\Delta s_c$ is the distance light would have travelled in the given amount of time and $\Delta\vec s$ is the distance between the two events. But why is this invariant? How can one conclude the given invariance from the constance of the speed of light? I'm feeling as if I missed something important here. Here's a geometric interpretation... (admittedly a top down approach). (The essence of the idea is inspired by the Bondi k-calculus and by the "product of times" formula seen in A.A. Robb's "Optical geometry of motion" [see also Geroch's "General Relativity from A to B"].)
{ "domain": "physics.stackexchange", "id": 73138, "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, metric-tensor, inertial-frames, lorentz-symmetry, invariants", "url": null }
java, algorithm, clustering Title: Nearest pair of points Given a set of 2 dimensional points, it returns the two nearest points. If more pairs have the same min-distance between them, then an arbitrary choice is made. This program expects the points to be sorted on the x-axis. If not, input is unpredictable. I'm looking for code review, optimizations and best practices. final class PointPair { private final Point point1; private final Point point2; private final double distance; PointPair (Point point1, Point point2, double distance) { this.point1 = point1; this.point2 = point2; this.distance = distance; } public Point getPoint1() { return point1; } public Point getPoint2() { return point2; } public double getDistance() { return distance; } } final class Point { private final int x; private final int y; public Point(int x, int y) { this.x = x; this.y = y; }
{ "domain": "codereview.stackexchange", "id": 6031, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, clustering", "url": null }
star, general-relativity, mass, stellar-remnants No. Conservation of energy applies. When you drop a 100000kg asteroid from some high elevation above the Earth, some of the asteroid's gravitational potential energy, which is mass-energy, is converted into kinetic energy. The mass-equivalence of the system does not increase as the asteroid falls. Instead the asteroid's rest mass reduces as the relativistic mass associated with its kinetic energy increases*. When the asteroid hits the Earth (BOOM!) some of the kinetic energy will get dissipated and radiated out into space, and then you're left with a mass deficit. The mass of the system is then less than it was. See Wikipedia: "This missing mass may be lost during the process of binding as energy in the form of heat or light, with the removed energy corresponding to the removed mass through Einstein's equation E = mc²".
{ "domain": "astronomy.stackexchange", "id": 3032, "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": "star, general-relativity, mass, stellar-remnants", "url": null }
You will be turning in two (2) deliverables, a short writeup of the project and the spreadsheet showing your work. Writeup. Your writeup should introduce your solution to the project by describing the problem. Correctly identify what type of problem this is. For example, you should note if the problem is a maximization or minimization problem, as well as identify the resources that constrain the solution. Identify each variable and explain the criteria involved in setting up the model. This should be encapsulated in one (1) or two (2) succinct paragraphs. After the introductory paragraph, write out the L.P. model for the problem. Include the objective function and all constraints, including any non-negativity constraints. Then, you should present the optimal solution, based on your work in Excel. Explain what the results mean. Finally, write a paragraph addressing the part of the problem pertaining to sensitivity analysis and shadow price. Excel.
{ "domain": "lil-help.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992969868543, "lm_q1q2_score": 0.8148024579217195, "lm_q2_score": 0.8418256532040708, "openwebmath_perplexity": 1494.552042082549, "openwebmath_score": 0.5021284818649292, "tags": null, "url": "https://www.lil-help.com/questions/142990/mat-540-week-8-assignment-1-linear-programming-case-study" }
python, python-2.x, utf-8, rss def convert_feed(**kwargs): """ Main loop """ out = StringIO.StringIO("") for entry in parsefeed(kwargs['url']).entries: title = entry['title'] link = entry['link'] description = entry['description'] print >>out, entry2html(title=title, link=link, description=description) return out.getvalue() print convert_feed(url='http://stackoverflow.com/feeds') Work in Unicode and encode at the last moment: def entry2html(**kwargs): """ Format feedparser entry """ template = u""" <h2 class='title'>{title}</h2> <a class='link' href='{link}'>{title}</a> <span class='description'>{description}</span> """ return template.format(**kwargs) def convert_feed(**kwargs): """ Main loop """ out = u'\n'.join(entry2html(**entry) for entry in parsefeed(kwargs['url']).entries) return out.encode('utf-8')
{ "domain": "codereview.stackexchange", "id": 7383, "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-2.x, utf-8, rss", "url": null }
java, beginner, snake-game Title: Simple Snake clone in Java I made a Snake clone for a programming class. I wanted some feedback regarding coding style and will appreciate any other opinions concerning my code. import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Snake extends JFrame { /* Some properties. */ private final int BOARD_WIDTH = 20 * 30; // Tilesize * number of columns private final int BOARD_HEIGHT = 20 * 30; private final int TILE_SIZE = 20; private final int ALL_TILES = 900; // Total numer of tiles private final int DELAY = 100; /* The coordinates of the snake. */ private int[] xCoor = new int[ALL_TILES]; private int[] yCoor = new int[ALL_TILES]; /* Coordinates for apple. */ private int apple_x, apple_y; /* Pressed Key. */ int pressedKey = KeyEvent.VK_DOWN; int oldPressedKey; private int snakeSize = 3; private boolean inGame = true;
{ "domain": "codereview.stackexchange", "id": 23010, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, snake-game", "url": null }
$$\bbx{\ds{\large% \mbox{Hereafter,}\ \bracks{\cdots}\ \mbox{is the}\ Iverson\ Bracket}}$$ The answer to $2.$ is given by: \begin{align} {1 \over 8}\sum_{d_{8} = 1}^{8}{1 \over 6}\sum_{d_{6} = 1}^{6} \bracks{d_{6} > d_{8}} & = {1 \over 48}\sum_{d_{8} = 1}^{8}\braces{\bracks{d_{8} \leq 5} \sum_{d_{6} = d_{8} + 1}^{6}} = {1 \over 48}\sum_{d_{8} = 1}^{8}\bracks{d_{8} \leq 5}\pars{6 - d_{8}} \\[5mm] & = {1 \over 48}\sum_{d_{8} = 1}^{5}\pars{6 - d_{8}} = {1 \over 48}\bracks{5 \times 6 - {5\pars{5 + 1} \over 2}} = \bbx{\ds{5 \over 16}} = 0.3125 \end{align} If there is a die with $m$ sides and a die with $n$ sides, assuming that $m<n$, the probability that $m$ will be greater than $n$ assuming that those are the names given to the outcomes when both of them are rolled is $$\frac{m-1}{2n}$$ Full disclaimer: I made this up with help from the grid. This is a formula very specific to your question.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9859363721302861, "lm_q1q2_score": 0.8457047681858012, "lm_q2_score": 0.8577680995361899, "openwebmath_perplexity": 452.09756433836264, "openwebmath_score": 0.945294976234436, "tags": null, "url": "https://math.stackexchange.com/questions/1972652/probability-an-6-sided-die-will-be-higher-than-a-8-sided-die" }
react.js, memoization export const CookiePopup = () => { const { cookieConsentSet } = useContext<CookieContextType>(CookieContext); if (cookieConsentSet) return null; return ( <InnerCookiePopup/> ); }; As far as memoization, there's not a lot of state changes or expensive computations happening here. Filling a string template is trivial and the ternary in descriptiveText is even more trivial. I would use React.memo to memoize the inner component as a whole. Yes your function will still get re-initialized when the component state changes and yes you could use useCallback, but it's probably overkill. It's more important to make sure that the setCookieConsent function in your CookieContext is memoized so that you don't have unnecessary re-renders in the components that use this context.
{ "domain": "codereview.stackexchange", "id": 44299, "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": "react.js, memoization", "url": null }
automata-theory, minimization NL is contained in polyL (deterministic polylogarithmic space). The subset construction can be implemented by a PSPACE transducer, i.e., a Turing machine whose work tape is PSPACE-bounded. Its output (on an extra tape) will be exponential in general. By composing the PSPACE transducer with the polyL-machine in the standard space-efficient way (involving the (re-)computation of any bit the polyL-machine requires), we (even) get a PSPACE transducer that given an NFA computes a minimal equivalent DFA.
{ "domain": "cstheory.stackexchange", "id": 5318, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "automata-theory, minimization", "url": null }
c, interpreter, brainfuck A possible improvements might be: const static char brainfuck_alphabet[] = {'+', '-', '>', '<', '[', ']', '.', ','}; return memchr(brainfuck_alphabet, c, sizeof(brainfuck_alphabet)); The improvements lies in the fact that the algorithm of memchr can make an assumption about the size of the memory region to check while strchr cannot. This could lead to a performance improvement. Use bool for boolean values The header <stdbool.h> declares boolean-like types. You can use them to express your intention for a boolean return value of isInstruction(): bool isInstruction(char c) { ... } Don't repeat yourself While you generally did will to adhere to that principle, I want to point out one small spot that could use improvement: printf("Error: cannot read more than 30000 instructions\n"); could be printf("Error: cannot read more than %d instructions\n", MEMSIZE);
{ "domain": "codereview.stackexchange", "id": 45455, "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, interpreter, brainfuck", "url": null }
rviz, moveit Original comments Comment by dornhege on 2014-12-04: It says optional. Did you enable this? The logs are written in a hidden folder under your home folder: ls $HOME/.ros/log Originally posted by VictorLamoine with karma: 1505 on 2014-12-04 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 15067, "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": "rviz, moveit", "url": null }
1) If no sign restrictions are placed on $a_n$ and $b_n$, then the answer is yes. For instance, we can take any conditionally convergent series $\sum_n a_n$ (the alternating harmonic series is a popular one) and put $b_n = -a_n$ for all $n$. 2) This makes one wonder what happens if for all $n$, the terms $a_n$ and $b_n$ have the same sign. Here the answer is no: the series cannot converge absolutely if even one of $\sum_n a_n$, $\sum_n b_n$ converges nonabsolutely. This follows quickly from the fact that in a series which converges nonabsolutely, both the series of positive parts and the series of negative parts must diverge ($\S 8.4$ of the same notes). -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9706877675527112, "lm_q1q2_score": 0.8024790175073276, "lm_q2_score": 0.8267117855317474, "openwebmath_perplexity": 229.70386409128236, "openwebmath_score": 0.981260359287262, "tags": null, "url": "http://math.stackexchange.com/questions/77813/sum-of-two-conditionally-convergent-series" }
hydrology, rivers Title: Rivers - How to calculate maximum velocity from average velocity in a cross section I'm studying flow velocities in a small river. I have a lot of data of average flow velocities in cross sections throughout the entire catchment. And I know the river develop a stream velocity profile per cross section (see below).
{ "domain": "earthscience.stackexchange", "id": 1550, "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": "hydrology, rivers", "url": null }
neural-network, bias, batch-normalization Where the torch.Conv2d has an implicit bias=True in the constructor. How would I go about implementing the fifth point in the code sample above? Though, based on the second sentence of the point, it doesn't seem like this matters?.. Love this question. First, note the last thing said in the tweet you quote: "This one won't make you silently fail, but they are spurious parameters." Basically, this is a sort of mathematical quibble, but To see what is happening here, consider what's happening in a BatchNorm2d layer vs Conv2d (quoting the PyTorch Docs): BatchNorm2d: $y = \frac{x - \mathrm{E}[x]}{ \sqrt{\mathrm{Var}[x] + \epsilon}} * \gamma + \beta$ Conv2d: $\text{out}(N_i, C_{\text{out}_j}) = \text{bias}(C_{\text{out}_j}) + \sum_{k = 0}^{C_{\text{in}} - 1} \text{weight}(C_{\text{out}_j}, k) \star \text{input}(N_i, k)$
{ "domain": "datascience.stackexchange", "id": 10084, "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": "neural-network, bias, batch-normalization", "url": null }
ruby, parsing, datetime, ruby-on-rails end else hours["sunday"] = [{open: "closed",close: "closed"}] if day == "Saturday" && timings.match(day) open_close = timings.gsub(/.*Saturday:?\s?\-?\s?(.*)/,'\1') else open_close = timings.gsub(/^[a-zA-Z]+\s?-\s+?[a-zA-Z]+:?\s?(.*)\s?Saturday.*/,'\1') end end save_day_array(open_close,day,hours) end end elsif match_days.length == 4 #eg: Sunday - Tuesday: 9:00am-5:00pm Wednesday-Saturday: 9:00am - 7:00pm validdays.each do |day| if timings.match(/^[a-zA-Z]+\s?\-?\s?[a-zA-Z]+:?.*\s+?[a-zA-Z]+:?.*/) open_close = [] if (day == "Sunday") && timings.match(day) open_close = timings.gsub(/.*Sunday:?(.*)/,'\1') elsif (day == "Saturday") && timings.match(/.*Saturday\s?\&?\s?Sunday.*|.*Saturday\s?\-?\s?Sunday.*/)
{ "domain": "codereview.stackexchange", "id": 21610, "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": "ruby, parsing, datetime, ruby-on-rails", "url": null }
ds.algorithms, approximation-algorithms, randomized-algorithms, dc.distributed-comp, matching (One thing you can prove about your process is that, for any graph, in expectation, a constant fraction of the edges will touch the edges in the generated matching. See e.g. here. Roughly, if you direct each edge $(u,w)$ from the lower-degree vertex to the higher-degree vertex, and call a vertex good if more than one-third of its incident edges are directed into it, then at least half the edges must be directed into good vertices (Lemma 6). And each good vertex has constant probability of being matched in your process. So, at least half the edges touch vertices that have a constant probability of being matched. EDIT: So after $O(\log n)$ rounds of your process, it will have a maximal matching with high probability.)
{ "domain": "cstheory.stackexchange", "id": 4308, "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": "ds.algorithms, approximation-algorithms, randomized-algorithms, dc.distributed-comp, matching", "url": null }
electromagnetism, gravity, cosmology, singularities, dark-energy Can it not thus be assumed that if we take this expansionary halo gradient of electromagnetic density and define dark energy as vacuum energy, "i.e. the cost of empty space", that the inward (relative the origin of the Big Bang) "gravitational equivalent"/pressure (i.e. dark energy) exerted on the mass within the expansion sphere would be greater than the outward energy as the dark energy is proportional to the energy density and the inner energy density exceeds the outer (relative the expansion sphere)? (This is in effect the title question -- would the dark energy scalars eventually reverse, exerting inwards pressure / deceleration?) Further if gravity can act an an infinite distance (infinitely beyond the Hubble sphere), won't remaining masses exert some centralized pull towards the point of origin of the Big Bang?
{ "domain": "physics.stackexchange", "id": 37187, "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, gravity, cosmology, singularities, dark-energy", "url": null }
c++, beginner, fizzbuzz ++(*this); // start with the first valid number } iterator& operator++() { do { num = direction(num, 1); } while (!isDivisable()); return *this; } iterator operator++(int) { ++(*this); iterator retval = *this; return retval; } bool operator==(iterator other) const { return num == other.num; } bool operator!=(iterator other) const { return !(*this == other); } reference operator*() const { return num; }
{ "domain": "codereview.stackexchange", "id": 43669, "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, fizzbuzz", "url": null }
python, hash-map, collections Title: Data set with many variables in Python, many indented dictionaries? I am working with a data set that has many variables. Currently I am storing the data in many indented dictionaries in the following way: import numpy as np X_POSITIONS = [0,1.5,1] Y_POSITIONS = [0,1,2] CHANNELS = ['left pad', 'right pad', 'top pad', 'bottom pad'] data = {} for x in X_POSITIONS: data[x] = {} for y in Y_POSITIONS: data[x][y] = {} for ch in CHANNELS: data[x][y][ch] = np.random.rand() # Here I would place my data. This works fine, but it is cumbersome if by some reason I need to change the order of the keys. Consider the following function: def do_something_with_single_channel(data_from_one_channel): for x in data_from_one_channel: for y in data_from_one_channel[x]: print(f'x = {x}, y = {y}, data[x][y] = {data_from_one_channel[x][y]}')
{ "domain": "codereview.stackexchange", "id": 40368, "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, hash-map, collections", "url": null }
attempt to use geoshape or geotrace questions in forms authored prior to 3. Regular polygon. The problem concerns a polygon with twelve sides, so we will let n = 12. Return from the Polygon Game page to the Math Play homepage. 9 degrees are in the measure of an interior angle of a regular seven sided polygon. Regular Polygons Printable regular polygon sheet which includes picture and name of each of the 10 polygons from triangle, through to dodecagon. Read each question carefully before you begin answering it. Videos, worksheets, 5-a-day and much more. In this video, we'll talk about a few things you need to know about polygons for the GMAT, some of their basic names of regular polygons, and the sum of the interior angles of a polygon. Polygons can be regular or. Polygon diagonals. Find out which polygons are regular and which are not. Polygons problems with solutions for CAT exam. (The other option is to use shape=regular polygon from \usetikzlibrary{decorations. 652 Responses.
{ "domain": "madzuli.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754501811437, "lm_q1q2_score": 0.8655863321899627, "lm_q2_score": 0.8791467754256018, "openwebmath_perplexity": 683.6335121365421, "openwebmath_score": 0.30508238077163696, "tags": null, "url": "http://shey.madzuli.it/regular-polygon-questions.html" }
python, tree, python-2.x def canfit(body, node): """canfit(body, node) Checks wheather the body could be accomodated inside the node. Returns suitable status mesages; a. EXTERNAL : Can't fit because there is another body inside. b. INTERNAL : Can't fit because this node has child nodes. c. EMPTY : Can fit (yay!) d. None : Can't fit at all (out of bounds). """ bx, by = positions[body] nx, ny = vertices[node] l = lengths[node] if (0<=bx-nx<=l) and (0<=by-ny<=l): if isexternal(node): return 'EXTERNAL' if isinternal(node): return 'INTERNAL' return 'EMPTY' def split(node, rearrange=True): """split(node, rearrange=True) Splits the given node (external or empty) and divides it in to four quadrants (internal).
{ "domain": "codereview.stackexchange", "id": 8763, "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, tree, python-2.x", "url": null }
java, beginner, swing, connect-four public static void main(String[] args) { int height = 6, width = 8, moves = height * width; ConnectFour board = new ConnectFour(width, height); /**The emptyChar char is used for the first time the function label_That_Tells_Player_What_Columns_They_Can_Pick_Or_Tells_Them_Who_Won_Function *is called. This is because no specific char value is needed for the first time this function is called. Due to the number in the first parameter, *this function sets the text of a label to tell the user(s) the acceptable range an inputed column number is supposed to be in. */ char emptyChar=' '; board.gui.label_That_Tells_Player_What_Columns_They_Can_Pick_Or_Tells_Them_Who_Won_Function(2,width,emptyChar); //Since the board does not already exist, the last parameter is set to false to create a new empty board. board.gui.createBoard(width, height, board, false);
{ "domain": "codereview.stackexchange", "id": 35634, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, swing, connect-four", "url": null }
pressure This does not necessarily mean that pressure can't be manipulated to exert a force in a certain direction to do work, though. For example, inside a gun as it fires, you essentially have a cylinder (with one end blocked, and the other end fitted with a bullet) with a high pressure gas inside. The gas exerts force isotropically (in all directions equally), so the back face of the bullet is feeling the same force per area as the walls of the gun are. But, the bullet is free to move (while the walls aren't, unless the pressure so high that the gun explodes), and so it is forced out of the gun. But throughout the whole process, the gas was in fact exerting force isotropically in all directions.
{ "domain": "physics.stackexchange", "id": 11271, "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": "pressure", "url": null }
molecules, lewis-structure, valence-bond-theory The most electropositive atom is usually at the center of a molecule because a "central atom" implies that there are multiple (more than 1) bonds to the central atom. If the central atom is relatively electropositive, then it will be better able to share its electrons and form bonds with other atoms, at least more so than an electronegative central atom would. electronegative atoms tend to carry multiple lone pairs of electrons. If this electronegative atom and all of its lone pairs were at the center of the molecular structure, then we would have many more destabilizing (lone-pair - bonding pair) electron-electron repulsions, then if all of these lone pairs were on the periphery of the molecule.
{ "domain": "chemistry.stackexchange", "id": 1663, "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": "molecules, lewis-structure, valence-bond-theory", "url": null }
5. Nov 12, 2004 ### NateTG $$\lim_{n\rightarrow \infty} (\sqrt{n+1} - \sqrt{n}) \sqrt{n+\frac{1}{2}}=$$ $$\lim_{n\rightarrow \infty} \frac{((n+1)-n)\sqrt{n+\frac{1}{2}}}{\sqrt{n+1}+\sqrt{n}}=$$ $$\lim_{n\rightarrow \infty} \frac{\sqrt{n+\frac{1}{2}}}{\sqrt{n+1}+\sqrt{n}}=$$
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713878802045, "lm_q1q2_score": 0.8314656969851125, "lm_q2_score": 0.8438951005915208, "openwebmath_perplexity": 2104.108355516741, "openwebmath_score": 0.9453006386756897, "tags": null, "url": "https://www.physicsforums.com/threads/proof-of-limit-involving-square-root.52372/" }
soft-question, research-level, theory-of-everything, unified-theories There are passionate people who do it in their spare time, but this is the rare exception and doesn't impact the development of the field very much. I would be surprised if they account for more than 2% of all publications in the field and those papers are disproportionately less cited. Even physicists working outside their primary specialties make up a quite small percentage of all papers and often have papers that are less influential than those of specialists in the field. Many are professors or graduate students who also have teaching or studying obligations, although some physicists with a big physics experiment collaborations or institutes (many of whom are what are called "post-docs" who have earned PhDs but not held an academic professorship or senior institute fellow position) do work full time without teaching or studying responsibilities.
{ "domain": "physics.stackexchange", "id": 55675, "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": "soft-question, research-level, theory-of-everything, unified-theories", "url": null }
rocket-science, nasa Title: What is the mass of the LEGO figurines being launched with spacecraft Juno? What is the mass of the LEGO figurines being launched with spacecraft Juno? How much additional fuel will be needed to get them to Jupiter? With the following assumptions: Dimensions of a Lego figurine = ~0.59 cubic inches The figurines are composed of aluminum, which has a density of 0.098 pounds per cubic inch The payload weight of the rocket = ~18,000 pounds Launch price = ~$110 million The weight/mass of the figurines can be calculated as 0.05782 lbs or 26.23 grams: 0.59 cubic inches * 0.098 lbs/cubic inch = 0.05782 lbs You can calculate the launch cost of the figurines to be roughly $1,060. ($110,000,000/18,000 lbs) * 0.05782 lbs * 3 figurines = $1,060 As for the fuel requirements, I could not locate a source for the amount of fuel required per pound, but it should be fairly easy to come up with the answer if you have that number. [Attribution]
{ "domain": "physics.stackexchange", "id": 3164, "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": "rocket-science, nasa", "url": null }
• When it comes to the injection $\mathbb{N}^\mathbb{N}\rightarrow \{0,1\}^\mathbb{N}$ I thought about mapping a sequence $(x_1,x_2,x_3,\dots)$ to number of appearances of ones separated by zero, e.g. $(2,1,3,\dots)$ would be $1,1,0,1,0,1,1,1,0,\dots$ and inverting the function for the other way round (so from a sequence of zeroes and ones we get a sequence of natural numbers). Is it correct? – whiskeyo Jan 13 at 15:00
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.98058065352006, "lm_q1q2_score": 0.808451418798112, "lm_q2_score": 0.8244619306896955, "openwebmath_perplexity": 103.82346099345938, "openwebmath_score": 0.8644677400588989, "tags": null, "url": "https://math.stackexchange.com/questions/3071630/cardinality-of-sets-and-usage-of-cantor-bernstein-theorem" }
lagrangian-formalism, field-theory, supersymmetry Title: On-shell SUSY-transformations for interacting Wess-Zumino model I'm learning SUSY with Quevedo, Cambridge Lectures on Supersymmetry and Extra Dimensions. Setup: The SUSY transformations of the component fields of a chiral field $\Phi$ are given by (p.41) \begin{align*} \delta_{\epsilon,\overline{\epsilon}}\varphi &= \sqrt{2}\epsilon^{\alpha}\psi_{\alpha}, \\ \delta_{\epsilon,\overline{\epsilon}}\psi_{\alpha} &= i\sqrt{2}\sigma^{\mu}_{\alpha\dot{\alpha}}\overline{\epsilon}^{\dot{\alpha}}\partial_{\mu}\varphi + \sqrt{2}\epsilon_{\alpha}F,\\ \delta_{\epsilon,\overline{\epsilon}} F &=i\sqrt{2}\overline{\epsilon}_\dot{\alpha}(\overline{\sigma}^{\mu})^{\dot{\alpha}\alpha}\partial_{\mu}\psi_{\alpha}, \end{align*} where $\varphi$ is a complex scalar, $\psi_{\alpha}$ is a left-handed Weyl spinor and $F$ is an auxiliary field. My questions:
{ "domain": "physics.stackexchange", "id": 67219, "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, supersymmetry", "url": null }
quantum-mechanics, hamiltonian-formalism, semiclassical, wigner-transform, deformation-quantization (\overleftarrow{\partial}_x -i \overleftarrow{\partial}_p) (\overrightarrow{\partial}_x + i\overrightarrow{\partial}_p ) \right) , $$ it is, in fact, much easier to solve the *-genvalue equation for this hamiltonian, (Exercise 0.21), up to some care at the origin, than in the Moyal picture: the resulting ODE is only first order! Both pictures, naturally, produce the same spectrum of stargenvalues, as they should. (But, no room for complacency, here: the ground state stargenfunction in the Husimi picture is the square root of that in the Wigner-Moyal picture. Can you check that? They both become δs at the origin in the classical limit.) An arbitrary nonstatic Husimi distribution, just like a Wigner function, or a classical object, rotate rigidly in phase space for an oscillator.
{ "domain": "physics.stackexchange", "id": 38462, "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, hamiltonian-formalism, semiclassical, wigner-transform, deformation-quantization", "url": null }
performance, beginner, sql, sqlite WHEN COMPART = 'Poissons' THEN (SELECT CODE_STATUT FROM BDC_POISSONS WHERE NOM_VALIDE_COMPLET = NEW.NOM_SCIENT_VALIDE AND CORRESPONDANCE_REGION = NEW.REGION AND CD_TYPE_STATUT = 'LRR') WHEN COMPART = 'Reptiles' THEN (SELECT CODE_STATUT FROM BDC_REPTILES WHERE NOM_VALIDE_COMPLET = NEW.NOM_SCIENT_VALIDE AND CORRESPONDANCE_REGION = NEW.REGION AND CD_TYPE_STATUT = 'LRR') ELSE NULL END, ZNIEFF = CASE WHEN COMPART = 'Flore' THEN 'Déterminante ZNIEFF - ' || (SELECT CORRESPONDANCE_REGION FROM BDC_FLORE WHERE NOM_VALIDE_COMPLET = NEW.NOM_SCIENT_VALIDE AND CORRESPONDANCE_REGION = NEW.REGION AND CD_TYPE_STATUT = 'ZDET') WHEN COMPART = 'Amphibiens' THEN 'Déterminante ZNIEFF - ' || (SELECT CORRESPONDANCE_REGION FROM BDC_AMPHIBIENS WHERE NOM_VALIDE_COMPLET = NEW.NOM_SCIENT_VALIDE AND CORRESPONDANCE_REGION = NEW.REGION AND CD_TYPE_STATUT = 'ZDET')
{ "domain": "codereview.stackexchange", "id": 45541, "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, beginner, sql, sqlite", "url": null }
electromagnetism, electricity, electric-circuits Title: Current densities in a 3D object What is a smart way to calculate current densities in 3D objects with unorthodox boundary conditions? For example, J(x,y,z) in a cube with constant resistivity with applied voltages Va in a vertex and Vb in a plane? Assuming these are constant voltages, you need to solve Laplace’s equation,
{ "domain": "physics.stackexchange", "id": 61711, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electricity, electric-circuits", "url": null }
java, beginner, object-oriented, battle-simulation I'd love to hear how you'd personally accomplish coding the above (simplified down to my level...) the more approaches I have to compare the better. The only pattern I've looked at in depth thus far is the strategy pattern, and I'm having to stop myself from trying to work it into every situation. Handling I/O without bolting/coupling it directly to the logic is proving difficult for me to get my head around. It's so tempting to just put printf statements right after the event has happened in the method that processed it, but from what I've read, that's a big no-no. I don't have internet at home (posting from the library) so if I don't reply for 24 hours, that's why. Any questions about how the code works, of course just ask (I hope the formatting/structure is easy enough to follow). I'd say in general, it is quite decent code. Nothing written too complicated, variables are named so that I understand it and 'stuff' which belongs together is mostly separated within classes.
{ "domain": "codereview.stackexchange", "id": 31566, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, object-oriented, battle-simulation", "url": null }
c#, game // if we're the beginning of a wall... if(isWallStart) { // If there are no Y intersections here, add an edge if(corners1 == 0) geo.add(vec3(px1a, py2, pz), vec3(px1a, py1, pz), vec3(px1a, py2, pz + wallHeight), vec3(px1a, py1, pz + wallHeight), 0, 1, 0, 1, edgeMat); } else if(corners1 != 3) { tx1a = px1; tx1b = px1; }
{ "domain": "codereview.stackexchange", "id": 29533, "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#, game", "url": null }
statistical-mechanics, lattice-model, non-equilibrium Title: The Bhatnagar-Gross-Krook (BGK) approximation of the collision integral Bhatnagar, Gross and Krook (BGK) proposed a relaxation term for the collision integral $ Q$ as follows $$J = \frac{1}{\tau} (f^{eq} - f)$$ where $f^{eq}$ is the distribution at equilibrium. $Q$ has following property: $$\int Q \psi_k d\mathbf{v} = 0$$ where $\psi_0 = 1,\hspace{.5cm} (\psi_1, \psi_2,\psi_3) = \mathbf{v}, \hspace{.5cm} \psi_4 = \mathbf{v}^2 $ Now we say that this term should have the following constraints: a) It should have a tendency towards Maxwellian distribution What is meant by this expression? My understanding is that f should be close to Maxwell distribution at all times. Is this correct? if not what is the correct interpretation of this constraint? b) J Should conserve collision invariants of Q i.e. $\int J \psi_k d\mathbf{v}d\mathbf{x} = 0 $ where $\psi_k$ is one of the collision invariant.
{ "domain": "physics.stackexchange", "id": 8064, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, lattice-model, non-equilibrium", "url": null }
c, parsing, functional-programming, lazy test_regex: parse( t, chars_from_string( "ac" ) ) = _ test_regex: take( 1, parse( t, chars_from_string( "bd" ) ) ) = _ test_regex: Int( garbage_collect( t ) ) = 5294 test_regex: u = regex( "ab|cd|ef" ) = _ test_regex: parse( u, chars_from_string( "ab" ) ) = _ test_regex: parse( u, chars_from_string( "cd" ) ) = _ test_regex: take( 1, parse( u, chars_from_string( "cd" ) ) ) = _ test_regex: parse( u, chars_from_string( "ef" ) ) = _ test_regex: take( 1, parse( u, chars_from_string( "ef" ) ) ) = _ test_regex: Int( garbage_collect( u ) ) = 7804 test_regex: v = regex( "ab+(c).|def" ) = Parser test_regex: parse( v, chars_from_string( "def" ) ) = _ test_regex: take( 2, parse( v, chars_from_string( "def" ) ) ) = _ test_regex: w = regex( "a?b|c" ) = Parser test_regex: parse( w, chars_from_string( "a" ) ) = ... test_regex: parse( w, chars_from_string( "b" ) ) = ... test_regex: take( 3, parse( w, chars_from_string( "c" ) ) ) = ((() ... )_ )
{ "domain": "codereview.stackexchange", "id": 34480, "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, parsing, functional-programming, lazy", "url": null }
ruby, markov-chain And here's a sample of ten names it can generate (with the above dictionary file): ab acb acabcacacb abca acacaca abcacacb acb a acbcacb a I don't like how you've mixed the concerns of calculating with output. I know that right now you only want to output to a file, but what if you decide later that you want to work with this data in some other program? Writing to the file system is expensive and slow. Why write to a file and then read it back in. I would modify this to be in two parts. One to generate the names from the dictionary and one that uses that class to output to a file. This leaves things open to writing the output to Standard IO, some other UI, or for another program to simply work with the data. The idea is that each class should do one thing and do it well. On this note, each of your comments indicates a missed opportunity to extract a well named method that does one and only one thing.
{ "domain": "codereview.stackexchange", "id": 13791, "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": "ruby, markov-chain", "url": null }
evolution, development, phylogenetics Fig. 7. Infants with Syndactyly (left) and Pseudosyndactyly (right). sources: Wikipedia & University of Columbia Original photographic image source (Figs 1 & 5)* - Nilsson, Ett Barn Blir Till * Credits go to rg255
{ "domain": "biology.stackexchange", "id": 5316, "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": "evolution, development, phylogenetics", "url": null }
floating-point, numerical-analysis Title: Is the exponent bias $2^{n-1}-1$ or $2^{n-1}$ I'm a bit confused with the exponent bias. The sources I found online claim that it is either $2^{n-1}-1$ or $2^{n-1}$, $n$ is the number of bits used for the exponent. In my book when given examples on the bias of a 32bit system the bias is said to be $2^7$ which means the bias is $2^{n-1}$ while in an example on the bias of 64bit the bias is said to be $2^{11}-1$ which is $2^{n-1}-1$ So which one is it? Both encodings for the exponent are possible, and they are called Excess-$2^{n-1}$ and Excess-$2^{n-1}-1$ - in particular, you might meet such number encodings as Excess-127, Excess-128, Excess-1023 and so on. The IEEE-754 standard happened to choose the Excess-127 and the Excess-1023 encodings for exponents, so these encodings became more customary. Your book is not mistaken about the exponent bias, it just follows a way, different from this standard. You can find additional information and nice graphs here.
{ "domain": "cs.stackexchange", "id": 15465, "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": "floating-point, numerical-analysis", "url": null }
black-hole, gravity, supermassive-black-hole, escape-velocity Escape velocity doesn't apply to rockets which apply several minutes of thrust to escape Earth's gravity and enter orbit. (technically in orbit is still in Earth's gravity well, but it's escaping a significant part of Earth's gravity it in order to remain in orbit) - see xkcd Escape velocity only applies to initial velocity and it ignores air resistance.
{ "domain": "astronomy.stackexchange", "id": 5418, "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": "black-hole, gravity, supermassive-black-hole, escape-velocity", "url": null }
We note that $$\sum_i \langle v_i, w_j\rangle \langle w_j, v_i\rangle = \sum_i |\langle v_i, w_j \rangle|^2 = |v_i|^2 = 1$$ where the first equality follows as the two inner products are conjugated, and the second because $w_j$ is an orthonormal basis, i.e. the base transformation is an isometry, hence the length in the base $w_i$ is the same as the base in the base $v_i$. If you set $w_i = u_i$, i.e. the $i$-th canonical unit vector, it's not hard to see that we have $$u_i^* A u_i = a_{ii}$$ -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.988312742176424, "lm_q1q2_score": 0.817049798077796, "lm_q2_score": 0.8267117919359419, "openwebmath_perplexity": 125.63337028523618, "openwebmath_score": 0.9756967425346375, "tags": null, "url": "http://math.stackexchange.com/questions/537602/why-is-the-trace-of-a-matrix-the-sum-along-its-diagonal" }
Hence f -1 is an injection. Justify all conclusions. Determine the range of each of these functions. A set is a fundamental concept in modern mathematics, which means that the term itself is not defined. Can we find an ordered pair $$(a, b) \in \mathbb{R} \times \mathbb{R}$$ such that $$f(a, b) = (r, s)$$? The function $$f: \mathbb{R} \times \mathbb{R} \to \mathbb{R} \times \mathbb{R}$$ defined by $$f(x, y) = (2x + y, x - y)$$ is an injection. Then fff is injective if distinct elements of XXX are mapped to distinct elements of Y.Y.Y. What is yours, OP? Functions can be injections (one-to-one functions), surjections (onto functions) or bijections (both one-to-one and onto). The existence of a surjective function gives information about the relative sizes of its domain and range: If X X X and Y Y Y are finite sets and f ⁣:X→Y f\colon X\to Y f:X→Y is surjective, then ∣X∣≥∣Y∣. From French bijection, introduced by Nicolas Bourbaki in their treatise Éléments de mathématique. From French
{ "domain": "com.br", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471613889295, "lm_q1q2_score": 0.811144534425749, "lm_q2_score": 0.8244619350028204, "openwebmath_perplexity": 426.07968905398485, "openwebmath_score": 0.9781416058540344, "tags": null, "url": "http://jemidiavisual.com.br/peter-stefanovic-uvjfu/d7a994-injection%2C-surjection%2C-bijection" }
python, game, python-2.x, pygame, minecraft # Tile class, to be used to create a chunk with the Chunk class class Tile(object): def __init__(self, x, y, tile_type, tile_image): self.x = x self.y = y self.tile_type = tile_type self.tile_image = tile_image # Update the position of a tile def update_tile_position(self, x_change, y_change): self.x += x_change self.y += y_change # Render the tile on the screen def render_tile(self): screen.blit(self.tile_image, (self.x, self.y)) # Chunk class, for generating a chunk and rendering it class Chunk(object): def __init__(self, chunk_x): self.chunk_x = chunk_x self.chunk_data_overworld = [] self.chunk_data_underground = [] # Generate an overworld chunk for the center def generate_overworld_chunk_center(self):
{ "domain": "codereview.stackexchange", "id": 15319, "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, game, python-2.x, pygame, minecraft", "url": null }
algorithm-analysis, formal-methods, software-verification, loop-invariants, automated-theorem-proving I understand this invariant and the full proof (Initialization, Maintenance, and Termination). However, the above invariant is mostly written in natural language, and I wonder if there is a more formal way to state it. This is because I need a more rigorous proof that need not rely on natural language. For example, to verify the program with a theorem prover I can't use natural language at all. Update @Dmitry suggested a different invariant that requires using the concept of permutation. However, Coq's axioms of permutation look really complicated. Is there a simpler way to formally prove the Merge function without resorting to Coq's axioms or other external libraries? Merge function proof of correctness Let $A'[p \ldots r]$ be a copy of the array $A[p\ldots r]$ right after entering the Merge function. Precondition $0 \leq p \leq q \lt r$ $\forall p\leq x\leq r: A'[x] \neq \infty$ $A'[p\ldots q]$ and $A'[q+1\ldots r]$ are sorted in ascending order. Postcondition
{ "domain": "cs.stackexchange", "id": 21024, "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": "algorithm-analysis, formal-methods, software-verification, loop-invariants, automated-theorem-proving", "url": null }
Below is a proof that the (pseudo)functor that sends a scheme to its petit étale topos is not fully faithful, for any category of schemes over an algebraically closed base field $$k$$, assuming that this category contains both $$\mathrm{Spec}(k)$$ and $$\mathrm{Spec}(k[t])$$. Proof: The morphisms of schemes $$\mathrm{Spec}(k) \to \mathrm{Spec}(k[t])$$ over $$k$$ correspond to maximal ideals of $$k[t]$$. At the level of toposes, these give geometric morphisms $$\mathbf{Sets} \to \mathcal{E}$$, with $$\mathcal{E}$$ the étale topos of $$\mathrm{Spec}(k[t])$$. However, not every geometric morphism $$\mathbf{Sets} \to \mathcal{E}$$ is of this form. There is another one induced by the morphism of schemes $$\mathbf{Spec}(k(t)^\mathrm{sep}) \to \mathrm{Spec}(k[t])$$, with $$k(t)^\mathrm{sep}$$ the separable closure of $$k(t)$$. $$\square$$
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846691281407, "lm_q1q2_score": 0.8021710766367288, "lm_q2_score": 0.8198933425148214, "openwebmath_perplexity": 297.70251289891996, "openwebmath_score": 0.9318681359291077, "tags": null, "url": "https://mathoverflow.net/questions/426038/making-the-%C3%A9tale-topos-construction-a-fully-faithful-2-functor-from-schemes-to-g" }
electrostatics, gauss-law, textbook-erratum I think i need to ask, is the question the "number of field lines" relevant? The actual number of field lines is irrelevant. Only the relative number of lines at one location vs another. That may provide information on the relative electric strength or the relative flux at the two locations. just to re-clarify, we can never find the "number of electric lines of force originating from a charge of 1 Coulomb" right?" Right.
{ "domain": "physics.stackexchange", "id": 79171, "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": "electrostatics, gauss-law, textbook-erratum", "url": null }
general-relativity, energy, energy-conservation, tensor-calculus, stress-energy-momentum-tensor Is my first reasoning right ? Otherwise: can someone give me a hint ? Thanks If the dust does not interact with anything, momentum and energy are conserved. Otherwise, the general equation reads $$ \partial_0 T^{i0} = - \sum_{k=1}^3\partial_k T^{ik} +Q^i\:. $$ If you integrate it in a regular volume $\Omega$ at rest with the reference frame defined by the used Minkowskian coordinates, exploiting the theorm of divergence you have: $$\frac{d}{dt}\int_\Omega T^{i0} d^3x = - \oint_{+\partial \Omega} T^{ik} n_k dS +\int_\Omega Q^i d^3x\:.$$
{ "domain": "physics.stackexchange", "id": 11085, "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, energy, energy-conservation, tensor-calculus, stress-energy-momentum-tensor", "url": null }
electrical-engineering, power, circuits, power-engineering, multiphase-flow In the first case the author is making emphasis that the line voltage is a vector (magnitude $\angle$ angle or $V_{LL} = \sqrt{3} V_{LN} \angle30º$) and the second case talks about magnitude ($ V_{LL} = \sqrt{3} V_{LN} $). The phase angles are only relevant when looking at phasor diagrams, so they are usually left off for clarity.
{ "domain": "engineering.stackexchange", "id": 4447, "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": "electrical-engineering, power, circuits, power-engineering, multiphase-flow", "url": null }
rotational-dynamics, complex-numbers, rigid-body-dynamics $\mathbf{M}\in \mathbb{R}^{m\times m}$ is joint-space inertia matrix. Now, I use a quaternion joint to represents the 3D angle of the humanoid root orientation. Since quaternion joint has a dimensionality of 4, the dimensionality of $\mathbf{q}\in \mathbb{R}^{m_{quat}}$ is now $m_{quat} = 7 + n$. Accordingly the dimensionality of $\mathbf{M}$ will be lifted up from $m\times m$ to $m_{quat}\times m_{quat}$. This confusing for me. In my understanding, the dimensionality of $\boldsymbol{\tau}$ and $\ddot{\mathbf{q}}$ remain the same ($m$) even if we use a quaternion joint to represent the root orientation. Then, isn't the equation not solvable anymore because of the inconsistency of the dimensionalities? Or am I misunderstanding something? Although the quaternion has 4 parameters, it really has 3 degrees of freedom, since it must obey the unity condition $\sqrt{x^2+y^2+z^2+w^2}=1$.
{ "domain": "physics.stackexchange", "id": 69704, "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": "rotational-dynamics, complex-numbers, rigid-body-dynamics", "url": null }
randomized-algorithms, query-complexity, decision-trees Title: Randomized and deterministic query complexity of symmetric functions The deterministic query complexity $D(f)$ of a symmetric function $f$ is $\Omega(n)$ (except for f = 0 or f = 1). I am wondering if the same result holds for the (bounded-error) randomized query complexity? Do we have $R_{1/4}(f) = \Omega(n)$? I know it's true for some well-known functions (like the OR function), and that it doesn't hold in the quantum setting (for instance, $Q(OR) = \Theta(\sqrt{n})$ by Grover's algorithm). In fact, $D(f) = O(Q(f)^2)$ so we have at least $R_{1/4}(f) = \Omega(\sqrt{n})$. Ok, I found the answer in this survey: http://homepages.cwi.nl/~rdewolf/publ/qc/dectree.pdf The sensitivity $s(f)$ of a (nonconstant) symmetric function $f$ is $s(f) \geq \lceil\frac{n+1}{2}\rceil$. However, $D(f) \geq s(f)$ and $R_{1/4}(f) \geq \frac{s(f)}{3}$... There are other interesting results concerning symmetric functions in this survey (see Section 6.1).
{ "domain": "cstheory.stackexchange", "id": 3646, "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": "randomized-algorithms, query-complexity, decision-trees", "url": null }
conventions, units, dimensional-analysis, angular-velocity Title: Unit of Angular velocity Why is the angular velocity $\omega$ always written in $rad/sec$? Is there anything wrong if I write it in $degrees/sec$? If no, then why almost all the books have it as $rad/sec$?? $w $ is the angular velocity, not the angular displacement. You can write it in deg/ sec if you wish. The reason rad/sec are used is because the identities $\frac{d}{dx}\cos(x) = -\sin(x) $ and $ \frac{d}{dx}\sin(x) = \cos(x)$ only hold when x is measured in radians.
{ "domain": "physics.stackexchange", "id": 44454, "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": "conventions, units, dimensional-analysis, angular-velocity", "url": null }
beginner, object-oriented, ruby Title: Ruby banking system program As a beginner I'd like to get any kind of feedback. The more the better. Any optimization and style mistakes? class Account attr_reader :name, :balance def initialize(name, balance=100) @name = name @balance = balance end private def pin @pin = 789 end def pin_check puts "Welcome to the banking system, #{@name}!\n" + "To access your account, input PIN please" @input_pin = gets.chomp.to_i end def pin_error return "Access denied: incorrect PIN." end public
{ "domain": "codereview.stackexchange", "id": 33759, "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, object-oriented, ruby", "url": null }
# Data Fitting # First, we'll generate some fake data to use x = np.linspace(0,10,50) # 50 x points from 0 to 10 # Remember, you can look at the help for linspace too: # help(np.linspace) In [3]: # y = m x + b y = 2.5 * x + 1.2 In [4]: # let's plot that pl.clf() pl.plot(x,y) Out[4]: [<matplotlib.lines.Line2D at 0x105959150>] In [5]: # looks like a simple line. But we want to see the individual data points pl.plot(x,y,marker='s') Out[5]: [<matplotlib.lines.Line2D at 0x1031a3290>] In [6]: # We need to add noise first noise = pl.randn(y.size) # Like IDL, python has a 'randn' function that is centered at 0 with a standard deviation of 1. # IDL's 'randomu' is 'pl.rand' instead # What's y.size? print y.size print len(y) 50 50 y.size is the number of elements in y, just like len(y) or, in IDL, n_elements(y)
{ "domain": "ipython.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9752018376422666, "lm_q1q2_score": 0.8018003509745034, "lm_q2_score": 0.8221891305219504, "openwebmath_perplexity": 3176.441913635825, "openwebmath_score": 0.5396174192428589, "tags": null, "url": "http://nbviewer.ipython.org/gist/keflavich/4042018" }
quantum-mechanics, resource-recommendations, curvature Using the definition of momentum $p$ and the Hamiltonian $H$ from translation operators: $$ R_{a,t} |x \rangle = \lim_{\delta a,\delta t \to 0} U(- \delta t) T( - \delta a) \Big( \frac{-i }{\hbar } \frac{T( \delta a) ( H )}{\delta a}+ \frac{-i }{\hbar } \frac{p}{\delta t} + \frac{i }{\hbar } U(\delta t) ( \frac{p}{\delta t}) + \frac{i}{\hbar} \frac{H}{\delta a} \Big) |x \rangle $$ Taking $i / \hbar$ and other factors common: $$ R_{a,t} |x \rangle = \lim_{\delta a,\delta t \to 0} U(- \delta t) T( - \delta a) \frac{i }{\hbar }\Big( - \frac{T( \delta a) ( H )}{\delta a}- \frac{p}{\delta t} +U(\delta t) ( \frac{p}{\delta t}) + \frac{H}{\delta a} \Big) |x \rangle $$ Again applying definitions of position and momentum: $$ R_{a,t} |x \rangle = \lim_{\delta a, \delta t \to 0} U(- \delta t) T( - \delta a) \frac{i }{\hbar } \frac{- i }{\hbar }\Big(H p - p H \Big) |x \rangle $$
{ "domain": "physics.stackexchange", "id": 74000, "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, resource-recommendations, curvature", "url": null }
typescript My solution works, but it feels a bit messy and inefficient in places. I feel like I'm not doing things in the proper Typescript way. Are there any suggestions for improvement? I'll start with the simple ones. Use const instead of let when possible. It prevent accidental overwrites and it also better comunicates the intent. In fact, in your code, const is suitable in every single instance. The test variable is unused and in fact, you should not call map at all if you're not mapping the array. You just wanna "forEach" the array or simply loop it using for. Avoid using any type unless really necesary and it should stand for "any type is suitable here". If you just don't know what the type, better to use unknown. Since result can only be Array, asking if (result) is meaningless because it will always be true.
{ "domain": "codereview.stackexchange", "id": 44087, "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": "typescript", "url": null }
path-integral, econo-physics The class of physical problems that can be tackled with the first type of equation are called Markov processes, their characteristic is that the state of the system depends only on its previous state. Despite its seeming limitedness, this comprises many phenomena since any process with a long but finite memory can be mapped onto a Markov process provided the state space is enlarged appropriately. On the other hand, the second equation is pretty natural and general in quantum mechanics. It is basically stating that the unity operator can always be decomposed into a, possibly overcomplete, sum of pure states $$\mathbb{I}=\int |X_k\rangle\langle X_k| dX_k \; .$$
{ "domain": "physics.stackexchange", "id": 147, "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": "path-integral, econo-physics", "url": null }
java, algorithm, array but this one will fail : int[] a9 = {1, 2, 100, 100, 101}; assertEquals(3, getClosestK(a9, 2)); // actually returns 100
{ "domain": "codereview.stackexchange", "id": 20005, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, array", "url": null }
angular-momentum, electrons, solid-state-physics, conservation-laws, scattering \times<\mathbf{x}',\sigma'|H_{\operatorname{per}}|\mathbf{x},\sigma><\mathbf{x},\sigma|\mathbf{k}_0,\sigma_0> \\ = \sum_{\sigma,\sigma'} \int\int d^3xd^3x' \left\{\psi^*_{\mathbf{k}_1}(\mathbf{x})\delta_{\sigma',\sigma_1}\right\}\left\{H_{\operatorname{per}}(\mathbf{x})\delta(\mathbf{x - x'})\delta_{\sigma',\sigma}\right\} \left\{\psi^*_{\mathbf{k}_0}(\mathbf{x})\delta_{\sigma,\sigma_0}\right\}\ \\ = \delta_{\sigma_0,\sigma_1}\int d^3x \psi^*_{\mathbf{k_1}}(\mathbf{x}) H_{\operatorname{per}}(\mathbf{x})\psi^*_{\mathbf{k_0}}(\mathbf{x}). $$ And hence, $\sigma_1 \neq \sigma_0$ leads to a vanishing matrix element and thus to a vanishing scattering rate $S(\mathbf{k}_0,\sigma_0;\mathbf{k}_1,\sigma_1)$. As a consequence, scattering due to a spin-independent potential conserves spin. This is the case of phonon scattering and non-magnetic impurity scattering.
{ "domain": "physics.stackexchange", "id": 44544, "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": "angular-momentum, electrons, solid-state-physics, conservation-laws, scattering", "url": null }
c#, reflection, extension-methods /// <summary> /// Searches for the specified method, using the specified binding constraints. /// </summary> /// <param name="name">The string containing the name of the method to get.</param> /// <param name="bindingAttr"> /// A bitmask comprised of one or more System.Reflection.BindingFlags that specify /// how the search is conducted.-or- Zero, to return null. /// </param> /// <param name="result">When this method returns, contains System.Reflection.MethodInfo of found method or null (in a case of failure).</param> /// <exception cref="ArgumentNullException"></exception> /// <returns>returns true if method with the given data was found and match is not ambiguous; otherwise false.</returns> public static bool TryGetMethod(this Type type, string name, BindingFlags bindingAttr, out MethodInfo result) { if (type == null) throw new ArgumentNullException("type"); if (name == null)
{ "domain": "codereview.stackexchange", "id": 3833, "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#, reflection, extension-methods", "url": null }
classical-mechanics, simulations, rocket-science Title: Analytic and numerical integration of the rocket equation yield different results Background The mass of a rocket as a function of time is: $$ m = m_0 - \dot m t$$ Where $m_0 $ is the initial mass of the rocket and $\dot m$ is the mass flow rate. At a certain time all the fuel has been used, so from that time onwards $m = m_f$, the mass of the rocket without fuel. The speed is then defined by the following equation, where $V_e$ is the exhaust velocity and $g$ is constant gravity. $$v = V_e log({m_o \over m_o - \dot mt}) - gt$$ To obtain position let $\dot m$ be constant, the equation can be written as $$v = V_e log({m_o \over m_o - kt}) - gt$$ Integration of that expression lets to the following, which corresponds with the expression contained in Orbital Mechanics by Curtis. $$h = \frac{V_e}{\dot m}[(m_0 - \dot m t)log({m_o - \dot mt\over m_o })+ \dot mt] - \frac{1}{2}g t^2 $$ Question
{ "domain": "physics.stackexchange", "id": 52556, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, simulations, rocket-science", "url": null }
information-theory, coding-theory, error-correcting-codes After a little research I learned that Z-channels (or binary asymmetric channels) flip bits in one direction. Also I found that linear error-correction codes for Z-channels are often applicable to symmetric channels as well. So to exploit the asymmetry, the codes likely need to be non-linear. More info on the state of the art is appreciated (hoping for a simple algorithm...). This is not possible. There's no free lunch. You are looking for a compression scheme that is guaranteed to compress 32 bits down to less than 32 bits. That's not possible in general, unless you have prior knowledge that lets you rule out some of the possible 32-bit values. In particular, if you want to send 32 bits of information, and all $2^{32}$ possibilities are equally likely, and errors are not allowed, you'll have to send at least 32 bits over the communication channel. This is a basic theorem of information theory. No amount of error-correcting codes will get you past this.
{ "domain": "cs.stackexchange", "id": 3197, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "information-theory, coding-theory, error-correcting-codes", "url": null }
quantum-mechanics, schroedinger-equation, spherical-harmonics Title: Why is the azimuthal part of spherical harmonics in the form of $Ae^{im\phi}$, but not $Ae^{im\phi}+Be^{-im\phi}$? The general solution to the azimuthal equation for a quantum-mechanical rigid rotor (spherical harmonics) $$\frac{d^2}{d\phi^2}\psi(\phi)=n^2\psi(\phi)$$ ($n^2$ is the separation constant) is given by $$\psi(\phi)=Ae^{in\phi}+Be^{-in\phi} $$ With the boundary condition $\psi(\phi)=\psi(\phi+2\pi)$, we have $$n = ... -2, -1, 0, +1, +2 ...$$ and $$\psi_n(\phi)=Ae^{in\phi}+Be^{-in\phi},\,\,\,\,\,\,n = ... -2, -1, 0, +1, +2 ...$$ However, the complete wave function (spherical harmonics) is expressed as
{ "domain": "physics.stackexchange", "id": 63234, "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, schroedinger-equation, spherical-harmonics", "url": null }
graph-theory, planar-graphs, graph-colouring Let the graph have $k$ vertices. The graph must have $2k$ edges, because it is 4-regular. Let the number of $a$ colored vertices be $k_a$, and similarly for $k_b$ and $k_c$. Call $e_{ab}$ the number of edges between $a$ and $b$ colored vertices, and the same for $e_{ac}$ and $e_{bc}$. If we assume that none of the restricted graphs have as many edges as vertices, we must have $$ e_{ab} < k_a + k_b \\ e_{ac} < k_a + k_c \\ e_{bc} < k_b + k_c \\ $$ Summing over all edges, we find that $e_{ab} + e_{ac} + e_{bc} < 2(k_a + k_b + k_c)$, and so $e < 2k$. But this contradicts the fact that 4-regular graphs have twice as many edges as vertices, mentioned above. Thus, the assumption is false, and some color-restricted subgraph has as many edges as vertices, and hence has a cycle.
{ "domain": "cstheory.stackexchange", "id": 4962, "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": "graph-theory, planar-graphs, graph-colouring", "url": null }
electric-circuits, electrical-engineering, electronics there will be following sign convention in case 1 and just opposite in case 2. So in case 1 as you can see D1 is forward biased so current will flow through D1 and R and will go to the central low potential point and the circuit will be completed for case 1 and in case 2 the current will flow through D2 and R and again will go to the centeral low potential point and the circuit will again be completed and it will rectifier the full wave that is it's negative as well as positive half cycle in a positive variable DC current. So that is the reason a center tap transformer is used in a full wave rectifier because you need to rectify full wave. Hope it helped you.
{ "domain": "physics.stackexchange", "id": 6670, "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, electrical-engineering, electronics", "url": null }
thermodynamics, differentiation, mathematics, calculus I understand that: $$(3) \left\{ \begin{array}{c} dV=0 \implies T=\frac{\partial U}{\partial S}\\ dS=0 \implies -p=\frac{\partial U}{\partial V} \end{array} \right. $$ UPDATE: $$ (4) \forall S \forall V \left\{ \begin{array}{c} dU=T (S-S_0)-p(V-V_0) \\ dU=\frac{\partial U(S_0, V_0)}{\partial S}(S-S_0)+ \frac{\partial U(S_0,V_0 )}{\partial V} (V-V_0) \end{array} \right. $$ (5) is implied by (4) using Universal Elimination we set $V$ to $V_0$ $$(5) \left\{ \begin{array}{c} dU=T (S-S_0) \\ dU=\frac{\partial U(S_0,V_0)}{\partial S}(S-S_0) \end{array} \right. \implies T=\frac{\partial U(S_0,V_0)}{\partial S} $$ (6) is implied by (4) using Universal Elimination we set $S$ to $S_0$ $$ (6) \left\{ \begin{array}{c} dU=-p (V-V_0) \\ dU=\frac{\partial U(S_0,V_0)}{\partial S}(V-V_0) \end{array} \right. \implies -p=\frac{\partial U(S_0,V_0)}{\partial S} $$ Than using conjunction introduction from (5) and (6) we obtain (7). $$ (7) \left\{ \begin{array}{c}
{ "domain": "physics.stackexchange", "id": 79223, "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, differentiation, mathematics, calculus", "url": null }
newtonian-mechanics, experimental-physics, friction, spring, oscillators Title: Should damping ratio increase or decrease with increase in mass? I'm currently doing a small project in college for structures being damped. We're adding weights to a structure and measuring the damping affect. We've calculated the damping ratio and coeffecients, however, we currently have damping ratio increasing with mass, which I do not believe is correct following the below equation: $$\zeta=\frac{c}{2\sqrt{mk}} $$ The above equation, assuming $k$ and $c$ are constant, suggests that $\zeta$ decreases as mass increases. However, the results we are getting are entirely different, and we do not have a constant value for the damping coefficient: We got the initial value of damping ratio by interpreting the graphs by using the following equation and process:
{ "domain": "physics.stackexchange", "id": 63043, "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, experimental-physics, friction, spring, oscillators", "url": null }
Of course, you use conservation of momentum just before and just after the collision to find the speed of the two masses after the collision. I initially thought of this as a SHM problem and just thought to myself, Vmax = speed just after collision = Vtotal (1/2)(M+m)Vmax^2 = (1/2)k(A)^2 and just solve for A. Here's what he wrote: (1/2)(M+m)Vtotal^2 + 0 + (1/2)k(y)^2 = 0 + (M+m)g(d) + (1/2)k(d-y)^2 Where d is the max compression of the spring, d = 0 at the equilibrium point, and y is mg/k. Is that right, and am I wrong? Maybe this will be easier to answer: If after the collision I wanted to know how much the spring will be compressed/stretched by by relative to its unstretched length, can I do: (1/2)(M+m)Vmax^2 = (1/2)(k)(A^2) Solve for A, and say my answer is (mg/k)-A? Last edited: Aug 3, 2011 7. Aug 3, 2011 ### Staff: Mentor Not a bad thought, but the problem is that the initial position of the 'block+bullet' after the collision is not the equilibrium position.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226294209298, "lm_q1q2_score": 0.8435531375622395, "lm_q2_score": 0.8633916064586998, "openwebmath_perplexity": 764.9302547868277, "openwebmath_score": 0.6965649724006653, "tags": null, "url": "https://www.physicsforums.com/threads/question-about-vertical-oscillations-and-energy.518986/" }