TITLE: How to scale a triangle such that the distance between original edges and new edges are equal?
QUESTION [0 upvotes]: This is very similar to this question:
Coordinates of parallel triangle with a distance of 'd' between the parallel edges?
That seems to provide the answer in 2D, but I am unsure how to apply this to 3D.
To recap the original question; I am looking to scale a triangle such that the new triangle has the same distance to the original for each edge; I also need to do so in 3D.

REPLY [0 votes]: A triangle in 3D is still a triangle,
with the area $S$ and semiperimeter $\rho$,
just all the points has one extra coordinate,
so the solution in
the cited answer
is also valid. The point of the incenter is found as
\begin{align}
I&=\tfrac{a}{2\rho}A+\tfrac{b}{2\rho}B+\tfrac{c}{2\rho}C,
\end{align}
the inradius $r=\frac{S}{\rho}$,
and expression for the scaled points is the same:
\begin{align}
P'= I + \frac{r+d}{r}(P-I)
\end{align}
for $P=A,B,C$, $P'=A',B',C'$.
* Edit *
Example:
\begin{align}
a&=10.6770782520313
\\
b&=13.6014705087354
\\
c&=7.68114574786861
\\
\rho&=15.9798472543177
\\
S&=40.8962100933571
\\
r&=2.55923660861696
\\
Ic&=(0.0750533703072529,5.86313622256124,0.535772095008993)
\\
d&=-1
\end{align}

REPLY [0 votes]: The final scaled triangle will be the same wether it is embedded in three dimensional space or two dimensional space. I think you mean that your triangle is defined by it's coordinates in a coordinate system, and you want to find out the coordinates of the enlarged triangle's corners.
One way to do this would be to find some 2d coordinates that define the same triangle but in 2d space, and then use the answer you linked to to find the coordinates of the enlarged triangle in 2d. Then you could calculate the incenter of the 2d triangle, and measure the distance of the enlarged triangle's corners to the incenter. Once you have this distances, you can calculate the incenter in 3d space and use the distances to determine the new triangle's corners (the line from the triangle's incenter to one of it's corners will also contain the new triangle's corner).


TITLE: If $A$ commutes with $E$ then will it commute with $D$ where $E = P.D.P^{-1}$ where $P \in GL_n(\mathbb{R})$?
QUESTION [0 upvotes]: Let $E$ be an idempotent linear operator such that $E^2 = E$ .
Now $A.E = E.A$ and we see that $E$ is diagonalizable(as minimal polynomial splits) then $E = P.D.P^{-1}$ where $D$ is a diagonalizable operator. Does $A$ commute with $D$? I don't think it will but I cant't come up with a contradictory example..

REPLY [0 votes]: No. For instance:
$$
D=\begin{pmatrix} 1& 0 & 0\\0&0&0\\0&0&1\end{pmatrix}\,,\quad P=\begin{pmatrix} 0& 1 & 0\\1&0&0\\0&0&1\end{pmatrix}\,,\quad A=\begin{pmatrix} 1& 0 & 0\\0&1&1\\0&1&1\end{pmatrix}
$$
Then $ AE=EA$ but $AD\neq DA$.
The idea is that commuting matrices preserve each other's eigenspaces, but if the change of basis $P$ reorders the basis vectors, then the eigenspaces are not equally distributed in $D$ and $E$.
Since $E$ is idempotent, its only eigenvalues may be 0 and 1. The kernel of $E$ is the first vector in the basis, which is preserved by $A$, but the kernel of $D$ is the second vector, which is not.


TITLE: Probabilities for quantum random number generators
QUESTION [2 upvotes]: Consider a quantum random number generator (QRNG) X, which generates integers at random.
(Apparently, due to quantum statistical properties, this type of generation is truly at random, see e.g. "The quantum number generator".)
My question is: what is the probability that X generates a given integer $N \in \mathbb{Z}$ ?
From the mathematical viewpoint there appears to be some obstruction, in that uniform distributions on a countable set do not exist: if $p > 0$ would be the positive probability assigned to each integer, then $\sum_{i \in \mathbb{Z}}p = \infty$, and not $1$.
On the other hand, it might be that $p$ simply should be taken $0$, and that the classical idea of uniform probability is not relevant in this quantum-mechanical context ?
But if it is, then random generation does not imply that integers are chosen with the same probability, which seems a very interesting feature to me ...

REPLY [2 votes]: The quantum random number generator described in the article does not generate a random integer $n \in \mathbb{Z}$. It generates a random bit $b \in \{0,1\}$. Although you could (in theory) use any finite number $k$ of these bit generators to generate a random integer in the range $[0,2^k-1]$, this is not the same as generating a random integer $n \in \mathbb{Z}$. Any physical random number generator that claims to generate a random integer $n \in \mathbb{Z}$ with a uniform distribution is clearly bogus because it will almost certainly generate a number that requires more bits than the number of fundamental particles in the observable universe to represent it.


TITLE: Why do we take $R$ when constructing the tensor algebra?l
QUESTION [1 upvotes]: Let $R$ be a commutative ring and $M$ be an $R$-module.
Define $T^0(M)=R$ and $T^n(M)=M\otimes...\otimes M$(n-times) for $n\in\mathbb{Z}^+$.
Then we take $T(M)\triangleq \oplus T^n(M)$ and give an operation to make it an $R$-algebra.
My question is why do we take $T^0(M)$? What's the role of $T^0(M)$ in the tensor algebra $T(M)$?
And I don't get how to define an operation on $T(M)$.
It's written in my text that we take an operation as $(m_1\otimes...\otimes m_i)(n_1\otimes...\otimes n_j)=(m_1\otimes...\otimes m_i\otimes n_1\otimes...\otimes n_j)$ but what does this mean when $i$ or $j$ is $0$?

REPLY [1 votes]: You want $T(M)$ to be an $R$-algebra. Thus, the role of $T^0(M)$ is to give you an algebra homomorphism $R\stackrel{\sim}{\to} T^0(M)\to T(M)$.
When $i=0$ and $j>0$ you define $r\cdot (n_1\otimes \dots\otimes n_j)=(rn_1)\otimes \dots\otimes n_j$, similarly for $j=0$. When $i=0=j$, then the multiplication in $T(M)$ is just the same as in $R$.


TITLE: Should computer code be included within publications that present numerical results?
QUESTION [34 upvotes]: Many research papers include numerical results obtained through computation. Most of the time such computations are performed using software that is used by many mathematicians, i.e., Maple, Mathematica, or even C/C++ code. Should such code be included in the body of the published paper?
I've heard arguments from both sides:

Including such code can greatly decrease the time taken by a referee to replicate the results,
The code can be easily modified by further authors who wish to extend the result,
The reader does not need to spend time searching the journal website or the Internet for any "auxilliary files" containing the code.

On the other hand,

Pages of code degrade the aesthetic nature of the publication,
The author might need to spend additional space explaining the coding decisions that were made in the algorithms,
It is likely that there exist (much) better ways to write the same algorithms in the given, or any other, language.

So what is the standard in mathematical research papers that present numerical results, either as a main or as a side result? Should code be included within the body of the publication, as an auxilliary file, or not at all?

REPLY [5 votes]: There are some issues that are not emphasised enough in the previous comments and answers. Having the source code used by an author does not let you check that the author's theorems are correct. It only lets you check that the program does what the author claims. Transcribing the program output to the published paper is the step where an error is least likely to have occurred. Much more likely is an error in the program.
So, can you eyeball the program to check if it is correct? Not unless it is a very short simple program. I publish articles that rely on tens of thousands of lines of code that took me and others months of hard work to write and debug. Your chances of looking at it and checking its correctness in a reasonable amount of time are next to zero.  One day there will be programs that can check correctness for you; the beginnings exist today but generally useful checkers are still a long way off.
So what to do? If you are an author, get a coauthor and aim for separately implemented programs that get the same result, hopefully using different methods. (An axiom of software engineering is that programmers solving the same problem using the same method tend to make the same mistakes.) Intermediate results are very useful for checking, especially when the final answer has low entropy (like "yes" or "empty set").
Another fact is that problems which needed very tricky programming and bulk computer time 20 years ago can now be solved in a reasonable time using simpler programs. Presumably that trend will continue. Any computational result that is important enough will eventually be replicated independently without so much effort.