text:
• FEATURED

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

## Continuous Collision Detection of 3-dimensional Convex Hulls with Rotation and Translation

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

### #1PrestoChung  Members

Posted 19 October 2013 - 10:41 PM

I am looking for methods that take into account rotation as well as translation for continuous collision detection.

My broad phase algorithm uses swept maximal bounding spheres returning a start time when the objects will be within their maximum radius.

I have two ideas how to handle the next phase of collision detection:

1 ignore rotation:
A simplified collision I am considering is to ignore rotation from the beginning of the narrow phase and use a GJK representation to raycast the relative motion of the objects to the origin. This should give an intersection time by a raycast against a convex hull. This method will result in colliding objects to stop rotating for a portion of the time step, and can miss collision due to rotation over the timestep.

2 bisection search:
Doing a bisection search of instantaneous GJK tests at increasingly smaller intervals, presumably down to a fixed size. If a collision is detected then only earlier points in the bisection need be considered (reducing the search space), but to rule out collision completely the full space needs to be searched. This seems fairly expensive and can still miss collisions where the periodicity of motion is between the test points.

I have found some indication that dual numbers or dual quaternions + screw theory may have some application but it seems like an advanced topic and so far the only game-related application I have found is in mesh deformation, not collision detection. Screw theory seems promising, but I'm not sure it applies to situations where the axis of rotation is not the same as the axis of translation, or if that is just a sub-set of certain screw motions.

Some possible resources:

http://www.seas.upenn.edu/~meam520/notes02/RigidBodyMotion3.pdf

https://www.springer.com/computer/image+processing/book/978-1-4471-2339-2

Edited by PrestoChung, 19 October 2013 - 10:42 PM.

### #2Dirk Gregorius  Members

Posted 20 October 2013 - 11:47 AM

I recommend using Erin Catto's approach that he introduced at the GDC this year:

It is conceptually a hybrid of Brian Mirtich's conservative advancement method and bisection. I ported it to 3D and it works great in practice. The edge distance function in 3D is non-trivial though (it is non convex function), but I am sure you can figure it out.

You can find a 2D reference implementation in the Box2D source. You can find good discussions of conservative advancement here:

http://www.cs.berkeley.edu/~jfc/mirtich/impulse.html

In my *personal* experience the original conservative advancement is too slow for real-time simulation. Worst cases like a rigid body rotating over the edge of another one are a common situation in games and take hundreds of iterations. E.g. a book falling of a table.

HTH,

Dirk

Edited by Dirk Gregorius, 20 October 2013 - 03:23 PM.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


text:
Spherical to Cylindrical coordinates. Show Instructions In general, you can skip the … If one changes vectors relations to coordinate one, formula for cosine angle between vectors is also changes: cos φ a x b x a y b y a z b z a x 2 a y 2 a z 2 b x 2 b y 2 b z 2, where and . Compute the angle for the following pairs: I'm trying to work out a way to get the angle between two points given in polar coordinates, without first converting them to x,y. You will in fact get results as quickly as the blink of an eye. β is the angle between u and the y-axis. This free online calculator help you to find angle between two vectors. Before we can use the calculator it is probably worth learning how to find the slope using the slope formula. The Angle Between any Two Vectors Calculator is a handy, easy and free to use online tool that gives users the angle between any two vectors. In GIS bearing angle is used for navigation or direction. The result is also expressed in the range -180 to +180 degrees. The slope is basically the amount of slant a line has, and can have a positive, negative, zero or undefined value. Star 1 Right Ascension: Enter the Right Ascension of the first star in hours. Polar coordinates are r (magnitude) and o (angle); rectangular coordinates are x (horizontal) and y (vertical). The slope calculator determines the slope or gradient between two points in the Cartesian coordinate system. The angle in polar coordinates is often times described by the greek letter theta, and is measured in either degrees or radians. α is the angle between u and the x-axis. Ask Question Asked 3 years, 11 months ago. Technically, we have spherical coordinates of each point in three-dimensional space, because we know radius of the Earth, inclination angle (latitude) and azimuth angle (longitude). Angle in between two points with x , y coordinates //two points with x and y coordinates int x1 = 100 , y1 = 50, x2 =250, y2 =70; //distance b/w them The two lines are perpendicular means, Ø = 0° Thus, the lines are parallel if their slopes are equal. Area of a triangle with three points. Find the angle which is the result of the subtraction b2 - b1, where b1 and b2 are the bearings.. Cartesian to Spherical coordinates. where the slopes m 1 and m 2 are given by - b / a for each line. Calculating distance and angle between two points, C# program. 90 angle between coordinate breaks when applied to world. Vector is a quantity that has a magnitude and a direction. Calculators for the conversion of geo coordinates, as delivered by a GPS tool, for the distance of two point and for bearing. The shortest distance between two points on the surface of a sphere is an arc, not a line. Triangle area calculator by points. Calculate bearing between two decimal GPS coordinates. As you can see the angle is relative to the 0° degree or north pole of the 2D space. Enter the values of the both the vectors A and B, the angle formed between them will be displayed here. Uses Heron's formula and trigonometric functions to calculate area and other properties of a given triangle. Once you input this into the calculator, it will show you that the distance between these two cities is 15,495 km, and the azimuth is 63.78 degrees. Input bearings are expressed in the range -180 to +180 degrees. However, RAW observations are interpolated from existing point coordinates, which produces the same results without requiring a separate observation data file. Polar to Cartesian coordinates Plane equation given three points. Condition for parallelism. Finding the angle between two bearings is often confusing. Shortest distance between a point and a plane. 3. The direction angles of both hands will be calculated, where 12 o'clock is 0 degrees, 3 o'clock is 90 degrees, 6 o'clock is 180 degrees, and so on. a x + b y = c . Calculator for the angle between the two hands of a clock and the angle of hour hand and minute hand. Vector a x y z. Vector b x y z. Distance between two points calculator uses coordinates of two points A(x_A,y_A) and B(x_B,y_B) in the two-dimensional Cartesian coordinate plane and find the length of the line segment \overline{AB}. It’s an online Geometry tool requires coordinates of 2 points in the two-dimensional Cartesian coordinate plane. Cylindrical to Cartesian coordinates Angle between vectors: 0.80994502. Task. Angle Balance compares the calculated closing azimuth to the observed closing azimuth. Our online calculator is able to find angle between two vectors with step by step solution for free. I might have an idea of finding the bearing to rectangle vertices and stuff like that (I just used them for the system) but I want to know if there is already a simple formula for this. However, this decision was not arbitrary. This online calculator is used to find the angle formed between the two vectors. The calculator will find the angle (in radians and degrees) between the two vectors, and will show the work. Calculate Angle between Clock Hands. 9. Linear equation given two points. Intersection of two lines. 1. This calculator may be used to calculate the angular distance between two stars or celestial objects. PentaCalc Pro provides two buttons, [RŒP] and [PŒR], for converting between rectangular and polar coordinates. Angle Between Two Lines Examples. Here x-axis is (0) zero degree and y-axis is at 90 degree. Instead, it was created as a definition of two vectors' dot product and the angle between them. A calculator to find the angle between two lines L 1 and L 2 given by their general equation of the form . New coordinates by rotation of axes. Angle Between Two Vectors Calculator. If we convert these to cartesian coordinates, with x, y, z in three-dimensional space, we can easily find the distance using well-known Euclidean distance formula: Distance Calculator is use to calculate the distance between coordinates and distance between cities. The two lines are perpendicular means. Traverses are adjusted in two steps: Angle Balance and Compass Rule. Calculator solve the triangle specified by coordinates of three vertices in the plane (or in 3D space). Cartesian to Polar coordinates. 3. To find the angle between two vectors, simply fill in the (x, y, z) coordinates for both vectors below and then click the “Calculate” button. BYJU’S online angle between two vectors calculator tools makes the calculation faster and it displays the angle in a fraction of seconds. The simple analytic geometry calculator which is used to calculate the distance between two points in polar co-ordinates on two dimensional coordinate system. If θ is the angle between two intersecting lines defined by y 1 = m 1 x 1 +c 1 and y 2 = m 2 x 2 +c 2, then, the angle θ is given by. New coordinates by rotation of points. Distance Between Coordinates. Addition and subtraction of two vectors on plane, Exercises. ... is the magnitude of vector b. If you don't know your location, use the where am I right now to find out. Angle Between Two Vectors Calculator is a free online tool that displays the angle between two vectors. Calculate Point Angle in QGIS. Spherical to Cartesian coordinates. Volume of a tetrahedron and a parallelepiped. Please enter a time of day. γ is the angle between u and the z-axis. Distance between two points. The formula used to find the acute angle (between 0 and 90°) between two lines L 1 and L 2 with slopes m 1 and m 2 is given by . I've found the Haversine formula, but that's to find the central angle between two points on a circle. ... Azimuth angle results are different for 'Field Calculator' and 'Measure Angle' on QGIS. ... //GetPoints() defines all the point coordinates via user input and //returns true if the data entered was invalid. Linear equation with intercepts. (Try this with a string on a globe.) Knowing the coordinates of the two points, how can I know that angle? Calculate the angle of three dimensional vectors (3D Vectors) with entered vector coordinates. The radius denoted with r, is typically measure in a unit less measure, but some distance measure such as inches or meters could be used. Note that the coordinates for Lima are negative because it’s in the southern and western hemisphere. Vectors are used in GPS, generating weather reports etc., Here, the vectors are represented as a and B. With a look back to basic geometry, we can see why this formula results in intuitive and useful definitions. Shortest distance between two lines. Angle Between Two Straight Lines Formula. The 3D vectors are using the x-y-z axes. I (sort of) remember enough high school trig to do it with x,y but I'm stumped at trying to do it with r, theta. tanθ=±(m 2-m 1) / (1+m 1 m 2) Angle Between Two Straight Lines Derivation. So in this article we get familiar with What is bearing and calculate angle between two points. Code to add this calci to your website Just copy and paste the below code to your webpage where you want to display this calculator. Please insert starting point and angle in decimal degrees. Cartesian to Cylindrical coordinates. The terminal coordinates program may be used to find the coordinates on the Earth at some distance, given an azimuth and the starting coordinates.. This online calculator finds the angle between two vectors person_outline Timur schedule 2019-06-06 07:47:48 This calculator finds the angle between two vectors given their coordinates. Ø = 90° Thus, the lines are perpendicular if the product of their slope is -1. If you are not sure what the gps coordinates are, you can use the coordinates converter to convert an address into latlong format or vice versa. Hot Network Questions Very slow random read/write on HDD This calculator is designed to convert the two different and distinct methods of co-ordinate nomenclature from one methodology to the other, and to calculate the distance between two sets of coordinates. You can enter this as HH.MMSS and click "Convert HH.MMSS" to convert to hours Star 1 Declination: Enter the Declination of the first star in degrees. This formula was not derived from existing rules. θ = |tan-1 ( (m 2 - m 1) / (1 + m 2 × m 1))| . In addition, the azimuth looking from Point B to Point A will not be the converse (90 degrees minus the azimuth… A point in a plane can be described by either polar or rectangular coordinates.

Uncategorized

format: plain


text:
# string.replace.regex

Syntax

snew = string.replace.regex(source,sreg,srep)

Replaces anything that matches the regular expression sreg in string source with the contents of srep, and returns the new string.

Returns: snew - The new string after the replacement. source - The string to scan for matches to sreg. sreg - The regular expressed used to find a match. srep - The string used to replace the contents that match sreg.


text:
# Correspondence between finite Galois extensions and abelian p-groups

There is a correspondence between $k$-isomorphic finite separable normal extensions of $k$, $char(k) = p > 0$, and abelian p-groups.

Put it formally, $$\forall \, G = Gal(\Bbb F/k), |G| < \infty, \, char(k) = p > 0, \, \exists \, P \text{ - abelian p-group}, \exists \, \beta \text{ - bijection}: \beta(G) = P$$ up to $k$-isomorphism, and vise versa.

How to clearly define such a bijection (i.e. how to prove this)?

Well, since galois extension can be defined as automorphisms that fixes field $k$, and since $k$ has characteristic $p$, we can consider Frobenius endomorphism $\mathrm f: q \mapsto q^p$, which can be connected with p-groups as we talk about finite extensions (i.e. finite groups). $k$ is fixed by $G$, hence so do $\mathrm f(k), \mathrm f(\mathrm f(k))$ and so on. But one can generate Galois extension by Frobenius automorphisms only in case of finite fields, so the way is not so trivial.

• Why do you think this is true? – Eric Wofsey Dec 3 '17 at 21:27
• @EricWofsey I do not think this is true, but I consider. If not, one need to give a counterexample. – Evgeny Dec 3 '17 at 21:29
• Well it's strange to ask people how to prove something if you don't think it's true... – Eric Wofsey Dec 3 '17 at 21:36
• Abelian $p$-extensions of a field $k$ of characteristic $p$ can be characterized using the theory of Witt vectors. This generalizes the Artin-Schreier description of cyclic extensions of degree $p$. I recommend chapter 8 of Jacobson's Basic Algebra II for an account of this theory. – Jyrki Lahtonen Dec 5 '17 at 10:43
• Of course, should it happen that the Galois group is elementary $p$-abelian, then $\Bbb{F}$ is a composition of cyclic extensions $\Bbb{F}=\prod_{i=1}^n K_i$, where $K_i$ is gotten as the splitting field of $x^p-x-a_i$ over $k$. – Jyrki Lahtonen Dec 5 '17 at 10:46

It's not entirely clear what precise statement you are asking to be true (what you have written does not make sense if taken literally), but any reasonable interpretation is false and I don't know why you would think it is true. For instance, if $k$ is algebraically closed, then there is only one finite extension of $k$. Or if $k$ is uncountable, there could be uncountably many non-isomorphic finite Galois extensions, whereas there are only countably many finite abelian $p$-groups.


text:
# A fundamental question on multiple rotation of a qubit using $SU(2)$

I am trying to implement qubit rotations using $$SU(2)$$ from scratch in order to understand and debug what happens under the (physical) hood. The reason why gates and high-level APIs are omitted here is the desired learning effect and the physical understanding of what actually happens beneath the cap.

Implementing the rotation matrix as describes in this lecture notes (equation 25) works fine if I perform one rotation as follows:

from qiskit.visualization.bloch import Bloch
from sympy.physics.matrices import msigma
from sympy import Matrix
from sympy import N, re
import numpy as np

def to_spherical(vec):
x = np.real(vec[0])
y = np.real(vec[1])
z = np.real(vec[2])
hxy = np.hypot(x, y)
r = np.hypot(hxy, z)
ϕ = np.arctan2(y, x) #az
θ = np.arctan2(z, hxy) #el
return [r, ϕ, θ]

def to_cartesian(polar):
r = polar[0]
ϕ = polar[1]
θ = polar[2]
x = r * np.sin(ϕ) * np.cos(θ)
y = r * np.sin(ϕ) * np.sin(θ)
z = r * np.cos(ϕ)
return [np.real(x), np.real(y), np.real(z)]

def rn_su2(vec, rot_angle, n):
spherical_vec = to_spherical(vec)
ϕ = spherical_vec[1]
θ = spherical_vec[2]

sx = msigma(1)
sy = msigma(2)
sz = msigma(3)
M_q = (np.sin(θ)*np.cos(ϕ)*sx + np.sin(θ)*np.sin(ϕ)*sy + np.cos(θ)*sz)
U_n = np.eye(2)*np.cos(rot_angle/2) -1j*(n[0]*sx+n[1]*sy+n[2]*sz)*np.sin(rot_angle/2)
M_q_rotated = U_n*M_q*np.matrix(U_n).H
return M_q_rotated

def extract_angles(M_q_rotated):
cos_θ_rotated = float(N(re(M_q_rotated[0,0])))
θ_rotated = np.arccos(cos_θ_rotated)

# e^(ix) = cos(x) + i*sin(x)
# see https://en.wikipedia.org/wiki/Euler%27s_identity
temp = float(N(re(M_q_rotated[1,0])))
temp = temp/np.sin(θ_rotated)
ϕ_rotated = np.arccos(temp)
return (ϕ_rotated, θ_rotated)

After having implemented the fundamental functions, the most interesting part is to perform the rotations of a Qubit. In the following I am trying to take a vector, rotate it by $$\frac{\pi}{8}$$ around the $$z$$-axis, then in the next step I take the resulting rotated vector and rotate it again by $$\frac{\pi}{8}$$ around the $$z$$-axis and so forth:

rot_angle = np.pi/8
n = [0, 0, 1]

start_vec = [1, 0, 0]

num_iterations = 5
_bloch = Bloch()
_bloch.vector_color = ['blue'] * num_iterations

sv = []
vec = start_vec
sv.append(vec)
for i in range(num_iterations):
M_q_rotated = rn_su2(vec, rot_angle, n)
(ϕ_rotated, θ_rotated) = extract_angles(M_q_rotated)
vec = np.array(to_cartesian([1, ϕ_rotated, θ_rotated]))
sv.append(vec)

_bloch.render()

I am using qiskit for visualizing the vectors on a blochsphere. The first rotation works really well, but the subsequent ones not:

I would really appreciate any help to get the subsequent rotations working. The complete notebook is publicly available here on GitHub.

Update (2022-06-13): After fixing the issues enlisted in the great answer of Egretta.Thula, the plot looks as follows (see updated code here on GitHub):

There is more than one issue in your code.

1. You switched ϕ and θ in the function that convert polar coordinates to cartesian coordinates:
x = r * np.sin(ϕ) * np.cos(θ)
y = r * np.sin(ϕ) * np.sin(θ)
z = r * np.cos(ϕ)
1. hxy and z are passed in a wrong order while calculating θ in to_spherical function:
θ = np.arctan2(z, hxy)
1. SymPy uses I instead of j for imaginary numbers. That makes numpy.matrix.H not working properly. You should use Dagger instead.

Update:

There is another issue in the code which takes place when num_iterations $$\geq 8$$,

extract_angles uses real part of $$e^{i\phi}$$ to calculate the value of $$\phi$$. You should take both real and imaginary parts. Otherwise you will always get a value between $$0$$ and $$\pi$$. So you will need to change these lines of code:

temp = float(N(re(M_q_rotated[1,0])))
temp = temp/np.sin(θ_rotated)
ϕ_rotated = np.arccos(temp)

to become:

temp = M_q_rotated[1,0]/np.sin(θ_rotated)
temp_r = float(N(re(temp)))
temp_i = float(N(im(temp)))
ϕ_rotated = np.arctan2(temp_i, temp_r)

I think this is the root cause of the issue described here.

• Your answer is great and works. I updated my OP and added the new plot resulting from your fixes. I pushed the updated code to GitHub. Thank you again. Jun 13 at 6:09


text:
# Can you calculate water velocity from m=f/A

1. Aug 24, 2009

### Jim Sanderson

Hello, I was putting together some information to calculate water flow rates from fire hydrants and hoses. I have attached a copy in case anyone would be interested to have a look and point out any issues.

We use the Freeman formula for this which makes it pretty easy. Q=AV Q is quantity of water, A is area of outlet, V is velocity. To calculate velocity we use Bernoulli's Equation V=$$\sqrt{2gh}$$ g=gravity h=head or height of water source above outlet. As we normally use pressure not head we would substitute gh for P in kPA i.e. 10m of head pressure is equal to 9.91 x 10 = 98.1kPa.

I was wondering if we could calculate the velocity of the water using P=F/A F=ma?

Question: If we had a large square hose that was 1m x 1m with a cap on the end. There is a pressure gauge in the cap that reads 100kPa. Assume there is a massive dam 10m above the hose outlet, this will provide a constant water supply at 100kPa (although when water is flowing the pressure will be nil. If we were to remove the cap, what would be the velocity of the water as it leaves the hose? Can we use P=F/A F=ma?

Thanks for any assistance.

#### Attached Files:

• ###### flow calculations.pdf
File size:
67.9 KB
Views:
1,194
Last edited: Aug 24, 2009
2. Aug 24, 2009

### kyiydnlm

No, you cannot find equivalent force on an element of water. P = F/A, where F is lift. In the large reservoir, we assume F equals gravity; however it is not, or water wont flow.

BTW, Q is quatity rate of water.

3. Aug 24, 2009

### Staff: Mentor

I suspect if you tried to derive yourself an equation starting with f=ma, you'd just end up deriving Bernoulli's equation. So just use that.


text:
# Why Jordan measure is undefined?

$R^2$, $A=\{(x,\;y)\in R^2\colon 0\leqslant x\leqslant 1,\;0\leqslant y\leqslant 1\}$. Consider $X=A\cap Q^2$. Why for $X$, $m_e X=1,\;m_i X=0,\;m_e X\neq m_i X$? Especially i interested in why inner measure equals to $0$.

-

by definition we have $m_iX = \sup_{S \subseteq X \text{ simple}} m(S)$ where a set is simple iff it is the finite disjoint union of sets of the form $[a,b) \times [c,d)$. Since a notempty half-open interval has inner points, every non-empty simple set has also. As $X$ doesn't have an inner point, $m_iX = 0$.

For $m_eX = 1$, as $m_eX = \inf_{S \supseteq X \text{ simple}} m(S)$ we obviously have $m_eX \le 1$ as $[0, 1+\epsilon)^2$ is a simple set of measure $(1+\epsilon)^2$ which contains $X$. To show $m_eX \ge 1$ let $S \supset X$ be simple. We show $[0,1)^2 \subseteq S$, as $m$ is monotone on simple sets, the conclusion follows. So let $(x,y) \in [0,1)^2$, if we had $(x,y) \not\in S$, there were an $\epsilon > 0$ such that $[x, x+\epsilon) \times [y,y+\epsilon)$ is disjoint from $S$ (as $S$ is a finite union of such intervals), which contradicts $A \subseteq S$. So $m_eX \ge 1$ and we get $m_eX = 1$.

-
sorry, but why $X$ doesnt have inner points? its in $Q^2$. And $Q$ is subset of $R$. –  Yola May 15 '12 at 13:53
An inner point of $A$ were a point $(x,y) \in A$ with $(x-\delta, x+\delta) \times (y-\delta, y+\delta) \subseteq A$ for some $\delta > 0$. $A$ doesn't have inner points as $\mathbb Q \subseteq \mathbb R$ doesn't. –  martini May 15 '12 at 13:57
Hint: One can show that the Jordan outer measure of a bounded set $E$ is always equal to the Jordan outer measure of the closure of $E$. You can also show that the Jordan inner measure is bounded above by the Lebesgue outer measure of a bounded set $E$. Now it is not that difficult to show that the Jordan outer measure and the Lebesgue outer measure disagree on $A$.


text: 2013-04-15 09:20:40 -0600 received badge ● Student (source) 2013-04-15 03:45:57 -0600 asked a question coefficient() with composite variable Say I have something like this: var('a','b','c') test=b*a + c*a + 3*a + b + c  I can find that the coefficient of 'a' is (b+c+3) using: test.coefficient(a,1)  However, I am interested in find the coefficient of $ab$ (which in this case would just be $1$). I tried test.coefficient(a*b,1)  but it just returns zero. Is something like this possible? 2013-03-18 08:35:30 -0600 commented question solving system of equations I also have a system that Sage cranks and cranks on but never returns an answer: var('r,s,m,n,l,A,B,C,D,E,F') solve([2*m - 2*r==2*A*m*l + B*n*l + D*l, 2*n-2*s==B*m*l + 2*C*l*n + E*l, A*m + B*m*n + C*n^2 + D*m + E*n + F == 0], m, n, l) Any thoughts as to why this happens?


text:
# zbMATH — the first resource for mathematics

Compact spaces and their generalizations. (English) Zbl 0801.54001
Hušek, Miroslav (ed.) et al., Recent progress in general topology. Papers from the Prague Toposym 1991, held in Prague, Czechoslovakia, Aug. 19-23, 1991. Amsterdam: North-Holland. 571-640 (1992).
This survey paper presents results concerning compact spaces and their generalizations which have been obtained in the decade prior to 1992. The discussion is broken into topics: The Moore-Mrówka problem; In between countable tightness and first-countability: the fine structure; Points of small character in countably tight and sequential compact spaces; Comparing properties of $$X$$ with that of $$X^ 2$$ and $$X^ 2\setminus \Delta$$; Topological problems arising from functional analysis; Dungundji spaces; dyadic spaces, $$\kappa$$-metrizable spaces and their generalizations; Dense subspaces of compact spaces; Generalizations of compact spaces; and Miscellanea.
Some of these topics focus on dominant questions that were still open a decade ago (such as Moore-Mrówka) and present solutions, partial solutions, related theorems and new open questions. Other topics (such as topological problems arising from functional analysis) are less focused and look at work done on a variety of new and old questions in the area. For topics which already have detailed surveys (such as Eberlein, Gul’ko, and Corson compact space or the Scarborough-Stone problem) the reader is referred to the survey with little discussion. The organization of the paper puts the work of the 1980’s and early 1990’s into a context that would be beneficial to a newcomer in the field. It also introduces western readers to the work of Soviet topologists, through both the exposition and the extensive bibliography.
In addition to reciting the recent progress on compact spaces, this article traces the historical development of several problems. Most notable are the discussions of the Moore-Mrówka problem and Katětov’s 1948 question of whether a compact space $$X$$ is metrizable if the square $$X^ 2$$ is hereditarily normal.
For the entire collection see [Zbl 0782.00072].

##### MSC:
 54-02 Research exposition (monographs, survey articles) pertaining to general topology 54D30 Compactness 54D55 Sequential spaces 54A35 Consistency and independence results in general topology 54D60 Realcompactness and realcompactification 46A11 Spaces determined by compactness or summability properties (nuclear spaces, Schwartz spaces, Montel spaces, etc.) 54D15 Higher separation axioms (completely regular, normal, perfectly or collectionwise normal, etc.) 54A25 Cardinality properties (cardinal functions and inequalities, discrete subsets) 54D20 Noncompact covering properties (paracompact, Lindelöf, etc.)


text:
Keely M.

Story problem I can not figure out

math help: would you rather sign an open ended contract that compensates you with a one time only 15,000 signing bonus plus $200 for each day you work OR be paid$1 if you work 1 day, $2 if you work two days,$4 if you work 3 days, \$8 if you work 4 days, and so on?


text:
# Wikipedia:Reference desk/Archives/Mathematics/2011 October 6

Mathematics desk
< October 5 << Sep | October | Nov >> October 7 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.

# October 6

## Using "curve" to refer to a straight line

In a log-log plot, plotting any monomial will give a straight line. However, it seems a little odd to refer to the plot of e.g. ${\displaystyle x^{2.5}}$ as a line, but equally strange (if correct) to refer to that plotted straight line as a curve. What would you do? Oliphaunt (talk) 08:03, 6 October 2011 (UTC)

In what context? --Trovatore (talk) 08:21, 6 October 2011 (UTC)
A paper we're writing. We've fitted some data sets with curves of the form ${\displaystyle ax^{b}}$ and plotted the result on a log-log scale. I'm going back and forth on this; perhaps "line" is the way to go after all. Just interested in others' opinions. Oliphaunt (talk) 08:42, 6 October 2011 (UTC)
Arguably it is a curve, but is rendered as a line because it is a log log plot. For that reason, I'd go with curve. --Tagishsimon (talk) 12:31, 6 October 2011 (UTC)
My (possibly imperfect) understanding is that, mathematically, a line (even a y=mx+b Euclidean/Cartesian one) *is* a curve, in the same sense that a square is a rectangle. It's not incorrect to call a line a curve, even though in most situations you'd likely use the most specific descriptor which applies. -- 174.24.217.108 (talk) 16:55, 6 October 2011 (UTC)
Yes, the article on curve mentions that, and I alluded to it by interjecting "if correct" :-) —Oliphaunt (talk) 06:43, 7 October 2011 (UTC)
It is perfectly fine to call a straight line a curve. Just like every Irishman is a man and every odd number is a number. 19:57, 7 October 2011 (UTC)
I realise it's fine; I was just wondering what you'd do. It's also fine to refer to such a representation

of a monomial as a line. So this is choosing between two 'fine' options. The consensus seems to be that people would pick "curve". —Oliphaunt (talk) 12:33, 9 October 2011 (UTC)

I would also recommend "curve". CRGreathouse (t | c) 17:46, 10 October 2011 (UTC)

## .9 repeating and 1+1=3

I read that on the .9 repeating page that it's possible to create a new number system where .999~ does not equal 1. But such a number system would be fairly useless. With that logic, is it also possible to create a new number system where 1+1=3? 198.151.130.149 (talk) 15:35, 6 October 2011 (UTC)

Technically yes, although that starts to call into the question what you mean by "3". (Usually 1+1=2 is take to be the definition of "2", roughly speaking, so if you also have 1+1=3, you either would have 2=3, or you start to mess with the basic properties of equality.) Note that redefining addition from its "normal" definitions is not always as silly as you seem to think it is. For example, doing things like defining 1+1=0 is the key step which gets you to modular arithmetic. - By the way, -- 174.24.217.108 (talk) 16:49, 6 October 2011 (UTC)

## Number Game

There was a game that I've heard of, that I was hoping you cats could help me find the name of:

You have a large group of people, everyone kicks into the pot (something small, a dollar or whatever) and then everybody writes a positive integer on a piece of paper. Whoever wrote the smallest UNIQUE integer wins the pot. I'm looking for the name because I was hoping that there'd been some scholarship on the optimal strategies or something.

Thanks!209.6.40.167 (talk) 15:53, 6 October 2011 (UTC)

Well, you know no one will write down 1, out of fear that someone else will have chosen to pick that number as the smallest positive integer, causing them to lose. And, knowing that no one will pick any number less than or equal to n, it follows that no one will write down the number n+1 either, for the same reason. Hence, by induction, no one will write down anything.
(No, I don't know what the game is called.)
Actually, strong induction, which is completely different from weak induction in that it has the word "strong" before it.
--COVIZAPIBETEFOKY (talk) 17:24, 6 October 2011 (UTC)
See Unique bid auction. —Bkell (talk) 18:09, 6 October 2011 (UTC)
Let N be the number of people in the group. Choose a random number k≥1 from the geometric distribution Pr(k)=(N−1)−1(1−N−1)k. Bo Jacoby (talk) 21:01, 6 October 2011 (UTC).
However, that approach, even if it was to be optimal (and it is by no means clear that it would be in real-world auctions against humans) only works in you know N. An interesting related problem would be how to estimate N by looking at the winning prices in a succession of auctions, as online auction operators do not typically reveal N, for obvious reasons. -- The Anome (talk) 07:33, 7 October 2011 (UTC)
The more difficult game is of course when the second lowest unique number wins. – b_jonas 08:44, 7 October 2011 (UTC)
The game is easily rigged. If a syndicate of floor(N/2)+1 players agree to choose the integers from 1 to floor(N/2)+1 in some predetermined manner, then one of then is bound to win the \$N pot. Splitting the winnings equally between syndicate members gives each member a certain gain of a little under \$1. As the game is so easily rigged, there is no point in playing. Gandalf61 (talk) 10:01, 7 October 2011 (UTC)
Applying the logic a bit above why should anybody share anything in the last round of the game if there isn't going to be another round? And thus why should anyone share in the second last round if they know the person wont share in the last round... ;-) Dmcq (talk) 10:13, 7 October 2011 (UTC)


text:
# What are the sets of vertices in a proper vertex coloring referred to?

A (proper) vertex coloring of a graph is a labelling of the graph’s vertices with colors such that no two vertices sharing the same edge have the same color. A coloring using at most $k$ colors is called a (proper) $k$-coloring.

The $k$-coloring partitions the vertex set of a graph into $k$ sets. What do I say to refer to one of these sets of vertices? For example, "fix a vertex coloring of $G$ and let $A$ be the (blank) of largest order."

Is there a standard terminology? Also, if there are multiple terms, what other words for these might I see floating around?

-

## 2 Answers

The most common term for the collection of vertices receiving the color $i$ is "the $i^\text{th}$ color class" (or just "color class" if you do not wish to specify its color).

-

I would talk about (maximal) monochromatic components.

-
Not that I am a reference or something, but I saw it in a couple articles. –  beauby Nov 25 '12 at 0:13
In my experience, "component" is generally reserved for "connected component" in graph theory. –  Austin Mohr Nov 25 '12 at 0:17
Indeed; a monochromatic component is a connected component of the subgraph induced by the vertices with a given colour (in an improper colouring); see e.g. [this](www.csse.monash.edu.au/~gfarr/research/small-monochromatic-components.ps). –  Douglas S. Stones Jan 6 '13 at 0:16


text:
# Movement velocity relative to a static object (Vector Maths)

I have a static object. I have a moving player.

If the player is moving directly towards the object then I want to return the value of 1. If the player is moving directly away from the the object then I want to return the value of 0. If the player is moving somewhat between these two directions then I want to return a value proportionally relevant to the two previously mentioned values - between 0 and 1 depending on the direction. The direction that the player is facing is irrelevant, it's the velocity of the player that's important for my situation.

How do I calculate this value?

This is so frustrating, as I know that I've solved this exact problem in the past but I'm currently drawing a blank. It involves some trig and some dot product, but for now I'm clueless and would appreciate any help that's offered.

The dot product between two unit vectors is:

• +1 when the vectors are pointing in the same direction
• 0 when the vectors are perpendicular
• -1 when the vectors are pointing in opposite directions

So, we can get this value just by normalizing our two direction vectors and dotting them, and then massaging the output into the 0-1 range.

In Unity-style syntax it would be:

float Towardness(Vector3 playerPosition, Vector3 playerVelocity, Vector3 obstaclePosition) {
Vector3 movementDirection = playerVelocity.normalized;
Vector3 towardObstacle = (obstaclePosition - playerPosition).normalized;

float dot = Vector3.Dot(movementDirection, towardObstacle);

return 0.5f + 0.5f * dot;
}

Or, if you want it to vary linearly with the angle between the vectors, we can use the fact that the dot product of two unit vectors is the cosine of that angle, and get the angle itself (in radians) via the arc-cosine function:

 return 1f - Mathf.Acos(dot)/Mathf.PI;


text:
RUS  ENG JOURNALS   PEOPLE   ORGANISATIONS   CONFERENCES   SEMINARS   VIDEO LIBRARY   PACKAGE AMSBIB
 General information Latest issue Archive Impact factor Subscription Journal history Search papers Search references RSS Latest issue Current issues Archive issues What is RSS

 Tr. Mosk. Mat. Obs.: Year: Volume: Issue: Page: Find

 An asymptotic formula for polynomials orthonormal with respect to a varying weightA. V. Komlov, S. P. Suetin 175 Rational functions admitting double decompositionsA. B. Bogatyrev 201 Topological applications of graded Frobenius $n$-homomorphisms, IID. V. Gugnin 207 Simple spectrum of the tensor product of powers of a mixing automorphismV. V. Ryzhikov 229 On holomorphic solutions of equations of Korteweg–de Vries typeA. V. Domrin 241 Parallelohedra: a retrospective and new resultsN. P. Dolbilin 259 Asymptotics of the spectrum of the hydrogen atom in a magnetic field near the lower boundaries of spectral clustersA. V. Pereskokov 277


text:
Algebra

# Radical Expressions and Equations: Level 2 Challenges

Find the number of non-zero real solutions to the equation $-\sqrt { x } =x.$

$\large \sqrt { -4 } \times \sqrt { -9 } = \, ?$

$\large \dfrac{\sqrt{50}+7}{\sqrt{50}-7}+\dfrac{\sqrt{50}-7}{\sqrt{50}+7} = \ ?$

$\Huge \sqrt{\color{#D61F06}9^{\color{#20A900}{16} \color{#3D99F6}{x^2}}}$

Which of the following is equal to the above expression?

$\Large{ \sqrt{3+2\sqrt2} - \sqrt{3-2\sqrt2} = \ ?}$

Which is greater?

$\Large\sqrt{ \color{#D61F06}{8}} - \sqrt{ \color{#D61F06}{7}} \ \ \ \ \ \text{OR} \ \ \ \ \ \sqrt{ \color{#3D99F6}{6}} - \sqrt{ \color{#3D99F6}{5}}$

×


text:
# Five stages of accepting constructive mathematics

In 2013 I gave a talk about constructive mathematics “Five stages of accepting constructive mathematics” (video) at the Institute for Advanced Study. I turned the talk into a paper, polished it up a bit, added things here and there, and finally it has now been published in the Bulletin of the American Mathematical Society. It is not quite a survey paper, but it is not very technical either. I hope you will enjoy reading it.

Free access to the paper:  Five stages of accepting constructive mathematics (PDF)

Mike Shulman

Nice! However, it seems a little contradictory to present sheaves as a model of "constructive mathematics" but also consider a proof using dependent choice to be "constructive".

Paul Fabel

Great paper! Great talk! But I am in stage confusion.

I think I understand the proof of Theorem 1.3 using classical reasoning, but am wondering where the proof of Theorem 1.3 fails to establish LEM in constructive mathematics.

In particular the proof of Theorem 1.3 ( that AC=>LEM) seems to use only a very weak, (and constructively accepted?) form of AC, namely that if we have precisely one or two distinct inhabited subsets of {0,1}, then we may pick an element from each one.

Are the sets A and B constructively well defined'?

Is the problem that we have' two sets A and B but don't know' if A=B?

You are mistaken about the form of AC needed in the proof of Theorem 1.3. The proof is constructive, of course! And it is not the case that we have "precisely one or two distinct inhabited subsets of ${0,1}$" because for that to be true you would need to know "$A = B$ or $A \neq B$", which would immediately decide $P$. The set ${A, B}$ is one of those funny sets which cannot be shown to be finite.

And what is this idea that a set can be "defined" but not "constructively defined"? The language of set theory and first-order logic is identical in classical and constructive mathematics.

Well, it is only contradictory if you assume that there is just one world of constructive mathematics, or if you presuppose that everything I say in the paper fits into a single world of mathematics. As I specifically speak about three differrent worlds in the Bargaining stage, I would hope it's not such a big problem if later on I do things which are not universally true everywhere. So I think it boils down to warning the reader that dependent choice is not valid in every world, and I decided this was not really necessary at that point.

The paper is very readable and very interesting. But I didn't understand the example on p. 8, of the non-finiteness of subsets of {0, 1}. Are the subsets decidable in your constructive world? If so, what if I represent the subset input as a computation from {0,1} -> {TRUE, FALSE} and test if 0 and/or 1 are present in the subset? If the input programs -- even those denoting decidable sets -- are allowed not to terminate and yet the realizing program must always terminate, then how are any "for all" propositions realized? You write, “In computable mathematics a finite set is represented by a finite list of its elements, and a countable set by a program which enumerates its elements, possibly with repetitions.” Shouldn’t there be a third option: decidable countable subsets of a countable (or finite) set S, are realized by a program S -> {TRUE, FALSE} ?

The subsets are not presumed to be decidable. And you can't just say things like "what if I represent the subset input as a computation from {0,1} -> {TRUE, FALSE} and test if 0 and/or 1 are present in the subset" without first properly setting up an interpretation of logic and set theory (or whatever formalism you have in mind) under which it is even possible to represent subsets as computations. You would probably need to use something like realizaiblity. However, note that general subsets cannot be represented by binary functions because not all subsets are decidable. Regarding your third option: that is just describing countable sets, possibly with decidable equality. And as soon as you say "realized" that means you're at stage three and you're thinking of a particular model. Whatever you discover a particular model may not be applicable to constructive mathematics in general.

Oh, and I guess that an axiom stating that all subsets of finite sets are decidable (and therefore finite) would yield choice for finite sets which would enough to get LEM, right?

... And what if I change selection/specification so that a subset cannot be defined by an arbitrary predicate but only by a decidable one?

Then you cannot do any serious mathematics, as I explained in this MathOverflow answer.

Tony

Very interesting talk, and more relevant than ever a decade later as mathematicians keep applying the Platonist standard to our Aristotelian machines. I am still stuck on the anger part.

Few questions, the number $a=1$ if Riemann hypothesis is true, and $a=0$ if it is not, is not a valid number for the lack of effective decision procedure. How then is A or B a set? I realize set theory is still used, but this seems inappropriate. Why not keep logic away from constructions (which sets are) all the way through?

Similarly, why is the notion of finite set defined in the same way as classically? These highly non-constructive meaningless notions is exactly why I was attracted to exploring constructive mathematics. Clearly the correct interpretation is that the set is FINITE (assuming for the moment we accept it even is a set rather than a logical predicate), but there is no bijection to a finite string of natural numbers.

It would be more convincing if constructive mathematicians went "all in" on constructive mathematics, rather than letting classical mathematics hold them back. The anger creeps in from the word games that need not be played.

@Tony: Remember that constructive mathematics makes no explicit assumptions about effective procedures. In particular, it does not require everything to be effective, although it is consistent to assume that everything is constructive.

Regarding your example of the number $a = 1$ if the Riemann hypothesis holds and $a = 0$ if it does not: your definition is not yet complete, as you have not demonstrated that the Riemann hypothesis is decidable, and so you have not yet defined the number $a$. It is not clear what sets $A$ and $B$ you are referring to.

There are several notionf of finite sets. I used a very strong one, because it fit my purposes. In constructive mathematics, and in mathematics in general, picking the correct definition is a matter of getting work done most efficiently and with greatest insight.

You seem to think that constructive mathematics is a political affair laden with philosophical conundrums. Perhaps it was a long time ago, but not anymore. Ideology cannot replace proficiency.

Elif Uskuplu

Thanks for this very interesting talk and paper. I'm very new in HoTT, and I saw the video of the talk in a Youtube playlist related to HoTT. Since I started my pure math education, I've been trained deeply in classical sense. My favorite mathematician was Cantor and my favorite theorem was CSB theorem :) Before I meet with constructive math, I didn't even think that the possibility of omitting LEM, or that Cantor's paradise may not be so. I still appreciate all of works done by "classical" mathematicians, but I belive such a new kind of thoughts is worth to study on it. Today's math is almost lying on the works done in 1900s, and maybe, the future' math will be lying on the works done in 2000s. To rethink everything we took for granted is always a progressive idea. And thank you again for providing new perspective to me.

Write your comment using Markdown. Use $⋯$ for inline and $$⋯$$ for display LaTeX formulas, and <pre>⋯</pre>` for display code. Your E-mail address is only used to compute your Gravatar and is not stored anywhere. Comments are moderated through pull requests.


text:
# Explain $\iint \mathrm dx\mathrm dy = \iint r \mathrm d\alpha\mathrm dr$

It is changing the coordinate from one coordinate to another. There is an angle and radius on the right side. What is it? And why?

I got:

$2\mathrm dy\mathrm dx = r(\cos^2\alpha-\sin^2\alpha)\mathrm d\alpha \mathrm dr$,

where $x = r \cos(\alpha)$ and $y = r \sin(\alpha)$.

but cannot understand and get the right side. The problem emerged when trying to integrate $\displaystyle \int_0^{\infty} e^{\frac{-x^2}{n^2}}\mathrm dx$ where I tried to change the problem knowing $r^2=x^2+y^2$ but stuck to this part. What is the change in the title called and why is it so?

-
See here, Example 3, and also here. –  t.b. May 4 '11 at 21:54
If you think of $x$ and $y$ being cartesian coordinates for the plane, then what this does is a change to polar coordinates. –  Lagerbaer May 4 '11 at 22:12
A physicist would note that this is dimensionally correct. Typically $dx, dy,r$ and $dr$ have dimensions of lenght, while $d \alpha$ is dimensionless (it is an angle). So $dxdy=r drd\alpha$ is dimensionally correct: both sides of the equation are areas. On the contrary $dx dy=drd\alpha$ is not dimensionally correct: you have an area equal a lenght. This is useful to quickly spot computational errors. –  Giuseppe Negro May 4 '11 at 23:07
You don't have to be a physicist to talk about dimensional analysis. $\mathbb{R}^2$ is acted on by scaling and this extends to an action on differential forms, etc. And of course if two things are equal then the corresponding scaling action needs to agree. –  Qiaochu Yuan May 5 '11 at 0:12
$r$ is the "Jacobian" ... when you learn about multi-dimensinoal integration, you should learn how to change variables in that context. –  GEdgar Sep 11 '11 at 13:00

Generally speaking, a double integral always has an area differential, so that you're integrating $\int \int dA$. Another way to view the question, then, is why $dA = dx dy$ in Cartesian coordinates and $dA = r dr d\theta$ in polar coordinates.

An area element in Cartesian is a rectangle, as Qiaochu describes in his answer. The area of the rectangle is the small change in $x$ times the small change in $y$, or $\Delta x \Delta y$.

An area element in polar, however, is a piece of a circle sector. There's a nice picture below taken from here. (The area element is the shaded part.)

If the angle is measured in radians, we know that the area of a sector of angle $\theta$ of a circle of radius $r$ is $\frac{1}{2}r^2 \theta$. So the area of the shaded piece in the picture is $$\Delta A = \frac{1}{2}(r + \Delta r)^2 \Delta \theta - \frac{1}{2}r^2 \Delta \theta = r \, \Delta r \, \Delta \theta + \frac{1}{2}(\Delta r)^2 \, \Delta \theta.$$ The quadratic factor of $\Delta r$ makes the second term negligible compared to the first term for small enough $\Delta r$ and $\Delta \theta$. Thus in the limit we get $dA = r \, dr \, d\theta$.

As others have said, you can also use the multivariate change of variables formula involving the Jacobian of the transformation directly. I like the geometric argument when first introducing the polar element in a calculus course, though.

-
@Jonas: Thanks for editing the picture into my answer. –  Mike Spivey May 5 '11 at 2:44
Is that formula just for aproximation? –  Victor Dec 9 '11 at 0:55
@Victor: I'm not sure I understand your question. The expression for $\Delta A$ becomes $dA = r dr d\theta$ in the limit, as explained in the sentence following the formula. –  Mike Spivey Dec 9 '11 at 1:00
i think you ignore the 1/2 (tri(r))^2 (tri(degree)) because it is too small, isn't that call approximate? –  Victor Dec 9 '11 at 1:03
@MikeSpivey Great answer! It really made me get the idea though I'm not familiar with double integration! –  Pedro Tamaroff Feb 20 '12 at 0:41

It's a special case of the multivariate change of variables formula. Intuitively you can think of it as follows: starting from a point $(x, y)$, you make an infinitesimal change in $x$ and then an infinitesimal change in $y$ to get to $(x + \delta x, y + \delta y)$. Those changes trace out a little square whose area is $\delta x \delta y$, and you're summing over a bunch of these little squares.

So what happens when you do the same thing in polar coordinates? Starting from $(r, \theta)$ you move to $(r + \delta r, \theta + \delta \theta)$. Now moving $\delta r$ is just like moving $\delta x$ in an appropriately rotated set of axes. But when you move $\delta \theta$, the actual distance you move by is multiplied by $r$ (draw a diagram to see this), and it's in a direction orthogonal to the direction you move when changing $r$. You're actually moving by $r \, \delta \theta$. The result is not quite a square, but for small enough values of $\delta r, \delta \theta$ it approaches a square with side lengths $\delta r$ and $r \, \delta \theta$.

-
you don't need square, you only need rectangle.. –  Aang Jul 10 '12 at 19:18

UPDATE: The series have been replaced by limits of sums.

Geometric interpretation. By definition of a double integral of a continuous function over a bounded closed region $R$ of the $xy$-plane, we have

$$\iint_R f(x,y)\;\mathrm{d}x\;\mathrm{d}y=\lim_{n\to\infty}\; \sum_{i=1}^{n }f(x_{i},y_{i})\Delta A_{i},$$

where $\Delta A_{i}$ is the area of a generic rectangular cell and $n$ the number of cells.

If $f(x,y)=1$, we get the area of $R$

$$\iint_R \mathrm{d}x\;\mathrm{d}y=\lim_{n\to\infty}\; \sum_{i=1}^{n }\Delta A_{i}.$$

If we decompose $R$ into cells with a shape of sectors of a circle defined by two radii whose difference is $\Delta r_{i}$ for the generic $i^{th}$ cell and two rays making an angle $\Delta \theta _{i}$ with each other, the area of the cell, using the formula of a circle sector, is

$$\frac{1}{2}\left[ \left( r_{i}+\frac{1}{2}\Delta r_{i}\right) ^{2}-\left( r_{i}-\frac{1}{2}\Delta r_{i}\right) ^{2}\right] \Delta \theta _{i}=r_{i}\Delta r_{i}\Delta \theta _{i}\text{,}$$

where $r_{i}$ is the radius of the middle point of the cell. The same area $R$ can be expressed as the limit $\lim_{n\to\infty}\;\sum_{i=1}^{n }r_{i}\Delta r_{i}\Delta \theta _{i}$, which by definition of a double integral is equal to $$\iint_R r\;\mathrm{d}r\;\mathrm{d}\theta.$$

Figure: Generic $i^{th}$-cell in polar co-ordinates with the shape of a circle sector

This transformation is defined rigorously by the absolute value of the Jacobian of the transformation $\left\vert \frac{\partial (x,y)}{\partial (r,\theta )}\right\vert =r$ from the Cartesian to the polar system of co-ordinates ($x=r\cos \theta ,y=r\sin \theta$):

$$\iint_R \mathrm{d}x\;\mathrm{d}y=\iint_R \left\vert \frac{\partial (x,y)}{\partial (r,\theta )}\right\vert \;\mathrm{d}r\;\mathrm{d}\theta = \iint_R r\;\mathrm{d}r\;\mathrm{d}\theta.$$

Added: Evaluation of the Jacobian determinant: $$\begin{eqnarray*} \frac{\partial \left( x,y\right) }{\partial \left( r,\theta \right) } &=&\det \begin{pmatrix} \partial x/\partial r & \partial x/\partial \theta \\ \partial y/\partial r & \partial y/\partial \theta \end{pmatrix} \\ &=&\det \begin{pmatrix} \cos \theta & -r\sin \theta \\ \sin \theta & r\cos \theta \end{pmatrix} \\ &=&r\cos ^{2}\theta +r\sin ^{2}\theta \\ &=&r. \end{eqnarray*}$$

-
@Mike Spivey: Thanks! (corrected). –  Américo Tavares May 5 '11 at 8:33
Let us approach this problem like some physicists would, that is, let us consider the differential $\mathrm{d}$ as an operator which obeys the rules of derivation, only with a sign.
In the present case, $x=r\cos\alpha$ and $y=r\sin\alpha$ hence $$\mathrm{d}x=\cos\alpha\mathrm{d}r-r\sin\alpha\mathrm{d}\alpha, \quad \mathrm{d}y=\sin\alpha\mathrm{d}r+r\cos\alpha\mathrm{d}\alpha.$$ Now, there are some magic rules which allow to multiply $\mathrm{d}r$ and $\mathrm{d}\alpha$ elements. These are $$\mathrm{d}r\mathrm{d}r=0,\quad \mathrm{d}\alpha\mathrm{d}r=-\mathrm{d}r\mathrm{d}\alpha,\quad \mathrm{d}\alpha\mathrm{d}\alpha=0.$$ Hence, $$\mathrm{d}x\mathrm{d}y=(\cos\alpha\mathrm{d}r-r\sin\alpha\mathrm{d}\alpha)(\sin\alpha\mathrm{d}r+r\cos\alpha\mathrm{d}\alpha).$$ The $\mathrm{d}r\mathrm{d}r$ and $\mathrm{d}\alpha\mathrm{d}\alpha$ terms disappear and the terms which interest us are the $\mathrm{d}r\mathrm{d}\alpha$ and $\mathrm{d}\alpha\mathrm{d}r$ ones. One gets $$\mathrm{d}x\mathrm{d}y=(\cos\alpha\cdot r\cos\alpha-r\sin\alpha\cdot (-1)\sin\alpha)\mathrm{d}r\mathrm{d}\alpha,$$ that is, $$\color{green}{\mathrm{d}x\mathrm{d}y=r\mathrm{d}r\mathrm{d}\alpha},$$ a formula which yields $$\color{red}{\iint f(x,y)\mathrm{d}x\mathrm{d}y=\iint f(r\cos\alpha,r\sin\alpha)r\mathrm{d}r\mathrm{d}\alpha}.$$ One can also transform integrals the other way round, all there is to do is to compute a formula for $\mathrm{d}r\mathrm{d}\alpha$ as a multiple of $\mathrm{d}x\mathrm{d}y$. Our formula for $\mathrm{d}x\mathrm{d}y$ in terms of $\mathrm{d}r\mathrm{d}\alpha$ yields $$\mathrm{d}r\mathrm{d}\alpha=\frac1r\mathrm{d}x\mathrm{d}y=\frac1{\sqrt{x^2+y^2}}\mathrm{d}x\mathrm{d}y,$$ hence $$\color{blue}{\iint f(r,\alpha)\mathrm{d}r\mathrm{d}\alpha=\iint f(x,y)\frac1{\sqrt{x^2+y^2}}\mathrm{d}x\mathrm{d}y}.$$ Once again, this only describes the computational side of the story, but this recipe is supported by a well established theory of differential forms which we omitted.
it would be maybe helpful to use the symbol $\wedge$ (or $\cdot$, or $\otimes$, or ...) for the multiplication of two differentials just to make clear that the "usual" rules for product do not apply. –  Fabian May 5 '11 at 9:47
@Fabian: I deliberately omitted it. Both choices (with and without $\land$) have their advantages. Thanks for your reaction. –  Did May 5 '11 at 9:53
Can the "magic rules" be viewed as the cross product of "vectors" $\mathrm{d}r,\mathrm{d}\alpha$ ? –  Américo Tavares May 5 '11 at 17:41


text:
# Tag Info

13

There are many specialised products for HF tick data. In addition to KDB which you mentioned, there is OneTick, Vertica, Infobright, and some open-source ones like MonetDB etc. (see http://en.wikipedia.org/wiki/Column-oriented_DBMS). My experience is that Column Oriented Databases are overrated when it comes to tick data, because very often you request the ...

8

The main issue measuring intraday volatility is called "signature plot": when you zoom in, the volatility measure (i.e. empirical quadratic variations) explode. Similarly you have the "Epps effect" for correlations: when you zoom in, the correlations collapse (it is at least a mechanical effect). For the volatility a lot of models can correct this: - first ...

8

Here are some pointers. First of all: What you list as a Reuters RIC, RSF.ANY.AAPL.OQ, is not really a RIC, only the AAPL.OQ is. The initial part is some stuff which is essentially site specific and tells me that you are working on a site that has a legacy RTIC infrastructure (some Reuters/TIBCO technology which is quite old these days and for all ...

7

Your question is very vague (e.g. what are you trying to measure, and what "tick data" do you have), but I'll give you some pointers: In general, when people consider how prices evolve, they will tend to think about things like volatility and correlation dynamics. So I would start by defining exactly what you want to measure. The irregularity of time ...

6

The expression you have is fine. But more generally, for the intraday volatility, I don't think there "the correct definition". More like, whatever works in the given context. I found the following notes by Almgren pretty useful: http://cims.nyu.edu/~almgren/timeseries/notes7.pdf

6

We use Node for reporting but not as part of our main signal generating trading system. To be honest the answer will almost certainly be yes for every common programming technology as it just takes one person to use it somewhere to make the answer yes. Just look at OCaml, before Jane street, most techno logiest on the street had never heard of it and now ...

5

If you're missing ticks, then no technique will get those ticks back. If you have two sources, then designate one source as the primary feed and then fill-in gaps from the secondary feed. Of course, you'll have to mind the timestamps when determining whether the secondary feed can be used properly.

5

Yes, there is a software application that you can purchase for $39.99 which stores all your tick data in a highly compressed format while still allowing maximum throughput and lowest latency data queries that I have ever seen. The package provides APIs to all languages under the sun but because they have a special sale going on it comes with the complete ... 4 Statistical volatility is the standard deviation of a window of log returns. For example, 30-day statistical volatility is the standard deviation of 30, one-day log returns. The log return comes from the assumption that log stock returns are normally distributed. Statistical volatility differs from implied volatility which is the volatility input to some ... 4 xignite seems like a cheaper option for historical data at around$6,000 per year. I am not a client (yet) so I can't give my opinion but it looks good to me. They have a long list of services, a free trial period and interesting pricing model based on the number of queries you send them. If you do use them, let us all know.

4

I think you're addressing the wrong people. What I'd do is to talk to the data vendors' marketing departments, much like I'm sure http://www.wikiposit.org/ has done. Tell them you would like to offer (an excerpt of) their data, in a unified/post-processed form, you would be willing to include links back to their sales website, or praise the vendors ...

4

Collect the data yourself and self-timestamp it or buy it from a vendor that timestamps on receipt. If you do buy data from the venues you should consider very strongly the fact that venue timestamps are never in agreement. Therefore, an event that INET reports at time A does not coincide with an event that BZX reports at time A. This makes buying this sort ...

4

Using MySQL for financial data is not unreasonable. But for tick data are you ever going to do anything except a query on a date range? For analyzing tick data in R I generally keep it in a disk file, one tick file per day, and load the files in as I need them. Using .RData files instead of csv files is quicker. I've also used custom C++ classes before, to ...

4

As explained in the comments best bid and best offer (best ask) are the best prices at which you can respectively sell and buy at least one unit of the asset your are considering. When backtesting a strategy, most people usually either use best bid and best offer or even worse last price. The problem is that these prices are only available for a limited ...

3

If you just want to run some simplistic technical analysis on quotes, then select the last quote for each unique timestamp. That will ensure that you don't have duplicate timestamps. If you must have it evenly spaced (i.e. no gaps from one second to another), then you can reuse the previous quote to fill-in the missing value.

3

Bloomberg equity codes are usually quite easy to derive if you know the ticker (though you may have to replace dashes/spaces/slashes for preferred and multi-class shares). This is just for equities though and this is definitely not the case for futures. RICs are a different story. In the US, you need to know on what exchange the ticker is listed to get the ...

3

Obviously merging two streams is harmless and it should be done. But it's hard to advise you regarding the "interpolation" methods you can use to generate the ticks without knowing why you need this. The reason is that any method will introduce a certain bias to the data. Therefore, it very much depends on what are you going to do with your altered data on ...

3

I use interactive brokers as well. What I do is I collect the data throughout the day with their API (reqMktDepth functionality) and I'm building my personal data warehouse. It may seem silly but I've been doing it for two years now and I have a good dataset to play with. Just get started and you'll see that it makes sense, the nice thing about it is that ...

3

On a theoretical level and for low frequency data (e.g. daily), your formula seems right. However, since you are talking about one minute bars, things may get a little messy. There is a vast literature on this, and empirically, things are complicated due to market micro-structure noise. Namely, you need to do consider jumps, errors, periods of low volume, ...

3

Your code for volatility seems correct, if you want minute volatility, but is that really what you want? See this recent question on annualizing volatility from intraday data. Also, using first and last tick is what is generally done, but over very short time intervals such as a minute, you will have microstructure issues. Another question here deals with ...

3

I'm trying to formulate an answer for latter users of the site and, hopefully to lure some more experienced high frequency traders to further react to my post. First of all, I'd notice that the paper you mentioned was published in 1991. I believe high-frequency trading has evolved a lot since then, and that nowadays HF strategies are more evolved. From ...

2

It isn't clear from this post or your last post what data you want and what you want it for. The only thing you are going to get permission to distribute is the higher level data feeds like EOD data, or last sale (probably can't offer history). Exchanges typically have this information available on their websites, for instance NASDAQ Basic pricing. If you ...

2

Following on from Tal Fishman's idea of using "some good old-fashioned judgment," you might find the idea of applying a Tukey chart and its related upper and lower control limits more useful than standard deviation.

2

This sounds like a case where you will need to apply some good old-fashioned judgment to determine what the standard deviation "should be" before you have enough data to measure it. Surely this process repeats with some frequency, and perhaps given some attributes and more details you could make an educated guess as to the standard deviation (or quantiles, ...

2

I will be adding here some resources that I found during the research, hopefully it will turn useful for others: http://www.linkedin.com/groups/master-symbol-database-most-cost-98173.S.51776671 http://en.wikipedia.org/wiki/Reuters_Instrument_Code

2

I have a little experience with this. First, NASDAQ has shared a dataset with researchers that flags whether an HFT participated in each trade or not but not the actual MPID - probably less granular than what you want. You generally need a professor to "cosign" your request, write a brief project proposal, and sign an NDA to get it. They also have shared ...

2

Neither is entirely correct. I think you need to find a middle ground here because: a) Bid and Ask do not have to be identical when a trade occurs. Someone may lift the offer and that results in a trade without ever having bid the asset b) The last trade may have occurred some time ago as pointed out and true value will most likely lie somewhere between ...

2

Try the FAST Antenna Codec for Windows. You need a little wrapper app that reads the UDP data from your dump and feeds the payload (i.e. sans IP/UDP headers) to the codec.

2

I am using a native C++ implementation based on QuickFAST, you can use the sample FileToMulticast to implement what you need. But if you are looking for a way do decode UMDF ( BM&FBOVESPA FIX/FAST) you must first take care with the UDP packages itself and re assembly the messages, before the decodification

2

To construct best bid/ask from ITCH you must build a book incrementally from the messages in the data. Every message, except for system oriented messages, and non-displayed Trades, represent an order or an action on an order. Process the data, build a book, and you will naturally be left with the best bid/ask at the top of each side.

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


text:
# Continuation-passing style (CPS)

Do you want to program in style? Well, you probably already do if you write programs at all. The most common style of programming is called ‘direct style’. In this style functions are called with some arguments and return some values (or nothing). When you want to combine functions, you can do so by just calling them individually or inside other functions. You can also exploit the composition operator.

So is there any other way to go about returning from a function? How can a function not just return a value that it has computed? How can you use such a function at all? A function written in continuation-passing style returns a continuation instead. So what is this ‘continuation’ thing? Let’s look at it’s type first:

type C r a = a -> r

This is just a function from type a to type r. What makes it so special? Because it can be used as a higher-order function. Moreover, it gains importance when used in the continuation monad. If you don’t know what a monad is, it doesn’t matter. Here is its type:

type Cont r a = (a -> r) -> r

where r stands for return value and a for intermediate value. The monad type is a higher-order function from a function that takes a value of type r and returns a value of type r to a value of type r. You could also say it is a function that takes a function and returns the result of that function. This sounds to me like it does nothing at all! Well it does do something, namely apply a function to a value of type a.

I suggest to now think really hard about functions that have this Cont type. We know it takes a function as its argument and applies something to it. Here is a simple example:

foo :: (Int -> r) -> r
foo c = c 42

foo' :: Cont r Int
foo' c = c 42

foo'' :: C r Int -> r
foo'' = \ c -> c 42

I have written the function with three different notations, they do exactly the same thing. In this blog post I will stick mostly with the first way of writing these functions. The types will get a bit messy later on, but I want to be as explicit as possible. These three functions take an argument c, that represents the current continuation and apply it to the integer value 42.

How do we get our number back? By simply applying foo to the identity function like so:

fortyTwo :: Int
fortyTwo = foo id

fortyTwo' :: Int
fortyTwo' = foo (\ fortyTwo -> fortyTwo)

We call the identity function with the value 42; returning 42. Can we use other functions with foo? Yes, we can. Can we use all functions with foo? No, we can’t. We can only use functions that support integers as their first argument. Luckily, there are many of these functions:

fortyThree :: Int
fortyThree = foo (+1)

fortyTwoStr :: String
fortyTwoStr = foo show

So far we have called foo with functions written in direct style, causing it to return a value. However, we can call it with other functions written in CPS. You may now ask yourself: “Can I call foo with itself?”. Yes, you can, but we have to make a slight modification. Remember what foo does: apply the continuation to the value 42. If foo is that continuation, this is analogous to applying foo to 42. We can use a lambda abstraction to deal with this:

foofoo :: (Int -> r) -> r
foofoo = foo (\ fortyTwo -> foo)

foofoo' :: (Int -> r) -> r
foofoo' = (\ fortyTwo -> (\ c -> c 42)) 42

and create an immensely useless function, because exactly nothing has happened and we get our original function back. You can also come to the conclusion that foo can not be applied to foo by the reasoning that foo does not support integers as its first argument, but functions from integers to r. It would look like the illegal expression (\ c -> c 42) 42.

## How to play the CPS game

A continuation can be seen as a todo. This part of our code may be completed later. In direct style this occurs frequently. When writing a program a certain function can be left undefined or with a placeholder: to be completed later. It may be called by some other function. This is what our c is: a placeholder for someone to complete later. We completed our foo function by calling it with the id function.

The person writing the implementation of the placeholder needs to only consider the intermediate value a passed to the continuation. She can remain agnostic about the rest of the original function. If she is lazy herself, she can even insert some continuations (todos) in her code. She then passes on the code to someone else, and this person continues… You get the idea. We can keep using continuations inside our continuations. CPS is just a long list of todo‘s.

When writing in CPS we will have two new rules:

• Functions take an extra continuation argument; c in our case.
• Functions are applied to variables or other functions (i.e., lambda expressions).

This has the consequence that the innermost part of an expression must be evaluated first. Making the order of evaluation explicit.

We will encounter two main usages of continuations:

• Apply the continuation to something.
• Apply something to the continuation.

If you want you may think about the possible types of these two somethings. The first one restricts the type of the continuation, as it needs to accept the thing it is applied to. In the foo example this is an integer, making the intermediate value an integer as well. The second one restricts the type of the something applied to the continuation, namely it needs to be a function that accepts continuations as arguments. When applying a function to a continuation, we are actually applying the continuation to the result of that function. It is like performing the function first and after it has finished just continuing on.

We will show some idioms of CPS. They will make more sense once you have read the entirety of this blog post.

• bind to result of continuation
• bind to continuation
• modify continuation

We saw an example of this with our foo function, where we bound the value 42. More generally we can bind the result of any continuation.

bindResult :: ((a -> r) -> r) -> (a -> r) -> r
bindResult m c = m (\ a -> c a)

This can be ead as: perform computation m and bind a to the result. What it does is pass the intermediate result to the current continuation. This becomes useful later, when we want to do some computation first and then continue with the result of that computation. We can also bind continuations to other functions. Like so:

bindContinuation :: ((a -> r) -> (a -> r) -> (a -> r) -> r) -> (a -> r) -> r
bindContinuation k c = k c c c

The type of modification function looks like a combination of the two other idioms:

withc :: ((b -> r) -> r) -> ((a -> r) -> b -> r) -> (a -> r) -> r
withc m f c = m (f c)

## Chains that bind

With this knowledge we can now start chaining functions like no other. Let’s first define a useful function which helps us do this:

unit :: a -> (a -> r) -> r
unit a c = c a

fortyTwo'' :: Int
fortyTwo'' = unit 42 id

With this function we can now make a continuation from any value of type a. Multiple unit‘s can be chained together.

unitChain :: a -> (a -> r) -> r
unitChain a = (unit a) unit unit

Note that unit does not need a lambda abstraction to chain it together, because it takes a first argument of type a. We can also create an at first weird looking expression:

uu :: ((a -> (a -> r1) -> r1) -> r2) -> r2
uu = unit unit

this can be interpreted as a function that takes a function and applies unit to it. We apply id to get our unit function back. You can do the same thing with unitChain.

uuid :: a -> (a -> r) -> r
uuid = uu id

We can use the intermediate value of a CPS function and keep passing it on. What we can not do is use all of the previous intermediate values. For this reason we define bind to paste continuations together. We saw something similar when defining foofoo. What will be the type of this function? It will take a continuation, a function from the intermediate value of that continuation to a new continuation, and return this new continuation

bind :: ((a -> r) -> r) -> (a -> ((b -> r) -> r)) -> ((b -> r) -> r)
bind m f c = m (\ a -> f a c)

This function is a bit magical, but can be translated to English. Perform computation m and bind a to the result; apply f to the result a and apply that to the continuation c. The main difference in this function

is that the contination c is not applied to something, but f is applied to c. We do this to pass our current continuation. Consider functions that just return their passed continuation:

continueCont :: ((a -> r) -> r) -> (a -> r) -> r
continueCont m c = m c

continueCont' :: ((a -> r) -> r) -> (a -> r) -> r
continueCont' m c = m (\ a -> c a)

this can also be implemented with the id function. Here we see the resemblance with our bind function immediately.

## Implementation example

I will give some functions to illustrate unit and bind. Since we are in the habit of making useless functions…

csqrd :: Floating a => a -> (a -> r) -> r
csqrd a c = c (a * a)

csqrt :: Floating a => a -> (a -> r) -> r
csqrt a c = c (sqrt a)

bar :: Floating a => a -> (a -> r) -> r
bar a = csqrd a csqrt

bar' :: Floating a => a -> (a -> r) -> r
bar' a = csqrt a csqrd

Now let’s say we want both the square and the square root

bothResults :: Floating a => a -> ((a, a) -> r) -> r
bothResults a = csqrt a bind \ x ->
csqrd a bind \ y ->
unit (x, y)

Here bind binds our intermediate results and unit helps us return the result. We can not use a normal tuple as final expression here? (Why?)

## Control Flow

The examples in the previous section work, but are mostly clearer in direct style. What is something you can do in continuation style that you can not do in direct style? We can use CPS for most control flow statements! A few examples:

• jmp
• break
• continue
• try, throw, catch
• while
• if then else
• yield
• lazy evaluation

We may now pause and think about the reason why these things are possible. How can we just go to any part in our function from our function? This is where we must realize the power of higher-order functions. Calling functions with other functions gives us the possibility to interpret the passed functions as continuations (and call then).

## Forward jumps

We will implement the cjmp, lbl pair to skip certain parts of our code. This is a forward jump. Backwards jumps are also possible, but a bit more elaborate. Let’s first think about the type of the conditional jump instruction. It should have a condition, which can be represented by a Bool, a continuation to jump to, and the current continuation, like all CPS function.

cjmp :: Bool -> a -> (a -> r) -> (a -> r) -> r
cjmp True  a c' _ = c' a
cjmp False a _  c = c  a

The True branch ignores the current continuation c and jumps to c'. The other branch does the same thing the other way around. Notice the similarity with the unit function.

The lbl function should take a label and return a continuation. What is a label? A label is function from two continuations to a result. We get the following:

lbl :: ((a -> r) -> (a -> r) -> r) -> (a -> r) -> r
lbl k c = k c c

With our fancy new function we can now do some flow control:

flow :: (String -> r) -> r
flow c = lbl (\ label ->
unit "hello" bind \ _ ->
unit "no jump"
) c

this returns "jump" when applied to id.

## TODO – Continuation assignment

We will implement the function callcc, which stands for call with current continuation. It provides us with a function that ignores its continuation. We see the use of all idioms coming together.

callcc :: ((a -> (b -> r) -> r) -> (a -> r) -> r) -> (a -> r) -> r
callcc h c = h (\ a _ -> c a) c

fix :: (a -> a) -> a
fix f = let x = f x in x -- Y-combinator

getcc :: ((((a -> r) -> r) -> r) -> r)
getcc = callcc (unit . fix)

getcc' :: a -> (((a, a -> ((b -> r) -> r)) -> r) -> r)
getcc' x0 = callcc (\ c -> let f x = c (x, f) in unit (x0, f))

## Conclusion

We have shown that CPS is a powerful tool for creating (sometimes hard to understand) functions with extra flow control. We have shown a couple of implementation examples. The takeway is that higher order functions have a lot of power to them. Monads and CPS are actually interchangable, if CPS is expressed as a monad like the one at the start of this post. This is exactly what we did in this post without calling attention to it. We defined the unit and bind function; the monad constructor can be emulated by defining a CPS function. Together they gives us a triple constituting a monad.

## References

Wadler, Philip. “The essence of functional programming.” Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages. 1992.


text:
## Thomas' Calculus 13th Edition

$-32$
We have: $F \cdot n =2uv+3v^2 -12$ and $\iint_{S} F \cdot n \ d S=\iint_{S} (2uv+3v^2 -12) \ dS$ or, $=\int_{-2}^{2} \int_{0}^{1} (2uv+3v^2 -12) \ du \ dv$ or, $= \int_{-2}^{2} [u^2 v+3uv^2-12u]_{0}^{1} \ dv$ or, $=\int_{-2}^{2} (v+3v^2-12) \ dv$ or, $=[\dfrac{v^2}{2}+v^3 -12 v]_{-2}^2$ or, $=(\dfrac{(2)^2}{2}+(2)^3 -12 \times 2) -(\dfrac{(-2)^2}{2}+(-)^3 -12 \times (-2))$ or, $=-32$


text:
# Powershell: Invoke-Command Permissions Issue

Summary: Running a "get-wmiobject" on another computer works properly. But when I "invoke-command" "get-wmiobject", I get access denied.

Detail: I have a workstation (Computer-Central) at our central site, from which I run an inventory script. The inventory script loops through several "get-wmi" commands for each IP on all our remote sites. If I log onto Computer-Central as a domain admin, the script works properly.

I'm now at one of those remote sites. My current workstation is (Computer-SiteA). So I can't log into Computer-Central directly; I have to RDP in. The trouble is, the RDP session times out before the script finishes (it takes about 12 hours). So I can't RDP in, start the script, and walk away. For various reasons, making a Scheduled Task is also out.

Powershell Remoting is enabled. I logged onto Computer-SiteA with my domain admin account and ran the following command:

invoke-command -computername Computer-Central {dir c:}

This worked properly. So I kicked off the inventory script with the following command (again, run as domain admin on Computer-SiteA):

invoke-command -computername Computer-Central -filepath c:\inventory.ps1

The script started and ran overnight. But the get-wmi commands all produced "Access Denied" errors. I RDP'd into Computer-Central and ran the following command:

get-wmiobject -class win32_computersystem -property name -computername Computer-SiteB

This worked properly. I got the WMI information back.

Then I logged onto Computer-SiteA and ran the following command:

invoke-command -computername Computer-Central {get-wmiobject -class     win32_computersystem -property name -computername Computer-SiteB}

This failed with "Access Denied." I logged on as Domain Admin and even did a "Run As Different User" to make sure the PS console was open as my domain admin account.

I'm very confused by this. "Invoke-Command" should start the Powershell.exe process on the remote system with the credentials I've used on the local PC. The "get-wmiobject" command should pass the WMI query from the remote PC to the target PC, again with the same credentials. But that doesn't seem to be the case.

Any ideas?

EDIT: I ran this command to make Computer-Central query itself.

invoke-command -computername Computer-Central {get-wmiobject -class     win32_computersystem -property name -computername Computer-Central}

That worked. If I invoke "get-wmiobject" on the remote system targeting itself, it works. If I invoke "get-wmiobject" on the remote system targeting a third system, it fails. I hope this helps.

The problem is that you're using NTLM (Windows) authentication to the remote machine, and then trying to connect to another machine. This is the classic "double hop" problem: You're on machine A, authenticating to machine B and then trying to connect to machine C from B (via WMI.)

http://blogs.msdn.com/b/besidethepoint/archive/2010/05/09/double-hop-authentication-why-ntlm-fails-and-kerberos-works.aspx

It works with RDP because you're connecting from A to B using RDP and giving B your username and password (which you physically must type in for RDP.) At this point, B is able to use NTLM to connect to C. When you don't use RDP, you are connecting from A to B with NTLM and you are not allowed to then use NTLM a second time from B to C without giving your username and password again.

Thankfully PowerShell has a solution to this and it's called CredSSP authentication. It does need a bit of extra work to set up though, but once it's done you can then do what you need to do. Here's a good walkthrough:

https://blogs.technet.microsoft.com/heyscriptingguy/2012/11/14/enable-powershell-second-hop-functionality-with-credssp/


text:
The answer-seizure ratio (ASR) is a measurement of network quality[1] and call success rates in telecommunications. It is the percentage of answered telephone calls with respect to the total call volume.

## Definition

In telecommunication an attempted call is termed a seizure. The answer-seizure ratio is defined as 100 times the ratio of answered calls, i.e. the number of seizures resulting in an answer signal, divided by the total number of seizures:

$ASR = 100 \ \frac {answered \ calls}{seizures}$

Busy signals and other call rejections by the telephone network count as call failures. However, the inclusion in the ASR accounting of some failed calls varies in practical applications. This makes the ASR highly dependent on end-user action. Low answer-seizure ratios may be caused by far-end switch congestion, not answering by called parties and busy destination circuits.


text:
Reconstructing phase space and estimating maximal Lyapunov exponent from experimental time series

Background

Last week I took some measurements of a system for my research and needed to show if the system was chaotic. The measured data was a 1-dimensional time series from a Laser Doppler Vibrometer (LDV). In order to show the system was chaotic I reconstructed state space using the method of delays, and estimated the maximal Lyapunov exponent of the system.

Continuous1 systems must be at least three-dimensional in order to exhibit chaos, but it's possible to reconstruct higher-dimensional state space from a 1-dimensional time series[2] by lagging the data, e.g. taking $x(t)$ and turning it into a series of vectors $[ x(t), x(t+T), ..., x(t+nT) ]$. There are a variety of methods for determining the constant $T$, and the embedding dimension (sometimes called $m$), and there is no clear best method. Fortunately these systems are somewhat forgiving.

Method of delays

In my experiment I generated a time series based on the Lorenz system by integrating the Lorenz equations with one of MATLAB's Runge-Kutta ODE solvers (code lorenz_ode.m gen_chaos.m).

Plotting $x$, $y$, and $z$ over $t=[0,100]$ produces a nice Lorenz attractor

I took the $z$ variable (lorenz_z.txt) and used the method of delays to reproduce the attractor. I just guessed at a lag value. I'll demonstrate a better method below.

We see that it is warped, but the underlying structure is there. For my experiment I generated a 100 Hz sinusoidal tone and added a scaled (1/50) and sped-up (100x) version of the Lorenz time series generated above. One second of data (at 204,800 samples/sec) was sent to a DAC, amplified, and used to drive a speaker coil. The vibration of the coil was measured using an LDV, producing a time series.

Determining lag

Andrew Fraser and Harry Swinney[3] give a method for determining appropriate lag for the method of delays using mutual information4. Dr. Eric Weeks wrote a C program which implements their method, and you can read more about it on his website.

Running this program on my LDV data produced this signal, plotted below. From this we can see that the first minimum is around $T=770$ (discrete steps, or $770 / Fs = 3.76$ milliseconds).

I reconstruct the attractor in MATLAB using this delay:

N = length(lz);
T = 770;
X = [lz((1:N - 2*T)), lz((1:N - 2*T) + T), lz((1:N - 2*T) + 2*T)];
X = X(1:100000, :);  % take first ~half of data so the plot isn't too dense
plot(X(:,1), X(:,2));
title('Reconstructed attractor from LDV data');
xlabel('x(t)'); ylabel('x(t+770)');

This does not look like the Lorenz attractor because the system is dominated by the 100 Hz carrier. It may be possible to get a better-looking reconstruction by taking the envelope of the signal. Zooming, we see dense orbits5:

Estimation of MLE

Lyapunov exponents describe how a system expands and contracts in phase space. There is a spectrum of exponents but the maximal Lyapunov exponent (MLE, often written $\lambda_1$) characterizes the system. One of the features of chaos is exponential divergence (sensitivity to initial conditions). Two trajectories, initially arbitrarily close to each other, will diverge exponentially in phase space. The existence of a positive Lyapunov exponent is good evidence for chaos. It is also an indication of the long-term predictibility of a system: it may be specified in nats per second (or bits or digits), giving the amount of time it takes for uncertainty in a system to increase by a factor of $e$ (or 2 or 10). Note that there must be exponential divergence for this analysis to be meaningful.

If differential equations for a system are known, it may be possible to solve for $\lambda_1$. Otherwise, it can be estimated by solving the system numerically, as in [6]: Integrate the system for two nearby initial conditions and watch how the trajectories diverge. Renormalization is necessary as most systems are bounded (two points can only be so far away from each other in phase space).

In my case, I have a small amount of data (204800 samples), and only one trajectory in phase space. Rosenstein, et. al. 7 present a method for estimating $\lambda_1$ in this case:

• Reconstruct the attractor using the method of delays (I use an embedding dimension of $m=10$)
• For each point $j$:
• Find that point's nearest neighbor with the constraint that it must have at least one mean period of temporal separation. The temporal separation constraint allows us to treat our single trajectory as a collection of trajectories having separate evolutions.
• Follow the evolution of both points, calculating the distance $d_j(i)$ between them with respect to time step $i$.
• Take the average over all points $j$: $d(i) = \mathrm{mean}(d_j(i))$
• Plot $ln(d(i))$. A straight line here indicates exponential divergence (there will likely be two regions, an initial exponential divergence and then a flat portion. This happens when phase space is bounded and there is a maximum distance, as discussed above).
• Fit a line to $ln(d(i))$.
di = rosenstein(lz, 770);
Fs = 204800;
figure;
plot((1:length(di)) / Fs, log(di));
title('Divergence for LDV data - Average distance between nearest neighbors');
xlabel('Lag (s)');
ylabel('ln(d_j(i))');

%% Fit line
x1 = 1;
x2 = 6643;
p = polyfit((x1:x2)'/Fs, log(di(x1:x2)),1);
h = refline(p);
set(h, 'LineStyle', ':');
text(0.04, 3.4, sprintf('slope = %.2f nats/sec', p(1)));

Sanity check

Is this a reasonable value for our system? I used this method on the original, computed8 Lorenz data ($[x(t), y(t), z(t)]$) and the computed time series $[z(t), z(t+T), ..., z(t+9T)]$ .

Note that the $z(t)$ data has been sped up by a factor of 100, so the estimated values for $\lambda_1$ are about equal. The actual MLE for the Lorenz system is known to be about 0.9056. So there is a significant error9 but the values are within reason for my purpose, which is to broadly characterize a time series.

1. It's possible to have e.g. 1-D discrete maps which are chaotic.

2. Packard, Norman H., et al. "Geometry from a time series." Physical review letters 45.9 (1980): 712.

3. Fraser, Andrew M., and Harry L. Swinney. "Independent coordinates for strange attractors from mutual information." Physical review A 33.2 (1986): 1134.

4. One of the things that differentiates chaos from random noise is that there is long-term memory, i.e. the autocorrelation function or this mutual information metric takes a long time to decay; autocorrelation for perfect Gaussian white noise is a sharp peak at zero lag, and zero everywhere else.

5. Compare to a non-chaotic signal, a perfect sinusoid + white noise, which looks "fuzzy" in phase space but the orbits always quickly return to the mean after deviation.

6. Benettin, Giancarlo, et al. "Lyapunov characteristic exponents for smooth dynamical systems and for Hamiltonian systems; a method for computing all of them. Part 1: Theory." Meccanica 15.1 (1980): 9-20.

7. Rosenstein, Michael T., James J. Collins, and Carlo J. De Luca. "A practical method for calculating largest Lyapunov exponents from small data sets." Physica D: Nonlinear Phenomena 65.1 (1993): 117-134.

8. Computed from the differential equations, as opposed to measured data from the LDV.

9. The Rosenstein, et. al. paper has several tables documenting how their method behaves for various underlying attractors, embedding dimensions, number of data points, lag value, and so on.