text stringlengths 49 10.4k | source dict |
|---|---|
special-relativity, quantum-entanglement, time-dilation
--
I should note, there are a number of physicists who have tried to construct alternatives to quantum mechanics with tiny non-linearities that would have the effect of looking linear on the small scale (thus matching experiments), but where the non-linearities cause all but one of the alternatives to actually disappear under their almost-unitary evolution at larger scales. (e.g. Roger Penrose proposing that quantum gravity would do so.) These are in principle experimentally distinguishable from quantum mechanics. However, I have heard that it is extremely difficult to fill in the details consistently, it is even harder to motivate why the tiny non-linearities should take the forms proposed, and so far there is zero experimental evidence either for or against any of them, compared to the linear alternative. I don't actually know how they propose to deal with the EPR-type causality paradoxes - but I should think they would still have the same problem that any sort of faster-than-light collapse process implies something travelling backwards-in-time. | {
"domain": "physics.stackexchange",
"id": 91778,
"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, quantum-entanglement, time-dilation",
"url": null
} |
quantum-mechanics, wavefunction, probability
Is this situation analogous to the probability distribution evolving to the delta function centred at the region between x and x+Δx, over that length of time?
It is not, since the probability distribution won't evolve to a delta function. The wavefunction of the particle is described by a wave equation (in non-relativistic quantum mechanics the Schrodinger equation), there is no wavefunction collapse as long as the position of the particle is not measured (ie you don't "find" the particle). After finding it, it has a new state, which gives a new probability distribution. | {
"domain": "physics.stackexchange",
"id": 88709,
"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, wavefunction, probability",
"url": null
} |
sampling, frequency, sensor
¹ that's not necessarily twice the maximum frequency in the signal! A lot of systems, especially superheterodyne systems, i.e. systems that have a strictly bandslimited signal on an intermediate frequency (IF) use subsampling, i.e. the sample rate is $> 2\cdot B$, but $\ll 2\cdot f_\text{max}$. The aliasing that occurs doesn't distort the information content, but aliases the signal down from the IF to the Nyquist band. It's a very useful, very common technique. | {
"domain": "dsp.stackexchange",
"id": 8626,
"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": "sampling, frequency, sensor",
"url": null
} |
c, parsing, shell
return false;
}
if (tilde) {
/*
* Expand the argument into the matching filenames.
*/
fileCount = expandWildCards(argument, &fileTable);
}
/*
* Expand the argument into the matching filenames or accept
* it as is depending on whether there were any unquoted
* wildcard characters in it.
*/
if (unquotedWildCards) {
/*
* Expand the argument into the matching filenames.
*/
fileCount = expandWildCards(argument, &fileTable);
/*
* Return an error if the wildcards failed to match.
*/
if (fileCount < 0)
return false;
if (fileCount == 0) {
fprintf(stderr, "Wildcard expansion error\n");
return false;
}
}
else {
/*
* Set up to only store the argument itself.
*/
fileTable = &argument;
fileCount = 1;
}
/*
* Now reallocate the argument table to hold the file name.
*/
if (argCount + fileCount >= argTableSize) {
newArgTableSize = argCount + fileCount + 1;
newArgTable = (const char **) realloc(argTable,
(sizeof(const char *) * newArgTableSize));
if (newArgTable == NULL) {
fprintf(stderr, "No memory for arg list\n");
return false;
}
argTable = newArgTable;
argTableSize = newArgTableSize;
}
if (1) {
/* for(int i=0;i<argCount;i++){
}*/
/*
* Copy the new arguments to the end of the old ones.
*/
/* copy_of_argv = malloc(sizeof(char *) * (argTableSize+fileCount));*/
/* memcpy(copy_of_argv,argTable, fileCount*sizeof(const char **));*/ | {
"domain": "codereview.stackexchange",
"id": 19756,
"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, shell",
"url": null
} |
laser, glass, laser-interaction, fluorescence
Pure soda–lime–silica glasses are not fluorescent, but as also mentioned by @Ed-V, the reddish fluorescence in your glass is likely due to decolourizing agents acting as fluorescent "activators". Decolourizors are traditionally needed because iron (as Fe$_2$O$_3$) is an ubiquitous contaminant that gives a green tint to common glass, and for centuries manganese oxide has been added to glass to decolourize it. Modern glass may be decolourized by selenium or cerium, but I believe the essential physics and chemistry are all similar.
According to Kreidl, the fluorescence of manganese-doped glass is due to the transitions of Mn$^{2+}$ ions embedded in the glass matrix.
Mn$^{2+}$ ions do not fluorescence when dissolved in water, but when dissolved in glass they can create luminescence centres that can fluorescence under ultraviolet in colours ranging from green to red depending the composition and structure of the surrounding glass matrix. Greenish fluorescence occurs when the Mn$^{2+}$ ions form part of the (mostly) SiO$_2 $ glass network, while red/orange fluorescence occurs when the Mn$^{2+}$ occupy more loosely bound interstitial locations. The exact colour emitted depends on the energy states of the luminescence centre formed by each Mn$^{2+}$ ion interacting with its specific neighbours. | {
"domain": "physics.stackexchange",
"id": 96195,
"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": "laser, glass, laser-interaction, fluorescence",
"url": null
} |
optics, condensed-matter, light-emitting-diodes
Title: What challenges needed to be overcome to create (blue) LEDs? In light of today's announcement of the 2014 Nobel laureates, and because of a discussion among colleagues about the physical significance of these devices, let me ask:
What is the physical significance of blue LEDs, which challenges had to be overcome to create them? Why are materials with the band gap necessary for blue light apparently so rare/difficult to manufacture?
I know it took decades to create blue LED after Holonyak discovered the first red ones, so there must have been some obstacles, which were maybe also important for other areas of research - otherwise I wouldn't understand why the inventors of the blue LED got a prize that the inventor of the first LED didn't.
Wikipedia has something to say on the topic:
Its development built on critical developments in GaN nucleation on sapphire substrates and the demonstration of p-type doping of GaN.
However, I'm asking myself why this is "critical" and why this was difficult. The Nobel website scientific background is good. Basically, when you try to make gallium nitride, you usually end up with a material that is (1) chock-full of defects, and (2) n-doped (even when you were trying to p-dope it).
So blue LEDs required
The invention of MOCVD technology for growing crystals (early 1970s);
Finding the right recipe to grow good GaN by MOCVD (i.e., use a sapphire substrate, start with a low temperature step then switch to high temperature, etc.) (mid-1980s);
Finding the right recipe to grow p-type GaN (what dopant to use (Mg), in what concentration, and what annealing / treating recipe to use to make the Mg dopants actually work and reduce the number of unintended n-type dopants that were canceling it out) (early 1990s);
Once all that was in place, find good structures to make LEDs (e.g. if you can also grow InGaN then you can make quantum wells) (early-to-mid 1990s). | {
"domain": "physics.stackexchange",
"id": 16800,
"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": "optics, condensed-matter, light-emitting-diodes",
"url": null
} |
image-processing, filters, filter-design, 2d
reZ1pi4 = filter1pi4.filter(x)
saveKernel('reZ1pi4', reZ1pi4)
reZ2pi4 = filter2pi4.filter(x)
saveKernel('reZ2pi4', reZ2pi4)
reZ3pi4 = filter3pi4.filter(x)
saveKernel('reZ3pi4', reZ3pi4)
$M=1$
$M=2$
$M=3$ | {
"domain": "dsp.stackexchange",
"id": 7552,
"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, filters, filter-design, 2d",
"url": null
} |
scattering, simulations, plasma-physics, stochastic-processes
$$m\,\mathrm{d}\mathbf{v}=-\lambda\mathbf{v}\mathrm{d}t+\mathrm{d}W$$
where $\mathrm{d}W$ is the Wiener process. Note that I am assuming that the particles don't interact with each other except through collisions, which I'll discuss later; if there are interactions with forces, then those need to be addressed in your force equation.
These can be evolved using pretty simple Euler integration scheme (see also my answer here), so for a single time step, you would have an update like,
for n = 1 to num_particles
x[n] = x[n] + v[n] * dt
v[n] = (1 - lambda * dt / m) * v[n] + dW(dt) / m | {
"domain": "physics.stackexchange",
"id": 90401,
"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": "scattering, simulations, plasma-physics, stochastic-processes",
"url": null
} |
The following Maple program shows how to compute this statistic using the cycle index $Z(S_n)$ of the symmetric group.
pet_cycleind_symm :=
proc(n)
local p, s;
option remember;
if n=0 then return 1; fi;
end;
v :=
proc(n)
option remember;
local part, src, idx, totcyc;
totcyc := 0;
if n=1 then
idx := [a[1]];
else
idx := pet_cycleind_symm(n);
fi;
for part in idx do
totcyc := totcyc +
lcoeff(part)*degree(part);
od;
n/totcyc;
end;
We get the sequence $$1,4/3,{\frac {18}{11}},{\frac {48}{25}},{\frac {300}{137}}, {\frac {120}{49}},{\frac {980}{363}},{\frac {2240}{761}},\ldots$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759654852756,
"lm_q1q2_score": 0.8152482395244011,
"lm_q2_score": 0.8311430478583168,
"openwebmath_perplexity": 474.2923118887029,
"openwebmath_score": 0.9053853154182434,
"tags": null,
"url": "https://math.stackexchange.com/questions/1409862/average-length-of-a-cycle-in-a-n-permutation"
} |
starting from rest means each starts with the same gravitational potential energy , which is converted entirely to , provided each rolls without slipping. 0points A bicycle wheel of radius 0. 1 Rolling Without Slipping When a round, symmetric rigid body (like a uniform cylinder or sphere) of radius R rolls without slipping on a horizontal surface, the distance though which its center travels (when. The linear speed of the wheel is. Now, consider a wheel of radius R rolling without slipping along the straight. In other words, at any particular instant of time, the part of the disc in contact with the surface is at rest with respect to the surface. A circular hoop rolls without slipping on a flat horizontal surface. Derive the governing differential equation of motion. (b) What is the minimum coefficient of friction required for the sphere to roll without slipping? Solution. In which order do the objects reach the bottom of the incline?. Rolling without slipping. A multi-objective optimization problem of a passively controlled motion is formulated for the model and it has been solved. The equations of motion will be: F x = m(a G) x => P - F = m a G F y = m(a G) y => N - mg = 0 M G = I Ga => F r = I G a There are 4 unknowns (F, N, a, and a G. Solution A. When the ring rolls without slipping, then v = rω, where v is the velocity of centre of mass of ring, and ω is its angular velocity. there are net forces) NON-smooth rolling motion. Course Material Related to This Topic: Complete exam problem 1e; Check solution to exam Problem 1e. Multiple-Choice Homework 21: Torque and rolling motion Problem 1: A solid cylinder and a solid sphere are rolling without slipping down an inclined plane. General Plane Motion Rolling without slipping. Velocities of points on a rolling wheel. Theoretical background Consider a cylinder of massm and radius R rolling down an inclined plane of angle θ. 7 in Section 10. Rotational motion is more complicated than linear motion, and only the motion of rigid bodies will be considered here. could be a cylinder, hoop, sphere. along a surface without slipping. a wheel rolling down the road. The motion of an extended rigid body can be resolved into two parts. Rolling Motion without Slipping. If the conditions are such that the object rolls without slipping, there is also a geometric relationship between | {
"domain": "fian-intern.de",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357237856482,
"lm_q1q2_score": 0.8597913633963247,
"lm_q2_score": 0.8757869786798663,
"openwebmath_perplexity": 406.11801210474823,
"openwebmath_score": 0.5616315007209778,
"tags": null,
"url": "http://csvh.fian-intern.de/rolling-motion-without-slipping.html"
} |
c, linked-list, reinventing-the-wheel, stack, c99
bool stack_is_empty(StackCDT *s)
{
return s->top == NULL;
}
void stack_push(StackCDT *s, StackElement elem)
{
Node *new = node_create(elem);
node_insert(&(s->top), new);
}
StackElement stack_pop(StackCDT *s)
{
if (stack_is_empty(s)) {
fprintf(stderr, "Can't pop element from stack, stack is empty.\n");
exit(1);
}
StackElement elem = s->top->data;
node_delete(&(s->top));
return elem;
}
stacktest.c
#include <stdio.h>
#include <string.h>
#include "stack.h"
#define MAX_STR_LEN 100
void stacktest()
{
printf("Enter a string(not more than %d characters): ", MAX_STR_LEN);
char input[MAX_STR_LEN + 1];
fgets(input, sizeof input, stdin);
char *pos;
if ((pos = strchr(input, '\n')) != NULL)
*pos = '\0';
Stack stack = stack_init();
for (char *c = input; *c; c++)
stack_push(stack, *c);
printf("Popped characters are: ");
while (!stack_is_empty(stack))
printf("%c", stack_pop(stack));
printf("\n");
stack_destroy(stack);
}
int main()
{
stacktest();
return 0;
}
Is my implementation all right? Generally looks good. Few comments:
Node is not used by the client; it is a stack implementation detail, so node_create, node_insert and node_delete should be static.
I prefer function returning results rather than void modifying its argument. Consider
Node * node_insert(Node * ref, Node * new);
Node * node_delete(Node * ref); | {
"domain": "codereview.stackexchange",
"id": 16683,
"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, linked-list, reinventing-the-wheel, stack, c99",
"url": null
} |
virology
lentiviral vectors packaging RNA much smaller than 10,000 nucleotides have been shown to efficiently transduce cells and are thus capable of genome uncoating and integration.
OP seems to be familiar with the details of the subject, so I recommend reading the review in full if you have access. | {
"domain": "biology.stackexchange",
"id": 12227,
"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": "virology",
"url": null
} |
scikit-learn, xgboost
xgb = xgb.XGBClassifier(objective=focal_loss)
What should I do in following situation? Is there maybe ready version of Focal Loss ready to use? Thanks in advance. def focal_loss(alpha, gamma):
def custom_loss(y_pred, y_true):
a,g = alpha, gamma
def fl(x,t):
p = 1/(1+np.exp(-x))
return -( a*t + (1-a)*(1-t) ) * (( 1 - ( t*p + (1-t)*(1-p)) )**g) * ( t*np.log(p)+(1-t)*np.log(1-p) )
partial_fl = lambda x: fl(x, y_true)
grad = derivative(partial_fl, y_pred, n=1, dx=1e-6)
hess = derivative(partial_fl, y_pred, n=2, dx=1e-6)
return grad, hess
return custom_loss
xgb = xgb.XGBClassifier(objective=focal_loss(alpha=0.25, gamma=1))
Using Python Closures!! | {
"domain": "datascience.stackexchange",
"id": 8723,
"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": "scikit-learn, xgboost",
"url": null
} |
vba, excel
Title: Get data from user input as workbook or worksheet I had two different functions for populating a data array. I tried to refactor them using a single argument as to whether or not the user should be selecting a worksheet or just the workbook.
The primary issue being whether I need to prompt the user to select a range or not. The main difference between the two before was if using just a sheet I didn't need xlApp.
I came at the refactoring a little backwards, so I imagine it can be improved.
Option Explicit
Private Function ImportDataFromExternalSource(ByVal pickSheet As Boolean, Optional ByVal numberOfColumns As Long = 0) As Variant
Dim lastRow As Long
Dim fileName As String
Dim xlApp As New Application
Set xlApp = New Excel.Application
Dim targetBook As Workbook
Dim targetSheet As Worksheet
Dim targetDataRange As Range
On Error GoTo ErrorHandler
fileName = File_Picker
Set targetBook = xlApp.Workbooks.Open(fileName)
Set targetSheet = targetBook.Sheets(1)
If pickSheet Then
xlApp.ActiveWorkbook.Windows(1).Visible = True
xlApp.Visible = True
targetBook.Activate
targetBook.Sheets(1).Activate
Set targetDataRange = xlApp.InputBox("Pick a cell on the sheet you would like to import", Type:=8)
Set targetSheet = targetDataRange.Parent
End If
If numberOfColumns = 0 Then numberOfColumns = targetSheet.Cells(1, Columns.Count).End(xlToLeft).Column
lastRow = targetSheet.Cells(Rows.Count, 1).End(xlUp).Row
ImportDataFromExternalSource = targetSheet.Range(targetSheet.Cells(1, 1), targetSheet.Cells(lastRow, numberOfColumns))
CleanExit:
If pickSheet Then
xlApp.Quit
Exit Function
End If
ThisWorkbook.Activate
targetBook.Close
Exit Function
ErrorHandler:
MsgBox "you've cancelled"
Resume CleanExit
End Function | {
"domain": "codereview.stackexchange",
"id": 24351,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, excel",
"url": null
} |
Fatal Crashes by Vehicle Type - Line Graph Example. Draw the line that connects the two points. thus adjusting the coordinates and the equation. Graphs that show acceleration look different from those that show constant speed. How many simple non-isomorphic graphs are possible with 3 vertices? Solution. (Example: For Client A, you can set up the CurrentAssets account group to include accounts in the range 100 – 149, and for Client B you can set up the same account group to include accounts 1000 – 1850. DH11 Files. Beyond that, the shape and growth for large positive x is given by:. Example: The graph of y = x2 + 3 is the graph of y = x2 shifted upward three units. You might, for example, want to show how a budget had been spent on different items in a particular year. Whether you want to create a pie chart or a stock chart, we make it simple for you. In Example 3, Sam's weight increased each month. Motivating example Grid graphs Search methods Small world graphs Conclusion Motivating example: max flow Compare performance of Ford-Fulkerson implementations • shortest augmenting path • maximum-capacity augmenting path Graph parameters for example graph • number of vertices V = 177 • number of edges E = 2000 • maximum capacity C = 100. This can also be written as the change in y over the change in x. We can use bar graphs to show the relative sizes of many things, such as what type of car people have, how many customers a shop has on different days and so on. They are shown below. f could be a positive constant: or zero: or a negative constant: As we can see from the previous example, we can't tell, given a graph of f', exactly what f will look like. GLE (Graphics Layout Engine) is a graphics scripting language designed for creating publication quality figures (e. Of course, none of this would be worth it if it was a pain for developers to implement. Microsoft Graph OAuth2 Access Token - Using Azure AD v2. The "Northwind" example, is run via :play northwind-graph and contains an traditional retail-system with products, orders, customers, suppliers and employees. We can draw a vertical line through the graph and have the line hit the graph more than once: Because our vertical line hits the graph more than once, there's an x-value getting | {
"domain": "solotango.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9615338123908151,
"lm_q1q2_score": 0.8114336733296955,
"lm_q2_score": 0.8438951005915208,
"openwebmath_perplexity": 1132.5435626150097,
"openwebmath_score": 0.2822085916996002,
"tags": null,
"url": "http://ylqo.solotango.it/graph-examples.html"
} |
ros, kinect, erratic, transform
Title: Kinect for Navigation on Erratic Robot
I have a kinect fitted on an erratic robot base. So far I managed to get the kinect and base working separately in ROS using erratic_player and openni for kinect. I also tried kinect laser emulator provided by ardros and works nicely.
I had a look at tf and also tutorials however am a bit stuck on how to set up and link the kinect frame and erratic odometry frame onto a common frame for navigation stack.
I think I am missing something fairly basic which I cannot figure out.
Any help will be greatly appreciated.
Originally posted by roboviz on ROS Answers with karma: 26 on 2011-06-13
Post score: 1
Have you seen this tutorial: Robot Setup?
For your robot you basically need to provide two tfs: odom -> base_link (the odometry) and base_link -> base_laser (the laser/kinect position). For the latter you can use a static_transform_publisher.
Originally posted by dornhege with karma: 31395 on 2011-06-13
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by roboviz on 2011-06-13:
Thanks for your answer. Yes I already had a look at Robot Setup tutorial and admittedly I got a bit lost there. This goes to show how beginner I am on ROS! I will give it another try and hopefully be able to create the TFs and link them as suggested. | {
"domain": "robotics.stackexchange",
"id": 5821,
"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, kinect, erratic, transform",
"url": null
} |
ros-melodic
2020-04-04 18:04:03 remove ros-melodic-desktop-full:amd64 1.4.1-0bionic.20200320.170844 <none>
2020-04-04 18:04:04 remove ros-melodic-perception:amd64 1.4.1-0bionic.20200320.161440 <none>
2020-04-04 18:04:05 remove ros-melodic-desktop:amd64 1.4.1-0bionic.20200320.165834 <none>
2020-04-04 18:04:05 remove ros-melodic-viz:amd64 1.4.1-0bionic.20200320.155640 <none>
2020-04-04 18:04:06 remove ros-melodic-geometry-tutorials:amd64 0.2.2-0bionic.20200320.154702 <none>
2020-04-04 18:04:06 remove ros-melodic-turtle-tf2:amd64 0.2.2-0bionic.20200320.123541 <none>
2020-04-04 18:04:07 remove ros-melodic-common-tutorials:amd64 0.1.11-0bionic.20200320.124359 <none>
2020-04-04 18:04:08 remove ros-melodic-turtle-actionlib:amd64 0.1.11-0bionic.20200320.123504 <none>
2020-04-04 18:04:08 remove ros-melodic-turtle-tf:amd64 0.2.2-0bionic.20200320.145720 <none>
2020-04-04 18:04:09 remove ros-melodic-actionlib-tutorials:amd64 0.1.11-0bionic.20200320.123237 <none>
2020-04-04 18:04:09 remove ros-melodic-simulators:amd64 1.4.1-0bionic.20200320.164211 <none> | {
"domain": "robotics.stackexchange",
"id": 34709,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-melodic",
"url": null
} |
quantum-mechanics, operators
$$[S \phi] (x) = exp(\mu\hbar) \phi(\exp(2\mu\hbar)x) $$
The wave function is simply scaled in the horizontal $x$-direction by that factor. Note that in the momentum representation, due to the inverse relationship of $x,p$ (or because we could run the derivation above with the $x,p$ interchanged but the sign in $S$ would then be the opposite one), the scaling goes in the opposite direction:
$$[S \tilde \phi] (p) = exp(-\mu\hbar) \tilde \phi(-\exp(2\mu\hbar)p) $$
The derivation was only valid for a real $\mu$ – when $S is manifestly unitary (the exponential of an anti-Hermitian operator). | {
"domain": "physics.stackexchange",
"id": 30771,
"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, operators",
"url": null
} |
physical-chemistry, electrochemistry
Second addition of Cerium(IV).
Here you add $25$ mL $\ce{Ce^{4+} 0.001 M}$, that is $250~\mu$moles. The same reaction happens. But here, the amount of Cerium added is equal to the amount of original Iron in the solution. So at the end, there is in solution $250~\mu$moles of $\ce{Ce^{3+}}$ and the same amount of $\ce{Fe^{3+}}$. The residual amount of $\ce{Ce^{4+}}$ and $\ce{Fe^{2+}}$ are very small, but unknown.
The potential of the solution must be the average of $\ce{E°(Fe^{3+}/Fe^{2+})}$ and $\ce{E°(Ce^{4+}/Ce^{3+})}$, and this is $(0.77$ V + $1.61$ V)/$2$ = $1.19$ V. The potential of the cell after this $2$nd addition is then $$\ce{E_{cell} = 1.19 V - (-0.24V) = 1.43 V}$$
Third edition of Cerium(IV). | {
"domain": "chemistry.stackexchange",
"id": 14440,
"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": "physical-chemistry, electrochemistry",
"url": null
} |
collections, c++20, circular-list
auto operator<=>(const iter &rhs) const {
return queue == rhs.queue ? pos <=> rhs.pos : std::partial_ordering::unordered;
}
iter& operator++() { return *this += 1; }
iter& operator--() { return *this += -1; }
[[nodiscard]] iter operator++(int) { iter tmp{queue, pos}; ++*this; return tmp; }
[[nodiscard]] iter operator--(int) { iter tmp{queue, pos}; --*this; return tmp; }
auto& operator+=(difference_type rhs) { pos = clamp(pos + rhs); return *this; }
auto& operator-=(difference_type rhs) { pos = clamp(pos - rhs); return *this; }
auto operator+(difference_type rhs) const { return iter{queue, pos + rhs}; }
auto operator-(difference_type rhs) const { return iter{queue, pos - rhs}; }
friend iter operator+(difference_type lhs, const iter &rhs) { return iter{rhs.queue, lhs + rhs.pos}; }
friend iter operator-(difference_type lhs, const iter &rhs) { return iter{rhs.queue, lhs - rhs.pos}; }
auto operator-(const iter &rhs) const { return pos - rhs.pos; }
};
public:
using iterator = iter<T>;
using const_iterator = iter<const T>; | {
"domain": "codereview.stackexchange",
"id": 44040,
"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": "collections, c++20, circular-list",
"url": null
} |
algorithm will find communities in such a graph. The weight of a directed walk (or trail or path) in a weighted directed graph is the sum of the weights of the traversed edges. You can use an adjacency-list or adjacency matrix implementation to represent a directed graph. or you can use the adjacency function to find the weighted or unweighted sparse adjacency matrix of a preexisting graph. Weighted graphs Description. In particular, if a vertex is not in a strongly connected component of size at least 2, or in the out-component of such a component, then its eigenvector centrality will be $0$. There are a few cases where you might want to use both—for example, a street map might have undirected edges for two-way streets and directed edges for one-way streets—but that's the only example I can think of off the top. Generalization (I am a kind of ) directed graph , weighted graph. Note: Usually applied only to directed graphs, since any vertex in a connected, undirected graph is reachable from any other vertex. Add to my favorites. We next explore how various fast, network-topological metrics, such as network community structure, can be used for cross-lingual comparisons. Positioning and Coordinates in Tikz+Beamer. To explain. In the case of weighted directed graph, each node contains an extra field that is called the weight of the node. I am to design an algorithm that runs in O(k(m + n)) for reporting a k-edge shortest path from s to t. Implicit representations. A weighted graph G= (V;E;w) is a graph with a weight w: E!R assigned to each edge. A weighted directed graph G is a triple (V, A, g) where (V, A) is a directed graph and g is an arbitrary real-valued function defined on the arc set A. Let's move straight into graph theory. In some contexts, one may work with graphs that have multiple edges between the same pair of nodes. Introduction to Graphs: Breadth-First, Depth-First Search, Topological Sort Chapter 23 Graphs So far we have examined trees in detail. This figure shows a simple directed graph with three nodes and two edges. In this video we will learn about adjacency matrix representation of weighted directed graph. In | {
"domain": "incommunity.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287698185481,
"lm_q1q2_score": 0.8185645006034283,
"lm_q2_score": 0.8333245973817158,
"openwebmath_perplexity": 763.2774657729245,
"openwebmath_score": 0.5039048194885254,
"tags": null,
"url": "http://ouzp.incommunity.it/weighted-directed-graph.html"
} |
quantum-field-theory, special-relativity, hilbert-space, momentum, normalization
If we say, both states describe the same particle then $k' = k$ but then $L^{-1}(p)p' = k'$ can not hold except when $p = p'$. Otherwise if both states describe different particles it is generally not true that $L^{-1}(p)p' = k'$ where $k'$ should be a standard momentum since we only have 6 standard momenta $k$ and the relation should hold in general for his argument to work. So if anyone can enlighten me I would be glad. I had basically the same questions as you! In my case at least, it stemmed from not properly understanding the previous arguments, so I'll try to explain everything in an organized way. It took many hours of being confused, but I think I finally get it.
But first, let me be clear with this: $k'$ is not a standard momentum. The notation Weinberg chose is somewhat confusing here in my opinion, but the book is nearly perfect so we can forgive him :). I'll switch the notation a tiny bit. Heads up: the actual answer to your question comes after this first section, but I think this is very useful as well.
Introduction: how and why we use standard momentum states
The $\sigma$ indices in $\Psi_{p,\sigma}$ indicate degrees of freedom of a particle that are not included in its momentum, and we want to understand how these change under Lorentz transformations. To start, I'll use a $\Phi$ basis instead of the $\Psi$ basis to indicate eigenstates of the remaining non-momentum observables needed to cover the entire Hilbert space. In other words, we have some set of commuting observables $\mathcal{O}$ for which $\mathcal{O}\Phi_{p,\alpha}=\alpha \Phi_{p,\alpha}$.
The most general transformation that the state will undergo is
$$
U(\Lambda)\Phi_{p,\alpha} = \sum_{\alpha'} \sum_{p'} A(p',p,\alpha',\alpha,\Lambda) \Phi_{p',\alpha'},
$$ | {
"domain": "physics.stackexchange",
"id": 68615,
"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, special-relativity, hilbert-space, momentum, normalization",
"url": null
} |
newtonian-mechanics, forces, classical-mechanics, work, rigid-body-dynamics
Title: A Question about Virtual Work related to Newton's Third Law In describing d'Alembert's principle, the lecture note I was provided with states that the total force $\mathbb F_l$ acting on a particle can be taken as,
$$\mathbb F_l=F_l+\sum_mf_{ml}+C_l,$$
where $F_l$ is the sum of the applied forces on $l^{th}$ particle, $f_{ml}$ being the internal force on $l^{th}$ particle due to an $m^{th}$ particle, and $C_l$ denoting the constraint forces. However considering the law of action and reaction it further states that $f_{ml}+f_{lm}=0$, which I have no trouble understanding. But considering a virtual displacement $\delta \bf{r}_l$ on $l^{th}$ particle, in the next line it concludes that the virtual work $\delta W$ done should be,
$$\delta W~=~\sum_{l=1}^N(F_l+C_l)\centerdot\delta\textbf{r}_l,$$
ignoring $f_{ml}$ terms. But if we take those terms into account shouldn't it be
$$\delta W~=~\sum_{l=1}^N(F_l+C_l)\centerdot\delta\textbf{r}_l+\sum_l\sum_mf_{ml}\centerdot\delta\textbf{r}_l.$$
In other words, I don't see how comes
$$\sum_l\sum_mf_{ml}\centerdot\delta\textbf{r}_l~\stackrel?=~0.$$ | {
"domain": "physics.stackexchange",
"id": 2700,
"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, forces, classical-mechanics, work, rigid-body-dynamics",
"url": null
} |
Find the Jordan canonical form J of T.
3. Let T be a linear operator on a finite-dimensional vector space V with Jordan canonical form
1. Find the characteristic polynomial of T.
2. Find the dot diagram corresponding to each eigenvalue of T.
3. For which eigenvalues , if any, does ?
4. For each eigenvalue , find the smallest positive integer for which .
5. Compute the following numbers for each i, where denotes the restriction of to .
1.
2.
3.
4.
4. For each of the matrices A that follow, find a Jordan canonical form J and an invertible matrix Q such that . Notice that the matrices in (a), (b), and (c) are those used in Example 5.
1.
2.
3.
4.
5. For each linear operator T, find a Jordan canonical form J of T and a Jordan canonical basis for T.
1. (a) V is the real vector space of functions spanned by the set of real-valued functions , and T is the linear operator on V defined by .
2. (b) T is the linear operator on defined by .
3. (c) T is the linear operator on defined by
4. (d) T is the linear operator on defined by
5. (e) T is the linear operator on defined by
6. (f) V is the vector space of polynomial functions in two real variables x and y of degree at most 2, as defined in Example 4, and T is the linear operator on V defined by
6. Let A be an matrix whose characteristic polynomial splits. Prove that A and have the same Jordan canonical form, and conclude that A and are similar. Hint: For any eigenvalue of A and and any positive integer r, show that .
7. Let A be an matrix whose characteristic polynomial splits, be a cycle of generalized eigenvectors corresponding to an eigenvalue , and W be the subspace spanned by . Define to be the ordered set obtained from by reversing the order of the vectors in .
1. (a) Prove that .
2. (b) Let J be the Jordan canonical form of A. Use (a) to prove that J and are similar.
3. (c) Use (b) to prove that A and are similar. | {
"domain": "devguis.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.991288617601157,
"lm_q1q2_score": 0.8172797275381692,
"lm_q2_score": 0.8244619306896955,
"openwebmath_perplexity": 201.6041777725767,
"openwebmath_score": 0.9520297050476074,
"tags": null,
"url": "http://devguis.com/7-2-the-jordan-canonical-form-ii-linear-algebra-5th-edition.html"
} |
• $$T$$ is sound with respect to $$\mathbb{K}$$ iff for every $$\mathcal{A}\in\mathbb{K}$$ we have $$\mathcal{A}\models T$$.
• $$T$$ is semantically consistent with respect to $$\mathbb{K}$$ iff for some $$\mathcal{A}\in\mathbb{K}$$ we have $$\mathcal{A}\models T$$.
The fundamental difference then is the "every"/"some" distinction. There's a second difference too, however, which is down to practice: usually when we talk about soundness we're tacitly referring to a $$\mathbb{K}$$ consisting of a single structure, and almost always when we talk about semantic consistency we're tacitly referring to the class of all structures. So there are really two differences between soundness and semantic consistency at work here: soundness typically looks at a small context while semantic consistency typically looks at a large context, and with respect to that class soundness is a universal condition while consistency is an existential one.
That said, as I mentioned above we almost always work with reference to the class of all structures when thinking about semantic consistency. So in light of that your definition of semantic consistency is correct. Note that the completeness theorem shows that the "realist commitment" in the (with-respect-to-the-class-of-all-structures) notion of semantic consistency (namely, that mathematical structures are things which actually exist and about which sentences are true or false) can be removed; by contrast, there isn't really an analogous result for soundness(es). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731158685838,
"lm_q1q2_score": 0.8346720197657481,
"lm_q2_score": 0.8670357632379241,
"openwebmath_perplexity": 454.4651767587068,
"openwebmath_score": 0.856113076210022,
"tags": null,
"url": "https://math.stackexchange.com/questions/4097507/what-is-a-precise-definition-of-soundness"
} |
ros, queue
Title: Queueing positions for the robot to move to
Hi,
I would like to have the robot move to point a->b->c in order and am not sure how to do this using a simple action client. I'm using movebase for this. When I add a second position for the robot to move to then it overwrites the first position. Thus, it looks like I need a way to check what the robot's current position is and if it point a then the robot should move to b and so on. Is this correct? How would I go about implementing this?
Thanks
Originally posted by duskxii on ROS Answers with karma: 3 on 2015-06-19
Post score: 0
You can listen /move_base/status for the status of the current goal. Here is the related document. You can go on with your second goal only if the first one is successful, for example.
Moreover, if you want to try a systematic approach you can use smach to create a state machine with states and transitions etc.
Originally posted by yigit with karma: 796 on 2015-06-19
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 21963,
"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, queue",
"url": null
} |
complexity-theory, time-complexity
Title: What is the correct way to define time constructible functions? Sipser defines a time constructible function as
$f(n)$ is time constructible if there exists a turing machine which given input $1^n$ writes value of $f(n)$ in binary to the output tape in $O(f(n))$ time.
whereas Sanjeev Arora and Barak defines it as
$f(n)$ is time constructible if there exists a turing machine which given input $1^n$ writes value of $1^{f(n)}$ in binary to the output tape in $O(f(n))$ time. | {
"domain": "cs.stackexchange",
"id": 6075,
"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": "complexity-theory, time-complexity",
"url": null
} |
c#, casting
case "Range":
var given = Convert.ToInt32(givenValue);
var rangeArrayValues = expectedValue.Split(new[] { SplitOperatorForRange }, StringSplitOptions.None);
if (fieldTypeName == "int")
{
var rangeA = (int)Convert.ChangeType(rangeArrayValues[0], typeof(int));
var rangeB = (int)Convert.ChangeType(rangeArrayValues[1], typeof(int));
return given > rangeA && given < rangeB;
}
if (fieldTypeName == "double")
{
var rangeA = (double)Convert.ChangeType(rangeArrayValues[0], typeof(double));
var rangeB = (double)Convert.ChangeType(rangeArrayValues[1], typeof(double));
return given > rangeA && given < rangeB;
}
return false;
}
return false;
} In order to make your switch testable and extendable you should split it into multiple classes. One class for each operation that could look like this interface:
interface IOperation
{
bool Evaluate(string actionToApply, string fieldTypeName, string expectedValue, string givenValue);
}
As the actionToApply check would repeat for all operations you can implement it in an abstract class already:
abstract class Operation
{
public bool Evaluate(string actionToApply, string fieldTypeName, string expectedValue, string givenValue)
{
return
string.Equals(actionToApply, GetType().Name, StringComparison.OrdinalIgnoreCase) &&
EvaluateCore(fieldTypeName, expectedValue, givenValue);
}
protected abstract bool EvaluateCore(string fieldTypeName, string expectedValue, string givenValue);
}
Other operations would just need to implement one method doing exactly one thing:
class HasValue : Operation
{
protected override bool EvaluateCore(string fieldTypeName, string expectedValue, string givenValue)
{
return !string.IsNullOrWhiteSpace(givenValue) && givenValue != expectedValue;
}
} | {
"domain": "codereview.stackexchange",
"id": 26727,
"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#, casting",
"url": null
} |
telescope, raw-data
Title: Where can I find Arecibo's data archive? Does anyone know where I can find Arecibo's historical data? After much searching, I can find neither hide nor hair of it. It doesn't help that the search results are completely dominated by the news of the relatively recent collapse of the telescope and I didn't come up with anything through their Science Portal. Arecibo recently opened the Arecibo Observatory Data Archive, which allows folks to obtain data organized by project. About 1800 proposals are listed, although not all of those have data available because not all of the observatory's data has been transferred to its new home at the Texas Advanced Computing Center. There's also an 18 month period during which each group has exclusive access to its Arecibo data.
You can search the database by project name, a particular discipline (astronomy, atmospheric, or planetary science) or by the instrument used on the telescope (e.g. ALFA, X-band radar, etc.). Each project has a blurb about technical details and then information about which data files are available, although you do need to request access:
The access to the information is controlled, meaning that users need to request access to the desired project. Once Data is requested, Arecibo staff needs to validate that the data is outside the proprietary period and perform other checks to ensure no policies are violated.
It looks like if your access is granted, you'll be sent an email with more information on how to download the relevant files. | {
"domain": "astronomy.stackexchange",
"id": 5591,
"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": "telescope, raw-data",
"url": null
} |
algorithms, complexity-theory, np-complete, polynomial-time, packing
And there is a comment that says "Solvable in polynomial time for any fixed $B$ by exhaustive search."
I have asked in math.stackexchange how it is possible and I get a clearly answer about that:
https://math.stackexchange.com/questions/3804912/bin-packing-problem-with-fixed-size-of-bins
Now I ask you why we can't applicate things like this to all instance of the problems? What is the thing that I don't get that makes this impossible?
For example, in the Bin Packing problem I think that I would can always enumerate the solutions and search into them because the $ B $ is always fixed once I get it, ok the number of the solutions could be a huge number, but it still remains a polynomial time algorithm. Or the "enumerate solutions" meanings that they are precomputated and the algorithm just has to check between them? And in this case, why we can't precomputate always?
I'm not saying something like $ P=NP $ because I'm sure not the first person that think about this thing and if the most accredited opinion is that $ P \not= NP $ it must be why this thought of mine is wrong and I want to understand why this isn't a generic solution for the problem, and where I'm wrong. It's often the case that an NP-complete problem has some parameter $b$ that when fixed to a small constant makes an polynomial algorithm possible, yes.
However in fixing $b$ that problem (at least as of writing when $P =^? NP$) loses its completeness. That means when we want to do a reduction we (for at least some instances) need this parameter to be bigger than $b$. | {
"domain": "cs.stackexchange",
"id": 16799,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, complexity-theory, np-complete, polynomial-time, packing",
"url": null
} |
The equation can be written in the form $f(x)=a(1+r)^x$ or $f(x)=ab^x$ where $$b=1+r$$. Graph the function. a) y = 2(4)^x growth or decay y-intercept: b) y = 3(. Decay function : if 0 < b < 1. Figure a, for instance, shows the graph of …. U4D8_T Applications - Exponential Growth and Decay Problems: Duo-tang Worksheet for U4D8 Applications Exponentials (Exponential Growth & Decay) Do: Growth Worksheet # 1 - 4 & Decay Worksheet # 1 - 4. Worksheet 9 Memorandum: Finance, Growth and Decay. In many cases "a" represents a starting or initial value, "b" represents the multiplier or. This calculator has three text fields and two active controls that perform independent functions of the calculator. Exponential Growth and Decay Make Up 1. IE7e EXAMPLE - Graphing f(x) = If for b > 1 Graph f(x) = 2*. Use the properties of exponents to interpret expressions for exponential functions. To vary the values of C and r, drag the sliders. edu: 8-1 Linear Growth and Decay. Exponential Growth and Decay Calculator Use our online exponential growth and decay calculator by entering the initial value (x 0), decay rate (r) and time (t) in the below calculator and click calculate button to find the answer. 3 4 4 4-4. Exponential Growth Rate of Growth Function, Inhibited Growth, development of the Quantity Formula, Logistic Growth, … Download [1. The value of the property in thousands of dollars, t years after 2001 is given by the exponential growth model. Exponential growth and exponential decay are two of the most common applications of exponential functions. $\endgroup$ – Matthew Leingang Jan 15 '15 at 17:01 $\begingroup$ Although your biggest problem is important, you will also need to figure out how to handle the “compounded quarterly” part of the problem. It occurs when the instantaneous rate of change (that is, the derivative) of a quantity with respect to time is proportional to the quantity itself. The table shows the world population of the lynx in 2003 and 2004. The instructions are | {
"domain": "chiryo.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9911526433490359,
"lm_q1q2_score": 0.8501791228395476,
"lm_q2_score": 0.8577681031721324,
"openwebmath_perplexity": 745.7257336556233,
"openwebmath_score": 0.5862599611282349,
"tags": null,
"url": "http://chiryo.it/edcl/growth-or-decay-function.html"
} |
i dont know how to get this result
$\displaystyle \int \frac{ln(x)} {\sqrt{x}} dx$
so let
$\displaystyle u=\ln(x) \implies du =\frac{1}{x}dx$
$\displaystyle dv=\frac{1}{\sqrt{x}}dx=x^{-1/2}dx \implies v =2\sqrt{x}dx$
$\displaystyle \int \frac{ln(x)} {\sqrt{x}} dx=2\ln(x) \sqrt{x}-2\int x^{-1/2}dx$
$\displaystyle \int \frac{ln(x)} {\sqrt{x}} dx=2\ln(x) \sqrt{x}-4\sqrt{x}+c$
3. Originally Posted by coobe
Hello!
i have difficulties sovling the following equation:
$\displaystyle \int \frac{ln(x)} {\sqrt{x}} dx$
the actual integration part isnt the problem:
$\displaystyle ln(x)*2\sqrt{x} \int x^\frac{-2}{3} dx$
simplifying the integral: $\displaystyle \int x^\frac{-3}{2}$
and after integrating im here:
$\displaystyle ln(x)*2\sqrt{x} * (-\frac{2}{\sqrt(x)})+C$
the solution is supposed to be $\displaystyle 2*ln(x)*\sqrt(x)-4\sqrt(x)+C$
i dont know how to get this result
let
$\displaystyle lnx=u...x=e^u...dx=e^udu...x^{\frac{1}{2}}=e^{\fra c{u}{2}}$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575147530351,
"lm_q1q2_score": 0.8331770932624186,
"lm_q2_score": 0.8479677583778258,
"openwebmath_perplexity": 7743.79171950716,
"openwebmath_score": 0.9969142079353333,
"tags": null,
"url": "http://mathhelpforum.com/calculus/92437-partial-integration-problem.html"
} |
matrix $$A$$ and its inverse $$A^{−1}$$ equals the identity matrix. and. Join the initiative for modernizing math education. aren't the same length as the rows of D; Note: For Amxm, there is only one multiplicative identity I m. (d) Distributive law For three matrices A, B, and C, A(B + C) = AB + AC (A + B)C = AC + … to work: On the other hand, to multiply This is also the multiplicative Its symbol is the capital letter I It is a special matrix, because when we multiply by it, the original is unchanged: A × I = A I × A = A var date = ((now.getDate()<10) ? I don't need to do the whole matrix multiplication. There is a matrix which is a multiplicative identity for matrices—the identity matrix: I =. In arithmetic, there is one number which does not have a multiplicative inverse. Gets the multiplicative identity matrix. in the above example), the identity matrix you use will depend upon the But while there is only one "multiplicative identity" for regular numbers (being the number 1), there are lots of different identity matrices. Top | 1 Then the answer is: The dimension product of Multiplying a matrix by the identity You can verify that I2A=A: and AI4=A: With other square matrices, this is much simpler. In the power Multiplicative identity: mandatory vs. optional. If is a commutative unit ring, the constant return (number < 1000) ? Such a matrix is referred to as the identity matrix, I, and is unique for a given size. Next we list several important properties of matrix multiplication. of the quotient ring of for all integers Lessons Index | Do the Lessons The multiplicative inverse of a nonsingular matrixis its matrix inverse. For example the matrix A itself may be very ill-conditioned, but there exists a scaling matrix S such that B = AS−1is much better conditioned. Properties. Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more. MATH TIP Not all square matrices have inverses. Multiplicative Identity Property of Matrix Scalar Multiplication If any matrix A is | {
"domain": "apanorthstar.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399051935107,
"lm_q1q2_score": 0.8167728342537088,
"lm_q2_score": 0.8418256452674008,
"openwebmath_perplexity": 441.4421698383543,
"openwebmath_score": 0.8675602674484253,
"tags": null,
"url": "http://apanorthstar.org/viewtopic/multiplicative-identity-matrix-22e1c7"
} |
thermodynamics
Title: What is radiation? So, I was in my grade 7 class and we studied about radiation. The teacher was saying radiation is when heat is transferred without any molecules being involved, like the sun. But in another post online someone else had said radiation is when heat is transferred with the heat source being hotter than it's enviroment, like an oven or a fire. Which is true? I prefer the first.
One reason is that the second includes conduction, and therefore loses the distinction between the two. I think I would modify the first by saying energy is transferred without any molecules being involved. It's hard to see how one would talk about heat transfer for laser radiation or beta radiation where the temperature of the source is not well defined.
I will admit that a good definition of radiation would be hard to construct. But an essential feature would be the ability to transfer energy through a vacuum. | {
"domain": "physics.stackexchange",
"id": 48898,
"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",
"url": null
} |
number of ties that a node has). subgraph_centrality. Both co-authorship relations and citations are well quantified data (weighted ties). Degree centrality. The mth-order degree mass of a node is the sum of the weighted degree of the node and its neighbors no further than m hops away. Let’s use degree centrality (connections) as a benchmark for importance. affinity index algorithm analysis antipaedo attack bipartite blog network blogs capitalisme social Cascade centrality clustering communities community detection community structure complex network complex networks complex systems compression connected graphs data mining debian degree distribution degree peeling diameter diffusion diffusion. Summing this weight across all INTERACTS interactions for that character gives us their weighted degree centrality|Social Manager may even let you know what occurred in the shape of occasions. Stability and Continuity of Centrality Measures in Weighted Graphs Santiago Segarra and Alejandro Ribeiro Abstract—This paper presents a formal definition of stability for node centrality measures in weighted graphs. Basic network analysis 4. An example of a local centrality measure is the degree centrality, which counts the number of links held by each node and points at individuals who can quickly connect with the wider network. Degree has generally been extended to the sum of weights when analysing weighted networks and labelled node strength, so the weighted degree and the weighted in- and out-degree was calculated (Barrat et al. As the name implies,. In a directed network, a node may have a different number of outgoing and incoming ties, and therefore, degree is split into out-degree and in-degree, respectively. trality, betweenness centrality, degree centrality, and PageRank) for authors in this network. See Also ----- degree_centrality, in_degree_centrality Notes ----- The degree centrality values are normalized by dividing by the maximum possible degree in a simple graph n-1 where n is the number of nodes in G. The closeness centrality of a vertex is defined by the inverse of the average length of the shortest paths to/from all the other vertices in the graph: 1/sum( d(v,i), i != v) If there is no (directed) path between vertex \code{v} and \code{i} then the total number of vertices is used in the formula instead of the path length. Let us define | {
"domain": "slb-biotec-france.fr",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.984336353126336,
"lm_q1q2_score": 0.8480433843994939,
"lm_q2_score": 0.8615382147637196,
"openwebmath_perplexity": 1434.6831723227028,
"openwebmath_score": 0.706092894077301,
"tags": null,
"url": "http://qrkc.slb-biotec-france.fr/weighted-degree-centrality.html"
} |
sampling, modulation, complex, quadrature, constellation-diagram
What do freq_lower/upper_edge and scale mean in the meta files
I believe this is the range of occupied bandwidth (signal power above some threshold in a spectrum plot). As explained above, multiply by these numbers by the sampling rate to convert to Hz. We see from this a hint at what the frequency offset would be, approximately, as the average between upper and lower.
Further Details and Demonstration
The constellation is likely oversampled (many samples per symbol) so that we see the desired symbols as they would be on the unit circle (for a PSK or phase shift keying modulation) as well as the transition samples between symbols. Further under condition of carrier offset, the entire constellation will rotate at the offset frequency. In addition, the waveform as transmitted will often be dispersed from the ideal constellation point due inter-symbol interference (ISI) as the ideal pulse shaping filter that has no ISI is typically split between transmitter and receiver to implement a "matched filter" in the receiver. Finally it is possible that the samples as received are offset in time from the correct sampling location (time offset). A typical receiver will address all these "offsets" using recovery loops (timing recovery, carrier recovery, etc). One approach to carrier recover that I demonstrate here with an implementation block diagram which occurs after timing recovery (with the samples down-sampled to be one sample per symbol at the expected time location within each sample), is to measure the phase rotation from symbol to symbol, and use that to correct the frequency offset in a classical control loop.
For a quick post processing study, an easy way to determine the carrier offset on the current waveform as sampled is to raise the waveform to the Mth power for an M-PSK waveform. After doing this taking the FFT will reveal a stronger tone at four times the carrier offset. I demonstrate these concepts below with an example 8-PSK waveform:
The constellation for the 8PSK waveform as transmitted, without any carrier offset is shown below. I have plotted all samples in blue, and every 8th sample in orange (the waveform was oversampled 8 samples per symbol). We see the effect of intersymbol interference since the pulse shaping filter is split between transmitter and receiver :
Passing this waveform through a second pulse shaping filter (in the receiver), with no time or frequency offset results in the following: | {
"domain": "dsp.stackexchange",
"id": 11922,
"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": "sampling, modulation, complex, quadrature, constellation-diagram",
"url": null
} |
We can now plug everything into our result from applying Taylor’s theorem:
$\begin{split}\phi(s) &= \phi(0) + s\phi'(0) + \frac{1}{2}s^2\phi''(v)\\ &= \ln(p - p + 1) + s\frac{p}{p - p + 1} + \frac{1}{2}s^2\phi''(v)\\ &= sp + \frac{1}{2}s^2\phi''(v)\\ &\le sp + \frac{1}{2}s^2\cdot \frac{1}{4}\\ &= sp + \frac{s^2}{8}\end{split}$
Thus,
$\begin{split}\Ex[e^{sX}] &\le e^{\phi(s)}\\ &\le \expp{sp + s^2/8}\end{split}$
as claimed.
Continuing our proof of Theorem 191, we have
$\Pr[e^{sX} \ge \expp{sn(p + \varepsilon)}] \le \expp{-sn(p + \varepsilon)} \prod_i \Ex[e^{sX_i}]$
Applying Lemma 194, we get | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9911526446557307,
"lm_q1q2_score": 0.8103410954711836,
"lm_q2_score": 0.8175744673038222,
"openwebmath_perplexity": 365.32718183504505,
"openwebmath_score": 0.9985395669937134,
"tags": null,
"url": "https://eecs376.github.io/notes/appendix.html"
} |
botany, classification
Title: Is ivy (genus Hedera) a shrub or an herb? It seems like the difference between a bush (shurb) and an herb is that a bush has a woody stem.
What does that make ivy (genus Hedera)? I know that ivy can get a pretty hard stem, does that count as woody? Is there something between a bush and an herb? Woody plants are usually either trees, shrubs, or lianas. Ivies are lianas, they can have 40 years of woody growth rings and bark. The categories are flexible. It's an arbitrary division for convenience, it isn't that clear cut. Bamboos for example, are a woody grass.
https://weedwise.conservationdistrict.org/weeds/english-ivy#foobox-1/7/Untitled-4-copy.jpg
Does that count as a woody plant? yes it's a woody liana. | {
"domain": "biology.stackexchange",
"id": 7970,
"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": "botany, classification",
"url": null
} |
# Understanding the definition of the d-dimensional Hyperube
Please see the picture bellow about the definition of the nodes of the d-dimensional Hypercube. Could anyone please tell me what does that notation means. I get confused with the superscript after the curly braces. What does that mean in set theory.
Nodes: $(x_1,\ldots,x_d)\in\{0,1\}^d$
Edges: $\forall i:(x_1,\ldots,x_d)\to(x_1,..,1-x_i,.. ,x_d)$
What does this mean? How are the nodes and the edges defined formally?
Thanks.
Here $\{0,1\}^d = \{0,1\} \times \{0,1\} \times \cdots \{0,1\}$ is just the Cartesian product $d$ copies of the set $\{0,1\}$. Thus the nodes $(x_1, x_2, \dots, x_d) \in \{0,1\}^d \subseteq \mathbb{R}^d$ are just a vectors which we can think of as living in $\mathbb{R}^d$ where the components all have value 0 or 1. Then the edges of your graph just connect nodes that differ in exactly one component.
You can also think of $\{0,1\}^d$ as binary strings of length $d$, there is a clear bijection between the vectors described above and binary string of length $d$. Sometimes $\{0,1\}^d$ used to denote this set of strings, but the rest of your notation suggests the vector interpretation.
Try drawing the cases for $d=2$ and $d=3$ you should get a square and cube respectively.
• Yes $(x_1,x_2,\dots,x_d)$ is a single node. – John Machacek Jun 19 '14 at 13:13 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9914225156000331,
"lm_q1q2_score": 0.8732420547819908,
"lm_q2_score": 0.8807970779778824,
"openwebmath_perplexity": 156.4185745008458,
"openwebmath_score": 0.92798912525177,
"tags": null,
"url": "https://math.stackexchange.com/questions/830537/understanding-the-definition-of-the-d-dimensional-hyperube"
} |
thermodynamics, electricity, temperature
Title: How to calculate temperature of an incandescent bulb filament? Suppose we have a light bulb, for which we know its power rating, like voltage of $12\mathrm V$, and power consumption of $10\mathrm W$. We also know it's a halogen bulb with a tungsten filament inside. Suppose we also know temperature of the surrounding air.
Is this data enough to compute temperature of the filament? If not, what should also be included? And anyway, how do we find the temperature? You really are asking two questions.
First - how do we calculate the temperature:
At the typical temperatures of an incandescent bulb, the large majority of heat loss is due to thermal radiation. Because of this, the most important factor is the "apparent size" of the filament. I say "apparent" because when you have a tightly wound coil, the parts of the coil facing other parts of the coil don't contribute to a net heat loss - they receive as much heat as they emit.
If you took for example a 5 mm long, tightly wound filament with a mean diameter (after winding) of 0.5 mm, you would have a surface area of approximately $5·π·0.5 \sim 8 \textrm{ mm}^2$. If you had 10 W of emission, you would use the Stefan Boltzmann law to get the power per unit area:
$$I = \sigma T^4$$
from which we get a temperature of
$$T = \sqrt[4]{\frac{10}{8\cdot 10^{-6}\cdot5.67\cdot 10^{-8}}} \approx 2100 K$$
This is of course for illustration only - at 2100 K the bulb is not very bright. Specifically, a real filament has emissivity less than 1.0 which would mean it would run a little hotter (though that pesky 4th power limits the impact somewhat).
Getting more accurate numbers is quite hard - there are lots of subtle effects (conduction down the support wires, heat lost due to imperfect vacuum, emissivity, and "true effective area" to name just four). | {
"domain": "physics.stackexchange",
"id": 21258,
"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, electricity, temperature",
"url": null
} |
special-relativity, acceleration, relativity
Also I appreciate if someone shows me a way to compare simultaneity of events for accelerated frames with an example.
So in short, what's the physical meaning of this transformation? Why is it not position dependent (from physical point of view)? Does it indicate some kind of absolute frame? This question combines two aspects: | {
"domain": "physics.stackexchange",
"id": 60184,
"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, acceleration, relativity",
"url": null
} |
filters, filter-design, wavelet, finite-impulse-response
Title: Is there a systematic method for converting an even length FIR filter to odd length? I'm currently implementing a discrete wavelet transform (DWT) as a cascaded QMF filter bank (pictured below). I've put together a convolution function that attempts to filter an input signal in a non-causal fashion. Essentially, the convolution mask is center around the output which means the output is a function of previous, current, and future outputs. I'm doing this to achieve zero-phase filtering.
However, I've noticed that filters associated with wavelets tend to be even length which make it impossible to center the convolution mask around the output. The only solution to this would be to convert the even length filter to an odd length filter (probably increase length by 1).
Is there a systematic method for changing the filter order from even to odd using MATLAB? Standard even-length filters are somewhat inherent to 2-band real FIR orthogonal wavelets. And they are most often non symmetric.
If you really want odd length, or at least central symmetry, most probably you will have to relieve one of the above assumptions. The simplest could be to use some biorthogonal wavelets. The classical JPEG2000 9/7 pair is probably close enough to orthogonality for most purposes. Other filters can be tabulated, see for instance: Wavelet Biorthogonal 2.8 (bior2.8).
Then, there is a possibly to have complex filters, but honestly I am not familiar anymore with the literature.
You can also use $(2M+1)$-wavelet filter-banks, to quit the dyadic case. There are a couple of $3$-band wavelet designs with odd-length filters. | {
"domain": "dsp.stackexchange",
"id": 9599,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters, filter-design, wavelet, finite-impulse-response",
"url": null
} |
homework-and-exercises, newtonian-mechanics, momentum, energy-conservation, collision
Title: Why isn't energy conserved in this collision problem? I am stuck in a question where energy conservation is failing and momentum conservation is correct. I think I might be doing something wrong, that's why I'm asking this question.
The problem is as follows:
A bullet of mass $25\,g$ is fired horizontally into a ballistic pendulum of mass $5.0\,kg$ and gets embedded in it. If the centre of pendulum rises by a distance of $10\,cm$, find the speed of the bullet.
(H.C. Verma, Centre of Mass, Q47)
Let the mass of the bullet be $m=25\,g$.
Let the mass of the pendulum be $M=5\,kg$.
Let the peak height be $h=0.1\,m$.
Let the initial and final velocities be $u$ and $v$ respectively.
Method 1: (Momentum Conservation)
$$mu=(M+m)v \implies v=\frac{mu}{M+m}\\ \text{Also, }\frac{1}{2}(M+m)v^2=(M+m)gh\\ \implies u^2=2\biggl(\frac{M+m}{m}\biggr)^2gh\\ \implies u=201\sqrt2 \text{ m/s}$$
Method 2: (Energy Conservation)
Since both the masses move together after the collision, and because the velocity at highest point is null, therefore:
$$\frac{1}{2}mu^2=\frac{1}{2}(M+m)v^2=(M+m)gh\\ \implies u^2=2gh\biggl(\frac{M+m}{m}\biggr) \implies u=\sqrt{402}$$
To summarize myself, I am curious about the following:
Why do the results differ? Shouldn't the energy be conserved as well as the momentum? Since it should be, then what is the flaw in my calculations?
Shouldn't the energy be conserved as well as the momentum? | {
"domain": "physics.stackexchange",
"id": 52995,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, momentum, energy-conservation, collision",
"url": null
} |
python, beginner, python-3.x
Be wary; dragons lie ahead
A trap many new programmers falls into is premature optimization. However, I can not avoid noticing that the logic in the code could be improved. If you are asking multiple questions; why not generate all the numbers and operators at the start? It would lead to a cleaner and faster code. Notice how our main loop now reads
for question in generated_questions():
Much more Pythonic! I also included Toby's suggestion even if it is 100% overkill when doing basic arithmetic.
import numpy as np
QUESTIONS = 42
BAN_NEGATIVE_NUMBERS = True
OPERATORS = ["-", "+"]
MAX_NUMBER, DECIMALS = 20, 2
MAX_ERROR = 10 ** (1 - DECIMALS)
def generate_questions():
operators = np.random.choice(a=OPERATORS, size=(QUESTIONS, 1))
numbers = np.random.choice(a=MAX_NUMBER, size=(QUESTIONS, 2))
for operator, (num1, num2) in zip(operators, numbers):
if num1 < num2 and operator == "-" and BAN_NEGATIVE_NUMBERS:
num1, num2 = num2, num1
yield f"{num1} {operator[0]} {num2}"
def get_guess():
try:
return float(input("> "))
except ValueError:
print("Ooops, you need to write in a number!")
return float("Inf")
def quiz(score=0):
print(f"Welcome! This is a {QUESTIONS} question quiz!\n")
for question in generate_questions():
print(question)
guessed_right = abs(get_guess() - eval(question)) <= MAX_ERROR
score += 1 if guessed_right else 0
print("Correct!" if guessed_right else "Incorrect", "\nScore", score, "\n")
print(f"Your score was {score}/{QUESTIONS} = {round(100*score/QUESTIONS, 2)}")
if __name__ == "__main__":
quiz() | {
"domain": "codereview.stackexchange",
"id": 41585,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-3.x",
"url": null
} |
&=\frac{n^2+(n-2j)^2+2(1-2y)(n-2j)}{4}\\ &=\frac{n^2+(n-2j+1-2y)^2-(1-2y)^2}{4}\\ &=\frac{n^2+(n-2x+1)^2-(1-2y)^2}{4}\\ &\ge \frac{n^2-1}{4}\\ \end{align} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232914907945,
"lm_q1q2_score": 0.8253101001132904,
"lm_q2_score": 0.8397339656668287,
"openwebmath_perplexity": 370.71739845218633,
"openwebmath_score": 0.9925042390823364,
"tags": null,
"url": "https://math.stackexchange.com/questions/439745/provex-1x-2x-3-cdotsx-n-geq-n-1"
} |
sql, mysql, sync
And here are the tables that i used:
CREATE TABLE `exercise` (
`id_exercise` int(11) NOT NULL,
`name` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `exercise_audit` (
`id_exercise_audit` int(11) NOT NULL,
`name` varchar(45) NOT NULL COMMENT 'The name will take the new value if inserted ,or the old value if edited.And the latest value if deleted.',
`action_peformed` varchar(45) NOT NULL,
`version` int(11) NOT NULL,
`reference_id` int(11) NOT NULL,
`change_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `version` (
`id_version` int(11) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`state` enum('C','P') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Showing rows 0 - 5 (6 total, Query took 0.0010 seconds.)
I feel that the query is missing something, how could i improve it?
I someone is interested i can share the code over github, if it will be easier. Documentation
The data was "action_peformed": "insert,update,update" but the
phone has the version 1, and the first insert on that data was from
version two so the output action be insert.
But if the phone version was 2 it means that the action should be
insert.. You get the point.
No, I'm afraid I don't get the point. Is version_send the phone's version? If so, am I supposed to be able to guess that from the name? And how could the phone have version 1 if the earliest existing version is 2? | {
"domain": "codereview.stackexchange",
"id": 26251,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sql, mysql, sync",
"url": null
} |
special-relativity, particle-physics, angular-momentum, representation-theory, poincare-symmetry
Wigner showed that there are two indices to index those representations : a real positive number $m$ and a half integer $J$. This will be our definition of mass and spin for particles.
But after Schwartz says that if $J>0$, there are $2*J+1$ independant states in the representation. I see that physically it would correspond to the value of the spin. But I don't understand to what "independant states" we refer. Indeed, from what I understood, I can write my representation like this :
$$ D(g)=\begin{bmatrix}[D_{m_0,J_0}(g)] & ~ & ~ & ~ \\ ~ & [D_{m_1,J_1}(g)] & ~ & ~ \\ ~ & ~ & \ddots & ~ \\ ~ & ~ & ~ & [D_{m_k,J_k}(g)] \\ ~ & ~ & ~ & ~ & \ddots \\ \end{bmatrix} $$
Each diagonal block in this matrix is an irreducible representation (so represent a given particle) that is infinite dimensional. So what are this $2J+1$ independant states ? We have infinite dimensional irreducible representation so it can't be the dimension of the diagonal blocks. I am confused here...
So in summary, my two questions are: | {
"domain": "physics.stackexchange",
"id": 46378,
"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, particle-physics, angular-momentum, representation-theory, poincare-symmetry",
"url": null
} |
EXERCISE:
Write a program that generates a sequence of bivariate Gaussian random numbers with the statistical properties as assumed in the foregoing example. Determine $\langle x_{1}^{2}\rangle$, $\langle x_{2}^{2}\rangle$, and $\langle x_{1}x_{2}\rangle$ to see if they indeed approach the given values of $3$, $4$, and $2$.
### 3.2.6 Homogeneous distributions in Orientation Space
#### Equidistribution on the unit circle:
• Draw a pair of equidistributed random numbers $(y_{1},y_{2})$ $\in (-1,1)^{2}$; compute $r^{2} = y_{1}^{2}+y_{2}^{2}$; if necessary, repeat until $r^{2} \leq 1$.
• $x_{1} \equiv y_{1}/r$ and $x_{2} \equiv y_{2}/r$ are the cartesian coordinates of points that are homogeneously distributed on the circumference of the unit circle.
Fig. 3.7: Simple as can be...
#### Equidistribution on a spherical surface: | {
"domain": "ac.at",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9936116800361313,
"lm_q1q2_score": 0.8236432861823408,
"lm_q2_score": 0.8289388125473628,
"openwebmath_perplexity": 597.5720529971376,
"openwebmath_score": 0.9677895903587341,
"tags": null,
"url": "http://homepage.univie.ac.at/Franz.Vesely/cp_tut/nol2h/new/c3st_s2od.html"
} |
nmr-spectroscopy
Sorry for the specialist reader : the previous explanation has been over-simplified. May be too much ! Sorry in advance ! | {
"domain": "chemistry.stackexchange",
"id": 14649,
"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": "nmr-spectroscopy",
"url": null
} |
gazebo
Title: depth value of openni_camera
Hello. I am doing simulation using openni_camera(https://github.com/ros-drivers/openni_camera) on Gazebo. I'd like to get the depth value of real type, but uint8[] will return as shown by document(http://docs.ros.org/api/sensor_msgs/html/msg/Image.html). Since 4 data was stored for one point, I converted it to float32 using union, but we could not get the correct value. What do these four data represent? Also, how can we obtain the depth value? Thank you.
Originally posted by Akitoshi on Gazebo Answers with karma: 3 on 2017-08-01
Post score: 0
there are a few related questions and answers in ROS answers, e.g. http://answers.ros.org/question/160611/how-can-i-get-depth-data-from-kinect/
I'm not sure what you mean by 4 data stored per point, maybe RGBD? The depth image topic will give you D. After converting to float32, you get depth values so there'll be a total of width*height values.
Originally posted by iche033 with karma: 1018 on 2017-08-01
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Akitoshi on 2017-08-02:
Thank @iche033! Thanks to the URL you sent, I was able to solve it! Perhaps one depth value was converted to four data, but I did not know how to reprocess the original data. However, I were able to obtain depth values by using openCV! | {
"domain": "robotics.stackexchange",
"id": 4153,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo",
"url": null
} |
fft, fourier-transform, phase
Title: Robust phase extraction of STFT bins I am interested in tracking how the phase of a signal at a particular frequency changes over time.
The method I am using calculates a series of STFTs and takes the arctangent of the imaginary and real components of the desired bin for each FFT, however, due to noise in the system I am having issues with phase unwrapping.
Are there any alternate and perhaps more robust methods of extracting phase from a signal in this manner?
Thank you If your signal is not exactly integer periodic within the width of the FFT, then you may need to window and interpolate.
Try windowing the data using a Blackman-Nutall window, doing an FFTshift to center the window at element 0, performing the FFT, interpolating the complex results to the periodicity of your signal (windowed Sinc interpolation works), then taking atan2() of that interpolated complex result.
Increasing the Overlap of the FFT windows helps reduce the phase shift between adjacent overlapped windows, which can make phase unwrapping much easier. | {
"domain": "dsp.stackexchange",
"id": 5340,
"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": "fft, fourier-transform, phase",
"url": null
} |
homework-and-exercises, electrostatics, coulombs-law
$$
dF(x_1)= (\lambda dx_1) \int_{l_{1}+r_{0}}^{l_{1}+r_{0}+l_{2}} \frac{\lambda dx_2 }{4\pi \epsilon_0 (x_2-x_1)^2}=k\lambda^2\frac{l_{2}}{(x_{1}-l_{1}-r_{0})(x_{1}-l_{1}-l_{2}-r_{0})}dx_1
$$
The net force:
$$
F=\int_{0}^{l_{1}} F dx_1=\int_{0}^{l_{1}}k\lambda^2\frac{l_{2}}{(x_{1}-l_{1}-r_{0})(x_{1}-l_{1}-l_{2}-r_{0})}dx_1=k\lambda^2log(\frac{(l_{1}+r_0)(l_2+r_0)}{r_0(l_1+l_2+r_0)})
$$ You need to consider first the force on a small segment $dx_1$ located at $x_1$ of the first wire due to all the pieces on the second wire. Assuming that by linear density you mean $\lambda$ is constant, the small segment at $x_1$ of the first wire will contain charge $dq_1=\lambda dx_1$ so
$$
dF(x_1)= (\lambda dx_1) \int \frac{\lambda dx_2 }{4\pi \epsilon_0 (x_2-x_1)^2}
$$
The net force is then
$$
F=\int dF(x_1)\, .
$$
I'll leave it to you to work out the limits of integrations and the actual expressions for the integrals. | {
"domain": "physics.stackexchange",
"id": 44179,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electrostatics, coulombs-law",
"url": null
} |
See the smartness of the above technique. Ideally what we need is an approximation (on the lower side) for $\sqrt{2}$ which is better than existing approximation $p$. So we just need to choose a rational between $p$ and $\sqrt{2}$. This is possible without even defining the symbol $\sqrt{2}$ because we have access to numbers $1$ (lower approx to $\sqrt{2}$) and $2$ (higher approx) and then we can divide the gap between $1$ and $2$ as finely as possible to obtain approximations to $\sqrt{2}$ which are as good as we need.
• Hardy says that given any rational $r$, and positive natural $N$, we can find a rational $s$ lying on either side of $r$. And given any two rational numbers we can interpolate successive rational numbers which differ from each other as little as we please. How do we prove these equivalent statements? Oct 6 '16 at 13:51
• @MaxisJaisi: Hardy says that for given $r, N$ we can find an $s$ on either side of $r$ which differs from $r$ by less than $1/N$. Suppose we want an $s$ on right of $r$ (i.e. $s > r$) then we just have to choose a rational $s$ between $r$ and $r + (1/N)$. This is possible because between any two rationals there lies another rational. Similarly we can choose $s$ between $r - 1/N$ and $r$ and this will be less than $r$. Such statements are very obvious and easy to prove (for a student of 11-12 years) and I don't know what more I can say. Oct 6 '16 at 18:48
Here's how I would be motivated to make Rudin's choice.
Say we have rational $$p=\dfrac a b$$ with integers $$a,b; b\ne0$$.
$$p$$ can be close to $$\sqrt2$$ but not equal. That is, $$a-b\sqrt2$$ can be small but not zero. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517482043892,
"lm_q1q2_score": 0.8085669091883755,
"lm_q2_score": 0.8267117876664789,
"openwebmath_perplexity": 163.4772998400005,
"openwebmath_score": 0.8928645849227905,
"tags": null,
"url": "https://math.stackexchange.com/questions/141774/choice-of-q-in-baby-rudins-example-1-1/141824"
} |
This is nim in disguise. I suggest you represent a pile by a sequence of the exponents of the primes, so $270000$ would be represented by $(4,3,4)$ You can then sort the starting numbers in order, as $(4,4,3)$ would play exactly the same. A legal move is replacing a sequence with two sequences such that: the sum of the corresponding positions in the new sequences matches the number in the original sequence and at least one position of the new sequences is greater than zero in both. For example, from $(4,3,4)$ you can move to $(2,3,4)+(2,0,0)$ or to $(3,2,1)+(1,1,3)$ or to $(4,1,2)+(0,2,2)$, but not to $(4,3,0)+(0,0,4)$. You are trying to find the nim values of various positions.
I would start with single position sequences, so the original number is a prime power. $(1)$ is a losing position, so is $*0$. $(2)$ is clearly $*1$ as you have to move to $(1)+(1)$. $(3)$ is losing, so is $*0$. $(4)$ is $*1$ because you can only move to $*0$. From $(5)$ you can only move to $*1$, so it is $*0$ and losing. A single even pile is winning as you can move to two piles half the size, then mirror your opponent's play, so is $*0$. A single odd pile is losing and is $*1$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936073551712,
"lm_q1q2_score": 0.8135617832669719,
"lm_q2_score": 0.8267117855317474,
"openwebmath_perplexity": 185.75738923566132,
"openwebmath_score": 0.7025365829467773,
"tags": null,
"url": "https://math.stackexchange.com/questions/1673586/factorization-game-can-we-find-winning-strategy"
} |
javascript
Title: Code reuse when generating dynamic variables I have some code that I want to repeat in the best way possible. I'm looking for some advice to an approach. Function, object, other?
Thanks!
// There are many #mad-1, #mad-2, #mad-3 etc
// There are many radioButtons1Value, radioButtons2Value etc
// There are many radio1subtract, radio2subtract etc
let radio1subtract = null;
let radioButtons1Value = null
let radio2subtract = null;
let radioButtons2Value = null
if (document.querySelector('#mad-1')) {
document.querySelector(`#mad-1 input`).addEventListener('click', (e) => {
if(!document.querySelector('#basket-case').classList.contains('touched')) {
extrasSetup(e);
radioButtons1Value = parseInt(e.target.dataset.price);
radio1subtract = radioButtons1Value;
localExtrasCalc(staticPrice);
parseAndUpdate();
} else if(e.target.classList.contains('radioClicked')) {
radioButtons1Value = 0;
noVatExtra = noVatExtra - radio1subtract;
parseAndUpdate();
e.target.disabled = true;
}
})
} | {
"domain": "codereview.stackexchange",
"id": 36280,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript",
"url": null
} |
thermodynamics, energy, temperature, phase-transition, physical-chemistry
However, because during the phase change temperature will remain
constant but the internal energy will not, how can this be so? Doesn't
that mean that there are two U values for a single T value?
Since, by definition, the molecules of an ideal gas are so far apart that there are no intermolecular forces and no potential energy, an ideal gas will not undergo a phase change.
But a gas will exhibit ideal gas behavior only as long as the gas pressure is low enough and/or temperature is high enough so that the molecules remain far apart. If the pressure becomes too high and/or the temperature too low, the molecules become closer together and the gas no longer behaves like an ideal gas as there will be intermolecular (van der Waal) forces between them. The gas now has an internal potential energy component of internal energy of the gas is due to the intermolecular forces, along with its kinetic energy component, so that
$$U=KE+PE$$
Now a phase change becomes possible. At that point, yes, the temperature will remain constant (if the phase change occurs at constant pressure), but it does not mean there will be "two $U$ values for a single $T$ value". It means there will be two components of $U$, a kinetic energy component and a potential energy component, where the temperature is due to the KE component.
During the phase change, ideally only the internal potential energy component of $U$ changes, that is
$$\Delta U=\Delta PE$$
and ideally there is no temperature change,
$$\Delta KE=0$$
Hope this helps. | {
"domain": "physics.stackexchange",
"id": 61468,
"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, energy, temperature, phase-transition, physical-chemistry",
"url": null
} |
beginner, child-process, erlang
For the second problem:
Several things seem off:
You are using an intermediate process on which all others are linked
This intermediate process will block on this piece of code:
receive
after infinity -> true
end
you are not killing all processes on an error, just linking them all to die together with the intermediate process. This may not be what is needed, if e.g. some process is trapping exit signals.
If all processes exit normally, the intermediate process will remain blocked forever.
If you follow my suggestion for the previous question, it is easy to replace the second phase with a different one that does the correct thing (remember to also keep track of processes that have died normally). | {
"domain": "codereview.stackexchange",
"id": 23294,
"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, child-process, erlang",
"url": null
} |
c++, performance, algorithm, recursion
Title: A recursive algorithm to find the number of distinct quantities of money from a pile of coins Problem: find the number of distinct quantities of money that a pile of coins can make.
The vector coins contains the values of the coins, and the corresponding vector quantity contains the number of coin there are (let's say coins = {1} and quantity = {5}, this means I have 5 pennies).
Although I have solved this problem, I would like to make it more time efficient. Could someone give me some pointers?
Miscellaneous info: the variable ctq stands for "coins to quantity". I solved this by systematically iterating through all possible combinations of coins and putting their sum into a set. There has to be a better way to solve this problem, because this problem is supposed to be a dynamic programming question and I solved this problem without any knowledge of what that's supposed to be.
#include<iostream>
#include<vector>
#include<map>
#include<set>
int money(std::map<int, int> x)
{
int sum=0;
for(auto it=x.begin(); it!=x.end(); ++it)
{
sum+=it->first*it->second;
}
return sum;
}
int rec
(
std::set<int> &sums,
std::map<int, int> ctq,
std::vector<int> coins,
std::vector<int> quantity,
int m
)
{
for(int k=quantity[m]; k>=0; k--)
{
ctq[coins[m]] = k;
sums.insert(money(ctq));
if(m != 0)
{
rec(sums, ctq, coins, quantity, m-1);
}
}
return sums.size()-1;
} | {
"domain": "codereview.stackexchange",
"id": 32886,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, performance, algorithm, recursion",
"url": null
} |
ros, uvc-cam, uvc-camera
started roslaunch server http://przem:54421/
SUMMARY
========
PARAMETERS
* /ar_pose/marker_center_x: 0.0
* /ar_pose/marker_center_y: 0.0
* /ar_pose/marker_pattern: /home/przemek/tum...
* /ar_pose/marker_width: 152.4
* /ar_pose/threshold: 100
* /ar_pose/use_history: True
* /camera/uvc_camera_node/camera_info_url: file:///opt/ros/i...
* /camera/uvc_camera_node/device: /dev/video0
* /camera/uvc_camera_node/fps: 30
* /camera/uvc_camera_node/frame: camera
* /camera/uvc_camera_node/height: 240
* /camera/uvc_camera_node/width: 320
* /rosdistro: indigo
* /rosversion: 1.11.9
NODES
/camera/
image_proc (image_proc/image_proc)
uvc_camera_node (uvc_camera/uvc_camera_node)
/
ar_pose (ar_pose/ar_single)
rviz (rviz/rviz)
world_to_cam (tf/static_transform_publisher)
ROS_MASTER_URI=http://localhost:11311 | {
"domain": "robotics.stackexchange",
"id": 20122,
"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, uvc-cam, uvc-camera",
"url": null
} |
machine-learning, artificial-intelligence, computer-vision, image-processing, computer-games
Title: The task of recognizing game units in the screenshot I'm new to computer vision and I want to solve the task of recognizing the game units of the game Clash Royale in the screenshot.
Briefly, there are about 70 different types of gaming units belonging to two teams (they differ a little in colors and some are visible in front, others with backs). I want to find game units on the screenshot and classify their type of unit (then health and the team).
What are the best tools for task like this? What libraries will I use to simply teach the model? How many teaching examples do I need to learn the model? It seems that the quality of the screenshots is quite good and the images are clear. To what size should I reduce the screenshoot to get a good model and its speed? Maybe someone had a similar experience?
I think about CNN or a lot of HAAR cascades for each of the types of units, but I would like to receive advice. Machine learning doesn't seem needed, since the image of each unit is always identical. One approach is to obtain a clean image of each unit, and then use template matching to find all locations where the template occurs in the screenshot. You might be able to check all locations in the screenshot whether they exactly match the template image (you will probably want to mask out the part where the health appears, as that will obscure the image). This can be done very efficiently.
To recover the health, you might also be able to do template matching on the numbers 0-10.
The way to tell what resolution you can downsize to is empirically: you experiment with different resolutions and measure the accuracy for each. There's probably no way to predict without trying it.
If you want to try machine learning, you could try a CNN, or better yet, you could try retraining the YOLOv3 object detector for your particular images (see, e.g., the YOLO project page or here). You will probably need a larger training set this way, and you'll have to do a bunch of manual annotation of sample screenshots.
Tool and library recommendations are off-topic here. | {
"domain": "cs.stackexchange",
"id": 11782,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, artificial-intelligence, computer-vision, image-processing, computer-games",
"url": null
} |
image-processing, image-segmentation
Title: Color and circle detection in image I try to detect and count circles in image (for example smarties)
I use HSL color space. But I am not able to distiguish colors od the same color if they are in touch. I try to erode and dilate picture. But result is the same, I have only some blobs(connected components) od the same color. Do you have some general algorithm for this problem?
(I try to do that with EMGUCV library)
Thanks in advance. If I understand you correctly, you erode, then dilate then look for the colour of your blobs. Erosion then dilation is an opening operator. As you can hopefully see that's not going to do too much to seperate the blobs.
I would suggest that you do not really need to dilate. If you just erode enough so that the blobs seperate. You can then mark a pixel in each blob (centre is probably a good bet), which should now be seperated, and find the colour of that pixel in the original image. | {
"domain": "dsp.stackexchange",
"id": 1780,
"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, image-segmentation",
"url": null
} |
complexity-theory, complexity-classes, counting
Title: Proof of $P^{\text{#}P} = P^{PP}$ I was reading this article on the complexity class $PP$.
In the fourth paragraph there is a claim that $P^{\text{#}P} = P^{PP}$ and that it can be proved using binary search. Can anyone please explain this in better detail?
The author himself gives the following explanation: If $f$ is a $\text{#P}$ function then the language $L= {(x,k) | f(x) \geq k}$ is in $PP$. Then do binary search on $k$.
This is still not clear to me. The other direction, $P^{PP} \subseteq P^{\text{#}P}$ is clear. It all boils down to simulating a $\mathsf{\# P}$ oracle using a $\mathsf{PP}$ oracle. Consider a $\mathsf{\# P}$ oracle call: a polytime non-deterministic Turing machine $T$ and an input $x$. We want to know how many runs of $T$ result in the output $1$. Denote this number by $T_1(x)$, and denote the total number of runs of $T$ on $x$ by $T(x)$.
First, let's show that using a $\mathsf{PP}$ oracle we can decide whether $T(x) \geq y$ for any polysize $y$. We construct a Turing machine $T'$ that acts as follows:
Guess a non-deterministic bit $b$.
If $b = 0$, then simulate $T$ on $x$ in such a way that there are $2T(x)+1$ different paths, and in all of them return $1$.
If $b = 1$, then have $2y$ different paths, all of them returning $0$. | {
"domain": "cs.stackexchange",
"id": 4689,
"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": "complexity-theory, complexity-classes, counting",
"url": null
} |
computational-geometry
Title: k-Closest pairs in Delaunay triangulation Assume there is a set of points $S$ in $\mathbb{R^2}$.
In this set of points there is a pair of points which are the nearest neighbors, the second-nearest neighbors and the third-nearest neighbors.
I want to show that the pair of points which represent:
the nearest neighbors,
the second nearest neighbors,
the third nearest neigbors | {
"domain": "cs.stackexchange",
"id": 7290,
"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": "computational-geometry",
"url": null
} |
$\textbf{Case 3:}$ All the digits are different. Since there are $\frac{990-110}{11}+1 = 81$ multiples of $11$ between $100$ and $999$, there are $81-8-9 = 64$ multiples of $11$ remaining in this case. However, $8$ of them contain a zero, namely $209$, $308$, $407$, $506$, $605$, $704$, $803$, and $902$. Each of those multiples of $11$ contributes $2 \cdot 2=4$ valid permutations, but we overcounted by a factor of $2$; every permutation of $209$, for example, is also a permutation of $902$. Therefore, there are $8 \cdot 4 / 2 = 16$. Therefore, there are $64-8=56$ remaining multiples of $11$ without a $0$ in this case. Each one contributes $3! = 6$ valid permutations, but once again, we overcounted by a factor of $2$ (note that if a number ABC is a multiple of $11$, then so is CBA). Therefore, there are $56 \cdot 6 / 2 = 168$ valid permutations in this subcase.
Adding up all the permutations from all the cases, we have $24+18+16+168 = \boxed{\textbf{(A) } 226}$.
## Solution 4
We can first overcount and then subtract. We know that there are $81$ multiples of $11$.
We can then multiply by $6$ for each permutation of these multiples. (Yet some multiples do not have six distinct permutations.)
Now divide by $2$, because if a number $abc$ with digits $a$, $b$, and $c$ is a multiple of $11$, then $cba$ is also a multiple of $11$ so we have counted the same permutations twice. | {
"domain": "artofproblemsolving.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936064221572,
"lm_q1q2_score": 0.8284352332772494,
"lm_q2_score": 0.8418256432832333,
"openwebmath_perplexity": 173.13403371723433,
"openwebmath_score": 0.9307394027709961,
"tags": null,
"url": "https://artofproblemsolving.com/wiki/index.php?title=2017_AMC_10A_Problems/Problem_25&curid=15381&diff=0&oldid=151797"
} |
## Wednesday, August 12, 2015
### The angle between the hour and minute hands of a clock.
Q. The time shown in the clock is 7:35 what is the angle between the hour and minute hands of a clock?
A. Consider the simpler problem if the time is 7:00. As there are 12 hours in a complete revolution of the hour hand, one hour subtends an angle
of 360/12 = 30 degrees. Thus, if H is the number of hours, the angle made by the hour hand from the noon positioon would be 30H.
Now let us consider the minute hand. if M is the number of minutes, consider that if M is 15 minutes , the angle which the minute hand makes is
90 degrees. This means that each minute ssubends an angle of 90/15 = 6 degrees or 6M.
But each revolution of the minute hand imparts 1/12 revolution of the hour hand. In other words, in the time covered by the minute hand, the hour hand will cover an
The angle between the hour hand and minute hand for a time reading of H:M will then be |30H + M/2 - 6M|. If this angle is greater than 180 degrees,
we take the difference from 360 degrees.
Getting back to our original problem, for a time of 7:35, the angle beween the hour and minute hands is |30(7) + 35/2 - 6(35)| = 17.5 degrees.
## Monday, August 20, 2012
### Statistics Problem Set Aug-21-2012
1. Which of the following formulas measure symmetry of a sample data distribution?
(a)$(1/n) \sum (x-\overline{x})^2$ (b) $(1/n) \sum (x-\overline{x})^3$ (c)$(1/n) \sum (x-\overline{x})^4$ (d.) Not listed
2. The following were determined for a sample data: n = 10, min=-2, max= 10, sd = 3,
$\overline{x}=5$. The data is invalid since | {
"domain": "blogspot.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9835969660413474,
"lm_q1q2_score": 0.81534169482056,
"lm_q2_score": 0.828938806208442,
"openwebmath_perplexity": 881.0855146571457,
"openwebmath_score": 0.8326252102851868,
"tags": null,
"url": "http://engineering-problems-and-solutions.blogspot.com/"
} |
inorganic-chemistry, reaction-mechanism, coordination-compounds, molecular-structure, atoms
Title: Mechanism of S2Cl2 and NaHSO3 I learned that NaHSO3 reacts with S2Cl2 to give Na2S4O6 as product. After looking up the structure of Na2S4O6, it confuses me that four sulfur atoms connect together. I couldn't figure out the exact mechanism for this reaction. Nothing odd happens. The $S-S$ covalent bond is relatively strong and sulfur atoms don't mind at all linking up in chains of four or longer. In that respect they're quite differengt from oxygen atoms, which have smaller, highly localized lone pairs that repel each other strongly.
Mechanistically, the reaction is a simple nucleophilic substitution, where both the nucleophile (in $HSO_3^-$) and the electrophilic center (in $S_2Cl_2$) are sulfur atoms. The bisulfite ion is electron rich due to its charge, and attacks one of the electron poor (due to the electron withdrawing chlorine atom) sulfurs in $S_2Cl_2$, expelling the chlorine as $Cl^-$ and forming a $S-S$ bond in addition to the one already present in $S_2Cl_2$.
$$\ce{S_2Cl_2 + HSO_3^- -> HS_3O_3Cl + Cl^-}$$
This reaction will proceed smoothly as chloride is a weak base and good leaving group, and sulfur has diffuse electron pairs and is a good nucleophile, especially when charged. The resulting intermediate is much more acidic and easily gives off a proton; if there is no other base present sulfurous acid will form, which will partially decompose into $SO_2$ and $H_2O$:
$$\ce{HS_3O_3Cl + HSO_3^- <=>> S_3O_3Cl^- + H_2SO_3}$$
$$\ce{H_2SO_3 <=> H_2O + SO_2}$$ | {
"domain": "chemistry.stackexchange",
"id": 17445,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry, reaction-mechanism, coordination-compounds, molecular-structure, atoms",
"url": null
} |
vba
maxGrade and minGrade are only ever assigned once - they're essentially constants and could be declared as such:
Const MAXGRADE As Integer = 10
Const MINGRADE As Integer = 1
I would suggest to declare variables closer to their usage, and perhaps only assign the function's return value in one place.
Variables restPoints and restPass are only ever used with a passing grade, in that Else block. VBA doesn't scope variables at anything tighter than procedure scope, so you could extract a method to calculate a passing grade, but that's borderline overkill - here's what it would look like, with parameter casing to camelCase:
Option Explicit
Private Const MAXGRADE As Integer = 10
Private Const MINGRADE As Integer = 1
Public Function Grade(ByVal points As Integer, ByVal maxPoints As Integer, ByVal cesuur As Double) As Double
Dim passPoints As Integer
passPoints = cesuur * maxPoints
Dim passGrade As Double
passGrade = (MAXGRADE + MINGRADE) / 2
Dim base As Double
base = MAXGRADE - passGrade
Dim result As Double
If points < passPoints Then
result = 1 + (passGrade - MINGRADE) * points / passPoints
Else
result = CalculatePassingGrade(MAXGRADE, base, points, maxPoints, cesuur)
End If
Grade = Round(result, 1)
End Function
Private Function CalculatePassingGrade(ByVal base As Double, ByVal points As Integer, ByVal maxPoints As Integer, ByVal cesuur As Double) As Double
Dim restPoints As Integer
restPoints = maxPoints - points
Dim restPass As Double
restPass = mxPoints * (1 - cesuur)
CalculatePassingGrade = MAXGRADE - restPoints * base / restPass
End Function | {
"domain": "codereview.stackexchange",
"id": 13688,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba",
"url": null
} |
python, pathfinding, a-star
I expected to see length on the RHS rather than zero. It defaults in the method signature. Maybe the API you were looking for was a boolean parameter that requests the length be zeroed.
The docstring for isFinished is not very helpful. It says "Expandable function.", and then the rest is obvious. You might offer guidance about how to override it, or at least point to AStar_1d for an example.
In Node your reference to, for example, self.astar.openNodes[node.key]
feels clunky. Maybe you could have passed in the open/closed maps? Creating a result dict is perfectly nice, and clear, but you might also consider making getNeighbors a generator that yields such values.
The docstring for setKey() is helpful. The pass is clearly incorrect, in that it doesn't conform to the contract spelled out by the docstring. You might want to unconditionally raise an exception, to ensure the method will be overridden.
You specifically asked about the speed of the code. Other than the linear min() scan and the needless creation of temporary dict objects, I didn't notice any trouble areas leaping off the page. Looks good. | {
"domain": "codereview.stackexchange",
"id": 27132,
"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, pathfinding, a-star",
"url": null
} |
ros, quadcopter, ros-kinetic, hector, c++11
joints_[side][i]->SetMaxForce(0, torque);
^
hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/build.make:62: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/src/diffdrive_plugin_6w.cpp.o' failed
make[2]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/src/diffdrive_plugin_6w.cpp.o] Error 1
CMakeFiles/Makefile2:5541: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/all' failed
make[1]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_6w.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/build.make:62: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/src/diffdrive_plugin_multi_wheel.cpp.o' failed
make[2]: *** [hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/src/diffdrive_plugin_multi_wheel.cpp.o] Error 1
CMakeFiles/Makefile2:6567: recipe for target 'hector_gazebo/hector_gazebo_plugins/CMakeFiles/diffdrive_plugin_multi_wheel.dir/all' failed | {
"domain": "robotics.stackexchange",
"id": 26004,
"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, quadcopter, ros-kinetic, hector, c++11",
"url": null
} |
biochemistry, molecular-biology, immunology
Title: what does Pro→Glu substitution mean? Considering the paper:
A single amino acid in E-cadherin responsible for
host specificity towards the human pathogen
Listeria monocytogenes
in the abstract portion, what does Pro→Glu mean? Does it mean that, in place of Glu(glucose), pro-16 is placed? You are looking at a protein here, which is mutated in the higher host specificity, so glucose is not involved here. What is written here are the amino acids in the three-letter-code, the notation Pro→Glu means that Proline (Pro) is replaced by Glutamic acid (Glu).
The notation Pro16 means the proline on amino acid position 16 in the protein. You often find this replacements noted as Pro16Glu or P16E (in the 1-letter-code) | {
"domain": "biology.stackexchange",
"id": 3472,
"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": "biochemistry, molecular-biology, immunology",
"url": null
} |
quantum-mechanics, condensed-matter, solid-state-physics, electrons, mass
Title: What is the correct effective mass formula for an electron near a Brillouin zone edge? In Kittle's Intro to Solid State physics Pg 197, it is stated that the effective mass of an electron near the lower edge of the conduction band is
$$\epsilon (K)= \epsilon_c +\frac{\hbar^2}{2m_{eff}}K^2$$
where
$$\frac{m_{eff}}{m_e}\equiv \frac{1}{2\lambda /U -1} \tag{1} $$
$m_e$ is the mass of a free electron,$\lambda$ is the free electron energy and $K$ is the k-vector measured from the edge.
I am reasonably convinced that Kittle has made a sign error although I am not convinced enough to continue on as if he has.
In the same text on page 179, we calculate the energy near a Brillouin zone edge which leads to the equation
$$\epsilon_K(\pm)=\lambda \pm U +\frac{\hbar^2}{2m_e}K^2\left(1\pm\frac{2\lambda}{U}\right)$$
This equation seems to indicate that the effective mass ought to be
$$m_{eff}=\frac{m_e}{1\pm \frac{2\lambda}{U}} \tag{2}$$
Note how the denominator in the above equation is different to that in equation (1). My view is that eq (2) is correct and that (1) is erroneous. Am I correct? I have found alternate sources that seem to agree with eq (2) being correct (for example in the middle of pg 5 here https://ocw.mit.edu/courses/3-024-electronic-optical-and-magnetic-properties-of-materials-spring-2013/baecbd9de7692a35421c23aeb626e9e5_MIT3_024S13_2012lec13.pdf). | {
"domain": "physics.stackexchange",
"id": 96565,
"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, condensed-matter, solid-state-physics, electrons, mass",
"url": null
} |
general-relativity
Title: How strong is the spacetime curvature at distance $d$ for a nonmoving point mass? Consider a point mass $A$ with mass $m$ in empty space. The point mass $A$ does not have a velocity and does not rotate.
Since gravity is symmetric for nonmoving objects, the spacetime curvature around $A$ is also symmetric.
So at a distance $d$ from the point mass $A$ how strong is the curvature $C$ ?
$$ C = f(d,m) $$ $$f = ???$$ It sounds as if you just want the acceleration given by the non-relativistic equation from Newton's law:
$$ a = \frac{GM}{r^2} $$
where $M$ is the mass of the object generating the gravitational field (strictly speaking this equation only applies when the mass of the accelerating object is much less than $M$).
For the GR version of this have a look at twistor59's answer to What is the weight equation through general relativity?:
$$ a = \frac{GM}{r^2}\frac{1}{\sqrt{1-\frac{2GM}{c^2r}}} $$
This is the simplest treatment of the problem I've seen, but even so I suspect you'll have problems with this unless your maths is reasonably advanced. | {
"domain": "physics.stackexchange",
"id": 11188,
"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",
"url": null
} |
1. Call this natural number $x$. Then $x\equiv 1\bmod 3$ and $x\equiv 0\bmod 4$. $3$ and $4$ are coprime so, by the Chinese remainder theorem, we get that $x\equiv 4\bmod 12$.
2. Again, let's call this natural number $x$. Then $x\equiv 2\bmod 6$ and $x\equiv 1\bmod 9$. Here, we cannot turn to the Chinese remainder theorem since $6$ and $9$ are not coprime. Instead, observe that $x\equiv 2\bmod 6$ is equivalent to $x\equiv 2+6m$ for some integer $m$. Now, if we substitute this into our second congruence, we get $2+6m\equiv 1\bmod 9$. This is the same as $6m\equiv 8\bmod 9$. Since there is no inverse for $6$ modulo $9$, we have that no solution exists.
3. Here, we have $x\equiv 1\bmod 7$ and $x\equiv 3\bmod 11$. Since $7$ and $11$ are coprime, by the Chinese remainder theorem, we obtain $x\equiv 36\bmod 77$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429604789206,
"lm_q1q2_score": 0.8453443009783562,
"lm_q2_score": 0.8596637541053281,
"openwebmath_perplexity": 112.66759294232416,
"openwebmath_score": 0.854559600353241,
"tags": null,
"url": "https://math.stackexchange.com/questions/2913408/problem-regarding-linear-congruence"
} |
and! Following property: if two geometric objects are congruent to a third quantity, then they are equal to other... And b=4, then a must also equal 4 want to attend yet the! Angles and transitive property is a universally accepted truth that is similar to triangle b ) and (... Know that when two things are equal to each other what college want. Because \ ( a\ ), \ ) then \ ( b = c\ ) expressions, and with. Be a Study.com Member are also formal mathematical structures ( like partial ordering ) which require transitivity, transitivity... The length of the badge place to another first two years of college and save thousands your. Woman 5 ft tall walks away from the this KR property, when attempting to develop arguments using transitive! A long neck property when we have three or more quantities of the metric ruler, or contact support! Must also equal 4 equality, transitive property take triangle b contact customer support we draw a! In set a, such that a=b and b=c, then a=c a quantity.: badge Jamie is designing a badge for her club the movie Madagascar is a giraffe, b... And \ ( z\ ) and James were walking together and hence covered the same distance recall how candidates! The basic axioms is the tallest and who is standing next to Ted to triangle.! 5 by the transitive property of equality. put based on the set x is a logical that. Explore all angles of a novel is the tallest and who is between. Get transitive property geometry tests, quizzes, and c have elevations of 600 m and 800 m respectively answer and the! To another given a triangle c that is similar to the top the! Dedicated to making learning fun for our favorite readers, the relation between \ x\! Are the property of Congruence and the transitive property meaning, transitive property inequalities... Apples are equal to help you solve problems track of the first two years college! A and then we draw a triangle b that is similar to the substitution we... Are any three elements in set a, such that a=b and b=4, then a=c through an and. Rule the states if a=b and b=4, then a= c. one of them can replace the other is meters. Giraffes have tall necks, and | {
"domain": "com.pl",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765633889135,
"lm_q1q2_score": 0.8057260807194623,
"lm_q2_score": 0.8221891327004132,
"openwebmath_perplexity": 1268.6576577415447,
"openwebmath_score": 0.3646334409713745,
"tags": null,
"url": "http://zswielen.com.pl/international-company-awx/f5c2ed-transitive-property-geometry"
} |
## Specifications
Specification
ECMAScript Latest Draft (ECMA-262)
The definition of 'Math.hypot' in that specification.
## Browser compatibility
Update compatibility data on GitHub
Desktop Mobile Server Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Chrome Full support 38 Edge Full support 12 Firefox Full support 27 IE No support No Opera Full support 25 Safari Full support 8 WebView Android Full support Yes Chrome Android Full support 38 Firefox Android Full support 27 Opera Android Full support Yes Safari iOS Full support 8 Samsung Internet Android Full support Yes nodejs Full support 0.12
Full support
Full support
No support
No support | {
"domain": "mozilla.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130570455679,
"lm_q1q2_score": 0.8131557832926234,
"lm_q2_score": 0.8221891283434876,
"openwebmath_perplexity": 7727.21505760845,
"openwebmath_score": 0.3864273428916931,
"tags": null,
"url": "https://developer.mozilla.org/ar/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot"
} |
1. ## Algebra
Q1= show that if x is real, 2(x^2) + 6x + 9 is always positive.
Q2= Solve the simultaneous equations for x,y > 0
2log y = log 2 + log x
2^y = 4^x
cheers
2. for Q1 check the discriminant of the quadratic $b^2 -4ac$
for Q2 using the first equation you should be able to get $\log y^2 = \log 2x \Rightarrow y^2 = 2x$ using the laws of logs.
log both sides on the second equation and it should be easy form there.
3. Originally Posted by sparky69er
Q1= show that if x is real, 2(x^2) + 6x + 9 is always positive.
Q2= Solve the simultaneous equations for x,y > 0
2log y = log 2 + log x
2^y = 4^x
cheers
An alternative "looking" way to show Q1 would be completing squares and examining the expression.
$
2(x^2 + 3x + \frac92) = 2([x^2 + 2.\frac32.x + (\frac32)^2] + \frac92 - (\frac32)^2) = 2(x + \frac32)^2 + \frac94$
Now since $(x + \frac32)^2$ is always greater than or equal to zero, for all real x, and since $\frac94$ is positive , its sum is strictly positive.
4. Originally Posted by bobak
for Q1 check the discriminant of the quadratic $b^2 -4ac$
for Q2 using the first equation you should be able to get $\log y^2 = \log 2x \Rightarrow y^2 = 2x$ using the laws of logs.
log both sides on the second equation and it should be easy form there.
Hi, for Q1 i have done as you said and got -36 but what do you mean by the discriminant????
5. Hello, sparky69er!
1) Show that if $x$ is real, $2x^2 + 6x + 9$ is always positive. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683476832692,
"lm_q1q2_score": 0.8907083135634205,
"lm_q2_score": 0.9019206778476933,
"openwebmath_perplexity": 570.7701804020886,
"openwebmath_score": 0.8871765732765198,
"tags": null,
"url": "http://mathhelpforum.com/algebra/25338-algebra.html"
} |
0R0_R0Râ never has a multiplicative inverse, because 0â
r=râ
0=00 \cdot r = r \cdot 0 = 00â
r=râ
0=0 for all râR.r\in R.râR. âabcdaaaaabcbdbcdcbcdabcd A linear map having a left inverse which is not a right inverse December 25, 2014 Jean-Pierre Merx Leave a comment We consider a vector space E and a linear map T â L (E) having a left inverse S which means that S â T = S T = I where I is the identity map in E. When E is of finite dimension, S is invertible. We must show that g(y)â=âgʹ(y). Applying g to both sides of this equation, we see that g(y)â=âg(f(gʹ(y))). In this case, is called the (right) inverse functionof. Formal definitions In a unital magma. The calculator will find the inverse of the given function, with steps shown. A left inverse of a matrix $A$ is a matrix $L$ such that $LA = I$. Consider the set R\mathbb RR with the binary operation of addition. c = e*c = (b*a)*c = b*(a*c) = b*e = b. Similarly, any other right inverse equals b, b, b, and hence c. c. c. So there is exactly one left inverse and exactly one right inverse, and they coincide, so there is exactly one two-sided inverse. New user? One of its left inverses is the reverse shift operator u(b1,b2,b3,â¦)=(b2,b3,â¦). Let Râ{\mathbb R}^{\infty}Râ be the set of sequences (a1,a2,a3,â¦) (a_1,a_2,a_3,\ldots) (a1â,a2â,a3â,â¦) where the aia_iaiâ are real numbers. More explicitly, let SSS be a set, â*â a binary operation on S,S,S, and aâS.a\in S.aâS. Claim: f is surjective | {
"domain": "ingenium-elearning.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9648551515780319,
"lm_q1q2_score": 0.8312595779357588,
"lm_q2_score": 0.8615382076534742,
"openwebmath_perplexity": 596.7027181393795,
"openwebmath_score": 0.9139620065689087,
"tags": null,
"url": "http://stereotypes.ingenium-elearning.com/qrbqo/jake-wood-mgfn/qg6ek.php?5e26de=left-inverse-is-right-inverse"
} |
image-processing, matlab, fft, fourier-transform, frequency
Actually, this is not correct. The phase values determine the shift in the sinusoid components of the image. With zero phase, all the sinusoids are centred at the same location and you get a symmetric image whose structure has no real correlation with the original image at all. Being centred at the same location means that the sinusoids are a maximum at that location, and is why there is a big white patch in the middle of Figure 1.c.
The phase-only reconstruction preserve features because of the principle of phase congruency. At the location of edges and lines, most of the sinusoid components have the same phase. See http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT7/node2.html This properly alone can be used to detect lines and edges, http://www.csse.uwa.edu.au/~pk/research/pkpapers/phasecorners.pdf , without regard to magnitude. So you can see that the phase information is most important.
Changing the magnitude of the various component sinusoids changes the shape of the feature. When you do a phase-only reconstruction, you set all the magnitudes to one, which changes the shape of the features, but not their location. In many images the low frequency components have a magnitude higher than the high frequency components, so phase-only reconstruction does look like a high-pass filter.
In short, phase contains the information about the locations of features.
You cannot add the phase-only and magnitude-only images to get the original. You can multiply them in the Fourier domain and transform back to get the original. | {
"domain": "dsp.stackexchange",
"id": 1907,
"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, matlab, fft, fourier-transform, frequency",
"url": null
} |
Naturally there exists 1 array consisting of all the elements (indexed from 0 to N-1)
There exist 2 arrays consisting of N-1 consecutive elements (indexed from 0 to N-2)
and in general there are k arrays consisting of N-k+1 consecutive elements (indexed from 0 to N-k-1)
Proof:
We can access elements 0 ... N-k-1 as the first array, then 1 ... N-k+2 is the second array, and this goes on for all N-k+r until N-k+r = N-1 (ie until we have hit the end). The r that does us is can be solved for :
$$N-k+r = N-1 \rightarrow r -k = -1 \rightarrow r = k-1$$
And the list $$0 ... k-1$$ contains k elements within it
Thus we note that the total count of subarrays is
1 for N elements
2 for N-1 elements
3 for N-2 elements
.
.
.
N for 1 element
And the total sum must be:
$$1 + 2 + 3 ... N$$
Let us see if your formula works
if:
$$1 + 2 +3 ... N = \frac{1}{2}N(N+1)$$
then
$$1 + 2 + 3 ... N+1 = \frac{1}{2}(N+1)(N+2)$$
We verify:
$$\frac{1}{2}N(N+1) + N+1 = (N+1)(\frac{1}{2}N + 1) = (N+1)\frac{N+2}{2}$$
So you're formula does indeed work! Now we verify that for N = 1
$$\frac{1*(1+1)}{2} = 1$$
And therefore we can use the above logic to show that for any and ALL whole numbers N the formula works!
This calculation can be seen as an arithmetic series (i.e. the sum of the terms of an arithmetic sequence). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126513110864,
"lm_q1q2_score": 0.8683183703884247,
"lm_q2_score": 0.8872046041554923,
"openwebmath_perplexity": 742.3973683653206,
"openwebmath_score": 0.9221491813659668,
"tags": null,
"url": "https://math.stackexchange.com/questions/1194584/the-total-number-of-subarrays"
} |
...is certainly a larger sum than:
$$\frac12 + \frac14 + \frac14 + \frac18 + \frac18 + \frac18 + \frac18 + \frac1{16} + \frac1{16} + \frac1{16} + \frac1{16} + ...$$
...or:
$$\frac12 + \frac12 + \frac12 + ...$$
So think of it this way. No matter how many $\frac12$'s you want to add together, you'll eventually get there. If you want $n \frac12$'s to add together, you will get there by (around) the ($2^n$)'th term. So any number you come up with can be topped by going further into the series, which means the series diverges to infinity: you can't place any finite upper bound on it that won't be surpassed.
For $± \frac1k$ with the $-1$'s alternating, again we look at the partially expanded series:
$$1 - \frac12 + \frac13 - \frac14 + \frac15 - \frac16 + \frac17 - \frac18 + \frac19 - \frac1{10} + \frac1{11} - \frac1{12} + ...$$
If we combine each pair of terms, we get the series:
$$\frac12 + \frac1{12} + \frac1{30} + \frac1{56} + ...$$
This is clearly bounded below because every term is positive. To show convergence we have to find some finite upper limit this can't ever exceed. Doing this directly is tricky, but we can reduce it to a common problem we already know the answer to. The series is equivalent to:
$$\frac1{1*2} + \frac1{3*4} + \frac1{5*6} + \frac1{7*8} + ...$$
...which is obviously less than: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540704659681,
"lm_q1q2_score": 0.8284771617504657,
"lm_q2_score": 0.8459424295406088,
"openwebmath_perplexity": 258.2424459872029,
"openwebmath_score": 0.8625534176826477,
"tags": null,
"url": "https://math.stackexchange.com/questions/880980/why-these-two-series-are-convergent-or-divergent"
} |
Next, take $$u=\sin(10t)$$ and $$dv=e^{2t}\, dt$$
$$I=\frac{1}{2}e^{2t}\cos(10t)+5\left(\frac{1}{2}e^{2t}\sin(10t)-5 \int e^{2t}\cos(10t)\,dt\right)$$ $$I=\frac{1}{2}e^{2t}\cos(10t)+\frac{5}{2}e^{2t}\sin(10t)-25I$$ we solve for $$I$$ to find $$I=\frac{1}{52}e^{2t}\cos(10t)+\frac{5}{52}e^{2t}\sin(10t)+C$$ hence $$(*)$$ becomes $$e^{2t}y=\frac{1}{52}e^{2t}\cos(10t)+\frac{5}{52}e^{2t}\sin(10t)+C$$ which after dividing by $$e^{2t}$$ forms the general solution $$y(t)=\frac{1}{52}\cos(10t)+\frac{5}{52}\sin(10t)+Ce^{-2t}$$ The general solution is the same solution found by the method of undetermined coefficients. By finding the particular solution, the OP could then find the homogeneous solution and conclude $$y_g(t)=y_h(t)+y_p(t)=Ce^{-2t}+\Big(\frac{1}{52}\cos(10t)+\frac{5}{52}\sin(10t)\Big)$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105287006256,
"lm_q1q2_score": 0.8004704941155626,
"lm_q2_score": 0.8198933337131077,
"openwebmath_perplexity": 428.93734710308905,
"openwebmath_score": 0.9700153470039368,
"tags": null,
"url": "https://math.stackexchange.com/questions/3506232/particular-solution-to-y2y-cos10t"
} |
### Spring 2018 #6
Let \begin{align*} M &= \{(w, x, y, z) \in {\mathbb{Z}}^4 {~\mathrel{\Big\vert}~}w + x + y + z \in 2{\mathbb{Z}}\} \\ N &= \left\{{ (w, x, y, z) \in {\mathbb{Z}}^4 {~\mathrel{\Big\vert}~}4\divides (w - x),~ 4\divides (x - y),~ 4\divides ( y - z) }\right\} .\end{align*}
• Show that $$N$$ is a $${\mathbb{Z}}{\hbox{-}}$$submodule of $$M$$ .
• Find vectors $$u_1 , u_2 , u_3 , u_4 \in {\mathbb{Z}}^4$$ and integers $$d_1 , d_2 , d_3 , d_4$$ such that \begin{align*} \{ u_1 , u_2 , u_3 , u_4 \} && \text{is a free basis for }M \\ \{ d_1 u_1,~ d_2 u_2,~ d_3 u_3,~ d_4 u_4 \} && \text{is a free basis for }N \end{align*}
• Use the previous part to describe $$M/N$$ as a direct sum of cyclic $${\mathbb{Z}}{\hbox{-}}$$modules.
### Spring 2018 #7 | {
"domain": "dzackgarza.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9908743636887527,
"lm_q1q2_score": 0.8030827774478073,
"lm_q2_score": 0.8104789132480439,
"openwebmath_perplexity": 362.4303021135475,
"openwebmath_score": 0.9997151494026184,
"tags": null,
"url": "https://quals.dzackgarza.com/10_Algebra/TexDocs/QualAlgebra_stripped.html"
} |
newtonian-mechanics, rotational-dynamics, reference-frames, centripetal-force, centrifugal-force
Title: What happens when the centripetal force is equal and opposite to the centrifugal force? We say that centrifugal force is fictitious, yet we still use it in some problems. If the centrifugal force is equal and opposite to the centripetal force wouldn't that make the net force zero? The centrifugal force is a "fictitious force" that appears when working in a rotating coordinate system. Basically (together with the Coriolis force) it's the imaginary force that would, if real, make objects move with respect to a fixed, non-rotating coordinate system in the same way that they actually move (due to inertia) with respect to the rotating coordinates that we're using.
If all that sounds really confusing, please see the second half of this earlier answer I wrote, where I try to explain this in more detail (and with pictures!).
Anyway, the point of these fictitious forces is that they let us apply the same laws and formulas of Newtonian physics in a rotating frame of reference as we would in a non-rotating one, and still get physically correct results, as long as we remember to also include the effect of those imaginary forces on all objects.
For example, in a normal non-rotating coordinate system, a stationary object will remain stationary if (and only if) all the forces acting upon it cancel out, so that the net force acting on the object is zero. In a rotating coordinate system, an object which is stationary with respect to the coordinates (i.e. rotating along with them around the same axis at the same speed) will remain so if (and only if) all the real and imaginary forces acting on it cancel out, leaving an (apparent) net force of zero.
Here's a simple example, taken from the answer I linked above. Imagine two spheres floating in space near each other. If you do nothing, they'll just keep floating there. If you push each of them in different directions, then they'll each float in the direction you pushed them, away from each other. But if the spheres have been tied together with a string, then the tension of the string will exert a centripetal force that will curve their trajectories into circles: | {
"domain": "physics.stackexchange",
"id": 56614,
"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, rotational-dynamics, reference-frames, centripetal-force, centrifugal-force",
"url": null
} |
The Dot Product
Vector dot product is also called a scalar product because the product of vectors gives a scalar quantity. Sometimes, a dot product is also named as an inner product. In vector algebra, dot product is an operation applied on vectors
The Scalar product or dot product is commutative. When two vectors are operated under a dot product, the answer is only a number. A brief explanation on dot products is given below.
When two vectors are combined under addition or subtraction, the result is a vector. When two vectors are combined using the dot product, the result is a scalar. For this reason, the dot product is often called the scalar product. It may also be called the inner product.
Dot product of two vector
If we have two vectors
then the dot product or scalar product between them is defined as
## Formula for vectors Dot Product
Let be two non zero vectors. Then, the scalar product is denoted byand is defined as the scalar
## Dot Product of Two Parallel Vectors
If two vectors have the same direction or two vectors are parallel to each other, then the dot product of two vectors is the product of their magnitude.
Here, θ = 0 degree
so, cos 0 = 1
Therefore,
## Dot Product of Opposite Vectors
If the two vectors are opposite in direction, then θ=π
Here,
cosπ=−1
Now,
Let us know about some properties of Dot product.
Let
• Commutative Property
• Distributive Property
• Associative Property
• property of magnitude
Let us solve an example using S2 for better understanding.
Q: Determine $$x .y$$ given $$x = \begin{bmatrix}1\\2\\3\\4\end{bmatrix}$$ and $$y = \begin{bmatrix}4\\5\\6\\7\end{bmatrix}$$
%use s2
// define vectors x and y
var x = DenseVector(arrayOf(1.0, 2.0, 3.0, 4.0))
var y = DenseVector(arrayOf(4.0, 5.0, 6.0, 7.0))
// P = x.y
val P = x.multiply(y)
println(P) | {
"domain": "nm.education",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9873750525759486,
"lm_q1q2_score": 0.8162745990279074,
"lm_q2_score": 0.826711791935942,
"openwebmath_perplexity": 581.7252641330439,
"openwebmath_score": 0.7860962748527527,
"tags": null,
"url": "https://nm.education/courses/introduction-to-data-science/lessons/linear-algebra/topic/dot-product-and-orthogonality/"
} |
machine-learning, python, r, clustering, visualization
color_assignments = np.repeat(-1,len(centroids))
for i in range(len(centroids)):
knn = indices[i]
knn_colors = color_assignments[knn]
available_colors = color_ids[list(set(color_ids) - set(knn_colors))]
if(len(available_colors) > 0):
color_assignments[i] = available_colors[0]
else:
raise Exception("Can't color this many neighbors with this many colors")
centroids = centroids.reset_index()
colors = centroids.loc[:,['cluster']]
colors['color'] = color_assignments
data = data.merge(colors,on='cluster')
return(data) | {
"domain": "datascience.stackexchange",
"id": 8599,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, python, r, clustering, visualization",
"url": null
} |
motors
OEM Replacement motor:
DOMETIC 3310423.209U Torsion Assembly
https://www.amazon.ca/Dometic-3310423209U-Drive-Assembly-Awning/dp/B07L3JF78D/ref=asc_df_B07L3JF78D/?tag=googleshopc0c-20&linkCode=df0&hvadid=347072134503&hvpos=&hvnetw=g&hvrand=3888389780963375681&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9001077&hvtargid=pla-843687300391&psc=1 After ripping it all open, I believe I can repair the existing motor. I cleaned off the commutator and brushes; but it looks like I need to replace the brushes.
The windings all look good. I tested the contacts on the commutator with a multimeter and all were good.
I ordered new brushes; but I'm pretty confident this will fix it.
** On a side note **
I can tell that this thing was made to fail - the components around the brushes are super cheap, and I can tell it won't last long. | {
"domain": "engineering.stackexchange",
"id": 4254,
"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": "motors",
"url": null
} |
optimization, nisq
I verified this circuit in Quirk using the channel-state duality and a known-good inverse.
If one had access to the sqrt-of-CNOT operation, the number of 2-qubit operations could be brought down to 13 by merging two CNOTs and three Ts in the bottom area into a controlled-S.
If CNOTs had an error rate of 0.5%, and all other sources of error were negligible, you could apply this circuit nearly ten times before reaching a 50% failure rate. Implying a plausible NISQ machine could "almost count to ten". | {
"domain": "quantumcomputing.stackexchange",
"id": 322,
"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": "optimization, nisq",
"url": null
} |
electromagnetism, waves, electromagnetic-radiation, visible-light
Title: Can Transverse electric and Transverse magnetic waves propagate in free space in general? I understand (from Feynman lectures) that in a rectangular waveguide multiple reflections from the boundary of the conducting walls gives rise to an interference-like pattern and hence they propagate with a dispersive phase constant. And only TE (transverse electric) and TM (tranverse magnetic) waves can be possible within the waveguide due to the boundary conditions.
But my doubt is:
what happens if the other end of the waveguide is left open and the waves can travel into free space? will the waves continue to travel as TE, TM waves or they change into TEM (tranverse electro magnetic waves)?
Do different frequencies have different phase constant?
It would be really helpful if I get this clarified. A waveguide terminating to free space is an aperture antenna. As with any antenna, the radiated waves in the far field (many wavelengths and aperture dimensions away from the aperture) propagate as TEM waves.
As Feynman also makes explicit, the phase constant is frequency dependent:
$$ \beta = k\sqrt{1-\omega_c^2/\omega^2}=\frac 1 c\sqrt{\omega^2-\omega_c^2} $$
$c$ is the propagation velocity and $\omega_c$ is the cutoff frequency, which depends on the mode and waveguide dimensions. | {
"domain": "physics.stackexchange",
"id": 87400,
"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, waves, electromagnetic-radiation, visible-light",
"url": null
} |
Here is a counterexample: Let $C$ be a category with just one object, $X$, and just one arrow, $1_X$.
Let $D$ be a category with just one object, $Y$, and two arrows: $\text{Hom}(Y,Y) = \{1_Y,f\}$, with composition defined so that $f\circ f = f$.
Now let $F$ be the "functor" (in quotes because it is not really a functor) sending $X$ to $Y$ and $1_X$ to $f$. $F$ preserves composition ($F(1_X\circ 1_X) = F(1_X) = f = f\circ f = F(1_X) \circ F(1_X)$), but it does not preserve identities.
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877709445759,
"lm_q1q2_score": 0.8109936463274053,
"lm_q2_score": 0.8354835309589074,
"openwebmath_perplexity": 214.7968157331556,
"openwebmath_score": 0.9789242744445801,
"tags": null,
"url": "http://math.stackexchange.com/questions/264642/does-the-functor-law-about-preserving-identity-follow-from-other-laws"
} |
laser, laser-interaction, laser-cavity
And what is the oscillator, in this case?
The oscillator is the whole system. Optical resonator and gain medium.
This causes emitted photons to hit the gain medium, (The emitted photons from the pump, I'd assume ...
I'm not sure about the context, but usually we consider the pump energy to be coming in to the laser from somewhere else. From the point of view of the laser, pump photons would be absorbed (i.e., the opposite of emitted) in order to put the active species in its excited state. Probably they were emitted by some source somewhere, but that's not part of the laser proper.
Emitted photons likely refers to photons emitted by spontaneous emission in the gain medium.
if we tilt a resonator, the photons don't gain properly. This causes emitted photons to hit the gain medium, ... and then not oscillate back.
Again, the "emitted photons" start in the gain medium. Anything you do to keep them from being able to make a round trip (or half round-trip) through the cavity and get back to trigger a stimulated emission would be considered a Q reduction.
It could be de-aligning the cavity. It could be closing a shutter in the beam path. It could be adding a switched absorbing material in the beam path. Or any number of other things.
This means less photons hit the gain, causing less stimulated emission and more electrons sitting at a lasing band, with their high decay time. So, without any incident photons, they're more likely to stay there. Then.. I suppose.. from adjusting the "Q value", by aligning the mirror perfectly and fast, we get that needed amount of incident photons, and that cluster of lasing band electrons all undergo stimulated emission in close to at the same time?
This is all pretty much correct. | {
"domain": "physics.stackexchange",
"id": 40033,
"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": "laser, laser-interaction, laser-cavity",
"url": null
} |
and more. Coin Toss: The Technique. Probability of Getting head in a first throw = ½ Flipping a coin second time is an independent event, so it will have the same probability as before = ½ Flipping a coin third time is also indep. The probability the pen is green is 1 4. The events are independent since each flip of the coin does not affect the outcome of the next flip. We compute the expected number of coin flips for the first run of k consecutive heads to appear. The gambler's fallacy can be illustrated by considering the repeated toss of a fair coin. For example, one possible sequence is (H,T,H,T), where you get heads followed by tails followed by heads followed by tails. The challenge is to find the. randint(0, 1) will return a 0 value 50% of the time and a 1 value the other 50% of the time. Find the probability of getting exactly two heads when flipping three coins. "); Exchanging coins (2-O. 5 and having 10 heads in a row is … read more. What is the expected number of coin flips for getting a head? Ans: Let the expected number of coin flips be x. 2 raised to the 5th power is 32, so you'd have a 1 out of 32 shot. DICE partners with industry leaders and creative innovators to bring fans an experience that is personalised and easy. The probability the pen is blue or red is 2 7 0. 1 By Malcolm W. To find H’s overall winning probability, we must average p and q, because either player goes first with probability 1/2. Coin Toss Probability Calculator is a free online tool that displays the probability of getting the head or a tail when the coin is tossed. 2676506 × 1030. Suppose a coin is tossed 6 times. A simple event results in just one outcome. MCEVERS: The chances of that - 1 in 2048. 3333% I think. for heads on second toss = 1/ 2 pr. Probability of flipping a coin 7 times and getting 10 heads in a row; Probability of getting 10 heads when flipping 7 coins together; A coin is tossed 7 times, find the probability that at least 10 are heads? If you flip a fair coin 7 times what is the probability that you will get exactly 10 heads?. A flip of a rule … a flip of a coin | {
"domain": "redgiant.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8114537180429797,
"lm_q2_score": 0.831143054132195,
"openwebmath_perplexity": 361.56865089685897,
"openwebmath_score": 0.7884907126426697,
"tags": null,
"url": "http://usbn.redgiant.it/coin-flip-odds-in-a-row.html"
} |
java, regex, formatting
Title: regular expression for telephone/mobile per country and variable naming would like to know if there is a better approach in doing a telephone/mobile number regular expression for specific country. this includes naming variables like how to know if format is international format (is it with + sign?), a national format (is it the area code enclosed in parenthesis) or a local format (no + sign, and no area code), currently they are labelled as country_name_telephone/country_name_mobile or country_name_telephone_N_digit, etc...
below are the regular expression for some country.
/** matches the following pattern:
* - 01-111-11-11
* - 01 111 11 11
* - 011-11-11-11
* - 011 11 11 11
* - 011111111
*/
public final static String CTRY_BELGIUM_TELEPHONE = "^0(\\d{8}|\\d\\s\\d{3}\\s\\d\\d\\s\\d\\d|\\d-\\d{3}-\\d\\d-\\d\\d|\\d\\d\\s\\d\\d\\s\\d\\d\\s\\d\\d|\\d\\d-\\d\\d-\\d\\d-\\d\\d)$";
/** matches the following pattern:
* - 0412-34-56-78
* - 0412 34 56 78
* - 0412-345-678
* - 0412 345 678
* - 0412345678
*/
public final static String CTRY_BELGIUM_MOBILE = "^04\\d\\d(\\d{6}|\\s\\d\\d\\s\\d\\d\\s\\d\\d|\\s\\d{3}\\s\\d{3}|-\\d\\d-\\d\\d-\\d\\d|-\\d{3}-\\d{3})$"; | {
"domain": "codereview.stackexchange",
"id": 24977,
"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, regex, formatting",
"url": null
} |
• Let $$p_n =$$ prob of no match in the original experiment, where we start with $$2n$$ total socks in $$n$$ pairs.
• Let $$q_n =$$ prob of no match in a modified experiment, where we start with $$2n$$ total socks in $$n-1$$ pairs plus $$2$$ extra socks that don't match any other (but we will call these two as "phantom pair").
Here's my attempt to write a $$1$$-dimensional recurrence using just the above:
Claim 1: $$p_n = {2n-2 \over 2n-1} q_{n-1}$$
Reason: Person $$1$$ has unmatched socks with prob $${2n-2 \over 2n-1}$$, and as far as the rest of the people, they have an experiment with $$2n-2$$ socks in $$n-2$$ pairs plus $$2$$ extras (the partners to whatever Person $$1$$ is holding).
Claim 2: $$q_n = p_n + {1 \over 2n-1} p_{n-1}$$
Reason: The event of $$q_n$$ can happen in two (disjoint) cases:
• The phantom pair is held by the same person: This happens with prob $${1 \over 2n-1}$$ and then for the event of $$q_n$$ to happen the remaining $$n-1$$ pairs must be mismatched, which happens with prob $$p_{n-1}$$.
• The phantom pair is held by two different people: All $$n$$ pairs, real or phantom, must be mismatched, which happens with prob $$p_n$$.
If my reasoning above is correct, then:
$$p_n = {2n-2 \over 2n-1} (p_{n-1} + {1 \over 2n-3} p_{n-2})$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232924970204,
"lm_q1q2_score": 0.8293997593561593,
"lm_q2_score": 0.8438950986284991,
"openwebmath_perplexity": 357.2889304760196,
"openwebmath_score": 0.8477510809898376,
"tags": null,
"url": "https://math.stackexchange.com/questions/3383678/probability-of-at-least-one-matching-pair-for-n-pairs-of-socks"
} |
ros, pr2-tabletop-manipulation-apps
Title: How to solve 'Tabletop detection returned error code 2'?
I follow pr2_tabletop_manipulation_apps.
I run
export ROBOT=sim
roslaunch pr2_gazebo pr2_empty_world.launch
roslaunch gazebo_worlds table.launch
roslaunch pr2_tabletop_manipulation_launch pr2_tabletop_manipulation.launch
I also run the source code of Writing a Simple Pick and Place Application
It shows:
sam@sam:~/code/ros/test/launch/pr2_pick_and_place_tutorial$ ./bin/t
[ INFO] [1334666827.188273982, 82.119000000]: Calling tabletop detector
[ERROR] [1334666827.711098626, 82.376000000]: Tabletop detection returned error code 2
sam@sam:~/code/ros/test/launch/pr2_pick_and_place_tutorial$
How to solve it?
Thank you~
Originally posted by sam on ROS Answers with karma: 2570 on 2012-04-17
Post score: 0
Original comments
Comment by aknirala on 2012-06-11:
hey sam, I am also facing the same problem, figured out a solution yet?
hey sam,
Hope you have got this working by now.
I was finally able to run this. I guess the issue over here is computation speed (I guess). As I made no other significant changes which have affected this. I didn't open rviz for the last time. I am using 2.93Ghz Quad core i3 processor,2GB RAM ,nVidia GeForce 9600M GT, ROS electric on Ubuntu 11.10
Make sure that stereo camera is able to see the table and object (cup) on it. The rviz should look sth like :
If it does not see the table on the pipeline terminal it will print: | {
"domain": "robotics.stackexchange",
"id": 9005,
"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, pr2-tabletop-manipulation-apps",
"url": null
} |
ros-melodic
...
void dijkstra(const nav_msgs::OccupancyGrid& map)
{
...
// use variable in global scope
pub.publish(poseArray);
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "dijkstra");
ros::NodeHandle n("~");
...
// initialise variable in global scope
pub = n.advertise<geometry_msgs::PoseArray>("/poseArray", 1);
...
ros::spin();
}
Originally posted by gvdhoorn with karma: 86574 on 2019-12-22
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by gvdhoorn on 2019-12-22:
PS: yes, this is software, so "never" is never really never, but if you're just starting out with all of this, you should really not do this.
Comment by Parth2851 on 2019-12-22:
This worked! thanks!
Comment by gvdhoorn on 2019-12-23:
For future readers: what worked, specifically?
Comment by Parth2851 on 2019-12-23:
Okay, yes. I made a publisher in mainand then I declared a global poseArray and then published it in a loop something like this -
while(ros::ok())
{
pose_array_pub.publish(pa);
} | {
"domain": "robotics.stackexchange",
"id": 34185,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-melodic",
"url": null
} |
# A combinatorial card problem
Suppose you have a standard bridge deck of 52 cards. We will say you "have a pair" if you have two consecutive cards in the deck with the same rank (2,3,4,5,6,7,8,9,10,J,Q,K,A). If a deck is randomly shuffled, what is the probability you have a pair in the deck?
I have been able to estimate this nicely using a simulation, but finding an analytical solution remains elusive.
-
Below I explain how to enumerate all decks without bad pairs explicitly. The exact number turns out to be $$3668033946384704437729512814619767610579526911188666362431432294400.$$ Dividing by $52!$, I get roughly $$0.045476282331.$$
We are going to write a recurrence relation for $f(H,k)$, which is the number of partial decks with $t$ cards appearing $H_t$ times, the last card making its $k$th appearance. The total number of decks is then $f((0,0,0,0,13),4)$.
The base case is $f((12,1,0,0,0),1) = 52$. Now suppose we're given some $H$ and $k$ such that $H_k \geq 1$. First form $H'$ by moving one "rank" from $k$ to $k-1$. Now for each $t \neq k - 1$, we can extend each of the $f(H_k,t)$ partial decks to a new deck in $H_k(k-1) \cdot (4-(k-1))$ ways. For $t = k-1$, we can extend the $f(H_k,k-1)$ partial decks in only $(H_k(k-1)-1) \cdot (4-(k-1))$ ways (since one rank is taken). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9688561730622296,
"lm_q1q2_score": 0.819596546797175,
"lm_q2_score": 0.8459424314825853,
"openwebmath_perplexity": 272.4519892005141,
"openwebmath_score": 0.920294463634491,
"tags": null,
"url": "http://math.stackexchange.com/questions/36991/a-combinatorial-card-problem/36994"
} |
4. You first need to recall that the tangent function is periodic, with a period of $\displaystyle 180^{\circ}$. So
\displaystyle \begin{align*}\tan{(3x+180)} &= \frac{3}{2} \\ 3x + 180 &= \tan^{-1}{\left(\frac{3}{2}\right)} + 180n \textrm{ where }n \in \mathbf{Z} \\ 3x &= \tan^{-1}{\left(\frac{3}{2}\right)} + 180n - 180 \\ x &= \frac{1}{3}\tan^{-1}{\left(\frac{3}{2}\right)} + 60n - 60\end{align*}
5. Okay, but how do I solve that for the x-intercepts?
6. Those ARE the x-intercepts.
7. Lol, I think I'm still lost.... so I just list x = tan^-1 (3/2) + 60n - 60 for the x-intercepts?? Does that account for all of them then? I can't use that equation to solve for and list specific intercepts?
8. ## Re: Solving for zeros of tan(x) function with transformation
Yes; all the x-intercepts would be given by $x = \tan^{-1}(3/2) + 60n - 60$, because remember, $n$ is any integer. So you would get a different solution for each different value of $n$.
To get specific x-intercepts, you would just need to specify what $n$ you are using. For example, $n = 2$ gives:
$x = \tan^{-1}(3/2) + 60(2) - 60 = tan^{-1}(3/2) + 60$.
I hope that this helps. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137900379085,
"lm_q1q2_score": 0.8051465600664244,
"lm_q2_score": 0.8198933337131076,
"openwebmath_perplexity": 700.5090678239783,
"openwebmath_score": 0.9968926906585693,
"tags": null,
"url": "http://mathhelpforum.com/trigonometry/182949-solving-zeros-tan-x-function-transformation.html"
} |
quantum-mechanics, energy
Title: Physical interpretation of negative total energy I am going through Griffith's text on Quantum Mechanics, in which he states
$$\begin{cases}
E < V(-\infty) \text{ and }V(\infty) \implies \text{bounded state}\\
E > V(-\infty) \text{ and }V(\infty) \implies \text{scattering state}
\end{cases}$$
where $E$ is the total energy of the particle. This makes sense. However, he notes that most potentials tend to 0 as you approach infinity, and so the above simplifies to
$$\begin{cases}
E < 0 \implies \text{bounded state}\\
E > 0 \implies \text{scattering state}
\end{cases}$$
This is where I am having some trouble with the physical interpretation. How can one have negative total energy? Can someone provide some intuition and maybe an example? The total energy can be negative because, away from infinity, the potential can be negative. If the total energy is negative, then regions with zero potential are unaccessible for the particle, since it can't have negative kinetic energy. That's why Griffiths calls that situation "bounded": the cases with negative energy are constrained to the region of space in which the potential is negative enough for the total energy to be whatever value it is while the kinetic energy is still non-negative.
Particles with positive total energy, on the other hand, won't have those restrictions at infinity (for potentials vanishing at infinity). Hence, they can keep going on forever, without being restricted to a finite region. That's why Griffiths calls this case scattering. | {
"domain": "physics.stackexchange",
"id": 88858,
"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, energy",
"url": null
} |
ros2, urdf, ros-humble, robot-state-publisher, errors
<link name="wheel2_1">
<inertial>
<origin xyz="4.6187777968942356e-07 -0.08499966189077818 2.1514828360547078e-07" rpy="0 0 0"/>
<mass value="24.630675452766535"/>
<inertia ixx="0.231272" iyy="0.343906" izz="0.231272" ixy="0.0" iyz="0.0" ixz="-0.0"/>
</inertial>
<visual>
<origin xyz="0.729843 0.447031 -0.156291" rpy="0 0 0"/>
<geometry>
<mesh filename="file://$(find mars_description)/meshes/wheel2_1.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="silver"/>
</visual>
<collision>
<origin xyz="0.729843 0.447031 -0.156291" rpy="0 0 0"/>
<geometry>
<mesh filename="file://$(find mars_description)/meshes/wheel2_1.stl" scale="0.001 0.001 0.001"/>
</geometry>
</collision>
</link> | {
"domain": "robotics.stackexchange",
"id": 38862,
"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": "ros2, urdf, ros-humble, robot-state-publisher, errors",
"url": null
} |
c++, game-of-life
for(auto const & cell : kill_set){
m_live_cells.erase(cell);
}
for(auto const & cell : born_set){
m_live_cells.insert(cell);
}
}
[[nodiscard]]
std::unordered_set<Position> const & get_live_cells() const noexcept {
return m_live_cells;
}
void add_cell(Position position){
m_live_cells.insert(position);
}
void remove_cell(Position position){
m_live_cells.erase(position);
}
[[nodiscard]]
bool should_die(Position const & position) const noexcept {
auto const neighbors = get_neigbhors(position);
auto num_alive_neighbors = std::count_if(
cbegin(neighbors), cend(neighbors),
[&](auto const & neighbor) { return m_live_cells.count(neighbor); }
);
return num_alive_neighbors < 2 || num_alive_neighbors > 3;
}
[[nodiscard]]
bool should_be_born(Position const & position) const noexcept {
auto const neighbors = get_neigbhors(position);
auto num_alive_neighbors = std::count_if(
cbegin(neighbors), cend(neighbors),
[&](auto const & neighbor) { return m_live_cells.count(neighbor); }
);
return num_alive_neighbors == 3;
}
std::unordered_set<Position> m_live_cells;
};
// ------------ ui.h ---------------------- //
#include <SFML/Graphics.hpp> | {
"domain": "codereview.stackexchange",
"id": 45265,
"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-of-life",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.