text:
Probability of rolling a value a certain number of times in a certain number of rolls

I am familiar with the formula to calculate the probability of rolling a certain number at least once given $x$ rolls of a die with $y$ sides, that is:

$$P_1(x, y) = 1 - \left(1 - \frac{1}{y}\right)^x$$

where the subscript $1$ indicates that the number should be rolled at least once. For example, the chance of rolling a 6 in 6 rolls of a D6 would be $P_1(6, 6) = 1 - \left(1 - \frac{1}{6}\right)^6 \approx 0.665$.

This got me thinking what the probability would be to roll a number at least $n$ times given the same die conditions. I manually worked out the probability for n = 2:

$$P_2(x, y) = \frac{x}{y}-\left(1 - \left(1 - \frac{1}{y}\right)^x\right)$$

This does work even if only two dice are rolled, in which case the probability should simply be $(\frac{1}{y})^2$, and it is. For a D20, $P_2(2, 20) = (\frac{1}{20})^2 = \frac{1}{400}$.

After that I tried to figure out how to represent $P_3(x, y)$ but unfortunately I was unable to do so. Previously, I was effectively considering a binomial coefficient in geometric terms. Using $P_n(3, y)$ as an example and looking for rolls of 20 for simplicity's sake, I considered a cube of side length $y$ divided into $y^3$ unit cubes. For $P_1$ I took the face cubes, subtracted the edge cubes, and added back the corner to give me the number of rolls in which a 20 appeared. For $P_2$, the formula was edge cubes $-$ corner for all rolls in which two 20s appeared. I know this all involves binomial coefficient, but I never really took a proper stats class so my knowledge of its application is somewhat limited. To find a general case for $P_3$, I would have to consider a 4-cube which I tried and failed.

I'm sure this could be done easily using binomial coefficient, but that's sort of why I'm asking about this. I'm fairly sure that my expression for $P_2$ only has that extra $\frac{x}{y}$ term because $\binom{3}{1}$ and $\binom{3}{2}$ happen to equal 3 and therefore could be algebraically reorganized.

My question is this: Is there a general case formula for $P_n(x, y)$ that represents the probability of rolling a number $n$ times given $x$ rolls of a $y$-sided die. Additionally, would said formula be different if the requirement was to roll one number $n_1$ times and another number $n_2$ times and so on? Is there a different general case for $P_{{n_1}, {n_2}, ...}(x, y)$?

You’ve asked several questions here. I’ll address the first one: finding the probability of getting some number at least $x$ times in $n$ rolls. You’re basically asking about the cumulative distribution function of the Binomial distribution.
For a random variable $X$, the c.d.f. of its distribution gives the probability $\Pr(X\le x)=F(x)$. The parameter $x$ is usually taken to be a real number. For a discrete random variable, the c.d.f. can be simply expressed by a sum of values of its p.d.f. (probability distribution function a.k.a. probability mass function): assuming that $X$ can take on positive integral values, $$F(x)=\sum_{k=0}^{\lfloor x\rfloor}\Pr(X=k).$$ ($\lfloor x\rfloor$ stands for the floor of $x$, the greatest integer less than or equal to $x$).
As you suspected, binomial coefficients are involved in die roll probabilities. When looking for some specific single value to come up, each die roll can be viewed as an independent success/failure (“Bernoulli”) trial with a uniform probability $p$ of success. To reduce clutter, its common to use $q=1-p$ for the probability of a failure in these calculations. In the following, let $X$ be a random variable that counts the number of successes. The probability of exactly $k$ successes in $n$ trials is pretty easy to compute: The probability that the first $k$ trials are successes and the rest failures is obviously $p^kq^{n-k}$. There are $\binom nk$ possible sequences of $k$ successes and $n-k$ failures, so $\Pr(X=k)=\binom nkp^kq^{n-k}$, as described in G Cab’s answer. The probability of at most $k$ successes is then $$\Pr(X\le k)=\sum_{i=0}^{\lfloor k\rfloor}\binom nip^kq^{n-i}.$$ As G Cab mentions, partial sums of binomial coefficients don’t usually have a nice closed form, but in this case, there is an expression of this sum as an integral: $$\Pr(X\le k)=(n-k)\binom nk\int_0^qt^{n-k-1}(1-t)^k\,dt$$ (see the article on the Binomial distribution that I linked at top for more details.) For large numbers of dice, a normal approximation to this value can be cheaper/easier to compute.
If you go for exactly $n$ times, then it is easy: ${x \choose n}$ to place the $n$ yes in a sequence of $x$ yes+no, each with prob. $(1/y)^n((y-1)/y)^{x-n}$.
Unfortunately there is no closed formula for a truncated binomial, which is what you get when summing for $n$.


text:
# Distinguish SAP ABAP code between clients

SAP HANASAPSAP Basis

You can use field “sy-mandt” to identify the client and then accomplish your requirement by doing something like below −

IF sy-mandt = '002'.
*do something for Client one
ELSE.
* do something for client two
ENDIF

This field is included in almost all the tables which are client dependent so you can freely use this to fulfill your requirement.

Published on 18-Dec-2017 13:06:40

format: plain


text:
Hilbert Curve - JavaLab

# Hilbert Curve

A Hilbert curve is a continuous fractal space-filling curve first described by the German mathematician David Hilbert in 1891.

## Fractal's self-similarity

Fractal curves retain their original shape even if they are greatly enlarged. Most fractal curves produce the same transformation over and over on smaller and smaller scales.
The property of maintaining the original shape even when the scale changes are called 'self-similarity.'
Self-similarity is easily found around us.

## An example of self-similarity

For most coastlines, it isn't easy to know whether the coastline is enlarged or reduced without other comparisons.
If you stand between the two mirrors installed inside the elevator, you can see my image getting smaller and smaller by infinite reflection.
A slice of broccoli cut out completely resembles the original large broccoli.


text:
# How can I protect a sensitive Component from voltage spikes?

I have some Deep UV LEDs that are about 100$a piece. They are Very sensitive to voltage spikes, a nano-second spike could destroy one. I am building a USB powered Device with a battery, and I'm concerned that even plugging in the USB device, or turning on the battery could destroy the LEDs. I need to clamp the source current at 20ma. What can I do to protect these LEDs? This is the Part ## 2 Answers They are not all that sensitive to forward current - 1% duty cycle 200mA. Reverse voltage is more of a problem with this kind of LED, as I understand it, so any kind of silicon diode across the LED will keep it within the -6V limit. You could use a 1N4148, for example. The diode will not limit the LED current- to do that you would have to add a limiting circuit in series. It's possible to do this but probably not worthwhile, depending on what you are using to control the current. For example, if you are using a resistor it's unlikely to go short. If you are using a current regulator circuit you can add a series resistor so the current regulator is limited in the damage it can do. • Im going to look at all the options I can, we cannot afford to blow any more 100$ LEDs. – j0h Nov 11 '16 at 18:10
• "more"? Ouch. Be sure to use ESD precautions with UVLEDs. – Spehro Pefhany Nov 11 '16 at 19:05

You can consider using a TVS (transient-voltage-suppression) diodes. TVS diodes are placed from the point that you want to protect to ground. Basically, when the voltage is high enough, and you should decide what is the voltage level that you want to protect, the diodes begin conducting, but most often in opposite direction, i.e. they are reversed polarized. That is why they don't conduct during normal operating conditions. For more information see Zener diode.

They are often used for sensitive ICs to protect against electrostatic discharge, and they're really cheap as well.

• Would I put one in parallel to the LED? I'll look into that! – j0h Nov 10 '16 at 19:13
• I extended my answer with more detailed explanation. Basically, you put TVS diode from a point that you want to protect, to the ground. – Marko Nov 10 '16 at 19:19


text:
# American Institute of Mathematical Sciences

February  2019, 39(2): 995-1017. doi: 10.3934/dcds.2019041

## Topological entropy of free semigroup actions for noncompact sets

 1 School of Mathematics, South China University of Technology, Guangzhou 510641, China 2 School of Computer Science and Engineering, South China University of Technology, Guangzhou 510641, China

* Corresponding author: Dongkui Ma

Received  March 2018 Revised  August 2018 Published  November 2018

Fund Project: Project supported by National Natural Science Foundation of China grant no.11771149, 11671149.

In this paper we introduce the topological entropy and lower and upper capacity topological entropies of a free semigroup action, which extends the notion of the topological entropy of a free semigroup action defined by Bufetov [10], by using the Carathéodory-Pesin structure (C-P structure). We provide some properties of these notions and give three main results. The first is the relationship between the upper capacity topological entropy of a skew-product transformation and the upper capacity topological entropy of a free semigroup action with respect to arbitrary subset. The second are a lower and a upper estimations of the topological entropy of a free semigroup action by local entropies. The third is that for any free semigroup action with $m$ generators of Lipschitz maps, topological entropy for any subset is upper bounded by the Hausdorff dimension of the subset multiplied by the maximum logarithm of the Lipschitz constants. The results of this paper generalize results of Bufetov [10], Ma et al. [26], and Misiurewicz [27].

Citation: Yujun Ju, Dongkui Ma, Yupan Wang. Topological entropy of free semigroup actions for noncompact sets. Discrete & Continuous Dynamical Systems - A, 2019, 39 (2) : 995-1017. doi: 10.3934/dcds.2019041
##### References:

show all references

##### References:
 [1] Mark F. Demers. Uniqueness and exponential mixing for the measure of maximal entropy for piecewise hyperbolic maps. Discrete & Continuous Dynamical Systems - A, 2021, 41 (1) : 217-256. doi: 10.3934/dcds.2020217 [2] Xiyou Cheng, Zhitao Zhang. Structure of positive solutions to a class of Schrödinger systems. Discrete & Continuous Dynamical Systems - S, 2020  doi: 10.3934/dcdss.2020461 [3] Tian Ma, Shouhong Wang. Topological phase transition III: Solar surface eruptions and sunspots. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020350 [4] Hua Qiu, Zheng-An Yao. The regularized Boussinesq equations with partial dissipations in dimension two. Electronic Research Archive, 2020, 28 (4) : 1375-1393. doi: 10.3934/era.2020073 [5] João Marcos do Ó, Bruno Ribeiro, Bernhard Ruf. Hamiltonian elliptic systems in dimension two with arbitrary and double exponential growth conditions. Discrete & Continuous Dynamical Systems - A, 2021, 41 (1) : 277-296. doi: 10.3934/dcds.2020138 [6] Thierry Cazenave, Ivan Naumkin. Local smooth solutions of the nonlinear Klein-gordon equation. Discrete & Continuous Dynamical Systems - S, 2020  doi: 10.3934/dcdss.2020448 [7] Xin-Guang Yang, Lu Li, Xingjie Yan, Ling Ding. The structure and stability of pullback attractors for 3D Brinkman-Forchheimer equation with delay. Electronic Research Archive, 2020, 28 (4) : 1395-1418. doi: 10.3934/era.2020074 [8] Leilei Wei, Yinnian He. A fully discrete local discontinuous Galerkin method with the generalized numerical flux to solve the tempered fractional reaction-diffusion equation. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020319 [9] Annegret Glitzky, Matthias Liero, Grigor Nika. Dimension reduction of thermistor models for large-area organic light-emitting diodes. Discrete & Continuous Dynamical Systems - S, 2020  doi: 10.3934/dcdss.2020460 [10] Xavier Carvajal, Liliana Esquivel, Raphael Santos. On local well-posedness and ill-posedness results for a coupled system of mkdv type equations. Discrete & Continuous Dynamical Systems - A, 2020  doi: 10.3934/dcds.2020382 [11] Yichen Zhang, Meiqiang Feng. A coupled $p$-Laplacian elliptic system: Existence, uniqueness and asymptotic behavior. Electronic Research Archive, 2020, 28 (4) : 1419-1438. doi: 10.3934/era.2020075 [12] Lihong Zhang, Wenwen Hou, Bashir Ahmad, Guotao Wang. Radial symmetry for logarithmic Choquard equation involving a generalized tempered fractional $p$-Laplacian. Discrete & Continuous Dynamical Systems - S, 2020  doi: 10.3934/dcdss.2020445 [13] Mokhtar Bouloudene, Manar A. Alqudah, Fahd Jarad, Yassine Adjabi, Thabet Abdeljawad. Nonlinear singular $p$ -Laplacian boundary value problems in the frame of conformable derivative. Discrete & Continuous Dynamical Systems - S, 2020  doi: 10.3934/dcdss.2020442 [14] Lei Liu, Li Wu. Multiplicity of closed characteristics on $P$-symmetric compact convex hypersurfaces in $\mathbb{R}^{2n}$. Discrete & Continuous Dynamical Systems - A, 2020  doi: 10.3934/dcds.2020378

2019 Impact Factor: 1.338


text:
# Sequences word problems

Given a verbal description of a real-world relationship, determine the sequence that models that relationship.
You might need: Calculator

### Problem

Fenyang got 6 rabbits to raise on his farm. From the following month forward, the rabbit population doubled every month.
Let n be a positive integer, and let g, left parenthesis, n, right parenthesis denote the number of rabbits in Fenyang's farm in the n, start superscript, t, h, end superscript month since he got the rabbits.
The expression g, left parenthesis, n, right parenthesis defines a sequence. What kind of sequence is g, left parenthesis, n, right parenthesis?
Please choose from one of the following options.
Depending on your answer to the question above, the recursive definition of the sequence can have one of the two following forms:
ArithmeticGeometric
What are the values of the parameters A and B for this sequence?
space, A, equals, space
space, B, equals, space


text:
Question
Mon June 04, 2012 By: Priyankar

# why is the power of 10 is not taken in significant figures?

Tue June 05, 2012

how to write a measurement of 50 cm in accordance with rule 5, so that it has decimal point to indicate that zeros are significant. We make use of scientific notation, which expresses a value in the powers of 10. Hence, we write different experiment values as given here,

50 cm=5.0X10 1  cm

This representation shows that the value has two significant figures. Similarly, consider measurements of 500 cm and 3240 cm as measured by an instrument. Our representation is required to reflect that these values have "3" and "4" significant figures respectively. We do this by representing them in scientific notation as :

500cm=5.00X102cm

3240cm=3.240X102cm

In this manner, we maintain the number of significant numbers, in case measurement value involves trailing zeros.

Related Questions
Thu May 25, 2017

Thu May 25, 2017

Home Work Help


text:
# Simple Pivot Tool

This Simple Pivot Tool was developed by Robert Vanderbei at Princeton University to solve linear programming (LP) problems. The given tableau is for an LP with a maximization objective:
$\begin{array}{llcl} \text{max} & \zeta & = & p^T x \\ \text{s.t.} & Ax & \leq & b \\ & x & \geq & 0 \end{array}$

or equivalently

$\begin{array}{llcl} \text{max} & \zeta & = & p^T x\\ \text{s.t.} & w & = & b-Ax \\ & w & \geq & 0 \\ & x & \geq & 0 \end{array}$

## Solve a Linear Programming Problem

Current Dictionary:

#### Set up an instance

By default, problems are assumed to have four variables and three constraints. To solve a problem of a different size, edit the two text fields to specify the number of rows and the number of columns you want. You can click on Generate Random Problem to quickly get a random problem or you can enter data elements into each text field to define a specific problem.

#### Select options

• Seed: The seed value controls how random problems are generated. With the default value of zero, the random number generator is seeded according to the system clock. Specifying a nonzero seed value gives random problems that can be repeated by starting over with the same seed value.
• Labels: The labels menu allows you to select the labels for the variable names, making it easy to set up some standard variants of the simplex method. If the dual labels are chosen and the seed value is nonzero, then the matrix entries will be the negative transpose of the values one would get with primal labels.
• Variable Names: The variable names are editable. To change the name of one of the xj‘s, just click on it as it appears in the objective function. Similarly, to change the name of a slack variable, wi, just click on the variable as it appears on the left side of its defining equation.

#### Complete the pivots

1. Select a column with a positive coefficient in the $$\zeta$$ row as the pivot column.
2. For each row in the pivot column, calculate the ratio: divide the value of the right-hand side ($$b$$) by the coefficient of the pivot column element. Do this computation only for terms in the row with positive coefficients.
3. Select the row with the smallest ratio as the pivot row. To make the pivot, click on the corresponding variable button in the tool.
4. Continue the steps until all of the coefficients of the non-basic variables are less than or equal to zero. Primal infeasible right-hand side coefficients are highlighted in fuscia (after the first pivot) as are dual infeasible cost coefficients. When all of the fuscia cells are gone, the dictionary is optimal.
5. Unboundedness occurs when a pivot column exists but there is no corresponding pivot row. Infeasibility occurs when a basic variable is assigned a negative value.


text:
# Holomorphic function on Upper Half Plane must be rational

Let $f$ be holomorphic on the upper half plane and continuous on $\mathbb{R}$, with $|f(r)|=1$ for all $r\in\mathbb{R}$. Prove that $f$ is rational.

I was playing around with conformal maps and $\overline{f(\bar{z})}$, but I would really like a hint on how exactly "rationality" comes up. I'm guessing Schwarz Lemma is involved?

-
how about $e^{ix}$? It doesn't look very rational. – user8268 May 2 '11 at 16:01
e^{ix} is not holomorphic on the upper half plane. – ergo May 2 '11 at 16:35
but it's the composition of two holomorphic functions? – quanta May 2 '11 at 16:37
@ergo: user8268 means $f(z) = e^{iz}$. – Robert Israel May 2 '11 at 16:42
Note that a rational function holomorphic on the upper half plane and such that $|f(r)|=1$ for all $r\in\mathbb{R}$ is a product of $z \mapsto (z-\alpha)/(z-\bar{\alpha})$ for $\alpha$ in the upper half plane. – Plop May 2 '11 at 19:33

I think you also want $\lim_{r \to +\infty} f(r)$ and $\lim_{r \to -\infty} f(r)$ to exist and be equal. Schwarz Reflection principle shows $f$ is meromorphic on $\mathbb C$ with $f(\overline{z}) = 1/\overline{f(z)}$. Same applies to $f(1/z)$. So $f$ is an analytic function from the Riemann sphere to itself, and such functions are rational.
Isn't it necessary that $f(r)\in\mathbb{R}$ for all $r\in\mathbb{R}$ in order to apply the Schwarz Reflection principle? – ergo May 2 '11 at 16:46
@ergo: you can compose $f$ with the inverse of the Cayley transform $z \mapsto \frac{z-i}{z+i}$, then apply the reflection principle you know and then transform back. – t.b. May 2 '11 at 16:51
@Theo letting $\varphi(z)=\frac{i(z+1)}{z-1}$ (the inverse of the Cayley transform), for $f \circ \varphi$ to be holomorphic we need $f(z) \neq 1$ for all $z$, and that is not true in general. I think an ad hoc version of the Schwarz reflection principle is needed here (to allow meromorphic functions). – Plop May 2 '11 at 19:06
@Robert why don't we need the stronger condition that $\lim_{|z| \rightarrow + \infty} f(z)$ exists? – Plop May 2 '11 at 19:09
@Plop: Right, I should have formulated this a bit more carefully. But you can simply exclude the discrete set of points that are mapped to one. The Schwarz reflection principle applies to all sets $U$ that are open in the closed upper half plane and only take real values on $U \cap \mathbb{R}$. – t.b. May 2 '11 at 19:19


text:
?

Free Version
Moderate

# Circles: Find the Measure of the Inscribed Angle

GEOM-PIW@N5

Find the measure of $\angle{ABC}$ in $\bigodot D$.

A

$268^{\circ}$

B

$134^{\circ}$

C

$67^{\circ}$

D

$47^{\circ}$


text:
# Angular momentum

1. Mar 13, 2005

### UrbanXrisis

The problem is here.

I got a different answer from what my book tells me and I want to know why. Angular momentum is:
$$L=I \omega$$
So... the moment of inertia for the block would be:
$$I=((M+m)l^2)$$
since the rod has negligible mass, it will not have a moment of inertia.
$$\omega=v/r=v/l$$
$$L=\frac{(M+m)l^2v}{l}$$
$$L=vlM+vlm$$

my text gives an answer of $$L=mvl$$
I dont understand what I misunderstood

Last edited: Mar 13, 2005
2. Mar 13, 2005

### SpaceTiger

Staff Emeritus
Try again without assuming that the block/bullet combination are moving at the same speed as the original bullet. You'll need to consider conservation of linear momentum.


text:
1. Dec 8, 2003

### tristan_fc

I've been struggling with this problem for an hour or so now, and can't seem to find the right answer. Perhaps someone here can help? I would be very grateful. ;)

Two moles of an ideal gas ( = 1.40) expands slowly and adiabatically from a pressure of 5.09 atm and a volume of 12.7 L to a final volume of 30.0 L.

I had to find this stuff first, and I know I have all of it right.

final pressure: 1.528
initial temp: 393.5K
final temp: 279

Find Q, W, dEint.

I know Q is 0, and I know that Work and change in internal Energy are the opposite of eachother, but I can't seem to find the right value for them. I thought work = nRdT, which in this case is:

2*.08214*(393.5-279)=1902.9

However, that answer is wrong according to webassign. There is also a problem in my text book that is the same, except with different numbers, and i tried that one and got it wrong too. Anyone know what I'm doing wrong? Your help is greatly appreciated. :)

2. Dec 8, 2003

### himanshu121

Formula for work done in adiabatic process is wrong

3. Dec 8, 2003

### tristan_fc

so what is the proper formula? The textbook goes through a proof of why PV^y is constanst, but doesn't really go any further from that... I'm guessing that's somehow incorperated into the formula...

4. Dec 8, 2003

### himanshu121

Write the differential equation for for work done for gas
i.e
dW=PdV

Note $$PV^\gamma= K$$

substitute P from above in workdone equation and calculate the work done by taking limits from V1 to v2

5. Dec 8, 2003

### tristan_fc

eh... P from above what? P is not constant.

6. Dec 8, 2003

### himanshu121

Refining it
$$dW=kV^-^\gamma dV$$

I hope u will got it now

Last edited: Dec 8, 2003
7. Dec 8, 2003

### tristan_fc

Okay, I thought maybe that's what you meant, but I'm sorry I don't see what good that does if I don't know what k is. Maybe I'm just slow tonight as I only got about 4 hours of sleep last night and am rather tired... Sorry. [zz)]

Ah well, it was due at midnight. So I'll just ask my teacher how to do it tomorrow...

Last edited: Dec 8, 2003
8. Dec 8, 2003

### himanshu121

k is a constant which is given by

$$PV^\gamma= k$$

$$P_iV_i^\gamma = P_fV_f^\gamma= k$$

Last edited: Dec 8, 2003
9. Dec 10, 2003

### tristan_fc

Oh duh. Sorry, I guess I was just really tired last night. ;) Anyway thanks for the help.


text:
In this project, we'll look at 20,000 rows of the jeopardy dataset in "jeopardy.csv". We want to see if there are patterns in the questions asked so we can get a little bit of an edge to win.

First, we'll have to tidy up the data.

In [1]:
import pandas as pd
import matplotlib.pyplot as plt

Out[1]:
Show Number Air Date Round Category Value Question Answer
0 4680 2004-12-31 Jeopardy! HISTORY $200 For the last 8 years of his life, Galileo was ... Copernicus 1 4680 2004-12-31 Jeopardy! ESPN's TOP 10 ALL-TIME ATHLETES$200 No. 2: 1912 Olympian; football star at Carlisl... Jim Thorpe
2 4680 2004-12-31 Jeopardy! EVERYBODY TALKS ABOUT IT... $200 The city of Yuma in this state has a record av... Arizona 3 4680 2004-12-31 Jeopardy! THE COMPANY LINE$200 In 1963, live on "The Art Linkletter Show", th... McDonald's
4 4680 2004-12-31 Jeopardy! EPITAPHS & TRIBUTES $200 Signer of the Dec. of Indep., framer of the Co... John Adams In [2]: print(jeopardy.columns)  Index(['Show Number', ' Air Date', ' Round', ' Category', ' Value', ' Question', ' Answer'], dtype='object')  Looks like there is a space after each column name, we can fix this pretty easily with the .columns() method. In [3]: jeopardy.columns = ['Show Number', 'Air Date', 'Round', 'Category', 'Value', 'Question', 'Answer'] jeopardy.columns  Out[3]: Index(['Show Number', 'Air Date', 'Round', 'Category', 'Value', 'Question', 'Answer'], dtype='object') Next, let's make all the strings in the question and answer columns lower case. We can do write a function and then use the .apply() method. We also want to remove all the punctuations, the goal is to have the "Question" and "Answer" columns down to just words. In [4]: import re def lowercase_no_punct(string): lower = string.lower() punremoved = re.sub('[^A-Za-z0-9\s]','', lower) return punremoved  In [5]: jeopardy['clean_question'] = jeopardy['Question'].apply(lowercase_no_punct) jeopardy['clean_answer'] = jeopardy['Answer'].apply(lowercase_no_punct)  The "Value" column is usually a dollar sign followed by a number. However, this is currently in a string format. We should conver tthis to an integer and remove the dollar sign. In [6]: def punremovandtoint(string): punremoved = re.sub('[^A-Za-z0-9\s]','', string) try: integer = int(punremoved) except Exception: integer = 0 return integer  In [7]: jeopardy['clean_values'] = jeopardy['Value'].apply(punremovandtoint)  We'll have to convert the values in the "Air Date" column into a datetime object In [8]: jeopardy['Air Date'] = pd.to_datetime(jeopardy['Air Date'])  Let's see what our table currently looks like In [9]: jeopardy.head()  Out[9]: Show Number Air Date Round Category Value Question Answer clean_question clean_answer clean_values 0 4680 2004-12-31 Jeopardy! HISTORY$200 For the last 8 years of his life, Galileo was ... Copernicus for the last 8 years of his life galileo was u... copernicus 200
1 4680 2004-12-31 Jeopardy! ESPN's TOP 10 ALL-TIME ATHLETES $200 No. 2: 1912 Olympian; football star at Carlisl... Jim Thorpe no 2 1912 olympian football star at carlisle i... jim thorpe 200 2 4680 2004-12-31 Jeopardy! EVERYBODY TALKS ABOUT IT...$200 The city of Yuma in this state has a record av... Arizona the city of yuma in this state has a record av... arizona 200
3 4680 2004-12-31 Jeopardy! THE COMPANY LINE $200 In 1963, live on "The Art Linkletter Show", th... McDonald's in 1963 live on the art linkletter show this c... mcdonalds 200 4 4680 2004-12-31 Jeopardy! EPITAPHS & TRIBUTES$200 Signer of the Dec. of Indep., framer of the Co... John Adams signer of the dec of indep framer of the const... john adams 200

Now that the data is cleaned, we can start analyzing it.

Suppose we are interested in the number of words in the answer that occurs in the question. We'll create a function and use the .apply() method to create a new column. This column will have ratio of matching question words to total answer words.

In [10]:
def cleaner(series):
split_question = series['clean_question'].split(' ')
match_count = 0
return 0
if item in split_question:
match_count +=1

In [11]:
jeopardy['answer_in_question'] = jeopardy.apply(cleaner, axis=1)

Out[11]:
0.060493257069335872

It looks like the answer only appears in the question 6% of the time, so this is not a super reliable strategy.

Next, we'll look at words used in the questions column. We can write a function to see how often they repeat

In [12]:
question_overlap = []
#a python set is an unordered list of items
terms_used = set()
for idx, row in jeopardy.iterrows():
split_question = row['clean_question'].split(" ")
match_count = 0
newlist = []
for word in split_question:
if len(word) >= 6:
newlist.append(word)
for word in newlist:
if word in terms_used:
match_count += 1
for word in newlist:
if len(newlist) > 0:
match_count = match_count/len(newlist)
question_overlap.append(match_count)

jeopardy['question_overlap'] = question_overlap

In [13]:
jeopardy['question_overlap'].mean()

Out[13]:
0.69087373156719623

There is a 69% overlap of words between new questions and old ones. However words can be put together as different phases with a big difference in meaning. So this huge overlap is not super significant.

Let's take a look at the number of questions that are > 800 dollars. Maybe it is a good idea to only study high value questions.

In [14]:
def highvalue(row):
value = 0
if row['clean_values'] > 800:
value = 1
return value

jeopardy['high_value'] = jeopardy.apply(highvalue, axis =1)

In [15]:
high_value_count = jeopardy[jeopardy['high_value'] == 1].shape[0]
low_value_count = jeopardy[jeopardy['high_value'] == 0].shape[0]

In [16]:
print(high_value_count)
low_value_count

5734

Out[16]:
14265

It doesnt look like there are that many high value questions in the dataset.

We can create a function that takes in a word, then return the # of high/low values questions this word showed up in. Maybe this will help us study.

In [17]:
def highlowcounts(word):
low_count = 0
high_count = 0
for idx, row in jeopardy.iterrows():
if word in row['clean_question'].split(' '):
if row["high_value"] == 1:
high_count += 1
else:
low_count += 1
return high_count, low_count

In [18]:
observed_expected = []
comparison_terms = list(terms_used)[:5]
comparison_terms

Out[18]:
['emigrated', 'ruffles', 'waterworld', 'mussorgsky', 'appendages']
In [19]:
for term in comparison_terms:
observed_expected.append(highlowcounts(term))

observed_expected

Out[19]:
[(1, 0), (0, 2), (1, 0), (1, 1), (1, 2)]

We can use the chi squared test to see if the values of the terms in "comparsion_terms" are statiscally significant.

In [20]:
chi_squared =[]
from scipy.stats import chisquare
import numpy as np
for lists in observed_expected:
total = sum(lists)
total_prop = total/jeopardy.shape[0]
expected_high = total_prop * high_value_count
expected_low = total_prop * low_value_count
observed = np.array([lists[0], lists[1]])
expected = np.array([expected_high, expected_low])
chi_squared.append(chisquare(observed, expected))

In [21]:
chi_squared

Out[21]:
[Power_divergenceResult(statistic=2.4877921171956752, pvalue=0.11473257634454047),
Power_divergenceResult(statistic=0.80392569225376798, pvalue=0.36992223780795708),
Power_divergenceResult(statistic=2.4877921171956752, pvalue=0.11473257634454047),
Power_divergenceResult(statistic=0.44487748166127949, pvalue=0.50477764875459963),
Power_divergenceResult(statistic=0.031881167234403623, pvalue=0.85828871632352932)]

None of the p values are less than 0.05 so this is not statiscally significant.

#### Learning Summary¶

Python concepts explored: pandas, matplotlib, data cleaning, string manipulation, chi squared test, regex, try/except

Python functions and methods used: .columns, .lower(), .sub(), .apply(), sum(), .array(), .split(), .shape, .mean(), .iterrows(), .remove(), .add(), .append()

The files used for this project can be found in my GitHub repository.


text:
Marco Bertolini Conseil et Formation

List Style Examples

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit.

List Style One

• It is a long established fact that a reader.
• On the other hand, we denounce.
• Lorem Ipsum has been the industry.
• Well Documented
Lorem ipsum dolor sit amet.
• Sed ut perspiciatis unde omnis iste natus.

List Style Two

• It is a long established fact that a reader.
• On the other hand, we denounce.
• Lorem Ipsum has been the industry.
• Well Documented
Lorem ipsum dolor sit amet.
• Sed ut perspiciatis unde omnis iste natus.

List Style Three

• It is a long established fact that a reader.
• On the other hand, we denounce.
• Lorem Ipsum has been the industry.
• Well Documented
Lorem ipsum dolor sit amet.
• Sed ut perspiciatis unde omnis iste natus.

List Style Four

• It is a long established fact that a reader.
• On the other hand, we denounce.
• Lorem Ipsum has been the industry.
• Well Documented
Lorem ipsum dolor sit amet.
• Sed ut perspiciatis unde omnis iste natus.


text:
# install.ps1 addition of project references to assemblies not in the gac

 robertob Aug 19, 2011 at 2:23 PM Edited Aug 19, 2011 at 2:25 PM I have a web projects related nuget package where my install.ps1 contains the following two entries. $project.Object.References.Add("$env:programfiles\Windows Azure SDK\v1.4\ref\Microsoft.WindowsAzure.Diagnostics"); $project.Object.References.Add("$env:programfiles\Windows Azure SDK\v1.4\ref\Microsoft.WindowsAzure.ServiceRuntime");  q1 - when i install the package these assembly references are not getting added, am i overlooking how to accomplish adding project references to assemblies not in the gac? q2 - from the package manager console is there a way to create the variable $project so i can debug/test things like this outside of the nuget package installation process? q3 - similarly from a powershell console is there a way to create the variable$project so i can debug/test my .\Tools\install.ps1 routines outside of the nuget package installation process? Haacked Coordinator Aug 19, 2011 at 4:21 PM a1 - If these are framework assemblies you’re adding, use the node. http://docs.nuget.org/docs/reference/nuspec-reference#Specifying_Framework_Assembly_References_(GAC) a2 - $project = Get-Project ProjectName a3 – From a standard PowerShell console, there is, but it’s not easy. You’d need to get a handle on the running Visual Studio instance.$project points to a DTE project which is part of the Visual Studio object model. robertob Aug 19, 2011 at 4:47 PM Wrt a1 these are not framework assemblies if by that you mean .net framework assemblies.   They are assemblies installed by the current windows azure sdk and they do not show up in the  | references | add | .net view, you add them using | references | add | browse | and then select them from the sdk path directly, e.g. "%programfiles%\Windows Azure SDK\v1.4\ref\Microsoft.WindowsAzure.Diagnostics.dll" .   That being the case any additional insights on how to get this added as a project reference based on the assumption that the target system has the azure sdk installed. robertob Aug 19, 2011 at 5:03 PM Edited Aug 19, 2011 at 5:04 PM wrt q1 i got it to work using the following command where in addition to the program files environment variable reference fix required it also required the .dll extension in the name $project.Object.References.Add("$env:programw6432\Windows Azure SDK\v1.4\ref\Microsoft.WindowsAzure.Diagnostics.dll"); so it seems that pm console runs from %windir%\syswow64\cmd.exe process in which case $env:programfiles=C:\Program Files (x86) and$env:programw6432=C:\Program Files in my uninstall script i ran $project.Object.References.Remove("$env:programw6432\Windows Azure SDK\v1.4\ref\Microsoft.WindowsAzure.Diagnostics.dll"); and $project.Object.References.Remove("Microsoft.WindowsAzure.Diagnostics"); but neither worked, am i doing something wrong with this remove assembly reference syntax? robertob Aug 19, 2011 at 5:46 PM Edited Aug 19, 2011 at 5:46 PM figured out how to get uninstall non-framework or project build output assembly reference removal to work$project.Object.References.Item("Microsoft.WindowsAzure.Diagnostics").Remove(); folks might also be interested in following as way to get install.ps1 addition of non-framework or project build assembly reference to have CopyLocal = true $project.Object.References.Add("$env:programw6432\Windows Azure SDK\v1.4\ref\Microsoft.WindowsAzure.Diagnostics.dll"); $project.Object.References.Item("Microsoft.WindowsAzure.Diagnostics").CopyLocal = "True"$project.Object.References.Add("$env:programw6432\Windows Azure SDK\v1.4\ref\Microsoft.WindowsAzure.ServiceRuntime.dll");$project.Object.References.Add("$env:programw6432\Windows Azure SDK\v1.4\ref\Microsoft.WindowsAzure.StorageClient.dll");$project.Object.References.Item("Microsoft.WindowsAzure.StorageClient").CopyLocal = "True" dfowler Developer Aug 19, 2011 at 5:53 PM Fyi, that probably doesn't work in F#or website projects. robertob Aug 19, 2011 at 6:40 PM i've tested the above for adding the azure sdk assembly references, and removing them in an asp.net mvc3 project and it works.   Are you referring to some other q/a above? dfowler Developer Aug 19, 2011 at 7:12 PM If web application projects are all that matters then you're fine.


text:
[This article was first published on A HopStat and Jump Away » Rbloggers, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I use a set of neuroimaging tools, but my language of choice is R. FSL, which is from the University of Oxford's Functional MRI of the Brain (FMRIB), and stands for FMRIB Software Library, is one tool I commonly use. I wrote some wrapper functions into an R package called fslr and wanted to discuss some of the functions.

## FSL – what is it?

FSL is has a command line interface with shell-type syntax as well as a GUI (which I generally don't use). It has a lot of functions that are good for general imaging purposes – fslstats and fslmaths have loads of functionality. Using FSL during your pipeline is fine, but I don't like switching between shell and R too much in an analysis and like to have scripts that don't jump around too much, so I created fslr.

One of the main problems I have is that I read an image into R, manipulate it in some way, and then want to use an FSL function on that manipulated. This presents a problem because I have an R object and not a NIfTI file, which FSL expects. I also want the result back in R, not in a file that I have to then find. fslr bridges the gap between R and FSL.

## fslr functionality

fslr is implicitly linked to the oro.nifti by Brandon Whitcher. The workflow is this:
1. Read NIfTI data into R using readNIfTI from oro.nifti. This is now an R object of class nifti.
2. Manipulate the data in some way. Maybe you applied a mask or changed some values.
3. Pass this nifti object to a function in fslr, which will write the object to a temporary NIfTI file, run the FSL command, and read the result into an R nifti object again using readNIfTI.

From the user's perspective, it's how it always is in R: pass in R object to R function and get out R object.

Alternatively, if the user specifies a filename of a NIfTI file instead of passing in an R object, fslr commands will simply run the FSL command without the file ever having to be read into R, yet the result can still be returned in R as an R object. This method may be much faster, especially if the image for the function to operate on is on the hard disk (otherwise it would be read in and written out before an FSL command was run).

## outfile and retimg options

For any function that has an image output should have two arguments: outfile and retimg. The argument outfile is default set to NULL, which will create a temporary file using tempfile(), which will be deleted when your R session is terminated. Alternatively, you can specify a path to the output file if the user wants it saved to disk.

The retimg argument is a logical indicator for whether you want the output read into R and returned (get it – return image). If retimg=FALSE and outfile=NULL, then the function will error as the outfile will be a temporary file and deleted and no image will be returned. Thus, the user will not ever be able to use the output image from the function which I believe is done in error.

### Function call-outs

All functions use the system command in R to execute FSL commands. If you are using an R GUI instead of the command line in a shell, then you will want to specify options(fsl.path=). If you are using the command line and FSL is in your PATH, the path to FSL will be found using Sys.getenv("FSLDIR") as your shell evnironment variables will be available. The function have.fsl() provides a logical check as to whether you can run an fslr command. I have not tested this on a Windows machine. I did not use system2 because I ran into some problems, but may want to change this in a future release for portability. Let's look at an example of using fslr

## Example of fslr commands

Let's check to make sure we have FSL in our PATH:

library(fslr)
options(fsl.path="/usr/local/fsl")
have.fsl()

## [1] TRUE

Similarly to fsl.path, you should specify an output type, usually NIFTI_GZ. See here for more information about output type.

options(fsl.outputtype = "NIFTI_GZ")

### Reading in Data

Here I'm going to read in a template T1 MRI brain image (no skull), with 1mm resolution and visualize it.

fname = file.path( getOption("fsl.path"), "data", "standard", "MNI152_T1_1mm_brain.nii.gz")
print(img)

## NIfTI-1 format
##   Type            : nifti
##   Data Type       : 4 (INT16)
##   Bits per Pixel  : 16
##   Slice Code      : 0 (Unknown)
##   Intent Code     : 0 (None)
##   Qform Code      : 4 (MNI_152)
##   Sform Code      : 4 (MNI_152)
##   Dimension       : 182 x 218 x 182
##   Pixel Dimension : 1 x 1 x 1
##   Voxel Units     : mm
##   Time Units      : sec

orthographic(img)

### Smoothing

Let's smooth the data using a 5mm Gaussian kernel and view the results:

smooth = fslsmooth(img, sigma = 5, retimg=TRUE)
orthographic(smooth)

That example is a little boring in that this could be much easier done in FSL than using fslr. If the data is manipulated beforehand, and in an explorative way, it may be easier to see fslr's use. Let's Z-score the image and then keep the z-scores above 2.

### Z-score and threshold

thresh.img = img
thresh.img = (thresh.img - mean(thresh.img))/sd(thresh.img)
thresh.img[thresh.img < 2] = NA
orthographic(thresh.img)

What? An empty picture? That doesn't make sense. Looking at the histogram of thresh.img we see there is data:

hist(thresh.img)

So what gives? The orthographic function from oro.nifti uses the slots cal_min and cal_max to determine the grayscale for the picture. fslr also has some helper functions to make it easier to rescale these values so that you can visualize the images again.

### Setting cal_min and cal_max

thresh.img = cal_img(thresh.img)
orthographic(thresh.img)

There we go. Looks like some white matter regions. Now let's smooth these z-scores using a 4mm Gaussian kernel.

smooth.thresh = fslsmooth(thresh.img, sigma = 4, retimg=TRUE)
orthographic(smooth.thresh)

Now you can do all your fun statistics and be able to call FSL and keep everything in R! Also for most of the functions, there is a FUNCTION.help function that will print out FSL's help file:

fslhd.help()

##
## Usage: fslhd [-x]
##        -x : instead print an XML-style NIFTI header

## But other packages exist!!

Some may think “Hmm I had a package with that functionality decades ago”. Other packages in R exist and have functions for images. I know this. But I believe:

1. R should be able to integrate other established and available neuroimaging software. Python is doing this everywhere and seems to be helpful for the Python part of the community.
2. Some of the functions the FSL package have are not implemented in R. What package do I call for skull-stripping an image like the BET from FSL? You can call fslbet by the way in fslr.
3. Some functions are faster in FSL than in some functions of R. Large 3D Gaussian smoothers take a long time in some packages of R.
4. It allows you to still your pipeline written in R even if it calls FSL or other languages.
5. If someone wrote it before, I don't want to write it again.

I am writing up a more comprehensive white paper hopefully in the coming weeks. Don't forget to check out other packages like ANTsR which is a wrapper for ANTS in R. I'm excited to start using it, especially for its MRI inhomogeneity correction.

### Work to be done

I haven't implemented much of the software for FEAT, which is part of FSL's fMRI analysis pipeline. I hope to do that in the future, but would love feedback if people would want that integration. Always – feedback is welcome on other parts as well.

To leave a comment for the author, please follow the link and comment on their blog: A HopStat and Jump Away » Rbloggers.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

# Never miss an update! Subscribe to R-bloggers to receive e-mails with the latest R posts.(You will not see this message again.)

Click here to close (This popup will not appear again)


text:
# Collision in PyGame for spinning rectangular object.touching circles

I'm creating a variation of Pong. One of the differences is that I use a rectangular structure as the object which is being bounced around, and I use circles as paddles. So far, all the collision handling I've worked with was using simple math (I wasn't using the collision "feature" in PyGame). The game is contained within a 2-dimensional continuous space.

The idea is that the rectangular structure will spin at different speed depending on how far from the center you touch it with the circle. Also, any extremity of the rectangular structure should be able to touch any extremity of the circle. So I need to keep track of where it has been touched on both the circle and the rectangle to figure out the direction it will be bounced to.

I intend to have basically 8 possible directions (Up, down, left, right and the half points between each one of those). I can work out the calculation of how the objected will be dislocated once I get the direction it will be dislocated to based on where it has been touch. I also need to keep track of where it has been touched to decide if the rectangular structure will spin clockwise or counter-clockwise after it collided.

Before I started coding, I read the resources available at the PyGame website on the collision class they have (And its respective functions). I tried to work out the logic of what I was trying to achieve based on those resources and how the game will function. The only thing I could figure out that I could do was to make each one of these objects as a group of rectangular objects, and depending on which rectangle was touched the other would behave accordingly and give the illusion it is a single object. However, not only I don't know if this will work, but I also don't know if it is gonna look convincing based on how PyGame redraws the objects.

Is there a way I can use PyGame to handle these collision detections by still having a single object? Can I figure out the point of collision on both objects using functions within PyGame precisely enough to achieve what I'm looking for?

P.s: I hope the question was specific and clear enough. I apologize if there were any grammar mistakes, English is not my native language.

• Are you interested in non-pygame solutions? You could implement a function for this single purpose without requiring a full collision system. For example, gamedev.stackexchange.com/questions/33546/… – Seth Battin Apr 20 '13 at 19:54
• I don't really understand the question. Are you asking for how to model the physics of a pong game or how to detect the collisions? The physics for the original pong aren't at all realistic; do you want to have similar ones or actually accurate ones? – Anko Dec 11 '14 at 2:07
• I suggest to use a physics library like Pymunk. – skrx May 8 '18 at 5:48

I think pygame doesn't have complex functions to get collisions. But now to your question:

You can just calculate the angle between your ball and the paddle and use this for the direction of bouncing.

Maybe I do something really silly but this function will work for calculating the angle:

#returns angle and distance between two points
def angle_distance(x1,y1,x2,y2):
distance = ((x1 - x2)**2 + (y1 - y2)**2)**0.5*pos_neg(y1 - y2)
try:
angle = math.acos((x1 - x2)/distance)/math.pi*180 + 180*(y1 - y2 >= 0)
except ZeroDivisionError:
angle = 0
return angle,abs(distance)

#returns -1 or 1 if value is negative or positive
def pos_neg(value):
return ((value >= 0)*2-1)

I hope this will help. If you want some more kollision stuff, also for rotated rectangles, just ask.


text: There shouldn't be any issues using the Xtion Pro. Can you update your question with output from lsusb -v, and relevant parts of dmesg when you plug in the sensor, and when you start openni? Keep in mind that newer ASUS sensors work with openni2 packages instead of openni.


text:
tell me the relation between phase difference and path difference.

harsh sharma
13 Points
7 years ago
$\Delta \phi = (2\pi /\lambda\) \Delta x$


text:
# Long path goals

Hello,

I have a peculiar situation with move_base. I have obtained a map of our lab and I am currently trying to navigate in it. Most of the time, move_base works without problems and short path goals are reached. However I have a peculiar case where I give the robot a goal that is on the other side of a set of obstacles (desks in the middle of the room as you can see from the map). The global path planner plans a perfect path to this goal without any problems, however when the robot attempts to navigate towards it by following this global path, it will simply rotate on its own axis and never attempts to move towards the goal. This is as far as it got towards reaching the goal before it started rotating on its own axis:

What is weird about this is that if this goal is segmented into two successive and shorter goals, the robot has no problem in navigating towards them and reaches them perfectly as shown below:

Does this have to do with the way that the Trajectory Rollout local planner is forward simulating the possible trajectories? If so, which is the parameter that most probably would need some tuning?

-- UPDATE -- Here's my navigation config:

common_costmap_params.yaml:

map_type: costmap
transform_tolerance: 0.7
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.5, -0.33], [-0.5, 0.33], [0.5, 0.33], [0.5, -0.33]]

inflation_radius: 0.6

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: laser,
data_type: LaserScan,
topic: /scan,
marking: true,
clearing: true,
inf_is_valid: true}

global_costmap_params.yaml:

global_costmap:
global_frame: /map
robot_base_frame: base_link
update_frequency: 3.0
publish_frequency: 10.0
static_map: true
width: 30.0
height: 30.0
resolution: 0.05
origin_x: 0.0
origin_y: 0.0

plugins:
- {name: static,                  type: "costmap_2d::StaticLayer"}
- {name: inflation,               type: "costmap_2d::InflationLayer"}

local_costmap_params.yaml:

local_costmap:
global_frame: /odom
robot_base_frame: base_link
update_frequency: 3.0
publish_frequency: 10.0
static_map: false
rolling_window: true
width: 10.0
height: 10.0
resolution: 0.05
origin_x: 0.0
origin_y: 0.0

plugins:
- {name: obstacles_laser,           type: "costmap_2d::ObstacleLayer"}
- {name: inflation,                 type: "costmap_2d::InflationLayer"}

base_local_planner.yaml:

TrajectoryPlannerROS:
# Robot Configuration Parameters
acc_lim_x: 0.2
acc_lim_y: 0.2
acc_lim_theta: 0.1
max_vel_x: 0.7
min_vel_x: 0.05
escape_vel: -0.1
holonomic_robot: true

# Goal Tolerance Parameters
xy_goal_tolerance: 0.3
yaw_goal_tolerance: 0.3
latch_xy_goal_tolerance: false

# Forward Simulation Parameters
sim_time: 2.0
sim_granularity: 0.025
vx_samples: 5
vtheta_samples: 20

# Trajectory Scoring Parameters
meter_scoring: true
pdist_scale: 0.6
gdist_scale: 0.8
occdist_scale: 0.01
heading_lookahead: 0.325
heading_scoring: false
dwa: false
global_frame_id: odom

# Oscillation Prevention Parameters
oscillation_reset_dist: 0.05

This is the move_base launch file:

<launch>
<master auto="start"/>

<arg name="no_static_map" default="false"/>

<arg name="base_global_planner" default="navfn/NavfnROS"/>
<!-- <arg name="base_global_planner" default="carrot_planner/CarrotPlanner"/> -->
<arg name="base_local_planner" default="base_local_planner/TrajectoryPlannerROS"/>
<!--<arg name="base_local_planner" default="dwa_local_planner/DWAPlannerROS"/> -->

<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="/home/powerbot67/navigation_powerbot/src/powerbot_2dnav/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="/home/powerbot67/navigation_powerbot/src/powerbot_2dnav/config/costmap_common_params.yaml" command="load ...
edit retag close merge delete

## Comments

In your screenshot of the failed attempt the laserscan topic is showing an error - is it not working even when laserscan ia happy ?

( 2015-06-05 07:27:52 -0600 )edit

The error is due to the fact that i stopped the motor controller "rosaria" so that the robot stops rotating to give me chance to capture the screenshot. Sorry about that. Otherwise I don't get any others from laser, move_base, etc.

( 2015-06-05 07:44:41 -0600 )edit

Please post your nav configuration.

( 2015-06-07 14:01:33 -0600 )edit

@David Lu I have updated my question with the config. I noticed that when I increased the sim_time parameter to a very large value (10.0) while keeping the sim_granularity default, I got better performance in that goals that were not reached as explained above, were suddenly reached. Why is that?

( 2015-06-08 02:46:35 -0600 )edit

Do you see better behavior when you use DWAPlannerROS?

( 2015-06-09 19:50:47 -0600 )edit

No, actually behaviour is much worse with DWAPlannerROS. I find it funny because it's supposed to be more efficient but I cannot get the vehicle to reach certain goals with DWA planner. The parameters I'm setting for it are similar to those of Trajectory Rollout.

( 2015-06-10 03:00:18 -0600 )edit


text:
# How do scaling of the coefficients for the poles of a biquad filter affect the gain?

Given a digital filter consisting of a chain of digital biquad filters. Given a digital biquad filter with a normalized Direct form 1 difference equation: $y_n = b_0x_n + b_1x_{n-1}+b_2x_{n-2} - a_1y_{n-1} - a_2y_{n-2}$

My goal is to implement the biquad filter with few multiplications. For this end I play with the coefficients. A first question is:

• Can I change coefficients $a_1$ and $a_2$ proportionately, and still retain the frequency response of the biquad filter?"

The rest of this post assumes an affirmative answer.
Many of my filters will have $b_0 = b_2$. As a start I change $b_0, b_1, b_2$ so that $b_0$ (and $b_2$) are powers of 2. This changes the gain of the biquad filter, this will be compensated later in the signal chain.
I want to change the coefficients $a_1$ and $a_2$ in a similar way, to eliminate yet another multiplier. I reason that this should be possible - the feedback is dependent on the proportion of $a_1$ and $a_2$. I am, however, unable to fathom how this affects the gain of the biquad filter. So my second question is:

• How does proportional changes to $a_1$ and $a_2$ affect the gain of the biquad filter?

# A concrete example

Assume the following coefficients:

a0 =  1.000000
a1 =  0.305805
a2 = -0.192467
b0 =  0.236979
b1 =  0.412704
b2 =  0.236979

If used "as is", four multipliers are needed (we would add $x_n$ and $x_{n-2}$ before multiplying with $b_2$). To remove one of the four multiplications is easy. I modify the non-recursive coefficients b0, b1 and b2 in such a way that b0 is a power of 2.

a0 =  1.000000
a1 =  0.305805
a2 = -0.192467
b0 =  0.236979/0.236979*0.25 = 0.25
b1 =  0.412704/0.236979*0.25 = 0.435380
b2 =  0.236979/0.236979*0.25 = 0.25

I now have a gain of $b_2/0.25$ I now modify $a_1$ and $a_2$:

a0 =  1.000000
a1 =  0.305805/0.305805*0.25 = 0.25
a2 = -0.192467/0.305805*0.25 = -0.157344
b0 =  0.250000
b1 =  0.435380
b2 =  0.250000

Experimentally, it seems the gain now changes with a factor 1.25, but how to derive this?

• Write out the transfer function H(z) and you should readily see the answer to your question. Do you know how to go from your form of $y_n = ...$ to $H(z)= Y(z)/X(z)$? – Dan Boschen Apr 23 '17 at 15:02
• Not scaling $a_0$ along with $a_1$ and $a_2$ is incorrect. As @Dan Boschen mentions, that will be obvious if you convert the difference equation to the transfer function in the Z domain. – Andy Walls Apr 23 '17 at 16:46
• I misinterpreted the effect of $a_0$ in a flow graph. You are right @andy-walls. This is easily seen by the difference equation that is not normalized, no need to go to the Z domain. – Baard Apr 24 '17 at 6:44

Sorry, that doesn't work. You have to scale all numerator (the "b") or all denominator coefficients (the "a") at the same time. That doesn't work for the denominator since you all practical implementations require $a_0=1$. Scaling $a_1$ and $a_2$ without scaling $a_1$ will move the poles and change the overall shape of the transfer function and not just the gain.


text:
# Definition:Real Interval/Notation/Reverse-Bracket

 $\displaystyle \left ] {\, a, b} \right [$ $:=$ $\displaystyle \set {x \in \R: a < x < b}$ Open real interval $\displaystyle \left [ {a, b} \right [$ $:=$ $\displaystyle \set {x \in \R: a \le x < b}$ Half-open on the right $\displaystyle \left ] {\, a, b} \right ]$ $:=$ $\displaystyle \set {x \in \R: a < x \le b}$ Half-open on the left


text:
# naginterfaces.library.correg.linregm_service_reorder¶

naginterfaces.library.correg.linregm_service_reorder(korder, xbar, std, ssp, r)[source]

linregm_service_reorder reorders the elements in two vectors (typically vectors of means and standard deviations), and the rows and columns in two matrices (typically either matrices of sums of squares and cross-products of deviations from means and Pearson product-moment correlation coefficients, or matrices of sums of squares and cross-products about zero and correlation-like coefficients).

For full information please refer to the NAG Library document for g02cf

https://www.nag.com/numeric/nl/nagdoc_27.1/flhtml/g02/g02cff.html

Parameters
korderint, array-like, shape

must be set to the number of the original variable which is to be the th variable in the re-arranged data, for .

xbarfloat, array-like, shape

must be set to the mean of variable , for .

stdfloat, array-like, shape

must be set to the standard deviation of variable , for .

sspfloat, array-like, shape

must be set to the sum of cross-products of deviations from means (or about zero ) for variables and , for , for .

rfloat, array-like, shape

must be set to the Pearson product-moment correlation coefficient (or the correlation-like coefficient ) for variables and , for , for .

Returns
xbarfloat, ndarray, shape

contains the mean of variable where , for .

stdfloat, ndarray, shape

contains the standard deviation of variable where , for .

sspfloat, ndarray, shape

contains the sum of cross-products of deviations from means (or about zero ) for variables and , where , and , .

rfloat, ndarray, shape

contains the Pearson product-moment correlation coefficient (or the correlation-like coefficient ) for variables and , where and , for , for .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: , for .

(errno )

On entry, there is not a one-to-one correspondence between the old variables and the new variables; at least one of the original variables is not included in the new set, and consequently at least one other variable has been included more than once.

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

Input to the function consists of:

1. A list of the order in which the variables are to be arranged on exit:

2. A vector of means:

3. A vector of standard deviations:

4. A matrix of sums of squares and cross-products of deviations from means:

5. A matrix of correlation coefficients:

On exit from the function, these same vectors and matrices are reordered, in the manner specified, and contain the following information:

1. The vector of means:

2. The vector of standard deviations:

3. The matrix of sums of squares and cross-products of deviations from means:

4. The matrix of correlation coefficients:

Note: for sums of squares of cross-products of deviations about zero and correlation-like coefficients and should be replaced by and in the description of the input and output above.


text:
The Einstein-Podolsky-Rosen (EPR) paradox originated following deba...
The original EPR paradox challenges the predictions of quantum mech...
A very interesting lecture from Feynman about Heisenberg’s uncertai...
In 1957 David Bohm and Yakir Aharonov provided a simplified formula...
Einstein states that instantaneous action at a distance violates sp...
$\lambda$ stands for a set of hidden variables, **inaccessible vari...
To get a better grasp of Bell’s results refer to [this Oxford lectu...
Bell’s test experiments are designed to demonstrate the real world ...
### Tests of Bell’s inequalities: #### J. Freedman and J. Clause...


text:
##### Heat of Combustion

1. A fuel is a chemical substance that burns in oxygen to produce heat energy.

2. Combustion is a chemical reaction between a fuel and oxygen to release heat. Combustion is always an exothermic reaction.

3. The heat of combustion is the heat produced when one mole of a substance is completely burnt in oxygen under standard conditions.

4. The substances can be elements or compounds.

(a) Combustion of elements

$$C(s)+O_2(g)\rightarrow CO_2(g)$$  $$\triangle H=-394 kJ$$

When 1 mole of carbon burns completely in oxygen to form carbon dioxide, 394 kJ of heat is released. The heat of combustion of carbon is -394 kJ $$mol^-1$$. The energy level diagram for the combustion of carbon is as shown below.

(b) Combustion of compounds

$$CH_4(g)+2O_2(g)\rightarrow CO_2(g)+2H_2O(l)$$  $$\triangle H=-890 kJ$$

When 1 mole of methane burns completely in oxygen to form carbon dipxide and water, 890 kJ of heat is released. The heat of combustion of methane is -890 kJ $$mol^-1$$. The energy level diagram for the combustion of methane is as shown in Figure 4.29.

5. Excess oxygen is necessary during combustion to make sure that the combustion is complete.

6. Incomplete combustion due to insufficient oxygen may result in different products being formed, and thus the heat given out would be different.

(a) In excess oxygen, 1 mole of carbon burns completely to form carbon dioxide and
produce 394 kJ of heat.

$$C(s)+O_2(g)\rightarrow CO_2(g)$$  $$\triangle H=-394 kJ$$

(b) In limited supply of oxygen, 1 mole of carbon burns to form carbon monoxide and
produce 108 kJ of heat.

$$C(s)+\frac{1}{2}O_2(g)\rightarrow CO(g)$$  $$\triangle H=-108 kJ$$

Note: The heat of combustion of carbon is $$-394\ kJ\ mol^{-1}$$ and not $$-108\ kJ\ mol^{-1}$$.

7. When writing thermochemical equation, we can use fractions to represent the number of moles of oxygen required so that the number of moles of the substance is always 1 mole.

8. Different fuels have different values of heat of combustion.

9. The value of heat of combustion is an important factor for us to decide what fuel to use for a certain purpose.

Table 4.15 Values of heat of combustion for some fuels

 Fuel Use Equation during combustion Heat of combustion, $$\triangle H (kJ\ mol^{-1})$$ Methane Heating, cooking $$CH_4(g)+2O_2(g)\rightarrow CO_2(g)+2H_2O(l)$$ -890 Hydrogen Rocket fuel $$H_2(g)+\frac{1}{2}O_2(g)\rightarrow H_2O(l)$$ -286 Glucose Body fuel $$C_6H_{12}O_6(s)+6O_2(g)\rightarrow 6CO_2(g)+6H_2O(l)$$ -2803 Butane Cooking $$C_4H_{10}(g)+\frac{13}{2}O_2(g)\rightarrow 4CO_2(g)+5H_2O(l)$$ -2877

Determining the heat of combustion

1. The heat of combustion of a fuel can be determined accurately by using a bomb calorimeter.

2. An insulated container is filled with a known quantity of water. A small sample of known mass in the steel bomb is ignited electrically and burnt completely. The heat given out in the reaction is determined from the temperature rise in the water that surrounds the bomb.

3. The bomb calorimeter is specifically designed to minimise heat loss to the surroundings.

4. In the laboratory, the heat of combustion of a fuel can be determined as follows.

(a) A liquid fuel is burnt is excess oxygen.

(b) The mass and the number of moles of the fuel are determined.

(c) The heat produced is used to heat a known mass of water.

(d) The increase in the temperature of the water is measured.

(e) The heat absorbed by the water is calculated using the formula $$H=mc\theta$$.

(f) The heat given out by the fuel is calculated. We assume that all the heat given out
during the combustion of the fuel is absorbed by the water.

Heat given out during combustion of the fuel = heat absorbed by the water

(g) The heat of combustion (heat given out by 1 mole of the fuel) is calculated.

Heat of combustion of various alcohols

1. One example of liquid fuel is alcohol. Different members of the alcohol family have different heat of combustion. The table below shows the heat of combustion of some alcohols.

Table 4.17 Heat of combustion of some alcohols

2. Table 4.17 shows that the heat of combustion of alcohol increases as the

(a)  number of carbon atoms per molecule increases

(b) number of hydrogen atoms per molecule increases

(c) relative molecular mass increases

3. During the combustion of alcohol:

(a) Carbon atom is burnt to form carbon dioxide.

$$[C]+O_2(g)\rightarrow CO_2(g)+$$ heat

(b) Hydrogen atom is burnt to form water.

$$2[H]+\frac{1}{2}O_2(g)\rightarrow H_2O(l)+$$ heat

(c) Both the reactions are exothermic. Therefore, more heat is produced when more carbon
and hydrogen atoms are burnt.

(d) Relative molecular mass is proportional to the number of carbon and hydrogen atoms
per molecule. Thus, the heat of combustion of alcohol increases as the relative
molecular mass increases.

4. The difference in the heat of combustion of successive members is almost the same, that is, about 650 kJ.

(a) Successive members of the homologous series of alcohols differ from each other by
a $$-CH_2$$ group.

(b) The constant increase in the heat of combustion of the successive members of alcohol
is due to the extra heat given out by the extra one carbon atom and two hydrogen
atoms in the $$-CH_2$$ group.

Table 4.18 Difference in heat of combustion of successive members

 Pair of alcohols Difference in the heat of combustion (Kj) Methanol and ethanol 1376 – 728 = 648 Ethanol and propan-1-ol 2016 – 1376 = 640 Propan-1-ol and butan-1-ol 2678 – 2016 = 662 Butan-1-ol and pentan-1-ol 3332 – 2678 = 654 Pentan-1-ol and hexan-1-ol 3981 – 3332 = 649

5. When the heat of combustion is plotted against the number of carbon atoms per alcohol molecule, the graph in Figure 4.33 is obtained.

Fuel value

1. Fuels are substances that can normally burn readily in air or oxygen to produce large quantity of heat.

2. Examples of some common fuels are petroleum, natural gas and coal. These are called fossil fuels.

3. Different types of fuels have different heats of combustion. Heat of combustion is expressed in kilojoules per mole.

4. In our daily life, it is not very practical to measure the quantity of a fuel in mole. We normally measure the quantity of a fuel by its mass.

5. The fuel value of a fuel is the amount of heat energy given out when one gram of the fuel is completely burnt in excess of oxygen.

6. The unit for fuel value is $$kJ\ g^{-1}$$.

7. Fuel value is also known as heat value.

8. A fuel with a high fuel value releases a lot of heat per gram when it burns.

9. Different types of fuels have different fuel values. Some fuels have very high fuel values but have low density, thus occupy a bigger volume. Others have high density but have low fuel values.

10. Some fuels can cause environmental pollution. There are fuels with high fuel values but are not very economical, not easily available or non-renewable.

11. The learning of thermochemistry helps us in the selection of a suitable fuel for a specific purpose.

12. The table below shows the fuel values of some food and common fuels.

Table 4.19 Fuel values of some food and common fuels

 Substance Fuel value $$(kJ\ g^{-1})$$ Apple 2 Egg 6 Bread 11 Wood 20 Coal 30 Butter 34 Gasoline 34 Kerosene 37 Natural gas 50 Hydrogen 143

13. The selection of a fuel to be used in industries depends on the following factors:

(a) Fuel value of the fuel

(b) Cost of the fuel

(c) Availability and sources of the fuel

(d) Effect of the fuel on the environment

(e) Technology used to harness the energy from the fuel

(f) Storage space needed to store the fuel

14. Fuels with the following qualities are normally chosen.

(a) High fuel value

(b) Cheap

(c) Easily available

(d) Do not pollute the environment

(e) Easily harnessed

(f) Require less storage space

The existence of various energy sources

We can find many sources of energy such as the sun, fossil fuels, water, biomass and radioactive substances on our earth.

The sun

1. The sun can provide us with in exhaustible solar energy that comes from nuclear fusion occurring inside the sun.

2. The energy radiated from the sun's surface in one year is equivalent to 250 thousand million million million tonnes of petroleum. If we could harness the solar energy on earth, we would have solved our energy problem.

3. However, we make very little direct use of solar energy. This is because technology has not yet provided an economical method of transforming solar radiation into usable energy.

4. Solar cells are still very expensive and inefficient. Furthermore, sunlight is intermittent and unreliable in many areas. The development in the storage of solar energy may help us solve the problem.

5. The knowledge of thermochemistry can help us store solar energy.

(a) Ionic hydrates such as hydrated sodium sulphate, $$Na_2SO_4.10H_2O$$ can be used to store
solar energy.

(b) When the hydrates are warmed by sunlight to over 32°C, the three moles of ions
dissolve in the ten moles of water in an endothermic process.

Hydrated sodium sulphate $$[Na_2SO_4.10H_2O(s)]$$ → aqueous sodium sulphate $$[Na_2SO_4(aq)]$$
$$\triangle H=+354\ kJ$$

(c) When cooled below 32°C  after sunset, the solution recrystallises, releasing the
absorbed energy.

Aqueous sodium sulphate $$[Na_2SO_4(aq)]$$ → Hydrated sodium sulphate $$[Na_2SO_4.10H_2O(s)]$$
$$\triangle H=-354\ kJ$$

Fossil fuels

1. Fossil fuels are most widely used because they are very convenient to use and have relatively high fuel values. But they are non-renewable and can cause environmental problems like the greenhouse effect and acid rain.

2. We can use generators and engines to harness heat energy from fossil fuels.

3. It is estimated that fossil fuels will be depleted in another 10 years. Thus, we need to find alternative energy sources.

Water

1. With the use of hydroelectric power stations, we can harness hydroelectric energy from water.

2. Hydroelectric energy is clean, renewable, convenient and economical to use.

3. Unfortunately, hydroelectric energy is limited in its location. It needs high cost of construction at the beginning stages and sometimes vast areas of land are needed, and thus might cause destruction of the surrounding environment.

Biomass

1. By using generators and engines we can harness biomass energy.

2. We can obtain biomass energy from either plants or droppings of animals. Palm oil, for example, is used to make biodiesel which can be used to power cars and generators.

3. Biomass energy, however, needs large areas of land to grow plants and may also cause environmental problems like the disposal of waste.

1. By using nuclear fission and nuclear fusion, we could obtain enormous supply of nuclear energy from radioactive substances like uranium and plutonium.

2. The heat given out during controlled nuclear fission and fusion can be used to generate electricity.

3. Nuclear energy is non-renewable and is very destructive if a nuclear accident occurs. Furthermore, we will face problems of disposing the nuclear wastes.

Table 4.20 Major sources of energy harnessed and their advantages and disadvantages

Other energy sources

1. Other energy sources that we can use are wind, tidal, geothermal, chemical fuel cells and hydrogen from the electrolysis of sea water.

2. Scientists and engineers are actively seeking new energy sources as the earth has only a limited supply of fossil fuels which will run out soon.

3. We must learn to use and conserve out finite energy resources more wisely and more efficiently.


text:
# RLC circuit

A circuit containing resistance (R), inductance (L), and capacitance (C) is called an RLC circuit. A simple circuit only has one RLC series.

With a resistance R present, the total electromagnetic energy U of the circuit (the sum of the electric energy and magnetic energy) is no longer constant. Instead, it decreases with time as energy is transferred to thermal energy in the resistance. Because of this loss of energy, the oscillations of charge, current and potential difference continuously decrease in amplitude, and the oscillations are said to be damped.

They are damped in exactly the same way as those of the damped block-spring oscillator. To analyze the oscillations of this circuit, an equation can be written for the total electromagnetic energy U in the circuit at any instant. This is because the resistance does not store electromagnetic energy.

$U = U_B + U_E = \frac{Li^2}{2} + \frac{q^2}{2C}$ =>Eq.1

However, this total energy decreases as energy is transferred to thermal energy.

$\frac{dU}{dt} = -{i^2}R$ =>Eq.2

where the minus sign indicates that U decreases. By differentiating Eq.1 with respect to time and then substituting the result in Eq.2, the following is obtained:

$\frac{dU}{dt} = {Li}\frac{di}{dt} + \frac{q}{c}\frac{dq}{dt} = -{i^2}{R}$

Substituting $dq/dt$ for $i$ and $d^2/dt^2$ for $di/dt$, the following is obtained:

${L}\frac{d^2q}{dt^2} + {R}\frac{dq}{dt} + \frac{q}{C} = 0$ (RLC circuit)


text:
# Adding non stoichiometric amount of NH3 to copper solution

Consider the following reaction: $$\ce{Cu(H2O)_n^2+ + 4NH3 -> Cu(NH3)4^2+}$$

The amount of ammonium hydroxide added to your penny solution was not controlled (i.e. you did not add “stoichiometric” amounts). Discuss what would happen to its absorbance value, and explain why, if the amount added was too low and too high. (Assume the mark on the volumetric flask was not overshot in either scenario.)

I was hoping to get a second opinion on what happens to the absorption in the case where you add too much $$\ce{NH3}$$ and the case where you add too little.

I think that if I had added not enough $$\ce{NH3}$$ that some of the copper would not turn into $$\ce{Cu(NH3)4^2+}$$ and thus the absorption reading would be lower.

As for adding too much... I think it would be okay to add too much. I don't think it would affect the absorption.

Both your conclusions are absolutely correct.

I'll point out that you'll never get "all" the $\ce{Cu^{2+}}$ to the amine complex. You're trying to get greater than 99% of the $\ce{Cu^{2+}}$ to the amine complex. Because 99% and 99.9% and 99.99% would have virtually the same absorption reading.

To give even more detail, in mildly acid solution the copper will be in a octahedral complex $\ce{Cu(H2O)6^{2+}}$ which is a light blue. As you add ammonia at first $\ce{Cu(OH)2}$ forms, which is then dissolved as the various ammine complexes form.

$\ce{Cu(H2O)_6^2+ + NH3 <--> Cu(NH3)(H2O)5^2+}$ $\ce{Cu(NH3)(H2O)5^2+ + NH3 <--> Cu(NH3)2(H2O)4^2+}$ $\ce{Cu(NH3)2(H2O)4^2+ + NH3 <--> Cu(NH3)3(H2O)3^2+}$ $\ce{Cu(NH3)3(H2O)3^2+ + NH3 <--> Cu(NH3)4(H2O)2^2+}$

The tetraammine complex, $\ce{Cu(NH3)4(H2O)2^2+}$, is a much darker blue than the corresponding complex with water molecules alone. Thus colorimetry is much more sensitive measuring the tetraammine complex that the water complex.

The tetraammine complex has shorter Cu-N bonds than the C-O bonds. Thus the four ammine groups are one plane and the two water molecules at the apexes of the square bipyramidal complex.

Hopefully now the point about not converting all the copper to the tetraammine complex is clear. The various ammine complexes are in equilibrium with each other. Given that $\ce{[NH3] >> [Cu^{2+}]}$ then one can imagine the overall reaction as

$\ce{Cu(H2O)_6^2+ + 4NH3 <--> Cu(NH3)4(H2O)2^{2+}}$

In extremely concentrated solutions of ammonia the final two ammine groups will attach.

$\ce{Cu(NH3)4(H2O)2^{2+} + NH3 <--> Cu(NH3)5(H2O)^2+}$ $\ce{Cu(NH3)5(H2O)^{2+} + NH3 <--> Cu(NH3)6^2+}$


text:
# Constraint (mathematics)

In mathematics, a constraint is a condition of an optimization problem that the solution must satisfy. There are several types of constraints—primarily equality constraints, inequality constraints, and integer constraints. The set of candidate solutions that satisfy all constraints is called the feasible set.

## Example

The following is a simple optimization problem:

${\displaystyle \min f({\mathbf {x}})=x_{1}^{2}+x_{2}^{4}}$

subject to

${\displaystyle x_{1}\geq 1}$

and

${\displaystyle x_{2}=1,}$

where ${\displaystyle {\mathbf {x}}}$ denotes the vector (x1, x2).

In this example, the first line defines the function to be minimized (called the objective function, loss function, or cost function). The second and third lines define two constraints, the first of which is an inequality constraint and the second of which is an equality constraint. These two constraints are hard constraints, meaning that it is required that they be satisfied; they define the feasible set of candidate solutions.

Without the constraints, the solution would be (0,0), where ${\displaystyle f({\mathbf {x}})}$ has the lowest value. But this solution does not satisfy the constraints. The solution of the constrained optimization problem stated above is ${\displaystyle {\mathbf {x}}=(1,1)}$, which is the point with the smallest value of ${\displaystyle f({\mathbf {x}})}$ that satisfies the two constraints.

## Terminology

• If an inequality constraint holds with equality at the optimal point, the constraint is said to be binding, as the point cannot be varied in the direction of the constraint even though doing so would improve the value of the objective function.
• If an inequality constraint holds as a strict inequality at the optimal point (that is, does not hold with equality), the constraint is said to be non-binding, as the point could be varied in the direction of the constraint, although it would not be optimal to do so. If a constraint is non-binding, the optimization problem would have the same solution even in the absence of that constraint.
• If a constraint is not satisfied at a given point, the point is said to be infeasible.

## Hard and soft constraints

If the problem mandates that the constraints be satisfied, as in the above discussion, the constraints are sometimes referred to as hard constraints. However, in some problems, called flexible constraint satisfaction problems, it is preferred but not required that certain constraints be satisfied; such non-mandatory constraints are known as soft constraints. Soft constraints arise in, for example, preference-based planning. In a MAX-CSP problem, a number of constraints are allowed to be violated, and the quality of a solution is measured by the number of satisfied constraints.


text:
## A class of abstract delay differential equations in the light of suns and stars. (arXiv:1901.11526v1 [math.DS])

Using dual perturbation theory in a non-sun-reflexive context, we establish a correspondence between 1. a class of nonlinear abstract delay differential equations (DDEs) with unbounded linear part and an unknown taking values in an arbitrary Banach space and 2. a class of abstract weak* integral equations of convolution type involving the sun-star adjoint of a translation-like strongly continuous semigroup. For this purpose we also characterize the sun dual of the underlying state space. More generally we consider bounded linear perturbations of an arbitrary strongly continuous semigroup and we comment on some implications for the particular case of abstract DDEs.查看全文

## Solidot 文章翻译

 你的名字 留空匿名提交 你的Email或网站 用户可以联系你 标题 简单描述 内容 Using dual perturbation theory in a non-sun-reflexive context, we establish a correspondence between 1. a class of nonlinear abstract delay differential equations (DDEs) with unbounded linear part and an unknown taking values in an arbitrary Banach space and 2. a class of abstract weak* integral equations of convolution type involving the sun-star adjoint of a translation-like strongly continuous semigroup. For this purpose we also characterize the sun dual of the underlying state space. More generally we consider bounded linear perturbations of an arbitrary strongly continuous semigroup and we comment on some implications for the particular case of abstract DDEs.


text:
• Free Veritas GMAT Class
Experience Lesson 1 Live Free

Available with Beat the GMAT members only code

• 5-Day Free Trial
5-day free, full-access trial TTP Quant

Available with Beat the GMAT members only code

• 1 Hour Free
BEAT THE GMAT EXCLUSIVE

Available with Beat the GMAT members only code

• 5 Day FREE Trial
Study Smarter, Not Harder

Available with Beat the GMAT members only code

• Magoosh
Study with Magoosh GMAT prep

Available with Beat the GMAT members only code

• Free Practice Test & Review
How would you score if you took the GMAT

Available with Beat the GMAT members only code

• FREE GMAT Exam
Know how you'd score today for $0 Available with Beat the GMAT members only code • Get 300+ Practice Questions 25 Video lessons and 6 Webinars for FREE Available with Beat the GMAT members only code • Award-winning private GMAT tutoring Register now and save up to$200

Available with Beat the GMAT members only code

• Free Trial & Practice Exam
BEAT THE GMAT EXCLUSIVE

Available with Beat the GMAT members only code

# The number 75 can be written as the sum of the squares of...

tagged by: swerve

### Top Member

#### The number 75 can be written as the sum of the squares of...

The number 75 can be written as the sum of the squares of 3 different positive integers. What is the sum of these 3 integers?

A. 17
B. 16
C. 15
D. 14
E. 13

The OA is E.

I guessed this right - but is there an algebraic way to do this PS question? Please, can any expert explain it? I need your help. Thanks.

### GMAT/MBA Expert

GMAT Instructor
Joined
08 Dec 2008
Posted:
12122 messages
Followed by:
1237 members
5254
GMAT Score:
770
swerve wrote:
The number 75 can be written as the sum of the squares of 3 different positive integers. What is the sum of these 3 integers?

A. 17
B. 16
C. 15
D. 14
E. 13
We're looking for 3 DIFFERENT squares that add to 75

Here are the only squares we need to consider: 1, 4, 9, 16, 25, 36, 49, 64

Can you find 3 that add to 75?
After some fiddling, we may notice that 1 + 25 + 49
In other words, 1² + 5² + 7² = 75
We want the SUM of 1 + 5 + 7, which is 13

Cheers,
Brent

_________________
Brent Hanneson – Creator of GMATPrepNow.com
Use our video course along with

And check out all of our free resources

GMAT Prep Now's comprehensive video course can be used in conjunction with Beat The GMAT’s FREE 60-Day Study Guide and reach your target score in 2 months!

### GMAT/MBA Expert

GMAT Instructor
Joined
08 Dec 2008
Posted:
12122 messages
Followed by:
1237 members
5254
GMAT Score:
770
swerve wrote:
I guessed this right - but is there an algebraic way to do this PS question? Please, can any expert explain it? I need your help. Thanks.
No, there's no straightforward algebraic solution.

Cheers,
Brent

_________________
Brent Hanneson – Creator of GMATPrepNow.com
Use our video course along with

And check out all of our free resources

GMAT Prep Now's comprehensive video course can be used in conjunction with Beat The GMAT’s FREE 60-Day Study Guide and reach your target score in 2 months!

### GMAT/MBA Expert

Elite Legendary Member
Joined
23 Jun 2013
Posted:
9762 messages
Followed by:
487 members
2867
GMAT Score:
800
Hi swerve,

This question can be solved with a bit of 'brute force' arithmetic, but the speed with which you solve it will likely depend on how quickly you can write everything down and how you do the work.

We're asked to find the three positive integers, whose squares add up to 75. To start, we should write down the list of possible squares:

1
4
9
16
25
36
49
64

We're limited to these 8 numbers. To work efficiently, we should work from 'greatest to least'..

If we use 64, then the other two numbers have to add up to 11....but there's NO WAY to make that happen (so 64 is NOT one of the numbers we need).

Next, let's try 49... then the other two numbers have to add up to 26....25 and 1 'fit', so the three numbers are 49, 25 and 1 (7, 5 and 1 --> that sum = 13).

GMAT assassins aren't born, they're made,
Rich

_________________
Contact Rich at Rich.C@empowergmat.com

Legendary Member
Joined
07 Sep 2017
Posted:
808 messages
Followed by:
3 members
6
The way I solved it was as follows:

$$75=49+25+1\ =\ 7^2+5^2+1.$$ Hence, the numbers are 1, 5 and 7. Therefore, $$7+5+1=13.$$ Therefore, the answer is E=13.

### GMAT/MBA Expert

GMAT Instructor
Joined
09 Apr 2015
Posted:
1461 messages
Followed by:
16 members
39
swerve wrote:
The number 75 can be written as the sum of the squares of 3 different positive integers. What is the sum of these 3 integers?

A. 17
B. 16
C. 15
D. 14
E. 13
If the sum of 3 different perfect squares is 75, each must be less than 75. So, we want to start by writing out the perfect squares that are less than 75:

1, 4, 9, 16, 25, 36, 49, 64

In this problem, there is no shortcut for determining which 3 squares add up to 75; however, it is strategic to start with the largest one, 64, and move down the list if it doesn’t work:

64 + 11 = 75

There is no way 11 can be written as a sum of two squares. So, we move down to 49:

49 + 26 = 75

We see that 26 can be written as the sum of 25 and 1; that is:

49 + 25 + 1 = 75

We have found the three perfect squares that sum to 75. In other words:

7^2 + 5^2 + 1^2 = 75

The sum of 7, 5, and 1 is 7 + 5 + 1 = 13.

_________________
Jeffrey Miller Head of GMAT Instruction

### Top First Responders*

1 Jay@ManhattanReview 81 first replies
2 Brent@GMATPrepNow 71 first replies
3 fskilnik 55 first replies
4 GMATGuruNY 37 first replies
5 Rich.C@EMPOWERgma... 16 first replies
* Only counts replies to topics started in last 30 days
See More Top Beat The GMAT Members

### Most Active Experts

1 fskilnik

GMAT Teacher

202 posts
2 Brent@GMATPrepNow

GMAT Prep Now Teacher

163 posts
3 Scott@TargetTestPrep

Target Test Prep

118 posts
4 Jay@ManhattanReview

Manhattan Review

94 posts
5 Max@Math Revolution

Math Revolution

94 posts
See More Top Beat The GMAT Experts


text:
# Secant variety of an irreducible non-degenerate projective curve

I would like to know why every non-degenerate irreducible projective curve has a three-dimensional secant variety. It is clear to me that the dimension can't be larger.

-
What about plane curves? –  M P Aug 10 '12 at 9:54
This isn't a research level question. Problems like this are studied in Harris' "first course" book. Ask at math.stackexchange.com if you're still stuck. –  Jack Huizenga Aug 10 '12 at 9:58
For a joke answer: if it isn't 3-dimensional, then projection from a general codimension 3 subspace gives an isomorphism from the curve to a smooth plane curve of the same degree and genus. But the Castelnuovo bound forbids this. More realistically, try differentiating a map like $X\times X \times \mathbb{A}^1\to Sec X$ in suitable local coordinates. –  Jack Huizenga Aug 10 '12 at 10:10
I'm sorry for this (I just didn't get any answers on the Stack exchange) –  Miklos Aug 10 '12 at 13:26

Suppose that the secant variety of your curve is a surface $S$. This implies that $S$ is covered by lines in such a way that there is a $1$-dimensional family of such lines through every general point of $S$.
Now let $P$ be a general smooth point on $S$. The lines contained in $S$ through $P$ are necessarily included in the plane $T_P S$. Since there is a $1$-dimensional family of such lines, these are exactly the lines in $T_P S$ through $P$. These lines cover $T_P S$ so that $T_P S\subset S$. Since the dimensions agree, and by irreducibility of $S$, $T_P S=S$.
This shows that the curve is included in the plane $T_P S$, hence degenerate.
Let $C\subset\mathbb{P}^{3}$ be a non-degenerate curve. Let us assume that $S=Sec_{2}(C)$ is a surface. Let $p\in S$ be a general point. Since $expdim(Sec_{2}(C))-dim(Sec_{2}(C)) = 1$ through $p$ there is a $1$-dimensional family of lines contained in $S$. Therefore $S\cong\mathbb{P}^{2}$ and $C$ is a plane curve. A contradiction.


text:
11,507 views

In the worst case, the number of comparisons needed to search a single linked list of length $n$ for a given element is

1. $\log n$
2. $\frac{n}{2}$
3. $\log_2 {n} - 1$
4. $n$

A & C are not correct as we can not do binary search in Linked list.

B seems like average case, be we are asked for worst case.

Worst case is we do not find the element in list. We might end up searching entire list & comparing with each element. So, answer -> (D). $n$

@srestha,how more than n is possible?
yes not possible
@reena_kandari

more than n is only possible when you apply binary search .

otherwise , by linear method it will take n
worst case is not just element is not found, if searched element is the last element then also N comparision are required...isn't it..?
SAYING WE CANT DO BINARY SEARCH IS WRONG WE CAN DO BUT IT IS NOT EFFICIENT TO DO BINARY SEARCH IN LINKED LIST IT GIVES ALMOST O(N) TC
Since, It is not possible to do a Binary search in Linked List, the Only solution is linear search so its O(n).
by

Binary search is possible on linked list but it is not efficient than linear search so we avoid it and use linear search
not impossible but time consuming

Binary search algorithm is based on the logic of reducing your input size by half in every step until your search succeeds or input  gets exhausted. Important point here is "the step to reduce input size should take constant time". In case of an array, it's always a simple comparison based on array indexes that takes O(1) time.

But in case of Linked list you don't have indexes to access items. To perform any operation on a list item, you first have to reach it by traversing all items before it. So to divide list by half you first have to reach middle of the list then perform a comparison. Getting to middle of list takes O(n/2)[you have to traverse half of the list items] and comparison takes O(1).
Total = O(n/2) + O(1) = O(n/2)

So the input reduction step does not take constant time. It depends on list size. hence violates the essential requirement of Binary search.
thts why d is the answer only in worst case

by

There are n elements so Log2n is not the case in single linked list because binary search not possible so option A and C is wrong

In worst case there are n comparisons so option D is right

### 1 comment

In which case searching in single linked list takes n/2- when we get an element in middle of the list.
In the worst case scenario,either we will find the element in the last node of otherwise we will not find the node after traversal to whole linked list .so to find a node in the worst case we have to traverse all the linked list till the last node ..that's why no. Of comparisons will also be 'n' .and we don't do binary search in Linked list so log n  base 2 can never be the our answer.


text:
# Standard Deviation. Why do we take the square root of the entire equation?

Please forgive my lack of maths knowledge,

It is my understanding that:

Standard Deviation is the average distance from the mean in a data set of numbers.

Therefore it stands to reason that working out the standard deviation of the data set $x_i = \{1,2,3,4,5\}$ would involve the following.

First working out the mean $\mu(x_i) = 3$ and Then working out the sum of the distance from the average $\sum{|x_i-\mu|} = 6$ then we do $\frac{\sum{|x_i-\mu|}}{N} = \frac{6}{5} = 1.2$

This means that, according to my method/thinking, 1.2 is the standard deviation.

However when using the formula $\sqrt{\frac{\sum{(x_i-\mu)}^2}{N}}$ I get $1.414$

Can someone explain why I'm wrong in layman terms. Thankyou

• This is the definition: $\sqrt{\frac{\sum|x_i-\mu|^2}{N} }$ and not $\sqrt{\frac{\sum|x_i-\mu|}{N} }$ as you thought. – zoli Mar 21 '15 at 22:25
• Standard deviation is not the average distance from the mean, as your example shows. ${}\qquad{}$ – Michael Hardy Mar 21 '15 at 22:36
• To get $2.68$ you must have made a mistake in the calculation. I get $\sum(x_i-\mu)^2=10$; with $N=5$ I get $\sqrt(10/5)=1.414$. – bof Mar 21 '15 at 22:41
• There are many nice answers to this over at stats.SE here and also in this MO answer. – aes Mar 21 '15 at 22:44
• @aes Very very true. That link is legit. – Daniel W. Farlow Mar 21 '15 at 22:48

The reason for using standard deviation rather than mean absolute deviation is that the variance of $\{x_i\}_{i=1}^m$ plus the variance of $\{y_j\}_{j=1}^m$ is the variance of $\{x_i+y_j\}_{i=1,\,j=1}^{n,\,m}$ (but only if you define variance in the way that puts $n$ and $m$ rather than the Bessel-corrected $n-1$ and $m-1$ in the denominators). This makes it possible, for example, to apply the central limit theorem to find the probability that when you toss $1800$ coins, the number of heads is between $890$ and $920$. You can find the standard deviation of the number of heads because of the additivity of variances.


text:
# A. Malchiodi Abstract

Variational techniques for the prescribed $Q$-curvature equation.

After recalling the definition of $Q$-curvature and some applications, we will address the question of prescribing it through a conformal deformation of the metric. We will address some compactness issues, treated via blow-up analysis, and then study the problem, which has variational structure, using a Morse-theoretical approach.


text:
# VMWare Fusion 12 Network Issue

Updated the VMWare Fusion install on my MacBook Pro yesterday and I came across an issue after starting Fusion, upgrading the Windows VM and trying to access a network resource - local and internet. Basically, it couldn’t get an IP address, using either sharing the IP with my Mac or using WiFi directly.

A search on the internet found some issues reported using betas of Big Sur, which I am not using. Basically, they found that removing a plist file and killing the configd task (if it was running) resolved the issue. So, I tried it and it worked for me. The command to use from your terminal, after quitting Fusion, is:

sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist && sudo killall -9 configd

Then you can start Fusion, start up your VM and you’ll get a network connection.

Now, I wait for the first set of updates for Big Sur and I’ll think about upgrading. 😏

Reference: VMWare Fusion Discussion


text:
# How do you write cos75cos35+sin75sin 35 as a single trigonometric function?

The answer is: $\cos 40$.
$\cos \left(\alpha - \beta\right) = \cos \alpha \cos \beta + \sin \alpha \sin \beta$.
In this case $\alpha = 75$ and $\beta = 35$, and we can use the formula conversely:
$\cos 75 \cos 35 + \sin 75 \sin 35 = \cos \left(75 - 35\right) = \cos 40$.