34
$\begingroup$

Basically the same as Formatting Sandbox in Meta Stack Exchange, but since this and Statistical Analysis are the only two sites (I know) supporting $\TeX$ formatting, I believe we also need one here for testing it.

$\endgroup$
  • 1
    $\begingroup$ Theoretical computer science also supports $\mathrm{\TeX/\LaTeX}$ formatting. $\endgroup$ – JeffE Jun 1 '12 at 7:29
  • 1
    $\begingroup$ @JeffE: You can use $\TeX$ and $\LaTeX$ (\Tex and \LaTeX) for the text. $\endgroup$ – Asaf Karagila Jun 2 '12 at 21:09
  • 3
    $\begingroup$ @JeffE: In 2010 only 'stats' and 'math' support TeX formatting. Of course now there is also 'cstheory', 'cs', 'chemistry', 'quant', etc. $\endgroup$ – kennytm Jun 3 '12 at 6:25
  • $\begingroup$ test $$\begin{align*}\text{middle line}\end{align*}$$ new line $\endgroup$ – Ruslan Jan 30 '14 at 13:06
  • $\begingroup$ test test $\not\in(1)\notin(2)$ Who's better??? $\endgroup$ – user93957 Jan 31 '14 at 22:25
  • $\begingroup$ $m^n + m^x + m^n = 555555$ test test $\endgroup$ – hichris123 Feb 2 '14 at 19:09
  • $\begingroup$ line $\begin{array}\phantom{i}\\\phantom{i} \end{array} $ line2 $\endgroup$ – Bill Dubuque Apr 18 '14 at 15:15
  • $\begingroup$ quotes test ${``}=\text{’’}$ $\endgroup$ – Ruslan Oct 25 '17 at 11:13
  • 1
    $\begingroup$ $a``=\!\!\text{’’}b$ $\endgroup$ – Ruslan Oct 25 '17 at 11:17
  • $\begingroup$ I would understand the newly covered elements at the time we choose $S_3$ should be $S_3\setminus(S_1\cup S_2)$ instead of $S_3\setminus(S_1\cap S_2\cap S_3)$. $\endgroup$ – Apass.Jack Aug 25 '18 at 20:51
  • $\begingroup$ $(\begin{smallmatrix}1\\-1\end{smallmatrix})$ $\endgroup$ – Marcus Ritt Jun 26 '19 at 20:45
  • $\begingroup$ yes$%-------------$ $\endgroup$ – Ruslan Oct 12 at 9:58
  • $\begingroup$ yes$%-------------$ $\endgroup$ – Ruslan Oct 12 at 10:00

46 Answers 46

1
2
0
$\begingroup$

Sudoku test $$\begin{array}{||c|c|c||c|c|c||c|c|c||} \hline\hline 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\ \hline 4 & 5 & 6 & 7 & 8 & 9 & 1 & 2 & 3 \\ \hline 7 & 8 & 9 & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline\hline 2 & 3 & 1 & 5 & 6 & 4 & 8 & 9 & 7 \\ \hline 5 & 6 & 4 & 8 & 9 & 7 & 2 & 3 & 1 \\ \hline 8 & 9 & 7 & 2 & 3 & 1 & 5 & 6 & 4 \\ \hline\hline 3 & 1 & 2 & 6 & 4 & 5 & 9 & 7 & 8 \\ \hline 6 & 4 & 5 & 9 & 7 & 8 & 3 & 1 & 2 \\ \hline 9 & 7 & 8 & 3 & 1 & 2 & 6 & 4 & 5 \\ \hline\hline \end{array}$$

Result: Doesn't work as expected. Actual $\rm\LaTeX$ output of the same code:

LaTeX output

| |
$\endgroup$
0
$\begingroup$

$\endgroup$
0
$\begingroup$

Replace an SEO unfriendly pic question

a sample pic question

with a markdown blockquote for site SEO (in order to avoid harming the content originality by enclosing cited contents with <blockquote> using markdown)

The following sum $$ \sqrt{25-\left(\frac5n\right)^2} \cdot \frac5n + \sqrt{25-\left(\frac{10}n\right)^2} \cdot \frac5n + \cdots + \sqrt{25-\left(\frac{5n}{n} \right)^2} \cdot \frac5n $$ is a right Riemann sum for the definite integral $$\int_a^b f(x)\,\mathrm{d}x$$ where $b = \:\bbox[2px, white, border:1px solid black]{\color{white}{\Rule{5em}{1em}{0.1em}} {\tt 5}}$
and $f(x) = \:\bbox[2px, white, border:1px solid black]{\color{white}{\Rule{1em}{1em}{0.1em}} {\tt sqrt(25 - x^2)}}$.
The limit of these Riemann sums as $n \to \infty$ is  $\bbox[2px, white, border:1px solid black]{\color{white}{\Rule{8em}{1em}{0.1em}}}$ .

$\endgroup$
0
$\begingroup$

Aligning equations: \begin{align} 3x-1 &= -10 \\ 3x &= -9 \\ x &= -3 \end{align}

| |
$\endgroup$
0
$\begingroup$

Test for MathJax trickeries on hyperlinks where the tag appears on the LEFT. Also see the closely related post about footnotes using html.

The main objective is to get the tag (visual cue) on the left, at the beginning of a line, be it in mathmode or text (sectioning).

Does this work? Yes, and inline \ref{sec01} tag works \ref{sec02} just as well in a standard mode or \ref{keypoint}. Now the challenge is to $\hspace{600pt}\ref{sec03}$. Hell yeah! .... umm why is it one line off? See the thoughts on phantom lines later.

So let's see how these silly ones work. First there's the blank Eq.\eqref{05} and the 2nd Eq.\eqref{12}, both tags consisting of 3 white spaces. Then we have Eq.\eqref{13} and lastly Eq.\eqref{14}. oh how about not in eqref but jus ref like these Eq.\ref{05}, Eq.\ref{12}, Eq.\ref{13}, and Eq.\ref{14}?

\begin{align*} &\text{This is an} & &\text{align environment} & &\text{Seriously} \tag{ } \label{05} \\ \mathbb{E}[X] &\equiv \mathcal{X} & \frac{\mathscr{X}}{\mathbb{Y}} &\approx \frac45 \Theta & j &= 2 \tag*{ } \label{12}\\ A &\equiv B+C & \frac{x}y &\approx \frac12 \Theta & i &= 3 \tag*{no kidding} \label{13}\\ \tag*{tag and label in 1st column} \label{14} \alpha &\equiv \beta+\gamma & \frac{\eta}\xi &\approx \frac23 \Omega & k &= 4 \\ \end{align*}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus bibendum a quam eu vulputate. Phasellus congue velit mi, non gravida neque lobortis ut.

So this is a hyperlink to Eq.\,\eqref{01} which is supposed to be the normal tag, and then Eq.\,\eqref{02} is supposed to clash with Eq.\,\eqref{03}. Of course, the standard use is like Eq.\,\eqref{04}. oh damn it no thin space unless in mathmode so maybe just Eq.\eqref{04} unless one goes through the trouble of $\text{Eq.}\,\eqref{04}$? Yeah there IS a visible diffrence.

Quisque dictum erat eget neque imperdiet lobortis. Vivamus vel malesuada purus. Nunc vulputate sem sit amet pretium luctus. Duis interdum, magna id interdum eleifend, est nisl malesuada dolor, sed mollis metus metus ac magna.

Now this is getting interesting: \Eq.\eqref{21}, or should I call \Eq.\eqref{22}? Getting into the realm of absurdity with \Eq.\eqref{23} and oh btw \Eq.\eqref{24} also with negative that's gonna mess things up, and \Eq.\eqref{25} is no exception. With just \ \ref we have \Eq.\ref{21} ipsum oh I cannot remember \Eq.\ref{22} yes lorem ipsum it is \Eq.\ref{23} can I block call this thing \Eq.\ref{24} by \require \Eq.\ref{25}?

Ut nisl risus, tempor eu dolor vel, suscipit luctus elit. Pellentesque facilisis arcu vitae lacus rutrum viverra. Ut enim sem, imperdiet non volutpat at, ultricies id est. Aenean ex mauris, scelerisque id dolor nec, vehicula tincidunt ligula.

$$s(m-1,n)= 2^{m-3}\sum\limits_{i=0}^{\frac{n}{2}}(-1)^{\frac{n}{2}-i}{m+n+2i-2 \choose 2i}{n\choose \frac{n}{2}-i} \tag{clash tag} \label{02} $$

$$s(m,n)= 2^{m-2}\sum\limits_{i=0}^{\frac{n}{2}}(-1)^{\frac{n}{2}-i}{m+n+2i-1 \choose 2i}{n\choose \frac{n}{2}-i} \tag{normal tag} \label{01} $$

$$ s(m,n-1)=2^{m-2}\sum\limits_{i=0}^{\frac{n-2}{2}}(-1)^{\frac{n-2}{2}-i}{m+n+2i-1 \choose 2i}{n-1\choose \frac{n-2}{2}-i} \tag{clash tag} \label{03} $$

$$ s(m-1,n-1)=2^{m-3}\sum\limits_{i=0}^{\frac{n-2}{2}}(-1)^{\frac{n-2}{2}-i}{m+n+2i-2 \choose 2i}{n-1\choose \frac{n-2}{2}-i} \tag{4} \label{04} $$ Proin non egestas dui, in tincidunt ante. Nunc placerat, nunc ac varius molestie, ipsum ipsum molestie arcu, id rhoncus tellus nunc commodo sapien.


$\Large\color{green}{\text{Oh my god I cannot believe this works!!}}$

Let's quote without the push \Eq.\eqref{31} and with the deliberate \Eq.$\hspace{100pt}\eqref{31}$ positive space paired with the equation labels \Eq.$\hspace{2000pt}\eqref{32}$, Oh my god I cannot believe this works. But is that the inevitable double parenthesis? How about \Eq.$\hspace{300pt}\eqref{33}$, is there still this thing? Now this \Eq.$\hspace{400pt}\eqref{34}$ and again \Eq.$\hspace{500pt}\eqref{35}$ and on and on to \Eq.$\hspace{600pt}\eqref{36}$. Hold on let's see $\hspace{100pt}\ref{31}$, $\hspace{200pt}\ref{32}$, $\hspace{300pt}\ref{33}$. Yeah, these show that $\hspace{400pt}\ref{34}$ tag position push $\hspace{500pt}\ref{35}$ is not affected by equation content, and we have $\hspace{600pt}\ref{36}$. Okay so there's no need to manually tag (label) the parenthesis just one-sided? Now do these $\hspace{700pt}\ref{37}$ go over the boarder $\hspace{800pt}\ref{38}$? Yes they totally do. So it is capped at 600? How about $\hspace{600pt}\ref{37}$ and $\hspace{600pt}\ref{38}$? Yes, exactly 600pt….. wait, there’s a HUGE problem to this system with any negative space: the page jumps to the middle (or below) the equation and cutting the letters in half, unlike the standard setup that jumps to show the entire equation regardless of the height of the expression. The immediate response to solve this is to always setup a phantom line just above $\tag*{wherever}\label{keypoint}$ you want to jump to (ha, not exactly like this), and maybe use some commands the squash the height of the phantom line. This is less than

$\Large\color{green}{\text{I guess for the sake of sectioning}\ldots} \tag*{Sec.1} \label{sec01}$

. . . it’s okay to setup a phantom line (the whole section heading is in mathmode anyway).


In tincidunt finibus porttitor. Integer lobortis dignissim iaculis. Mauris metus lectus, posuere eu cursus a, tempus sed nunc. Donec ut purus efficitur, pellentesque purus id, auctor erat.

\begin{gather*} s(m-1,n-1)=2^{m-3}\sum\limits_{i=0}^{\frac{n-2}{2}}(-1)^{\frac{n-2}{2}-i}{m+n+2i-2 \choose 2i}{n-1\choose \frac{n-2}{2}-i} \tag{21} \label{21} \\ =2^{m-3}\sum\limits_{i=0}^{\frac{n}{2}-1}(-1)^{\frac{n}{2}-1-i}{m+n+2i-2 \choose 2i}{n-1\choose \frac{n}{2}-1-i} \tag{$\color{red}{red tag}$} \label{22} \\ =-2^{m-3}\sum\limits_{i=0}^{\frac{n}{2}-1}(-1)^{\frac{n}{2}-i}{m+n+2i-2 \choose 2i}\frac{(n-1)!}{(\frac{n}{2}-1-i)!(\frac{n}{2}+i)!} \tag{white $\color{white}{tag}$} \label{23} \\ =-2^{m-3}\sum\limits_{i=0}^{\frac{n}{2}-1}(-1)^{\frac{n}{2}-i}{m+n+2i-2 \choose 2i}\frac{n!}{(\frac{n}{2}-i)!(\frac{n}{2}+i)!}\frac{\frac{n}{2}-i}{n} \tag{$\hspace{-120pt}\color{blue}{\Large blue Large}$ tag negative space} \label{24}\\ n\equiv 0 \pmod 2 \tag{$\hspace{-120pt}\color{magenta}{\large magenta large}$ same -120pt} \label{25} \end{gather*}

Curabitur accumsan sed nisi vitae finibus. Quisque vitae nisl eu eros egestas sollicitudin in vel turpis. Donec dapibus, nibh nec fringilla suscipit, turpis leo tempor nibh, eleifend accumsan nisi mauris quis eros.

\begin{gather*} D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-100pt}$(-100pt)} \label{31} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-200pt}$(-200pt)} \label{32} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-300pt}$(-300pt)} \label{33} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-400pt}$Eq.(-400pt)} \label{34} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-500pt}$Eq.(-500pt)} \label{35} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-600pt}$Eq.(-600pt)} \label{36} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-600pt}$Eq.(-700pt)} \label{37} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-600pt}$Eq.(-800pt)} \label{38} \end{gather*} Nunc malesuada suscipit quam non viverra. Praesent ante justo, semper non efficitur non, ullamcorper eget nulla. Pellentesque quis mi sit amet nulla consequat iaculis. Morbi consectetur augue nec leo aliquet, at venenatis est malesuada. Sed dapibus vehicula velit a rhoncus. Morbi a mi sollicitudin, accumsan odio ut, viverra turpis.

$\tag*{$\large\color{green}{\textit{Section.2}}$} \label{sec02}$

Nullam vulputate fermentum vestibulum. Integer dictum libero et sem consectetur, id consequat odio vestibulum. Nullam vel efficitur mi. Phasellus turpis massa, volutpat id blandit vitae, lacinia vel quam. Proin vitae ex quis mauris blandit molestie fringilla vestibulum augue. Phasellus euismod dictum eros sit amet vulputate. Nam condimentum convallis nisi, id tristique libero porttitor sit amet.

$\tag*{$\hspace{-600pt}\large\color{blue}{\textbf{Section.3}}$} \label{sec03}$

Praesent eleifend nisi sed eros bibendum, ut tincidunt nunc mattis. Pellentesque mi metus, ultrices congue tellus sit amet, semper bibendum ligula. In risus eros, tempor et tempus sit amet, imperdiet at dolor. Nam quis tristique elit. Praesent venenatis varius euismod. Fusce dignissim lorem sed odio dignissim, eu congue ex malesuada.

$\endgroup$
0
$\begingroup$

This post has been idling for a while. Sorry Steve.

Test for trickeries on hyperlinks.

The main objective is to get the tag (visual cue) on the left, at the beginning of a line, be it in mathmode or text (sectioning).

Does this work? Yes, and inline \ref{sec01} tag works \ref{sec02} just as well in a standard mode or \ref{keypoint}. Now the challenge is to $\hspace{600pt}\ref{sec03}$. Hell yeah!

So let's see how these silly ones work. First there's the blank Eq.\eqref{05} and the 2nd Eq.\eqref{12}, both tags consisting of 3 white spaces. Then we have Eq.\eqref{13} and lastly Eq.\eqref{14}. oh how about not in eqref but jus ref like these Eq.\ref{05}, Eq.\ref{12}, Eq.\ref{13}, and Eq.\ref{14}?

jaydfox I've already touched on this, but I did want to describe somewhat briefly how I've accelerated convergence of Andrew's slog, with a more detailed description to follow when I have the time.

\begin{align*} &\text{This is an} & &\text{align environment} & &\text{Seriously} \tag{ } \label{05} \\ \mathbb{E}[X] &\equiv \mathcal{X} & \frac{\mathscr{X}}{\mathbb{Y}} &\approx \frac45 \Theta & j &= 2 \tag*{ } \label{12}\\ A &\equiv B+C & \frac{x}y &\approx \frac12 \Theta & i &= 3 \tag*{no kidding} \label{13}\\ \tag*{tag and label in 1st column} \label{14} \alpha &\equiv \beta+\gamma & \frac{\eta}\xi &\approx \frac23 \Omega & k &= 4 \\ \end{align*}

First of all, let's make the assumption that the solution to the infinite system exists, and furthermore, that the resultant power series has a nonzero radius of convergence. Although heuristically the evidence is fairly strong, we don't know enough to formally prove it. However, like the Riemann hypothesis, we can still make some solid conclusions which we know are true IF the hypothesis is true.

So this is a hyperlink to Eq.\,\eqref{01} which is supposed to be the normal tag, and then Eq.\,\eqref{02} is supposed to clash with Eq.\,\eqref{03}. Of course, the standard use is like Eq.\,\eqref{04}. oh damn it no thin space unless in mathmode so maybe just Eq.\eqref{04} unless one goes through the trouble of $\text{Eq.}\,\eqref{04}$? Yeah there IS a visible diffrence.

Anyway, based on these assumptions, let's try to figure out how the convergence of the smaller systems works. First, let's start with the infinite system.
We'll call the matrix M, and the column vector $[1, 0, 0, ...]$ we'll call B. The coefficients A of the slog() are then the solution of the equation MA = B.

Now this is getting interesting: \Eq.\eqref{21}, or should I call \Eq.\eqref{22}? Getting into the realm of absurdity with \Eq.\eqref{23} and oh btw \Eq.\eqref{24} also with negative that's gonna mess things up, and \Eq.\eqref{25} is no exception. With just \ \ref we have \Eq.\ref{21} ipsum oh I cannot remember \Eq.\ref{22} yes lorem ipsum it is \Eq.\ref{23} can I block call this thing \Eq.\ref{24} by \require \Eq.\ref{25}?

Notice that we don't actually calculate the solution to the full system. We end up with, for example, a $100 \times \infty$ system. $100$ rows, infinity columns. However, in practice, we truncate this down to perhaps $100 \times 2000$. And we don't even have to solve the full system. We can precalculate the $100 \times 1900$ system, starting at column $101$, and subtract from B .

Now, below a certain row, say, row $100$, let's replace the rows with the corresponding entry from an infinite identity matrix. So rows $1..100$ will stay the same, but $101 .. \infty$ are going to be changed.
In order to do this, we replace the zero in the column vector B with the actual coefficient in A we're trying to solve for. This requires knowing the coefficients in A, obviously.

$$s(m-1,n)= 2^{m-3}\sum\limits_{i=0}^{\frac{n}{2}}(-1)^{\frac{n}{2}-i}{m+n+2i-2 \choose 2i}{n\choose \frac{n}{2}-i} \tag{clash tag} \label{02} $$

$$s(m,n)= 2^{m-2}\sum\limits_{i=0}^{\frac{n}{2}}(-1)^{\frac{n}{2}-i}{m+n+2i-1 \choose 2i}{n\choose \frac{n}{2}-i} \tag{normal tag} \label{01} $$

$$ s(m,n-1)=2^{m-2}\sum\limits_{i=0}^{\frac{n-2}{2}}(-1)^{\frac{n-2}{2}-i}{m+n+2i-1 \choose 2i}{n-1\choose \frac{n-2}{2}-i} \tag{clash tag} \label{03} $$

$$ s(m-1,n-1)=2^{m-3}\sum\limits_{i=0}^{\frac{n-2}{2}}(-1)^{\frac{n-2}{2}-i}{m+n+2i-2 \choose 2i}{n-1\choose \frac{n-2}{2}-i} \tag{4} \label{04} $$ Now it should be clear how Andrew's slog is converging on the true solution. We're solving for the infinite system, using the modified format the I described above, but instead of replacing the values in B with the true values, we're replacing them with $0$'s. This introduces errors in the first $100$ (or n) coefficients to compensate.

Extending further, I can solve a $700 \times 700$ system, using a precomputed vector which gives me the solution to a $700 \times 10,000$ system, which itself is the solution to a $10,000 \times 10,000$ system with approximations for terms $701$ to $10,000$. As with the original system, the errors stack up about halfway through, so a $700 \times 700$ system is only really accurate out to about $300-400$ terms. I should be careful about how I say this, because all $700$ terms are at least as accurate as the approximating series I would get if I used the coefficients of the two singularities.


$\Large\color{green}{\text{Oh my god I cannot believe this works!!}}$

Let's quote without the push \Eq.\eqref{31} and with the deliberate \Eq.$\hspace{100pt}\eqref{31}$ positive space paired with the equation labels \Eq.$\hspace{2000pt}\eqref{32}$, Oh my god I cannot believe this works. But is that the inevitable double parenthesis? How about \Eq.$\hspace{300pt}\eqref{33}$, is there still this thing? Now this \Eq.$\hspace{400pt}\eqref{34}$ and again \Eq.$\hspace{500pt}\eqref{35}$ and on and on to \Eq.$\hspace{600pt}\eqref{36}$. Hold on let's see $\hspace{100pt}\ref{31}$, $\hspace{200pt}\ref{32}$, $\hspace{300pt}\ref{33}$. Yeah, these show that $\hspace{400pt}\ref{34}$ tag position push $\hspace{500pt}\ref{35}$ is not affected by equation content, and we have $\hspace{600pt}\ref{36}$. Okay so there's no need to manually tag (label) the parenthesis just one-sided? Now do these $\hspace{700pt}\ref{37}$ go over the boarder $\hspace{800pt}\ref{38}$? Yes they totally do. So it is capped at 600? How about $\hspace{600pt}\ref{37}$ and $\hspace{600pt}\ref{38}$? Yes, exactly 600pt….. wait, there’s a HUGE problem to this system with any negative space: the page jumps to the middle (or below) the equation and cutting the letters in half, unlike the standard setup that jumps to show the entire equation regardless of the height of the expression. The immediate response to solve this is to always setup a phantom line just above $\tag*{wherever}\label{keypoint}$ you want to jump to (ha, not exactly like this), and maybe use some commands the squash the height of the phantom line. This is less than

$\Large\color{green}{\text{I guess for the sake of sectioning}\ldots} \tag*{Sec.1} \label{sec01}$

. . . it’s okay to setup a phantom line (the whole section heading is in mathmode anyway).


The residue is the part that is inaccurate, and by the $300$th term, the coefficients seem to be about ten orders of magnitude smaller than the singularities I've re-moved. And by the $300$th coefficient, I'm already dealing with extremely small coefficients as it is. So this $700 \times 700$ system is probably accurate to a hefty number of decimal places, at least $40$, if not $60$ or more, for complex inputs about a unit distance from the origin or less.

In order to improve convergence, what I've done is taken the coefficients for the two known singularities at $0.31813... + 1.3372357i$ and its conjugate, and put them in the B vector, rather than $0$'s. These coefficients aren't the true values from A, but they're much, much, much closer to the true values. This reduces the errors in the final solution by several orders of magnitude.

\begin{gather*} s(m-1,n-1)=2^{m-3}\sum\limits_{i=0}^{\frac{n-2}{2}}(-1)^{\frac{n-2}{2}-i}{m+n+2i-2 \choose 2i}{n-1\choose \frac{n-2}{2}-i} \tag{21} \label{21} \\ =2^{m-3}\sum\limits_{i=0}^{\frac{n}{2}-1}(-1)^{\frac{n}{2}-1-i}{m+n+2i-2 \choose 2i}{n-1\choose \frac{n}{2}-1-i} \tag{$\color{red}{red tag}$} \label{22} \\ =-2^{m-3}\sum\limits_{i=0}^{\frac{n}{2}-1}(-1)^{\frac{n}{2}-i}{m+n+2i-2 \choose 2i}\frac{(n-1)!}{(\frac{n}{2}-1-i)!(\frac{n}{2}+i)!} \tag{white $\color{white}{tag}$} \label{23} \\ =-2^{m-3}\sum\limits_{i=0}^{\frac{n}{2}-1}(-1)^{\frac{n}{2}-i}{m+n+2i-2 \choose 2i}\frac{n!}{(\frac{n}{2}-i)!(\frac{n}{2}+i)!}\frac{\frac{n}{2}-i}{n} \tag{$\hspace{-120pt}\color{blue}{\Large blue Large}$ tag negative space} \label{24}\\ n\equiv 0 \pmod 2 \tag{$\hspace{-120pt}\color{magenta}{\large magenta large}$ same -120pt} \label{25} \end{gather*}

In other words, assume we're given K as a $100 \times 2000$ matrix, A as a column vector with $2000$ rows, and B as a column vector with $100$ rows. Then, using the known values of K, and the approximations for rows $101..2000$ of A, we solve the new system:

$$ K_{ 1...100} A_{1...100}\ =\ B- K_{101...2000} A_{ 101...2000}$$

Thus, we only solve a $100 \times 100$ system, which actually is solving a $2000 \times 2000$ system, with very, very good approximations of the coefficients $101..2000$. And note that the right hand side can be precalculated in chunks, reducing memory requirements and making it feasible to solve large systems. For example:

\begin{gather*} D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-100pt}$(-100pt)} \label{31} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-200pt}$(-200pt)} \label{32} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-300pt}$(-300pt)} \label{33} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-400pt}$Eq.(-400pt)} \label{34} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-500pt}$Eq.(-500pt)} \label{35} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-600pt}$Eq.(-600pt)} \label{36} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-600pt}$Eq.(-700pt)} \label{37} \\ D_{X_\Sigma} p = X- (\nabla \rho \cdot X) \vec n (p(x)) - \rho(x) \nabla_X \vec n (p(x)). \tag*{$\hspace{-600pt}$Eq.(-800pt)} \label{38} \end{gather*} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus bibendum a quam eu vulputate. Phasellus congue velit mi, non gravida neque lobortis ut. Quisque dictum erat eget neque imperdiet lobortis. Vivamus vel malesuada purus. Nunc vulputate sem sit amet pretium luctus. Duis interdum, magna id interdum eleifend, est nisl malesuada dolor, sed mollis metus metus ac magna. Ut nisl risus, tempor eu dolor vel, suscipit luctus elit. Pellentesque facilisis arcu vitae lacus rutrum viverra. Ut enim sem, imperdiet non volutpat at, ultricies id est. Aenean ex mauris, scelerisque id dolor nec, vehicula tincidunt ligula. Proin non egestas dui, in tincidunt ante. Nunc placerat, nunc ac varius molestie, ipsum ipsum molestie arcu, id rhoncus tellus nunc commodo sapien.

$\tag*{$\large\color{green}{\textit{Section.2}}$} \label{sec02}$

In tincidunt finibus porttitor. Integer lobortis dignissim iaculis. Mauris metus lectus, posuere eu cursus a, tempus sed nunc. Donec ut purus efficitur, pellentesque purus id, auctor erat. Curabitur accumsan sed nisi vitae finibus. Quisque vitae nisl eu eros egestas sollicitudin in vel turpis. Donec dapibus, nibh nec fringilla suscipit, turpis leo tempor nibh, eleifend accumsan nisi mauris quis eros. Nunc malesuada suscipit quam non viverra. Praesent ante justo, semper non efficitur non, ullamcorper eget nulla. Pellentesque quis mi sit amet nulla consequat iaculis. Morbi consectetur augue nec leo aliquet, at venenatis est malesuada. Sed dapibus vehicula velit a rhoncus. Morbi a mi sollicitudin, accumsan odio ut, viverra turpis.

$\tag*{$\hspace{-600pt}\large\color{blue}{\textbf{Section.3}}$} \label{sec03}$

Nullam vulputate fermentum vestibulum. Integer dictum libero et sem consectetur, id consequat odio vestibulum. Nullam vel efficitur mi. Phasellus turpis massa, volutpat id blandit vitae, lacinia vel quam. Proin vitae ex quis mauris blandit molestie fringilla vestibulum augue. Phasellus euismod dictum eros sit amet vulputate. Nam condimentum convallis nisi, id tristique libero porttitor sit amet. Praesent eleifend nisi sed eros bibendum, ut tincidunt nunc mattis. Pellentesque mi metus, ultrices congue tellus sit amet, semper bibendum ligula. In risus eros, tempor et tempus sit amet, imperdiet at dolor. Nam quis tristique elit. Praesent venenatis varius euismod. Fusce dignissim lorem sed odio dignissim, eu congue ex malesuada.

$\endgroup$
0
$\begingroup$

Functions are generally $\mathcal{M}_{8\times 8}[\operatorname{GF}(2^8)]\rightarrow\mathcal{M}_{8\times 8}[\operatorname{GF}(2^8)]$ with input matrices $\in\mathcal{M}_{8\times 8}[\operatorname{GF}(2^8)]$.

$$\begin{align} \mu(a) &= b \Leftrightarrow b_{ij} = a_{8i + j}\text{, }0\leqslant i\text{, }j\leqslant 7\\ \gamma(a) &= b\Leftrightarrow b_{ij} = S[a_{ij}]\text{, }0\leqslant i\text{, }j\leqslant 7\\ \pi(a) &= b\Leftrightarrow b_{ij} = a_{(i-j)\bmod 8,j}\text{, }0\leqslant i\text{, }j\leqslant 7\\ \sigma[k](a) &= b \Leftrightarrow b_{ij} = a_{ij}\oplus k_{ij}\text{, }0\leqslant i\text{, }j\leqslant 7\\ \\ c^{r}_{0j} &\equiv 0\text{, }1\leqslant i\leqslant 7\text{, }0\leqslant j\leqslant 7\\ c^{r}_{0j} &\equiv S[8(r - 1) + j]\text{, }0\leqslant j\leqslant 7\\ \\ \rho[k] &\equiv \sigma[k]\circ\theta\circ\mu\circ\gamma\\ \\ K^0 &= K\\ K^r &= \rho[c^r](K^{r-1})\text{, } r \ge 0\\ \\ W[K] &= \biggl(\underset{1}{\overset{r=R}{\bigcirc}} \rho[K^r]\biggr)\circ \sigma[K^0]\\ \\ \eta_i &= \mu(m_i)\\ H_0 &= \mu(IV)\\ H_i &= W[H_{i-1}](\eta_i)\oplus H_{i-1}\oplus\eta_i\text{, }1\leqslant i\leqslant t\\ \\ \operatorname{Whirlpool}(M) &\equiv \mu^{-1}(H_t) \end{align}$$

| |
$\endgroup$
0
$\begingroup$

$$\begin{align} \{0,1\}^\ast\rightarrow\{0,1\}^n\\ \{0,1\}^n\rightarrow\{0,1\}^\ast \end{align}$$

| |
$\endgroup$
0
$\begingroup$

This is the site's logo:

test <span class=$2$">

| |
$\endgroup$
0
$\begingroup$

I am unable to find some examples on the main site right now, but I think that I have seen some instances where MathJax formulas with slightly higher vertical height are hidden behind the text. Let us try some experiments here:

It seems that $$ a=\frac{A}{K}, b=\frac{B}{K}, c=\frac{C}{K}, d=\frac{dK}{K}, n=\frac{N}{K}. $$ works fine, but using \text inside math mode might lead to problems: $$ a=\frac{A}{K}, b=\frac{B}{K}, c=\frac{C}{K}, d=\frac{dK}{K} \text{ and } n=\frac{N}{K}. $$

However, this contains \text{ and } and it is displayed fine: $$A=\frac{a}{a+b+c}, B=\frac{b}{a+b+c}, \text{ and } C=\frac{c}{a+b+c}$$ In this way we can transform the problem to a problem about a homogeneous polynomial.

Since both sides are multiplicative functions, it suffices to verify the equality for $n=p^a$. In this case the LHS equals $$\frac{n}{n\left(1-\frac1p\right)}=\frac1{1-\frac1p}=\frac{p}{p-1}.$$ The RHS is equal to $$1+\frac1{p-1}=\frac{p}{p-1}.$$

It is also known that $A, B, C, K$ and $N$ have a common factor $K$, and so dividing by $K$ gives the equivalent scalar equation $$ ax + by + cxy + d = n, $$ where $a, b, c, d$ and $n$ are respectively equal to$$ a=\frac{A}{K},\; b=\frac{B}{K},\; c=\frac{C}{K},\; d=\frac{dK}{K}\;\text{ and }\; n=\frac{N}{K}. $$ Therefore given these two equations supplied with constants $A, B, C, a, b, c, D$ and constants $K, N$ and $n$, is it possible to solve for $x, y$ and, $z = xy$. (This was copied from here.)

We put $$\overline D=\limsup_{n\to\infty}\frac{w_n}{\sum\limits_{k=1}^n w_k},$$ where $w_k\ge0$ are the given weights.

We put $$\overline D=\limsup_{n\to\infty}\frac{w_n}{\sum\limits_{k=1}^n w_k}\text{ and }\underline D=\liminf_{n\to\infty}\frac{w_n}{\sum\limits_{k=1}^n w_k}$$ where $w_k\ge0$ are the given weights.

$\endgroup$
0
$\begingroup$

triangle face of tetrahedron

As Li Li commented on your closely related Question, the Law of Cosines gives us a system of three quadratic equations for unknowns $x_1,x_2,x_3$:

$$ \begin{align*} x_1^2 + x_2^2 - d_3^2 &= 2x_1 x_2 \cos \theta_3 \\ x_1^2 + x_3^2 - d_2^2 &= 2x_1 x_3 \cos \theta_2 \\ x_2^2 + x_3^2 - d_1^2 &= 2x_2 x_3 \cos \theta_1 \end{align*} $$

$\endgroup$
0
$\begingroup$
There are a few decent options in the \$10-\$20 range.

produces

There are a few decent options in the \$10-\$20 range.

| |
$\endgroup$
0
$\begingroup$

SD-test-sandbox-012345678abcdefgh-temporary
This is a SmokeDetector testing post. It may be deleted at any time. I can't post on Meta.SE sandbox for insufficient reputation.

$\endgroup$
0
$\begingroup$

Let $q(k)$ be the probability that the process initiated by a single coin will stop on or before $k$ minutes. We write $q(k+1)$ in terms of $q(k)$: \begin{align} q(1) &= 1/2\\ q(2) &= (1/2) + (1/2)q(1)^2 = 5/8\\ q(3) &= (1/2) + (1/2)q(2)^2 = 89/128\\ q(4) &= (1/2) + (1/2)q(3)^2 = 24305/32768\\ q(5) &= (1/2) + (1/2)q(4)^2 = 16644\hspace{0pt}74849/2147483648 \end{align}

and the probability we stop at 5 minutes exactly is: $$q(5)-q(4) = \frac{71622369}{2^{31}} \approx 0.0333517645...$$

Another test:

$$q(5) = (1/2) + (1/2)q(4)^2 = 0612345678/2147483648$$

| |
$\endgroup$
0
$\begingroup$

Let try this toy example: Let $\Sigma = \mathbb D$ be the unit disk and defined on $\mathbb D$ the metric:

$$ g =h(r)^{-1} \mathrm dr^2 + h(r)\mathrm d\theta^2$$

where $h(r) \to + \infty$ as $r\to 1$ and $$\int_0^1 \frac{1}{h(r)} \mathrm dr <\infty.$$

Then the area $\mathbb D$ is given by

$$A(\mathbb D) = \int_0^1 \int_0^{2\pi} \mathrm d\theta \mathrm dr = 2\pi<\infty.$$

for all $(r, \theta) \in \mathbb D$, the distance to $\partial \mathbb D$ is given by $$d(r) = \int_r^1 \frac{1}{h(r)} \mathrm d r.$$

Then for all $\epsilon>0$, let $r(\epsilon)$ satisfies $$\epsilon = \int_{r(\epsilon)}^1 \frac{1}{h(s)} \mathrm ds.$$

Note that for each $\epsilon$, the curve $\gamma_\epsilon (\theta)= r(\epsilon) (\cos\theta, \sin\theta)$ is such a minimal curve. Then

$$m_\epsilon = 2\pi h(r(\epsilon)).$$ Since as $\epsilon \to 0$, $r(\epsilon) \to 1$, we ask if

$$h(r) \int_r^1 \frac{1}{h(s)} \mathrm ds$$ is bounded as $r\to 1$. Then we see that your bound is false in general. Indeed, let $$ h(r) = \exp ((1-r)^{-1})$$ and write $t = 1-r$, then

\begin{align} \lim_{r\to 1} h(r) \left( \int_r^1 \frac{1}{h(s)} \mathrm ds\right)^n &= \lim_{t\to 0 }e^{1/t} \left( \int_0^t e^{-1/s} ds\right)^n\\ &= \lim_{t\to 0 }\frac{\left( \int_0^t e^{-1/s} ds\right)^n}{e^{-1/t} }. \end{align}

$\endgroup$
0
$\begingroup$

Enumerate the # of solutions to $\left[\sum_{k = 1}^r (a_k)x_k\right] = n$

Given:
(a) $\forall ~q ~\in ~\mathbb{R}, ~\lfloor q\rfloor ~\equiv~$ the floor of $q$.

(b) $\forall ~s,t ~\in ~\mathbb{Z^+},~$ let the residue of $t \pmod{s} \equiv~$ the unique element $i$ in $\{0, 1, \cdots, [s-1]\}~$ such that $~t \equiv i\pmod{s}.$

(c) $a_1, a_2, \cdots, a_r, n ~\in ~\mathbb{Z^+}.$

(d) $n > \max \{a_1, a_2, \cdots, a_r\}.$

(e) $[E_r(a_1, a_2, \cdots, a_r, n)]$ represents the equation $\left[\sum_{k = 1}^r (a_k)x_k\right] = n$
constrained by $x_1, x_2, \cdots, x_r$ are all required to be non-negative integers.

(f) $F_r(a_1, a_2, \cdots, a_r, n)$ represents the number of solutions to $[E_r(a_1, a_2, \cdots, a_r, n)]$.

Problem:
Find an elegant way to compute $F_r(a_1, a_2, \cdots, a_r, n)]$.

Background:

The following link discusses Stars and Bars problems:

https://brilliant.org/wiki/integer-equations-star-and-bars/#:%7E:text=We%20discuss%20a%20combinatorial%20counting,groups%20is%20represented%20by%20bars

Computing $F_r(a_1, a_2, \cdots, a_r, n)$ was inspired by the following problem taken from that webpage:

Enumerate the # of non-negative integer solutions to $~3x + y + z = 24.$
That is, compute $F_3(3,1,1,24).$

My Work:

$\underline{\text{Step 1}}$

The Stars and Bars webpage shows two groups of problems: those where a solution is provided, and those where a solution is not provided. In my opinion, each of the provided solutions is elegant. No solution was given re the computation of $F_3(3,1,1,24).$ Therefore, it is unclear how much elegance was intended here.

Consequently, I spent several minutes pondering an elegant approach to either $F_r(a_1, a_2, \cdots, a_r, n)$ or $F_3(3,1,1,24)$. No ideas presented themselves. In desperation, I decided to attack $F_3(3,1,1,24)$ inelegantly, examining the answer. Then, I planned to slowly generalize $F_3(3,1,1,24)$ towards $F_r(a_1, a_2, \cdots, a_r, n)$, in the hope that an elegant pattern would present itself. Once such a pattern (i.e. a hypothesis) presented itself, I hoped to reverse-engineer a proof of the hypothesis.

This overall approach failed. The remainder of the "My Work" section details my efforts.

$\underline{\text{Step 2}}$

From the Stars and Bars webpage, it is immediate that

$\displaystyle F_2(1,1,n) ~=~ \binom{n + [2-1]}{[2-1]} ~=~ \binom{n+1}{1} ~=~ (n+1).$

To compute $F_3(3,1,1,24)$, I first let
$c \equiv \lfloor \frac{24}{3}\rfloor ~=~ 8.$

Having solved the computation of $F_2(1,1,n)$ I computed $F_3(3,1,1,24)$ by letting $x_1$ range from $0$ through $c$. For each value of $x_1$ an $[E_2(1,1,n)]$ type of equation was generated. Specifically:

$(1)x_2 + (1)x_3 = [24 - (3x_1)].$

$\displaystyle \therefore ~ F_3(3,1,1,24) = \sum_{x_1 = 0}^c ~F_2(1,1,[24 - 3x_1]$

$\displaystyle =~ \sum_{x_1 = 0}^c [25 - 3x_1]$

$\displaystyle =~ (25 \times [c+1]) - 3 \times \frac{c \times (c+1)}{2}$

$=~ (25 \times 9) - 3 \times \frac{8 \times (9)}{2} ~=~ 225 - 108 = 117$.

At this point, I took a small step towards relating computations like $F_3(3,1,1,n)$ with computations like $F_3(1,1,1,n).$

Consider (for example):
$[E_3(1,1,1,26)] : x_1 + x_2 + x_3 = 26.$
From the standard Stars and Bars analysis,
$F_3(1,1,1,26) = \binom{26 + [3-1]}{[3-1]} = \binom{28}{2}.$

Further, all of the solutions to $[E_3(1,1,1,26)]$ can be $partitioned$ by the residue of $x_1 \pmod{3}.$ Moreover, for each partition of solutions, a bijection can be created between the partition of solutions and the solutions to some equation of form $[E_3(3,1,1,m)].$ Explicitly:

The number of solutions to $[E_3(1,1,1,26)]$,
where $x_1$ is required to be $~\equiv~ 0 \pmod{3}$
$= F_3(3,1,1,26).$

Similarly, the number of solutions to $[E_3(1,1,1,26)]$,
where $x_1$ is required to be $~\equiv~ 1 \pmod{3}$
$= F_3(3,1,1,25).$

The above is implied by the change of variables: $y_1 = (x_1 - 1), y_2 = x_2, y_3 = x_3.$
Therefore, each solution to $x_1 + x_2 + x_3 = 26$ corresponds to a solution to $y_1 + y_2 + y_3 = 25.$

Also, since $y_1$ has been forced to be a multiple of 3, it can be expressed as $3\times z_1$. Therefore, each solution to $y_1 + y_2 + y_3 = 25$ corresponds to a solution to $3z_1 + y_2 + y_3 = 25.$

Similarly, the number of solutions to $[E_3(1,1,1,26)]$,
where $x_1$ is required to be $~\equiv~ 2 \pmod{3}$
$= F_3(3,1,1,24).$

Therefore, since $F_3(1,1,1,26) =$ the number of solutions in each of the 3 partitions,
$F_3(1,1,1,26) = F_3(3,1,1,26) + F_3(3,1,1,25) + F_3(3,1,1,24).$

$\underline{\text{Step 3}}$

$E_4,$ my inelegant attack on $E_3$ will be to allow $x$ to range from 0 through $c$. Each value of $x$ will produce an $E_4$ type sub-problem. Therefore, the final enumeration for $E_3$ will be represented by the summation of the $(c+1) E_4$ type enumerations.

Rather than detailing the inelegant attack upon $E_2$, I think that it will be more productive to detail an inelegant attack upon:

$[E_3]~:~$ Enumerate the # of non-negative integer solutions to $~ax + y + z = n,$
where $a, n ~\in \mathbb{Z^+}$ and $a < n.$

Denote this enumeration as $

First, consider:
$[E_4]~:~$ Enumerate the # of non-negative integer solutions to $y + z = m : m ~\in \mathbb{Z^+}.$

From Stars and Bars analysis, it is immediate that
the answer to $E_4$ is $\binom{m + [2-1]}{[2-1]} = \binom{m+1}{1} = (m+1).$

For any real # $p$, let $\lfloor p\rfloor$ denote the floor of $p.$
Let $c \equiv \lfloor \frac{n}{a} \rfloor.$

Having solved $E_4,$ my inelegant attack on $E_3$ will be to allow $x$ to range from 0 through $c$. Each value of $x$ will produce an $E_4$ type sub-problem. Therefore, the final enumeration for $E_3$ will be represented by the summation of the $(c+1) E_4$ type enumerations.

Editing in progress---


$\endgroup$
1
2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .