text:
# M-8: Nice Parameters Case Study

Our final case study has to do with answering a question about number theory (which is disguised as a 3D geometry problem). A trirectangular tetrahedron is a tetrahedron ABCD so that all three of the faces meeting at A are perpendicular. It is the 3D equivalent of a right triangle: the definition is equivalent to “all of the triangles ABC, ACD, and ADB are right-angled triangles with the right angle at A.” Our question is,

Are there trirectangular tetrahedra with all side lengths integral?

In your own work, you might come across similar situations when you want to make sure that a question you’re creating has “good” parameters so that the numbers all come out nice for the student at the end.

# Phase 0: Brute Force

Let’s use the Pythagorean theorem and the type function in Maple to do a brute force search. What we mean about the Pythagorean theorem is the following: we want that the lengths of i := |AB|, j := |AC|, and k := |AD| are integers, and also that all of $|BC| = \sqrt{i^2+j^2}, |BD| = \sqrt{i^2+k^2}, |CD| = \sqrt{j^2+k^2}$ are integers. So let’s simply test all possible values of i, j and k (up to some limit) to see which ones make this true.

We need to use the type procedure to check for integrality: type(x, integer) returns true or false depending on whether x is integral. E.g.,

type(sqrt(9), integer); # returns true

It makes our code a bit easier to read if we put aside the square/sqrt/typechecking stuff into a single procedure. Define isCompatible(x, y) to be true if $$\sqrt{x^2+y^2}$$ is an integer:

isCompatible := proc(x, y):
return type(sqrt(x*x+y*y), integer);
end:

Then, our basic search for triples where $$i, j, k \le n$$ where n is some maximum search limit we specify can be accomplished with:

findTetras0 := proc(n) local i, j, k:
for i from 1 to n do
for j from 1 to n do
for k from 1 to n do
if isCompatible(i, j) and isCompatible(j, k)
and isCompatible(i, k) then
print(i, j, k):
end:
end:
end:
end:
end:

This very basic version of the code takes about $$n^3$$ operations and therefore its running time is approximately some constant times $$n^3$$. For my computer,  findTetras0(50) takes about 2 seconds, and findTetras0(100) takes about 16 seconds. This does not produce any output, unfortunately. But we shouldn’t give up hope yet.

# Phase 1: Be Polite

Thinking about our code, can we reduce the amount of work that it does? Yes! Notice that if i and j are not compatible, then there is no need to perform the innermost for k loop, since none of the pairs inside of that innermost loop could result in an (i, j, k) of the desired form. So let’s not ask Maple to do computations that we are sure will reach dead ends. Hence we edit the code to:

findTetras1 := proc(n) local i, j, k:
for i from 1 to n do
for j from 1 to n do
if isCompatible(i, j) then
for k from 1 to n do
if isCompatible(j, k) and isCompatible(i, k) then
print(i, j, k):
end:
end:
end:
end:
end:
end:

This is much faster: on the same machine, findTetras1(100) takes less than 10 seconds, and findTetras1(500) takes less than a minute. (It’s harder to precisely estimate the running time since it depends on how many compatible (i, j) pairs are found.)

More importantly, this version of the code does find some results! However, you’ll notice that it prints out multiple versions of each triple, for example it prints out both 44, 117, 240 and also 117, 44, 240 etc. So let’s only make the code check triples with $$i \le j \le k$$ by setting the loop lower bounds to for j from i… and for k from j… After we do that, the code will give us data that looks like this:

The next few phases won’t give dramatic improvements in running speed, but will make the code more modular and put us in a place to get a very fast algorithm at the end once we use a mathematical idea. Along the way we’ll introduce a few more detailed ideas on writing code that runs more quickly.

One thing we can notice immediately is that there are still some “redundancy” in our output in the sense that some entries are multiples of one another: twice 44, 117, 240 is the same as 88, 234, 480. It is easy to convince yourself that whenever (i, j, k) satisfy the properties we’re looking for, so does (ti, tj, tk) for all integers t ≥ 1. So let’s only print out primitive triples, where there is no common factor to i, j, and k. Maple has a gcd function and while it only takes in two arguments, you can see that gcd(gcd(i, j), k) is the common gcd of all three numbers. So in our next version, we’ll only print out triples where this value is 1.

We’ll say that the rest of this lesson gets fairly technical. It would already be quite impressive, given that this is just a beginner course, if you were able to write your own code that worked without big redundancies (i.e., getting as far as our Phase 1 here). But if you are interested in knowing more, continue reading below.

# Phase 2: Pre-processing

There is a nice idiom in Maple which lets you return a list or set when you don’t know in advance what length it will have. The idea is to initialize a value to {}, the empty set. From then on, you will replace that set by its union with a singleton set. For example,

mySet := {};
for i from 1 to 10 do
mySet := mySet union {i};
end;
mySet;

sets mySet equal to the set {1, 2, …, 10}. Try this yourself and play around with it to see if it works like you expect.

The next major idea that our program evolution will use is the following: by doing some pre-processing, we might be able to save repeated work later on. In particular, let’s pre-compute a list of all of the compatible pairs. Specifically, for each i, let’s pre-compute all of the other values which are compatible with i. Having such a list could save us time since instead of searching through all j and k, we’ll only have to look at those j which are compatible with i, and those k that are compatible with i as well as j. By using the option remember concept introduced earlier, this can be written in the following way:

compatibleWith := proc(k, n) option remember:
# returns a set of all i s.t. 1<=i<=n and i*i+k*k is a square
local i, result:
result := {};  # the empty set
for i from 1 to n do
if isCompatible(i, k) then result := result union {i}: end:
end:
return result:
end:

For example, compatibleWith(40, 100) will return {9, 30, 42, 75, 96} since these are all of the integers ≤ 100 which, together with 40, can form the legs of a Pythagorean triangle. Now we rewrite our code so that instead of searching all possible j and k, it only searches the compatible ones:

findTetras2 := proc(n)
local i, jIndex, kIndex, cwi, j, k, numcwi:
for i from 1 to n do
# cwi means "compatible with i"
cwi := compatibleWith(i, n):
numcwi := nops(cwi);
for jIndex from 1 to numcwi do
j := cwi[jIndex]:
if (j>=i) then
for kIndex from 1 to numcwi do
k := cwi[kIndex]:
if (k>=j) and gcd(gcd(i, j), k)=1 and
isCompatible(j, k) then
print(i, j, k):
end:
end:
end:
end:
end:
end:

Notice that  «set»[i] works similarly to how it does for lists, and that the inner for loop variables go over jIndex and kIndex, with j and k taking on all of the values in cwi in turn. This version of the code, unfortunately, isn’t all that faster despite that the pre-processing is really looking at the problem in a novel way.

# Phase 3: Cleaning Up Our Code

Maple has another kind of for loop: for «loopVar» in «structure» works when the structure is either a list or a set. It iterates the loop variable directly over the elements of the structure… that’s exactly what we’ve been doing with the above example, but we can get rid of jIndex and kIndex. So for these edits, for example, we’d change the j loop to

for j in cwi do   # for all j that are compatible with i
...            # do stuff with j, no jIndex necessary

Another thing which might be annoying is the fact that there are so many lines of input. Let’s make our procedure stop printing things and instead return a set of all of the working {i, j, k} triples that we found. As before, this means initializing result := {} and taking unions.

Additionally, the for k loop could possibly be implemented in a more symmetric way. The current code ensures that i and k are compatible by forcing k to be drawn from cwi (the precomputed list compatibleWith(i, n) of integers compatible with i), while it is explicitly testing the compatibility of j and k using isCompatible. Instead, let’s use the former precomputation method for both i and j. We basically want to restrict k to the intersection of compatibleWith(i, n) and  compatibleWith(j, n). Using intersect, this gives the following evolved version of our code:

findTetras3 := proc(n) local i, cwi, j, k, result:
result := {};
for i from 1 to n do
# cwi means "compatible with i"
cwi := compatibleWith(i, n):
for j in cwi do
if (j>=i) then
for k in cwi intersect compatibleWith(j, n) do
if (k>=j) and gcd(gcd(i, j), k)=1 then
result := result union {{i, j, k}}:
end:
end:
end:
end:
end:
return result;
end:

The speed is about the same as before, but it’s a little easier on the eyes and has simpler logic.

# Phase 4: Number Theory and Arrays

The main thing that will get us to a blazingly fast version of the code is the following fact about Pythagorean triples:

Every Pythagorean triple can be expressed in the form $$\{k(2ab), k(a^2-b^2), k(a^2+b^2)\}$$ for some positive integers k, a, and b where a and b are relatively prime. The hypotenuse is $$k(a^2+b^2)$$ and the other two are the legs.

This parameterization, called Euclid’s formula, is very useful because it means that instead of searching for compatible pairs and missing a lot of the time, we can generate all of them and only get the hits.

We want our code to search through all values of a, b, and k, and then update our “compatibility sets” for i and j where $$\{i, j\} = \{2kab, k(a^2-b^2)\}$$. But how can we store the data if we search in this way rather than with for i and for j? We want to iteratively fill out a data structure whose [i]th element is the set of all numbers which are compatible with i, similar to before.

We can do this in principle with lists, except that we want to handle more than 100 elements so we’ll use a table (see the last lesson). This is what building the compatibility table looks like; note that it uses a hybrid forwhile loop (see ?for):

compatibilityTable := proc(n)
# returns a table indexed from 1 to n, where
# the item at index i is the set of all j<=n such that
# i*i+j*j is a square
local result, a, b, k, P, Q, i;
result := table():
for i from 1 to n do
result[i] := {}:
end:
for b from 1 to n do
for a from b+1 to n while max(2*a*b, a*a-b*b)<=n do
if gcd(a, b)=1 then
for k from 1 to floor(n/max(2*a*b, a*a-b*b)) do
P := k*2*a*b;
Q := k*(a*a-b*b);
result[P] := result[P] union {Q};
result[Q] := result[Q] union {P};
end:
end:
end:
end:
return result;
end:

Note that we use the floor function to get the search to stop at an integral value of k. Finally, the main procedure is the following — it’s the same as before except it uses compatibilityTable instead of compatibleWith.

findTetras4 := proc(n)
local i, j, k, CT, result:
result := {};
CT := compatibilityTable(n):
for i from 1 to n do
for j in CT[i] do
if (j>=i) then
for k in CT[i] intersect CT[j] do
if (k>=j) and gcd(gcd(i, j), k)=1 then
result := result union {{i, j, k}}:
end:
end:
end:
end:
end:
return result;
end:

This version is ridiculously fast!

If you want, you can download an entire .mw file with all of these commands.

In summary,

• start with a simple version of working code before making it complicated,
• optimize in small steps,
• keep your code idiomatic,
• see if you can use math to help you,
• and use data structures if you really need to.

We should also caution that it’s not always worthwhile to try to squeeze out every last drop of optimization from your routines. For example in a recursive function, maybe you can either treat the n=2 case like all of the rest, or alternatively come up with a hand-coded optimized version for that special case, by moving some if and for statements around and copying most of the body of your procedure. Avoid the temptation to do the latter! In general, trying to include tiny improvements that save a single step of wasted computation at the cost of making your code bloated is dangerous: it is not likely to help that much, but is likely to make your code more complex and error-prone. (Perhaps the only exception is inside of a deeply nested loop, but even then you should try to rigorously compare your “improvements” with the old version to see if they really help.)

Another thing to keep in mind is that debugging code is both an art and a science. Your code seems like it’s running forever? Try it on small cases and see if it’s totally broken, or just slow. Are some variables taking on unexpected values? Use print statements to inspect things more deeply. If you are extremely hardcore, check out ?debugger to interactively debug your code. Keep your code human-readable by using proper indentation and re-read the code frequently to see that you typed what you really meant to type.

Good luck coding with Maple and have fun!

These are course notes for the University of Waterloo's course Math 600: Mathematical Software.
© 2012—. Written and developed by David Pritchard and Stephen Tosh. Contact (goes to the CEMC)


text:
# What Is the Algorithm Behind Photoshop's "Black and White" Adjustment Layer?

Can someone explain the algorithm behind the "Black and White" adjustment layer in photoshop?

I have to reproduce it using C++ for an application that emphasizes non-red/magenta(ish) pixels from an image (with a percent-like configurable tolerance), and this resource showed the behavior I'm expecting.

Still couldn't reproduce it, but I found a clue:

Each pixel is defined by up to two controls, one additive (RGB) and one subtractive (CMY).

• Did you ever get any closer to figuring out the algorithm? I'm trying to figure this out as well. May 15 '13 at 16:26
• No, i didn't :/ May 16 '13 at 16:58

I replicated the algorithm perfectly in MATLAB (Based on @Ivan Kuckir answer):

function [ mO ] = ApplyBlackWhiteFilter( mI, vCoeffValues )

FALSE   = 0;
TRUE    = 1;

OFF = 0;
ON  = 1;

numRows = size(mI, 1);
numCols = size(mI, 2);
dataClass = class(mI);

numCoeff    = size(vCoeffValues, 1);
vHueVal     = [0:(numCoeff - 1)] * hueRadius;

mHsl = ConvertRgbToHsl(mI);
mO = zeros(numRows, numCols, dataClass);

vCoeffValues = numCoeff * vCoeffValues;

for jj = 1:numCols
for ii = 1:numRows
hueVal = mHsl(ii, jj, 1);
lumCoeff = 0;

% For kk = 1 we're dealing with circular distance
diffVal     = min(abs(vHueVal(1) - hueVal), abs(1 - hueVal));
lumCoeff    = lumCoeff + (vCoeffValues(1) * max(0, hueRadius - diffVal));
for kk = 2:numCoeff
lumCoeff = lumCoeff + (vCoeffValues(kk) * max(0, hueRadius - abs(vHueVal(kk) - hueVal)));
end

mO(ii, jj) = mHsl(ii, jj, 3) * (1 + lumCoeff);
end
end

end

Pay attention that the conversion from vPhotoshopValues to vCoeffValues should be done as vCoeffValues = (vPhotoshopValues - 50) ./ 50.
As Photoshop values are in [-200, 300] and should be linearly mapped into [-5, 5] with 50 -> 0.

Here is a comparison to Photoshop:

The maximum error is less than 1 in [0, 255] range.

The full code is available on my StackExchange Signal Processing Q688 GitHub Repository.

Each (color) image is composed of RGB components. when you add (or reduce) a constant value to all pixels only in RED components you will see the effect equivalent to moving the RED tab towards the right, and same way reducing the RED component by a constant will have the reverse effect.

Like wise you can increment/decrement each component by a fixed value as described. If you increase/decrease ALL RGB components by a same value this will be equivalent to change in brightness (basically you are adding/removing WHITE color).

The Cyan, Blue, Magenta - corresponds to such transformation in CMYK color space. (But i guess, Blue in this color space corresponds to mix of Cyan and Yellow. So that's a bit tricky. The transformation is essentially same for all.

The last element Tint: { Hue and Saturation } corresponds to same operations but here, the images is first transformed in HSV model and then HUE and Saturation is added/subtracted independently.

I don't know about the exact relationships of markers of the dial to the corresponding numbers but that you can figure out by trying out practical values.

• There is RGB and CMY, so all you need to do is transform to any of the two color spaces and you can adjust as much as you want. Just don't forget to update the other triplet once you're done adjusting. Nov 23 '11 at 17:13
• I believe this answer is incorrect and incomplete. 1. In the PS implementation, sliding the "blue" slider doesn't affect the brightness of cyan-ish pixels and sliding the "cyan" slider doesn't afffect the brightness of blue-ish pixels. This approach described in this answer wouldn't work like that. 2. you don't describe how, after RGBCMY components are manipulated, they're converted to grayscale (although it's probably a dotProduct(color, vec3(0.2989, 0.5870, 0.1140) operation). 3. Blue doesn't "correspond to a mix of cyan and yellow" in any color space. Jan 11 '17 at 21:09
• 4. You don't mention that the tint operation is performed after the conversion to grayscale and not before that. Jan 11 '17 at 21:09

format: plain


text:
# Hard Quantum Mechanics Question

1. Jun 7, 2014

### flydream19

1. All given variables and known data
Consider a particle of mass m subject to the infinite square well potential function (with L>0)

Suppose that you do not know the state function describing the system, but that you are told the expectation value of the position of the particle is given by

$$\left\langle x \right\rangle \left( t \right) = \frac{L}{2} + \alpha L\sin \left( {\Omega t} \right)$$

where α is some unknown constant less than 1/2, and Ω is some frequency greater than zero.

2. Relevant equations
Equations used in Quantum Mechanics

Questions:
a. There are many possible values of Ω - what are the allowed values of Ω? (That is, provide an equation for ℏΩ (h-bar*Ω) ). Explain your answer.

b. Write down the most general wave function consistent with this expectation value. Explain your answer.

2. Jun 8, 2014

### strangerep

So... where is your "attempt at a solution"??

OK, I'll give you a hint: write down the Schrodinger equation applicable to this situation.
Then solve it.

3. Jun 8, 2014

### vanhees71

Where is this question from? I find it quite strange, to say it friendly.

If you look for the state of a system with restricted information like in this example, the best you can do is to look for a statistical operator with maximum (von Neumann) entropy consistent with the given information. This is at least the way to look at this problem from the point of view of Shannon-Jaynes information theory.

4. Jun 8, 2014

### Jilang

This a great question! I've just spent a lovely hour in the sunshine having a go at it. As it is not a stationary state you need at least two terms in the general solution. As you need to arrive at at an expectation value of x that has a sinΩt dependency it looks like you need just two terms. I got that hΩ will represent the difference between the two energy levels of the two terms.

5. Jun 8, 2014

### Oxvillian

Surely it's just a question about pure states.

I agree! Perhaps we should add that when you have a superposition of two energy eigenstates, the system will "ring" at the characteristic frequency $\Omega$, as a result of "quantum mechanical cross terms". When you couple the system to an electromagnetic field, it might throw out a photon of that frequency.

6. Jun 8, 2014

### strangerep

Meanwhile, the OP has still made zero attempt at a solution...

7. Jun 9, 2014

### unscientific

What's frustrating is that others who put in decent effort get no replies at all...


text:
Volume 301 - 35th International Cosmic Ray Conference (ICRC2017) - Session Cosmic-Ray Direct. CRD- hadronic interactions/EAS development
Measurement of antiproton production in p-He collisions and prospects for other inputs to cosmic rays physics from the fixed target program of the LHCb experiment
G. Graziani* on behalf of the LHCb collaboration
*corresponding author
Full text: pdf
Pre-published on: 2017 August 16
Published on:
Abstract
The LHCb experiment has the unique possibility, among the LHC experiments,
to be operated in fixed target mode, using its internal gas target SMOG.
The energy scale achievable at the LHC and the excellent detector capabilities
for vertexing, tracking and particle identification allow a wealth of measurements
of great interest for cosmic ray physics. We present the first measurement of
antiproton production in proton-helium collisions at $\sqrt{s_{NN}} = 110$ GeV, which
allows to improve the accuracy of the prediction for secondary antiproton production in
cosmic rays. Prospects for other measurements achievable in the fixed target program
are also discussed.
Open Access


text:
# Solve the following equation for $-180^\circ\leq x\leq 180^\circ$

I am required to solve the following equation for $-180^\circ\leq x\leq 180^\circ$:

$$\sin2x=\tan x.$$

I am aware that I can convert $\sin2x = 2\sin x\cos x$. However, I am not sure where to go from here to find the values for $x$ that will make the equation hold. Any help with solving this would be very much appreciated.

## 4 Answers

You have the correct approach. $2\sin{x}\cos{x}=\dfrac{\sin{x}}{\cos{x}}\Rightarrow \sin{x}(2\cos^2{x}-1)=0\Rightarrow \sin{x}\cos{2x}=0$

Now either $\sin{x}=0$ or $\cos{2x}=0$, for the first search all the solutions in $[-\pi,\pi]$ and for second $-\pi\le x\le \pi \Rightarrow -2\pi\le 2x\le 2\pi$. Thus first gives $x=0,\pi,-\pi$ and second gives $2x=\pm\frac{\pi}{2},\pm\frac{3\pi}{2}$, thus $x=\pm\frac{\pi}{4},\pm\frac{3\pi}{4}$. Thus solution set is $\{0,\pm\pi,\pm\frac{\pi}{4},\pm\frac{3\pi}{4}\}$.

• Please can you show me how you have derive $0,±π,±\frac{π}{4},±\frac{3π}{4}$ an a final answer? The answer I can deduce at this point is $0°$ and $(\frac{π}{2})^°$, however I am unsure about the rest. – Aztec warrior Apr 18 '17 at 17:47
• You should search for all possible answers in domain of x. – user428700 Apr 19 '17 at 5:39

Cancel out $\sin x$.. that means $x= 2 p \pi$

Left out part is just $\cos^2 x= \frac12$ that means $x= q \pi/4$ all inclusive so that $x= 2 p \pi$ can be ignored as repetition.

hint

$$\sin(2x)-\tan(x)=$$

$$\sin (x)(2\cos (x)-\frac{1}{\cos (x)})=$$

$$\tan (x)\cos (2x)=0$$

$$x\in\{-180,-135,-45,0,45,135,180\}$$

HINT: your equation can be written as $$2\sin(x)\cos(x)-\frac{\sin(x)}{\cos(x)}=0$$ and this is $$\sin(x)\left(2\cos^2(x)-1\right)=0$$ if $$\cos(x)\ne 0$$ can you finish?

• $\cos x$ multiply by itself is $\cos^2 x$. Not $\cos x^2$ – Kanwaljit Singh Apr 18 '17 at 16:55
• i meant that, it is right now – Dr. Sonnhard Graubner Apr 18 '17 at 17:24
• Yes it is right now – Kanwaljit Singh Apr 18 '17 at 17:26
• it is not $\cos(2x)$ but $\cos^2(x)$ – Dr. Sonnhard Graubner Apr 18 '17 at 17:40
• From this I can derive that $$sin(x)(2cos^2(x)−1)=0$$ $$=$$ $$sin(x)cos(2x)=0$$ For $sin =0$, I can use $0°$. for $cos2x=0$, I can use $(\frac{π}{2})^°$ The two answers I can deduce are therefore $0°$ and $(\frac{π}{2})^°$ I am still unsure how to derive $0,±π,±\frac{π}{4},±\frac{3π}{4}$ an a final answer – Aztec warrior Apr 18 '17 at 17:45


text:
# Tag Info

13

You can do this using a cursor to grab the data from your table and write to a comma-delimited text file. EDIT: I'm adding a more concise block of code to accomplish the task using the csv module of Python New Answer: import arcpy,csv table =r'c:\path\to\table' outfile = r'c:\path\to\output\ascii\text\file' #--first lets make a list of all of the ...

8

You can use the Feature Class To Feature Class python snippet. Here is the general syntax. FeatureClassToFeatureClass_conversion (in_features, out_path, out_name, {where_clause}, {field_mapping}, {config_keyword}) To output to a shapefile, make sure that your out_path is a folder (and not pointing within a file geodatabase), and that out_name has a ...

7

You can do this using the Calculate Value (Data Management) tool and some Python magic. See also this related question: Add arbitrary code to Arcgis model builder? A multivalue variable is just a semicolon-delimited string of values, so what the multivaluesToCsv function below does is split the multivalue variables into lists and transpose them into rows ...

7

Yet another option, this is more of a theory and programmatic one, using arcpy. A polygon can consist not only of a single outer ring with a single inner donut hole -- they can be nested to an arbitrary number of levels. Consider the following: A topologically correct polygon's rings are ordered according to their containment relationship (source). ...

7

A very simple solution is as follows: Open the attribute table and enable editting (yellow pencil button at the bottom of the dialog box) Click the calculate fields button (calculator icon at the bottom) and create a new field for firstX (possibly changing the output field type to decimal and setting the width and precision) and select 'xat' from the ...

6

There is a little bit of information which might help you in your task. First you may need to download FWTools inorder to use geotifcp and listgeo. Create a TIFF File(You already did it..) Let us call it initialtif.tif find the image width and height(from where you saved it). imageWidth = 1016 imageHeight = 551 Create a World File for our ...

6

Jakup: Here's a link to an ESRI page that has links to both the 9x sample and the 10x code: http://support.esri.com/en/knowledgebase/techarticles/detail/29935 9x had a Detect Complex Output sample that could alert one to the presence of a symbol, setting, etc. that was causing rasterization. I can't find a similar sample made for 10x and haven't tried ...

5

I think what you want to do is create a custom Toolbox tool and setup your parameters there. Then you would ship others your code along with the .tbx Toolbox file. See this section of the ArcGIS help.

5

if they are drawing in just autocad, you will be relegated (restricted) to planar equal area coordinate systems as the output. if they are drawing using autocad map3d then there is at least a chance that the drawing is in an actual crs to start with. if 1 then you wil need to move, rotate, scale the dwg using a known point as "base point". I ussually do ...

5

PostGIS 2.0 doesn't have the function zmflag(geometry). It is now known as st_zmflag(geometry). I'm betting that the version of pgsql2shp is from a prior version of PostGIS. You can check with pgsql2shp -? At the top of the output, it should list the release version. Something like... RELEASE: 2.1.0SVN (r10420)

5

Bap, right clicking on a QGIS composer map item only locks its position, not the layers displayed within the map item. To lock the layers displayed, you must enable the "Lock layers for map item" check box in the map item properties panel:

5

Did you try Qgis? I think wil cover you. You wil find a lot of help on Internet. It is very easy to manipulate the data. If you want to change their style or icons it is very easy. And of course Tiff export is a standard. Is open source and cross platform, that mean you can install it in any Opereting System. More info: From here Download: From here ...

5

The OGC WKT and WKB specifications never explicitly addressed how to encode higher dimensionality, so it would not be surprising if Oracle either (a) did not encode those dimensions at all or (b) did so in a way that is not consistent with formats PostGIS can ingest. Absent any examples of Oracle output, I'm just guessing. You might find that a ...

4

GDAL 1.8 (or later) can convert DEM files to XYZ ASCII file formats. On a system where GDAL is installed (from source, FWTools, OSGeo4W, etc.), go to the shell and try the following command on your file.dem (or whatever): gdal_translate -of XYZ file.dem file.xyz I haven't tested out a raster of this size, but my guess is your xyz file will be close to 2 ...

4

I think you were missing closing your output text file - until you do that, you won't get anything written to the text file. Below code tested and works: import arcpy arcpy.env.workspace = r"C:\Users\chad\Documents\ArcGIS\Default.gdb" arcpy.BuildRasterAttributeTable_management("raster17", "Overwrite") outfile = open(r"D:\temp\raster17.txt", "w") rows = ...

4

You may want the "Export Feature Attribute to ASCII", cleverly named arcpy.ExportXYv_stats http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005p0000003v000000 import arcpy feature = "path to feature here" # fieldnames must be explicitly provided. Note that you will get additional fields based on the feature type (e.g., "XCoord" and "YCoord" ...

4

Yes. You need to purchase a separate Data Interoperability extension. ($2,500 USD, about$4,000 CAD) Free 60-day trial is available. http://www.esri.com/software/arcgis/extensions/datainteroperability/pricing.html

4

The API can return KML, so you just need to do queries such as: Search queries (this one is probably the most relevant to what you need): http://api.wikimapia.org/?function=search&q=bus&key=YOUR_API_KEY&format=kml BBox queries: ...

4

you can use the export (multiple). In ArcCatalog... Just right click on the database and choose "export to shapefile (multiple)" If you do it at the database level you will see everything in the database in the tool listed (there is a remove button if there are a few you don't want). If you do it at the feature dataset level you see everything in ...

4

Two options here: 1) When you do Save As in QGIS right click menu, add .tab to the export filename and it will save as a TAB file. 2) In MapInfo, Import the MID/MIF using the menu options: Table > Import. You can then choose the MID/MIF to import and then choose a place to save the TAB file.

4

I am not certain that I understand your question but it may be that you could use Batch Processing for which I would recommend its online help. UPDATE Now that I have more details of your question I think Batch Processing is the simplest way to go. Locate the Clip tool in the ArcToolbox window (Analysis Tools toolbox, Extract toolset) where you can ...

4

Given that your autocad version is 12+ years old it may be an issue with autocad dwg or dxf file format version (major format version: http://en.wikipedia.org/wiki/.dwg#Version_history). You should try to open it in a newer version of ACAD, or try saving it into an older format.

4

What you want to do is called a Spatial Join. A common GIS task is to join the attributes from one spatial data layer to another. In this example we will join the attribute table from a polygon layer to a points layer, based on which polygon contains the points. In QGIS, you can do that by using the JOIN ATTRIBUTES BY LOCATION TOOL. You can ...

4

Instead of getting the dataset: // Retrieve the first feature dataset from the workspace. IEnumDatasetName enumDatasetName = workspace.get_DatasetNames (esriDatasetType.esriDTFeatureDataset); You can get the feature class by: IEnumDatasetName enumDatasetName = workspace.get_DatasetNames(esriDatasetType.esriDTFeatureClass); See this thread: ...

4

If you really want a text-based raster.. whuber is quite right about a text-representation of raster data being inefficient. But at the same time, it can help to "see the data" when it's represented in text, especially while you're cutting your teeth on some concepts So in the spirit of endorsing text-based-raster for some purposes, you might want to check ...

4

I have had issues with exports running very slowly when I'm using very large dataset, like a PLSS survey grid for an entire state. You might try clipping any extra data out to minimize the amount of geometry that arcmap has to deal with. If you clip any very large or complex layers that you have to be as small as possible it will likely help arcmap ...

4

js2shapefile looks like it should be able to do this, although it may require you to write or use a separate KML parser. See this code for example usage with Google Maps.

4

A very simple approach which springs to mind is to export the tiff to an ascii grid format such as ESRI's .asc file. You will then have a space delimited plain text file. It will have a few header lines which describe the origin, resolution and NoData values etc and you can easily skip over these for the sake of you calculations. You can do the ...

4

I suggest expending effort cutting down the drawing time of the mxd rather than focusing on the python export process. There's some information about that here: Esri KB 34043 - HowTo: Improve printing or exporting performance

4

Have you tried exporting them using the python window as a work around? You could export maps using arcpy. This website shows how to set up the document for export: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s30000006w000000 While this one goes into more detail about the specifications you can set: ...

Only top voted, non community-wiki answers of a minimum length are eligible


text:
Study guide and 6 practice problems on:

## Vector-scalar multiplication scales the length of the vector

$c \mathbf{x}$ is the vector obtained by multiplying the length of $\bfx$ by $c$.
If $c < 0$, then the direction of the vector becomes reversed.
For example, if $c = \pm1.5$:


text:
## Chemistry and Chemical Reactivity (9th Edition)

Published by Cengage Learning

# Chapter 2 Atoms, Molecules, and Ions - Study Questions: 98

#### Answer

$^{39}K$

#### Work Step by Step

Potassium's atomic weight is 39.098 g/mol, which is closer to 39 than 41; therefore, the $^{39}K$ isotope must be more abundant.

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Before we perform any analysis and come up with any assumptions about the distributions of and relationships between variables in our datasets, it is always a good idea to visualize our data in order to understand their properties and identify appropriate analytics techniques. In this post, let’s see the dramatic differences in conclutions that we can make based on (1) simple statistics only, and (2) data visualization.

### The four data sets

The Anscombe dataset, which is found in the base R datasets packege, is handy for showing the importance of data visualization in data analysis. It consists of four datasets and each dataset consists of eleven (x,y) points.

anscombe

x1 x2 x3 x4    y1   y2    y3    y4
1  10 10 10  8  8.04 9.14  7.46  6.58
2   8  8  8  8  6.95 8.14  6.77  5.76
3  13 13 13  8  7.58 8.74 12.74  7.71
4   9  9  9  8  8.81 8.77  7.11  8.84
5  11 11 11  8  8.33 9.26  7.81  8.47
6  14 14 14  8  9.96 8.10  8.84  7.04
7   6  6  6  8  7.24 6.13  6.08  5.25
8   4  4  4 19  4.26 3.10  5.39 12.50
9  12 12 12  8 10.84 9.13  8.15  5.56
10  7  7  7  8  4.82 7.26  6.42  7.91
11  5  5  5  8  5.68 4.74  5.73  6.89

Let’s make some massaging to make the data more convinient for analysis and plotting

Create four groups: setA, setB, setC and setD.

library(ggplot2)
library(dplyr)
library(reshape2)

setA=select(anscombe, x=x1,y=y1)
setB=select(anscombe, x=x2,y=y2)
setC=select(anscombe, x=x3,y=y3)
setD=select(anscombe, x=x4,y=y4)

Add a third column which can help us to identify the four groups.

setA$group ='SetA' setB$group ='SetB'
setC$group ='SetC' setD$group ='SetD'

head(setA,4)  # showing sample data points from setA
x    y group
1 10 8.04  SetA
2  8 6.95  SetA
3 13 7.58  SetA
4  9 8.81  SetA

Now, let’s merge the four datasets.

all_data=rbind(setA,setB,setC,setD)  # merging all the four data sets
all_data[c(1,13,23,43),]  # showing sample

x    y group
1  10 8.04  SetA
13  8 8.14  SetB
23 10 7.46  SetC
43  8 7.91  SetD

### Compare their summary statistics

summary_stats =all_data%>%group_by(group)%>%summarize("mean x"=mean(x),
"Sample variance x"=var(x),
"mean y"=round(mean(y),2),
"Sample variance y"=round(var(y),1),
'Correlation between x and y '=round(cor(x,y),2)
)
models = all_data %>%
group_by(group) %>%
do(mod = lm(y ~ x, data = .)) %>%
do(data.frame(var = names(coef(.$mod)), coef = round(coef(.$mod),2),
group = .$group)) %>% dcast(., group~var, value.var = "coef") summary_stats_and_linear_fit = cbind(summary_stats, data_frame("Linear regression" = paste0("y = ",models$"(Intercept)"," + ",models\$x,"x")))

summary_stats_and_linear_fit

group mean x Sample variance x mean y Sample variance y Correlation between x and y
1  SetA      9                11    7.5               4.1                         0.82
2  SetB      9                11    7.5               4.1                         0.82
3  SetC      9                11    7.5               4.1                         0.82
4  SetD      9                11    7.5               4.1                         0.82
Linear regression
1      y = 3 + 0.5x
2      y = 3 + 0.5x
3      y = 3 + 0.5x
4      y = 3 + 0.5x

If we look only at the simple summary statistics shown above, we would conclude that these four data sets are identical.

### What if we plot the four data sets?

 ggplot(all_data, aes(x=x,y=y)) +geom_point(shape = 21, colour = "red", fill = "orange", size = 3)+
ggtitle("Anscombe's data sets")+geom_smooth(method = "lm",se = FALSE,color='blue') +
facet_wrap(~group, scales="free")

As we can see from the figures above, the datasets are very different from each other. The Anscombe’s quartet is a good example that shows that we have to visualize the relatonships, distributuions and outliers of our data and we shoul not rely only on simple statistics.

## Summary

We should look at the data graphically before we start analysis. Further, we should understand that basic statistics properties can often fail to capture real-world complexities (such as outliers, relationships and complex distributions) since summary statistics do not capture all of the complexities of the data.

Related Post


text:
#### Scale Invariant Subfamily and Macroscopic Quantum Chaos 1

This is how a set of quantum point interaction emerge from the quantum mechanical breaking of classical systemmries. It must be added in rush that not all quantum point interactions are gerenated because of the quantum scale anomaly. That is evident in the existence of scale invariant quantum point interactions.

Consider the family of point interaction spanned by (\mu, \nu) with fixed values \theta_+ = 0 and \theta_- = \pi in (3.4), (3.5) and (3.6). This, we recall, is nothing but the "spectral invariant sphere" in the previous chapters. Explicitely, U is given by

 (7.1)

We see one particular characteristics of this family of U, which is that the scale parameter L_0 does not appear anywhere. We can also show converse quite easily. Namely all scale invaiant point interaction is described (7.1). Therfore, the sphere representing the parameter space can also be called "scale invariant sphere". If we translate this U into the transfer matrix form (2.11), we have

 (7.2)

Here we have defined \alpha = \cos\mu. This show that the point interaction belonging to the scale invariant sphere casues the wave function discontinuity that enlarge (shrink) the wave function by factor \alpha and shrink(enlarge) its derivative by factor (1/\alpha) when moving from one side of the singularity to the other. A crucial aspect of this family of point interaction can be found in its scattering matrix, which is obtained straight from (3.11) as

 A (7.3)

These expressions show that the transmission and the reflection probabilities are energy independent constants, as they are expected to be from the scale invariant interactions.

Strangely, this fact does not change at any high energy limit, signifying its persistence to the scale we can handle macroscpically. Therefore, it must mean that this quantum obstacle act as a stochastic semi-transparent barrier for a "classical" experimenter-observer. The trick is of course in thge fact that this high energy limit is not really a classical limit in any usual sense. But this does have macroscopically observable consequence, classical or not, and it illustrates the mystery of quantumpoint interaction in very vivid way.

 Goto: ResearchPage copyright 2006 CheonHome EducationPage t.cheon & associates


text:
extra-1.4.11: Extra functions I use.

Data.Either.Extra

Description

This module extends Data.Either with extra operations, particularly to quickly extract from inside an Either. Some of these operations are partial, and should be used with care in production-quality code.

Synopsis

Documentation

isLeft :: Either a b -> Bool #

Return True if the given value is a Left-value, False otherwise.

Examples

Basic usage:

>>> isLeft (Left "foo")
True
>>> isLeft (Right 3)
False

Assuming a Left value signifies some sort of error, we can use isLeft to write a very simple error-reporting function that does absolutely nothing in the case of success, and outputs "ERROR" if any error occurred.

This example shows how isLeft might be used to avoid pattern matching when one does not care about the value contained in the constructor:

>>> import Control.Monad ( when )
>>> let report e = when (isLeft e) $putStrLn "ERROR" >>> report (Right 1) >>> report (Left "parse error") ERROR  Since: 4.7.0.0 isRight :: Either a b -> Bool # Return True if the given value is a Right-value, False otherwise. Examples Basic usage: >>> isRight (Left "foo") False >>> isRight (Right 3) True  Assuming a Left value signifies some sort of error, we can use isRight to write a very simple reporting function that only outputs "SUCCESS" when a computation has succeeded. This example shows how isRight might be used to avoid pattern matching when one does not care about the value contained in the constructor: >>> import Control.Monad ( when ) >>> let report e = when (isRight e)$ putStrLn "SUCCESS"
>>> report (Left "parse error")
>>> report (Right 1)
SUCCESS

Since: 4.7.0.0

fromLeft :: Either l r -> l Source #

The fromLeft function extracts the element out of a Left and throws an error if its argument is Right. Much like fromJust, using this function in polished code is usually a bad idea.

\x -> fromLeft (Left  x) == x
\x -> fromLeft (Right x) == undefined

fromRight :: Either l r -> r Source #

The fromRight function extracts the element out of a Right and throws an error if its argument is Left. Much like fromJust, using this function in polished code is usually a bad idea.

\x -> fromRight (Right x) == x
\x -> fromRight (Left  x) == undefined

fromEither :: Either a a -> a Source #

Pull the value out of an Either where both alternatives have the same type.

\x -> fromEither (Left x ) == x
\x -> fromEither (Right x) == x


text:
# ATLAS Preprints

2017-04-29
07:37
 $W$ and $Z$ boson production in 5.02 TeV $pp$ and $p$+Pb collisions with the ATLAS detector / Dumančić, Mirta (Weizmann Inst.) This proceeding reports the ATLAS results of measuring vector boson production in $pp$ and $p$+Pb collisions at the center-of-mass energy of 5.02~TeV per nucleon. [...] arXiv:1704.00298. - 4 p. Full text

2017-04-27
09:02
 Search for new phenomena in a lepton plus high jet multiplicity final state with the ATLAS experiment using $\sqrt{s}$ = 13 TeV proton-proton collision data / ATLAS Collaboration A search for new phenomena in final states characterized by high jet multiplicity, an isolated lepton (electron or muon) and either zero or at least three b-tagged jets is presented. [...] CERN-EP-2017-053 ; arXiv:1704.08493. - 2017. - 51 p. Fulltext - Previous draft version - Full text

2017-04-26
08:50
 Performance of the ATLAS Track Reconstruction Algorithms in Dense Environments in LHC run 2 / ATLAS Collaboration Abstract: With the increase in energy of the Large Hadron Collider to a centre-of-mass energy of 13 TeV for Run 2, events with dense environments, such as in the cores of high-energy jets, became a focus for new physics searches as well as measurements of the Standard Model. [...] CERN-EP-2017-045 ; arXiv:1704.07983. - 2017. - 44 p. Fulltext - Previous draft version - Full text

2017-04-15
08:30
 Search for dark matter at $\sqrt{s}=13$ TeV in final states containing an energetic photon and large missing transverse momentum with the ATLAS detector / ATLAS Collaboration Results of a search for physics beyond the Standard Model in events containing an energetic photon and large missing transverse momentum with the ATLAS detector at the Large Hadron Collider are reported. [...] CERN-EP-2017-044 ; arXiv:1704.03848. - 2017. - 45 p. Full text - Previous draft version

2017-04-11
18:11
 Measurements of integrated and differential cross sections for isolated photon pair production in pp collisions at $\sqrt{s}=8$ TeV with the ATLAS detector / ATLAS Collaboration A measurement of the production cross section for two isolated photons in proton--proton collisions at a center-of-mass energy of $\sqrt{s}=8$ TeV is presented. [...] CERN-EP-2017-040 ; arXiv:1704.03839. - 2017. - 39 p. Fulltext - Previous draft version - Full text

2017-04-06
16:46
 New physics searches in the top quark sector (excluding ttbar resonance searches) / Das, Pallabi (TIFR, Mumbai, DHEP) /ATLAS ,CMS and Top Collaborations Several theories beyond the Standard Model of Particle Physics predict new and heavy particles yet to be observed in the hadron colliders. These particles are likely to decay through the heavy top quark, making it suitable as a probe for new physics phenomena. [...] CMS-CR-2017-031.- Geneva : CERN, 2017 - 7 p. Fulltext: PDF; In : 9th International Workshop on the CKM Unitarity Triangle, Mumbai, India, 28 Nov - 2 Dec 2016

2017-04-05
17:06
 Measurement of the $k_\mathrm{t}$ splitting scales in $Z \to \ell\ell$ events in $pp$ collisions at $\sqrt{s} = 8$ TeV with the ATLAS detector / ATLAS Collaboration A measurement of the splitting scales occuring in the $k_\mathrm{t}$ jet-clustering algorithm is presented for final states containing a $Z$ boson. [...] CERN-EP-2017-033 ; arXiv:1704.01530. - 2017. - 42 p. Fulltext - Previous draft version - Preprint

2017-04-05
16:52
 Femtoscopy with identified charged pions in proton-lead collisions at $\sqrt{s_{\mathrm{NN}}}=5.02$ TeV with ATLAS / ATLAS Collaboration Bose-Einstein correlations between identified charged pions are measured for $p$+Pb collisions at $\sqrt{s_{\mathrm{NN}}}=5.02$ TeV using data recorded by the ATLAS detector at the LHC corresponding to a total integrated luminosity of $28~\mathrm{nb}^{-1}$. [...] CERN-EP-2017-004 ; arXiv:1704.01621. - 2017. - 56 p. Fulltext - Previous draft version - Full text

2017-04-04
13:43
 Flavor Changing Neutral Current searches in the top quark sector / Bhowmik, Sandeep (Bhubaneswar, NISER) /ATLAS ,CMS and Top Collaborations Flavor changing neutral current (FCNC) interactions in top quark are highly suppressed in the Standard Model. Therefore, any measurable branching ratio for top FCNC decays is an indication of new physics. [...] CMS-CR-2017-097.- Geneva : CERN, 2017 - 8 p. Fulltext: PDF; In : 9th International Workshop on the CKM Unitarity Triangle, Mumbai, India, 28 Nov - 2 Dec 2016

2017-03-30
16:12
 Jet reconstruction and performance using particle flow with the ATLAS Detector / ATLAS Collaboration This paper describes the implementation and performance of a particle flow algorithm applied to 20.2 fb$^-1$ of ATLAS data from 8 TeV proton-proton collisions in Run 1 of the LHC. [...] CERN-EP-2017-024 ; arXiv:1703.10485. - 2017. - 67 p. Fulltext - Previous draft version - Preprint


text:
# Multidimensional Systems and Signal Processing (MULTIDIM SYST SIGN P )

Publisher: Springer Verlag

## Description

Multidimensional Systems and Signal Processing is an archival peer-reviewed technical journal publishing survey and original papers spanning fundamentals as well as applicable research contributions. While the subject of multidimensional systems is concerned with mathematical issues designed to tackle a broad range of models its applications in signal processing have been known to cover spatial and temporal signals of diverse physical origin. The current problem faced due to the widely scattered nature of publications in this area will be circumvented through the unity of theme in this journal so that research is facilitated and expected with much reduced duplication of effort and much enhanced communication. Topics of current interest include but are not limited to: blurred and noisy image processing multidimensional signal reconstruction from partial or incomplete observations and projections signal modeling spectral analysis and transform techniques array processing linear and nonlinear prediction and filtering of multidimensional processes multidimensional spectrum estimation multivariate approximation multidimensional realization theory multidimensional sampling strategies interpolation and decimation schemes velocity filtering fast processing of remotely sensed multidimensional data multivariate polynomial and matrix factorization schemes computer algebra for symbolic and algebraic manipulations concurrent architecture for multidimensional signal processing visual communications neural networks and incorporation of artificial intelligence techniques in spatio temporal data processing

• Impact factor
0.86
Hide impact factor history

Impact factor
.
Year
• 5-year impact
0.80
• Cited half-life
9.00
• Immediacy index
0.20
• Eigenfactor
0.00
• Article influence
0.38
• Website
Multidimensional Systems and Signal Processing website
• Other titles
Multidimensional systems and signal processing (Online)
• ISSN
0923-6082
• OCLC
38267214
• Material type
Document, Periodical, Internet resource
• Document type
Internet Resource, Computer File, Journal / Magazine / Newspaper

## Publisher details

• Pre-print
• Author can archive a pre-print version
• Post-print
• Author can archive a post-print version
• Conditions
• Author's pre-print on pre-print servers such as arXiv.org
• Author's post-print on author's personal website immediately
• Author's post-print on any open access repository after 12 months after publication
• Publisher's version/PDF cannot be used
• Published source must be acknowledged
• Must link to publisher version
• Set phrase to accompany link to published version (see policy)
• Articles in some journals can be made Open Access on payment of additional charge
• Classification
 green

## Publications in this journal

• ##### Article: Biquaternion noncircular MUSIC
[Hide abstract]
ABSTRACT: A biquaternion-based direction-finding algorithm for noncircular sources is presented. The covariance and conjugate covariance matrices of the array output are utilized symmetrically within a frame of biquaternions. The direction-of-arrivals are found where the biquaternion steering vectors are orthogonal to the noise subspace in the biquaternion domain. Simulations show the improved performance of the proposed method compared to its complex counterparts.
Multidimensional Systems and Signal Processing 12/2014;
• ##### Article: Fast retrieval of color objects with multidimensional orthogonal polynomials
[Hide abstract]
ABSTRACT: In this paper, a color model for the Orthogonal Polynomials Transform and modifications to the generating function of the transform’s coefficients in order to enhance the speed of the transform have been proposed. Utilizing this simple and integer-based transform, a fast color image annotation and retrieval system is proposed. In the proposed retrieval system, images are represented as a mixture of Gaussians which are built from the transform’s partial coefficients. Annotation is performed by estimating the Kullback Leibler distance between the Gaussian distributions of the query and that of the database. This retrieval system is fast owing to the following reasons: 1) Usage of a computationally light transform 2) Sufficiency of partial decoding of the transform’s coefficients for building the image representation owing to its energy compaction property 3) Exploitation of the inherent symmetry of the point spread operator of transform which is useful for fast determination of the transform’s coefficients and 4) Non-usage of any time consuming weight assignment algorithm while fusing multiple features into the feature vector. The algorithm is validated on the COIL-100 database which has been categorized into six types for the purpose of analyzing the results better. An optimum number of extracted features and Gaussian mixtures that give a good annotation and retrieval performance is determined. The performance of the proposed system is compared with that of other recent compressed domain techniques and also with the feature set given by the local descriptors of SIFT.
Multidimensional Systems and Signal Processing 10/2014;
• ##### Article: Three stochastic measurement schemes for direction-of-arrival estimation using compressed sensing method
[Hide abstract]
ABSTRACT: We focus on the design of the measurement schemes in the compressed sensing (CS) method for direction-of-arrival estimation, and three stochastic measurement schemes are considered. In the perspectives of average apertures and incoherences, we give a detailed mathematical analysis for these schemes. The superiorities in incoherences for these schemes are illustrated, compared with the popularly used random Gaussian measurement scheme. Then we demonstrate that the newly used Poisson disk sampling scheme and uniform jittered sampling scheme can obtain relatively large average apertures by using a proposed computational method. Finally, several simulations are implemented to evaluate the performances of the CS methods with these stochastic measurement schemes.
Multidimensional Systems and Signal Processing 10/2014;
• ##### Article: A novel range alignment method for ISAR based on linear T/R array model
[Hide abstract]
ABSTRACT: In inverse synthetic aperture radar (ISAR) imaging, translation compensation should be done before range-Doppler imaging process, and range alignment is the first step for translation compensation. In order to remove the limitation of integer range bin and align the echoes precisely for ISAR range alignment, combining with the advantage of array signal processing at fractional unit delay compensation, we propose a novel range alignment method based on linear transmitting/receiving (T/R) array. Firstly the ISAR imaging system is modeled as a linear T/R array. Then based on the snapshot imaging model of linear T/R array, range alignment is accomplished by wave path difference compensation which is transformed into the phase difference compensation in frequency domain between adjacent array elements. The phase difference compensation consists of integer range bin alignment and decimal time delay compensation which is implemented by the phase rotation’s estimation and compensation in frequency domain. Finally, the results of simulation data and real radar data are provided to demonstrate the effectiveness of the proposed method.
Multidimensional Systems and Signal Processing 10/2014;
• ##### Article: Application of 2-dimensional analytic signals with single-quadrant spectra for processing of SAFT-reconstructed images
[Hide abstract]
ABSTRACT: The Synthetic Aperture Focusing Technique (SAFT) is an algorithm applied in non-destructive ultrasonic testing which provides an image of flaws within a specimen. The image is reconstructed from A-scans measured at different positions. Reliable evaluation of the images obtained by the SAFT-algorithm, however, depends on the representation of the reconstructed data, which is initially given in terms of positive and negative local values only. A suitable way of processing this data for evaluation is to calculate the envelope, which can be achieved by means of the analytic signal. The extension of this concept to the multidimensional case is neither trivial nor unique and although extensive work on this subject has been carried out in the past, a correct envelope calculation in multidimensional data remains difficult since it depends on an additional condition, namely the separability of the signal. In this paper, the concept of analytic signals with single-quadrant spectra is applied to process 2-dimensional data obtained by the SAFT-algorithm. Furthermore, we present a procedure to overcome the limitations of that approach by selecting local magnitude values from a number of rotated frames after evaluating the signal’s separability in each frame, which is briefly validated against synthetic and experimental data.
Multidimensional Systems and Signal Processing 10/2014;
• ##### Article: Robust iterative learning control with rectifying action for nonlinear discrete time-delayed systems
[Hide abstract]
ABSTRACT: This paper addresses the two-dimensional (2-D) linear inequalities based robust Iterative Learning Control (ILC) for nonlinear discrete systems with time delays. The proposed two-gain ILC rule has a rectifying action to iterative initial error and external disturbances. It guarantees a reduced bound of the ILC tracking error against the iteration-varying initial error and disturbances. For the iteration-invariant initial error and disturbances, the ILC tracking error can be driven to convergence, and a complete tracking to reference trajectory beyond the initial time point is even achieved as the control gain is specifically selected. An example is used to validate the proposed ILC method.
Multidimensional Systems and Signal Processing 10/2014;
• ##### Article: Algebraic integer architecture with minimum adder count for the 2-D Daubechies 4-tap filters banks
[Hide abstract]
ABSTRACT: A multiplierless architecture based on algebraic integer representation for computing the Daubechies 4-tap wavelet transform for 1-D/2-D signal processing is proposed. This architecture improves on previous designs in a sense that it minimizes the number of parallel 2-input adder circuits. The algorithm was achieved using numerical optimization based o exhaustive search over the algebraic integer representation. The proposed architecture furnishes exact computation up to the final reconstruction step, which is the operation that maps the exactly computed filtered results from algebraic integer representation to fixed-point. Compared to Madishetty et al. (IEEE Trans Circuits Syst I (Accepted, In Press), 2012a), this architecture shows a reduction of $$10\cdot n-3$$ adder circuits, where $$n$$ is the number of wavelet decomposition levels. Standard $$512\times 512$$ images Mandrill, Lena, and Cameraman were submitted to digital realizations of both proposed algebraic integer based as well as fixed-point schemes, leading to quantifiable comparisons. The design is physically implemented for a 4-level 2-D decomposition using a Xilinx Virtex-6 vcx240t-1ff1156 FPGA device operating at up to a maximum clock frequency of 263.15 MHz. The FPGA implementation is tested using hardware co-simulation using an ML605 board with clock of 100 MHz. A 45 nm CMOS synthesis shows improved clock frequency of better than 500 MHz for a supply voltage of 1.1 V.
Multidimensional Systems and Signal Processing 10/2014; 25(4).
• ##### Article: Computationally efficient 2-D DOA estimation for uniform rectangular arrays
[Hide abstract]
ABSTRACT: A computationally efficient two-dimensional (2-D) direction-of-arrival (DOA) estimation method for uniform rectangular arrays is presented. A preprocessing transformation matrix is first introduced, which transforms both the complex-valued covariance matrix and the complex-valued search vector into real-valued ones. Then the 2-D DOA estimation problem is decoupled into two successive real-valued one-dimensional (1-D) DOA estimation problems with real-valued computations only. All these measures lead to significantly reduced computational complexity for the proposed method.
Multidimensional Systems and Signal Processing 10/2014; 25(4).
• ##### Article: Computational integral imaging-based 3D digital watermarking scheme using cellular automata transform and maximum length cellular automata
[Hide abstract]
ABSTRACT: A novel 3D watermarking algorithm by combining use of computational integral imaging (CII) and cellular automata transform (CAT) is proposed in this paper. In this proposed scheme, first, the original image signal is decomposed into three resolution levels by using the level-3 2D CAT, and meanwhile, the middle-frequency domains are obtained. Then, an elemental images (EIs) array is generated by recording the information of rays of light coming from an object through a pinhole array in the CII system. The EIs array is encrypted by linear maximum-length cellular automata as the encrypted watermark embedded into the CAT middle-frequency domains. Finally, the watermarked image is obtained by using the level-3 2D inverse CAT. To verify the usefulness of the proposed algorithm, we carry out the computational experiments and present the experimental results for various attacks. Experimental results show that this proposed watermarking system provides excellent results in unobtrusiveness and robustness.
Multidimensional Systems and Signal Processing 07/2014;
• ##### Article: LMI-based criterion for robust stability of 2-D discrete systems with interval time-varying delays employing quantisation / overflow nonlinearities
[Hide abstract]
ABSTRACT: This paper is concerned with the problem of global asymptotic stability of a class of nonlinear uncertain two-dimensional (2-D) discrete systems described by the Fornasini-Marchesini second local state-space model with time-varying state delays. The class of systems under investigation involves norm bounded parameter uncertainties, interval-like time-varying delays and various combinations of quantisation and overflow nonlinearities. A linear matrix inequality-based delay-dependent criterion for the global asymptotic stability of such systems is proposed. An example is given to illustrate the effectiveness of the proposed method.
Multidimensional Systems and Signal Processing 07/2014;
• ##### Article: Controllability up to negligible trajectories of discrete multidimensional behaviours
[Hide abstract]
ABSTRACT: We define the controllability of the title algebraically and characterise it by a corresponding concatenability of trajectories. The main result is motivated by and extends the characterisation of standard controllability by Wood and Zerz (Notes on the definition of behavioural controllability, Syst Control Lett 37(1):31–37, 1999). Negligibility is defined with respect to a suitably chosen Serre category of modules over a given operator domain. A behaviour is called negligible if its module belongs to this category. Standard examples of negligible behaviours with respect to suitably chosen Serre categories are asymptotically stable and nilpotent behaviours according to Bisiacco and Valcher. A behaviour is called controllable up to negligible trajectories if its factor behaviour modulo its largest controllable subbehaviour is negligible. This controllability notion generalises multidimensional stabilisability and coincides with it in dimension one. The preceding definitions also apply to continuous systems. The domain of the independent discrete variables of the considered discrete behaviours is an arbitrary finitely generated submonoid of a free abelian group.
Multidimensional Systems and Signal Processing 07/2014;
• ##### Article: A hybrid STAP approach to target detection for heterogeneous scenarios in radar seekers
[Hide abstract]
ABSTRACT: Adaptive detection of moving targets on the sea is important for radar seekers. Recently, more attention has been paid to the deleterious effect of clutter heterogeneity on space-time adaptive processing (STAP) for pulse Doppler radar. Since secondary samples are no longer statistically independent and identically distributed (IID) in heterogeneous environments, this is subjected to a great challenge to target detection for radar seekers. Due to the fact that chaff jamming severely affects the performance degradation of target detection, the hybrid detection algorithm is proposed to suppress the sea clutter and chaff jamming. Firstly, the range cells can be classified into two regions according to the power, namely clutter region and hybrid region. Then we propose different algorithms to process two regions. The fixed point (FP) estimator is used to estimate the clutter covariance matrix in clutter region. While the power selected training (PST) algorithm is used to select the homogeneous secondary samples, and an algorithm based on two-step subspace projection for hybrid interference suppression is presented in hybrid region. Finally, the proposed Pareto-based generalized likelihood ratio test (PBGLRT) detector can detect the slowly moving targets in heterogeneous interference. Simulation results show that the PBGLRT detector outperforms both the low rank normalized adaptive match filter (LRNAMF) and normalized adaptive match filter (NAMF) detectors against interference heterogeneity.
Multidimensional Systems and Signal Processing 07/2014;
• ##### Article: Radar imaging for targets with complex rotation based on phase history decomposition
[Hide abstract]
ABSTRACT: Traditional inverse synthetic aperture radar (ISAR) imaging algorithms can not obtain focused images when the target undergoes complex three-dimensional (3D) rotation. An imaging algorithm to obtain two dimensional (2D) images or 3D distributions of scattering centers is proposed in this paper for targets undergoing complex rotation in a small angular extent. Firstly, the phase histories of different scattering centers are extracted by signal decomposition and they are arranged into a phase history matrix. Then, the singular value decomposition is carried out for the phase matrix to reveal the rotation characters. 3D rotations and 2D rotations are identified from the singular values and these two cases are treated separately. When target undergoes 2D rotation, the focused ISAR image can be obtained by resampling the received signals according to the first column of the right singular matrix. When target undergoes 3D rotation, the distorted 3D scattering center model can be obtained directly from the first and second columns of the left singular matrix. The distortion and ambiguity for the extracted 3D scattering center model are also analyzed theoretically. Simulations and experimental results verify the effectiveness of the algorithm.
Multidimensional Systems and Signal Processing 07/2014;


text:
Effective Altruism ForumEA Forum

MichaelDickens

I do independent research on EA topics. I write about whatever seems important, tractable, and interesting (to me). Lately, I mainly write about EA investing strategy, but my attention span is too short to pick just one topic.

I have a website: https://mdickens.me/ Most of the content on my website gets cross-posted to the EA Forum.

My favorite things that I've written: https://mdickens.me/favorite-posts/

I used to work as a software developer at Affirm.

Sequences

Quantitative Models for Cause Selection

Topic Contributions

Agrippa's Shortform

Eliezer said something similar, and he seems similarly upset about it: https://twitter.com/ESYudkowsky/status/1446562238848847877

(FWIW I am also upset about it, I just don't know that I have anything constructive to say)

MichaelDickens's Shortform

Looking at the Decade in Review, I feel like voters systematically over-rate cool but ultimately unimportant posts, and systematically under-rate complicated technical posts that have a reasonable probability of changing people's actual prioritization decisions.

Example: "Effective Altruism is a Question (not an ideology)", the #2 voted post, is a very cool concept and I really like it, but ultimately I don't see how it would change anyone's important life decisions, so I think it's overrated in the decade review.

"Differences in the Intensity of Valenced Experience across Species", the #35 voted post (with 1/3 as many votes as #2), has a significant probability of changing how people prioritize helping different species, which is very important, so I think it's underrated.

(I do think the winning post, "Growth and the case against randomista development", is fairly rated because if true, it suggests that all global-poverty-focused EAs should be behaving very differently.)

This pattern of voting probably happens because people tend to upvote things they like, and a post that's mildly helpful for lots of people is easier to like than a post that's very helpful for a smaller number of people.

(For the record, I enjoy reading the cool conceptual posts much more than the complicated technical posts.)

What are some high-EV but failed EA projects?

Thanks, I hadn't seen this previous post!

What are some high-EV but failed EA projects?

I will give an example of one of my own failed projects: I spent a couple months writing Should Global Poverty Donors Give Now or Later? It's an important question, and my approach was at least sort of correct, but it had some flaws that made my approach pretty much useless.

Why Helping the Flynn Campaign is especially useful right now

How quickly can campaigns spend money? Can they reasonably make use of new donations within less than 8 days?

New substack on utilitarian ethics: Good Thoughts

Sounds plausible. Some data: The PhilPapers survey found that 31% of philosophers accept or lean toward consequentailism, vs. 32% deontology and 37% virtue ethics. The ratios are about the same if instead of looking at all philosophers, you look at just applied ethicists or normative ethicists.

I don't know of any surveys on normative views of philosophy-adjacent people, but I expect that (e.g.) economists lean much more consequentialist than philosophers. Not sure what other fields one would consider adjacent to philosophy. Maybe quant finance?

How to optimize your taxes as a donor in the US: donate appreciated securities, make a donor-advised fund, and bunch your donations

You could do something very similar by having one person short a liquid security with low borrowing costs (like SPY maybe) and have the other person buy it.

The buyer will tend to make more money than the shorter, so you could find a pair of securities with similar expected return (e.g., SPY and EFA) and have each person buy one and short the other.

You could also buy one security and short another without there being a second person. But I don't think this is an efficient use of capital—it's better to just buy something with good expected return.

Kyle Lucchese's Shortform

Is it possible to do the most good while retaining current systems (especially economic)? What in these systems needs to be transformed?

This question is already pretty heavily researched by economists. There are some known answers (immigration liberalization would be very good) and some unknowns (how much is the right amount of fiscal stimulus in recessions?). For the most part, I don't think there's much low-hanging fruit in terms of questions that matter a lot but haven't been addressed yet. Global Priorities Institute does some economics research, IMO that's the best source of EA-relevant and neglected questions of this type.

FTX/CEA - show us your numbers!

As a positive example, 80,000 Hours does relatively extensive impact evaluations. The most obvious limitation is that they have to guess whether any career changes are actually improvements, but I don't see how to fix that—determining the EV of even a single person's career is an extremely hard problem. IIRC they've done some quasi-experiments but I couldn't find them from quickly skimming their impact evaluations.

FTX/CEA - show us your numbers!

A related thought: If an org is willing to delay spending (say) $500M/year due to reputational/epistemic concerns, then it should easily be willing to pay$50M to hire top PR experts to figure out the reputational effects of spending at different rates.

(I think delays in spending by big orgs are mostly due to uncertainty about where to donate, not about PR. But off the cuff, I suspect that EA orgs spend less than the optimal amount on strategic PR (as opposed to "un-strategic PR", e.g., doing whatever the CEO's gut says is best for PR).)


text:
# MAT 338 Day 41 2011

## 2809 days ago by kcrisman

Last time we ended with two new concepts.

• One is that of a Dirichlet series, which essentially is a series gotten from an arithmetic function $f(n)$ by making the series $\sum_{n=1}^{\infty}\frac{f(n)}{n^s}=F(s)$.
• The other is the idea of an Euler product, which is what you have if you can write such a series as an infinite product over primes $\prod_{p} g(p)$, where usually $g$ somehow looks like an infinite sum itself.

Our key example was the Riemann zeta function, where we saw that $$\zeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}=\prod_p \left(\frac{1}{1-p^{-s}}\right)\, .$$

We also saw that $$\sum_{n=1}^{\infty}\frac{\mu(n)}{n^s}=\prod_{p}\left(1-\frac{1}{p^s}\right)=\prod_p (1-p^{-s})$$ wherever these make sense.

What was surprising about this is that the Euler products for the Riemann $\zeta$ function and this function are simply multiplicative inverses, e.g. $$\prod_p \frac{1}{1-p^{-s}}=1/\left(\prod_p 1-p^{-s}\right)\, .$$

sum([moebius(n)/n^2 for n in [1..1000]]).n()
 0.607931911854226 0.607931911854226
1/zeta(2).n()
 0.607927101854027 0.607927101854027

Recall that $\zeta(2)=\frac{\pi^2}{6}$ (though before we just used this as a sum, and didn't call it $\zeta(2)$.

(Incidentally, though Euler calculated even values of $\zeta$, it was only in 1978 that $\zeta(3)$ was shown to be irrational, and then named after the man who proved this, Roger Apéry.  To this day, it is only known that at least one of the next four odd values is irrational.)

1/(pi^2/6).n()
 0.607927101854027 0.607927101854027

At least things agree to four digits when we approximate it, so this seems reasonable.

But last time, we said that

• Take $f(n)$ and $g(n)$ two arithmetic functions.
• Let $h=f\star g$ be their Dirichlet product.
• Then let $F,G,H$ be the corresponding Dirichlet series (in $s$).
• If the series $F$ and $G$ converge absolutely for any $s$ you care about (not necessarily all $s$), then $$H=FG\; .$$

This is really a quite remarkable connection between the discrete/algebraic point of view and the analytic/calculus point of view.

Proof:

• Key fact you may or may not have seen in calculus:
• When series converge absolutely, you can mess around with them a lot with impunity.
• So we can mess around a lot with the product $$F(s)G(s)=\sum_{n=1}^\infty\frac{f(n)}{n^s}\sum_{m=1}^\infty\frac{g(m)}{m^s}$$
• In particular, we can group the products $\frac{f(n)g(m)}{n^sm^s}$ the same way we did in proving things about $\star$ - we can group by when $n$ and $m$ are complementary divisors of the same number.   This gives $$\sum_{d=1}^\infty\sum_{nm=d}\frac{f(m)g(n)}{d^s}\; .$$
• But the inner sum is precisely the $\star$ Dirichlet product (well, over $d^s$), so this is the same as $$\sum_{d=1}^\infty \frac{(f\star g)(d)}{d^s}\; .$$
• The numerators are the definition of $h$, so this is just $H(s)$, as desired.

We can immediately apply this to calculate the Dirichlet series of $\phi$ in terms of the Riemann $\zeta$ function.  We have three facts:

• $\phi\star u=N$
• $\zeta$ is absolutely convergent for $s>1$
• The Dirichlet series of $\phi$ is absolutely convergent as well, as $$0<\sum_{n=1}^\infty \frac{\phi(n)}{n^s}\leq \sum_{n=1}^\infty \frac{n}{n^s}=\sum_{n=1}^\infty\frac{1}{n^{s-1}}$$ which converges by the integral test if $s>2$ (it's also $\zeta(s-1)$).

So the series for $\phi$ (call it $P$) and $u$ multiply to the series for $N$.  But now we have three other facts.

• The series for $u$ is $\zeta(s)$.
• The series for $N$ (from last time, or above) is $\zeta(s-1)$.
• So $P(s)\zeta(s)=\zeta(s-1)$ for $s>2$.

That means $$\sum_{n=1}^\infty \frac{\phi(n)}{n^s}=\frac{\zeta(s-1)}{\zeta(s)}\; .$$

sum([euler_phi(n)/n^3 for n in [1..10000]]).n()
 1.36837198604112 1.36837198604112
(zeta(2)/zeta(3)).n()
 1.36843277762021 1.36843277762021

It turns out that such Euler products (and hence nice computations like this) show up quite frequently.

Theorem: If $\sum_{n=1}^{\infty}\frac{f(n)}{n^s}$ converges absolutely and $f$ is multiplicative, then $$\sum_{n=1}^{\infty}\frac{f(n)}{n^s}=\prod_p\left(1+\frac{f(p)}{p^s}+\frac{f(p^2)}{p^{2s}}+\cdots\right)\, .$$

The proof is essentially identical to what we proved with Moebius $\mu$'s Dirichlet series converging to its Euler product.

We can now announce four application facts which we can prove, using these tools.  We will prove as many as we have time for, and leave the rest.

1. Fact: $$\qquad \sum_{n=1}^{\infty}\frac{1}{p_n}$$ diverges, with $p_n$ the $n$th prime.
2. Fact: The probability that a random integer lattice point is visible from the origin is $\frac{6}{\pi^2}$.
• This is the same thing as asking for the probability that two randomly chosen integers are relatively prime.
3. Fact: The Dirichlet series for $f(n)=|\mu(n)|$ is $\zeta(s)/\zeta(2s)$.
4. Fact: The average value of $\phi(n)$ is $\frac{3n}{\pi^2}$.

Let's prove these things.

Fact: $$\qquad \sum_{n=1}^{\infty}\frac{1}{p_n}$$ diverges, with $p_n$ the $n$th prime.

@interact def _(n=[10,100,1000,10000,100000,1000000]): out = sum([RealField(100)(1/p) for p in primes_first_n(n)]) html("The sum of the reciprocals of the first $%s$ primes is $\\approx %s$"%(n,out))

## Click to the left again to hide and once more to show the dynamic interactive window

Proof (divergence of "prime harmonic series"):

As with many other series, we will prove it by looking at the "tails" beyond a point that keeps getting further out.  In this case, we'll choose the 'tail' beyond the first $k$ primes.

• So look at $$\sum_{n>k}\frac{1}{p_n}\, .$$
• Any number of the form $$p_1 p_2 p_3\cdots p_k r+1=p_k\#\cdot r+1$$ is not divisible by any of those first $k$ primes.
• So $p_k\#\cdot r+1$ may be factored as $$p_{n_1}p_{n_2}\cdots p_{n_{\ell}}\; ,$$ where all $n_i>k$.
• That means that somewhere in the $\ell$th power of 'tail', $$\left(\sum_{n>k}\frac{1}{p_n}\right)^{\ell}\; ,$$ we have the term $$\frac{1}{p_1 p_2 p_3\cdots p_k r+1}\; .$$

Now assume that in fact the "prime harmonic series" converges; we will derive a contradiction.

• For some $k$, the "tail" above is less than $\frac{1}{2}$, i.e. $\sum_{n>k}\frac{1}{p_n}<\frac{1}{2}$.
• Then let's look at the sum of the $\ell$th power of the tail (this makes sense, since the series converges) $$\sum_{\ell=1}^{\infty}\left(\sum_{n>k}\frac{1}{p_n}\right)^{\ell}\leq \sum_{\ell=1}^{\infty}\frac{1}{2^{\ell}}=2\, .$$
• Somewhere within this sum of the $\ell$th powers, every single term of the form $\frac{1}{p_1 p_2 p_3\cdots p_k r+1}$ will appear.
• This is since all of these were are products of things like $\frac{1}{p_{n_i}}$ for $i>k$, though how many such primes (remember, we said $\ell$) are involved is heavily dependent upon $r$.
• So the series of reciprocals of these terms $$0<\sum_{r=1}^{\infty}\frac{1}{p_1 p_2 p_3\cdots p_k r+1}\leq \sum_{\ell=1}^{\infty}\left(\sum_{n>k}\frac{1}{p_n}\right)^{\ell}\, .$$
• This makes sense since we have added up all of them, no matter how many primes - from the case where $p_1 p_2 p_3\cdots p_k r+1$ is itself prime to the case where it is a big product $p_{n_1}p_{n_2}\cdots p_{n_{\ell}}$.
• This series should still converge (by comparison, for instance), but $$\sum_{r=1}^{\infty}\frac{1}{p_1 p_2 p_3\cdots p_k r+1}>\sum_{r=1}^{\infty}\frac{1}{p_1 p_2 p_3\cdots p_k r+p_1 p_2 p_3\cdots p_k}=\frac{1}{p_1 p_2 p_3\cdots p_k}\sum_{r=1}^{\infty}\frac{1}{r+1}$$ which certainly diverges as a multiple of the tail of the harmonic series!

This contradiction occurred because we assume that the tail of the original series was finite, so the series in fact diverges!

Fact: The chances that a random integer lattice point is visible from the origin is $\frac{6}{\pi^2}$.

@interact def _(viewsize=(5,[3..25])): var('x,y') P=Graphics() grid_pts = [[i,j] for i in [-viewsize..viewsize] for j in [-viewsize..viewsize]] P += points(grid_pts,rgbcolor=(0,0,0),pointsize=2) lattice_pts = [coords for coords in grid_pts if (gcd(coords[0],coords[1])==1)] P += points(lattice_pts, rgbcolor = (0,0,1),pointsize=10) linesegs=[line([[0,0],[spot[0],spot[1]]],rgbcolor=(1,0,0),linestyle="--",thickness=.5) for spot in lattice_pts] for object in linesegs: P += object show(P, figsize = [5,5], xmin = -viewsize, xmax = viewsize, ymin = -viewsize, ymax = viewsize, aspect_ratio=1) html("Probability in view is $\\approx %s$"%(Integer(len(lattice_pts))/Integer(len(grid_pts))).n()) html("Theoretical probability is $1/\zeta(2)\\approx %s$"%(1/zeta(2)).n())

## Click to the left again to hide and once more to show the dynamic interactive window

Proof (probability of visibility):

First off, it should be pretty clear from the picture that if $(x,y)$ has a gcd, then $\left(\frac{x}{d},\frac{y}{d}\right)$ is right on the line of sight from the origin to $(x,y)$ so that it is blocked off - hence we are really just asking for the probability that two integers are relatively prime.  So we will prove something about this instead.

• We know that $gcd(x,y)=1$ is true precisely if $x$ and $y$ are never simultaneously congruent to zero modulo $p$, for any prime $p$.
• For any given prime $p$, the chances that two integers will both be congruent to zero is $$\left(\frac{1}{p}\right)\left(\frac{1}{p}\right)\, .$$  (This works because they really are independent, since $p$ is fixed.)
• Hence the probability that at least one won't be divisible by $p$ is $$1-\left(\frac{1}{p}\right)\left(\frac{1}{p}\right)=1-\frac{1}{p^2}=1-p^{-2}\, .$$
• Now, a reasonable assumption:
• The probability than any given integer is divisible by $p$ has nothing to do with whether it is divisible by $q$ IF $p$ and $q$ are both prime.
• This is not in general true for such properties; if $n$ is divisible by 4 it has a 100% likelihood of being divisible by 2, while if $n$ is prime, it has almost no chance of being even.
• In this case it is legitimate to multiply the probabilities - we will sweep the fact that there are infinitely many under the rug as well under the rubric convergence - so $$\prod_p (1-p^{-2})=1/\prod_p \frac{1}{1-p^{-2}}=1/\zeta(2)=\frac{6}{\pi^2}\, .$$

Fact: The Dirichlet series for $|\mu(n)|$ is $\zeta(s)/\zeta(2s)$.

Proof:

It's nearly completely symbolic at this point!

• First, we have $$\sum_{n=1}^{\infty}\frac{|\mu(n)|}{n^s}=\prod_p\left(1+\frac{1}{p^s}\right)\, .$$
• Since $(1+x)=\frac{1-x^2}{1-x}$, we can rewrite the right-hand side as $$\prod_p\left(1+\frac{1}{p^s}\right)=\frac{\prod_p\left(1-\frac{1}{p^{2s}}\right)}{\prod_p\left(1-\frac{1}{p^s}\right)}\; .$$
• Now just make both parts reciprocals to get familiar friends: $$\frac{\prod_p\left(1-\frac{1}{p^{2s}}\right)}{\prod_p\left(1-\frac{1}{p^s}\right)}=\frac{\prod_p 1/(1-\frac{1}{p^s})}{\prod_p 1/(1-\frac{1}{p^{2s}})}\; ,$$ which means the sum is $\zeta(s)/\zeta(2s)$.

Fact: $$\lim_{n\to\infty}\frac{\frac{1}{n}\sum_{k=1}^n \phi(k)}{\frac{3}{\pi^2}n}=1$$

def L(n): ls = [] out = 0 for i in range(1,n+1): out += euler_phi(i) ls.append((i,out/i)) return ls
@interact def _(n=100): P = line(L(n)) show(P+plot(3/pi^2*x,(x,0,n),color='black',linestyle="--")) html("Blue is the average value of $\phi$$") html("Red is \\frac{3}{\pi^2} x") ## Click to the left again to hide and once more to show the dynamic interactive window Proof (that the average of \phi is linear with slope 3/\pi^2): We will crucially use these facts: •$$\sum_{n=1}^\infty\frac{\mu(n)}{n^2}=\frac{1}{\zeta(2)}=\frac{6}{\pi^2}$$•$$\phi=\mu\star N\Rightarrow \phi(n)=\sum_{d\mid n}\mu(d)\frac{n}{d}$$Now we will look at the summation function for \phi. We can once again think of it as summing things up in two different ways - along the hyperbola xy=k and along each column. •$$\sum_{k=1}^n\phi(n)=\sum_{k=1}^n\sum_{d\mid k}\mu(d)\frac{k}{d}$$@interact def _(n=(6,range(2,50))): viewsize=n+1 g(x)=1/x P=Graphics() P += plot(n*g,(x,0,n+1)) grid_pts = [[i,j] for i in [1..viewsize] for j in [1..viewsize]] P += points(grid_pts,rgbcolor=(0,0,0),pointsize=2) lattice_pts = [coords for coords in grid_pts if (coords[0]*coords[1]<=n)] for thing in lattice_pts: P += text(moebius(thing[1])*thing[0],thing,rgbcolor=(0,0,0)) show(P,ymax=viewsize,aspect_ratio=1) ## Click to the left again to hide and once more to show the dynamic interactive window So$$\sum_{k=1}^n\sum_{d\mid k}\mu(d)\frac{k}{d}=\sum_{d=1}^n\mu(d)\left(\sum_{k=1}^{\lfloor \frac{n}{d}\rfloor}k\right)$$• The inner sum has previously been seen to be$$\frac{1}{2}\left(\frac{n}{d}\right)^2+O\left(\frac{n}{d}\right)\; .$$• If we plug that in, we get$$\sum_{k=1}^n\phi(n)=\frac{1}{2}n^2\sum_{d=1}^n\frac{\mu(d)}{d^2}+nO\left(\sum_{d=1}^n\frac{1}{d}\right)\; .$$• But we just saw that the first series goes to \frac{6}{\pi^2} in the long run. • Further, the error is O(1/x), because \mu(n)/n^2<1/n^2 and \int x^{-2}=-x^{-1}. • Plugging that in, we get that$$\sum_{k=1}^n\phi(n) = \frac{1}{2}n^2\frac{6}{\pi^2}+O(\text{ stuff less than }x^2)$$So dividing by n and taking the limit, we get the asymptotic$$\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^n\phi(n)=\lim_{n\to\infty}\frac{1}{2}\frac{n^2}{n}\frac{6}{\pi^2}=\lim_{n\to\infty}\frac{3}{\pi^2}n\; .$\$

@interact def _(n=100): P = line(L(n)) show(P+plot(3/pi^2*x,(x,n-100,n),color='black',linestyle="--")+plot(3/pi^2*x+log(x),(x,n-100,n),color='red',linestyle='--'),xmin=n-100)


text:
# Intuition of Immersed versus Embedded Submanifolds

The definitions I read in Lee's Smooth Manifolds is:

Embedded Submanifold: $S\subset M$ is an embedded submanifold if $S \to M$ is an embedding.

Immersed Submanifold: $S\subset M$ is an immersed submanifold if $S \to M$ is an injective immersion.

Thus, an immersed submanifold with the subspace topology is an embedded submanifold. It is also true for an immersed submanifold $S$ that all $U\subset S$ that are open in the subspace topology are open in $S$ (in the immersed submanifold topology).

How does one think of immersed versus injective sub manifolds? Intuitively how do they differ?

• I don't agree with the statement "an immersed submanifold with the subspace topology is an embedded submanifold": the subspace topology on the image of an injective immersion may not admit a compatible structure of manifold at all. For instance, you can find an injective immersion $\Bbb R\to\infty$, where "$\infty$" is a curve of that shape: you send $0$ to the center of the knot and parametrise injectively each lobe with a half-line.
– user228113
May 19, 2016 at 16:01

Immersed submanifold with the subspace topology is not an embedded submanifold. In fact, when we consider the underlying set of an immersed submanifold with the subspace topology, the resulting space need not be a manifold at all. For example, with the subspace topology, the figure-eight is not a manifold since you cannot find an open set in $\mathbb{R}^2$ such that its intersection with the figure-eight gives an open set for some coordinate chart including $0$.

For the second statement, note that in the subspace topology, you cannot find an open neighborhood for $0$ in the figure-eight. Try to think this for the irrational line in torus example. Try to find an open set(in the subspace topology) for any point in the irrational line. (This shows how different two topologies are)

Immersed submanifold topology is inherited from the immersion map $f :S \to M$. That is, $f(U) \subset f(S)$ is open iff $U \subset S$ is open. This topology by definition gives us the homeomorphism $f(S) \cong S$.

One should think immersed submanifold is the same(topologically) as domain of the immersion when s/he uses immersed submanifold topology and one should consider immersed submanifold more carefully when s/he uses submanifold topology because as observed above in the subspace topology image may or may not be a manifold. On the other hand, embedded submanifolds are always homeomorphic to domain of embedding in the subspace topology.

Injective immersions that are not embeddings can be seen as an exotic type of injective immersion which is only possible when the spaces or map involved are not sufficiently nice. After all, an injective immersion $i:M\to N$ must be an embedding if

• $M$ is compact
• $M$ and $N$ have the same dimension (and $\partial M=\varnothing$)
• $i$ is open or closed
• $i$ is proper

(This is Proposition 4.22 in Lee.) You can make injective immersions that are not embeddings by taking manifolds that are not closed and folding their open edges to "touch" the manifold. For example, take an open interval and fold it over itself to make a lemniscate, as shown below. The image of this map is not a manifold.


text:
Differentiate the function? f(x) = log13(xe^x)

Mar 17, 2017

$f ' \left(x\right) = {e}^{x} \log 13 \left(1 + x\right)$

Explanation:

$f \left(x\right) = \log 13 \left(x {e}^{x}\right)$

Recall that the product rule allows us to differentiate a function that is the product of two functions.

If $h \left(x\right) = f \left(x\right) \cdot g \left(x\right)$
then $h ' \left(x\right) = f ' \left(x\right) \cdot g \left(x\right) + f \left(x\right) \cdot g ' \left(x\right)$

So, if we have

$f \left(x\right) = x {e}^{x} \log 13$

Using the product rule:

$f ' \left(x\right) = \left(1\right) \log 13 {e}^{x} + x {e}^{x} \log 13$

$f ' \left(x\right) = {e}^{x} \log 13 \left(1 + x\right)$

Mar 17, 2017

As presented, we have $f \left(x\right) = \log \left(13 x {e}^{x}\right)$. I'll assume that $\log$ is natural logarithm.

Explanation:

$\frac{d}{\mathrm{dx}} \left(\log u\right) = \frac{1}{u} \frac{\mathrm{du}}{\mathrm{dx}}$

So we have $f ' \left(x\right) = \frac{1}{13 x {e}^{x}} \frac{d}{\mathrm{dx}} \left(13 x {e}^{x}\right)$.

Using the product rule we get

$\frac{d}{\mathrm{dx}} \left(13 x {e}^{x}\right) = 13 {e}^{x} + 13 x {e}^{x} = 13 {e}^{x} \left(1 + x\right)$.

Thus $f ' \left(x\right) = \frac{1}{13 x {e}^{x}} \cdot 13 {e}^{x} \left(1 + x\right) = \frac{1 + x}{x} = \frac{1}{x} + 1$.

Mar 17, 2017

Perhaps the intended function is $f \left(x\right) = {\log}_{13} \left(x {e}^{x}\right)$ in which case

Explanation:

Use $\frac{d}{\mathrm{dx}} \left({\log}_{b} u\right) = \frac{1}{u \ln b} \cdot \frac{\mathrm{du}}{\mathrm{dx}}$ to get

$f ' \left(x\right) = \frac{1}{x {e}^{x} \ln 13} \cdot \frac{d}{\mathrm{dx}} \left(x {e}^{x}\right)$

Now use the product rule to find

$\frac{d}{\mathrm{dx}} \left(x {e}^{x}\right) = {e}^{x} + x {e}^{x} = {e}^{x} \left(1 + x\right)$.

So we have

$f ' \left(x\right) = \frac{1}{x {e}^{x} \ln 13} \cdot {e}^{x} \left(1 + x\right) = \frac{1 + x}{x \ln 13}$


text:
# Language of Automata

#### mathmari

##### Well-known member
MHB Site Helper
Hi! Could you help me finding the language that is accepted by the DFA with the following state diagram?

___| a ____ b
Q1 | Q2 __ Q1
Q2 | Q2 __ Q3
Q3 | Q3 __ Q3

final states: Q1, Q2

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Hi! Could you help me finding the language that is accepted by the DFA with the following state diagram?

___| a ____ b
Q1 | Q2 __ Q1
Q2 | Q2 __ Q3
Q3 | Q3 __ Q3

final states: Q1, Q2
Hi mathmari!

If Q3 is not a final state, you can never go to Q3, since you can never go back.
Is that what you intended?

How do you want your language?
As a regular expression?
In BNF syntax? Or EBNF?

If you start in state Q1, the words you can form are $b*a*$, where $*$ denotes zero or more.
Starting from state Q2, you can only form $a*$, which is already included.

#### mathmari

##### Well-known member
MHB Site Helper
Hi mathmari!

If Q3 is not a final state, you can never go to Q3, since you can never go back.
Is that what you intended?

How do you want your language?
As a regular expression?
In BNF syntax? Or EBNF?

If you start in state Q1, the words you can form are $b*a*$, where $*$ denotes zero or more.
Starting from state Q2, you can only form $a*$, which is already included.
The start state is Q1.
I want the language as a regular expression.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
The start state is Q1.
I want the language as a regular expression.

#### mathmari

##### Well-known member
MHB Site Helper
If you start in state Q1, the words you can form are $b*a*$, where $*$ denotes zero or more.
Starting in state Q1, couldn't the words be also $a*b*$ ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Starting in state Q1, couldn't the words be also $a*b*$ ?
After you accept the first $a$, accepting a $b$ would bring you to state Q3.
And from state Q3 you can never get to a final state anymore.

It is a bit weird though that you would have a state that doesn't go anywhere.
Are you sure that is right?

#### mathmari

##### Well-known member
MHB Site Helper
After you accept the first $a$, accepting a $b$ would bring you to state Q3.
And from state Q3 you can never get to a final state anymore.

It is a bit weird though that you would have a state that doesn't go anywhere.
Are you sure that is right?
Now I looked at the exercise again and realized that the state Q2 with $b$ goes to the state Q1 and to the state Q3.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Now I looked at the exercise again and realized that the state Q2 with $b$ goes to the state Q1 and to the state Q3.
So your transition table is incomplete?
But still no other transitions starting from state Q3?

#### mathmari

##### Well-known member
MHB Site Helper
So your transition table is incomplete?
But still no other transitions starting from state Q3?
Starting from Q3 with $a$ or $b$ it goes to the state Q3 again...

#### mathmari

##### Well-known member
MHB Site Helper
How can the state Q2 go with b to the state Q1 and also to the state Q3?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
How can the state Q2 go with b to the state Q1 and also to the state Q3?
Now that you mention it, that's not really deterministic is it?
However, if it would go to state Q3, it can never reach a final state anymore.

In my opinion, your state machine is screwed up.
State Q3 should be deleted altogether, including all transitions toward it.
Then we're left with a nice and deterministic state machine.


text:
# Relative standard deviation

In probability theory and statistics, the relative standard deviation (RSD or %RSD) is the absolute value of the coefficient of variation. It is often expressed as a percentage. A similar term that is sometimes used is the relative variance which is the square of the coefficient of variation.[1] Also, the relative standard error is a measure of a statistical estimate's reliability obtained by dividing the standard error by the estimate; then multiplied by 100 to be expressed as a percentage.

The relative standard deviation is widely used in analytical chemistry to express the precision and repeatability of an assay. It is also commonly used in fields such as engineering or physics when doing quality assurance studies and ANOVA gauge R&R.

The equation of the relative standard deviation, given as a percentage is as follows:

${\%RSD} = \frac{s}{\bar{x}} \times 100$

where ${s}$ is equal to the standard deviation, and $\bar{x}$ is equal to the mean.[2] A lower percentage indicates a lower variability in the data set. Equally, a higher percentage indicates the data set is more varied.

## Examples

A data set of [100, 100, 100] has constant values. Its standard deviation is 0 and average is 100:

100% × 0 / 100 = 0%

A data set of [90, 100, 110] has more variability. Its standard deviation is 10 and its average is 100:

100% × 10 / 100 = 10%

A data set of [1, 5, 6, 8, 10, 40, 65, 88] has more variability again. Its standard deviation is 30.78.. and its average is 27.875:

100% × 30.78 / 27.875 = 110.41%