text:
Star a question

Sometimes, I work really hard on a certain problem, but I don't manage to solve it. I want to request the ability to star it (or something similar) so the solution will be mailed to me when it's available. I know that I could check manually, but I often forget to do this. Also, having all solutions being mailed to me every week is not really an alternative, as I don't try to solve the problems every week. I hope this makes sense.

Edit: Also, it would be a great way to keep a list of problems you love! :)

Note by Tim Vermeulen
5 years ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

We have been kicking around the idea of the possibility of in the future having a "favorite problems" section of your profile where you could store favorite problems. Possibly also store drafts for solutions or discussions comments where you could practice your Latex. If we built something like that we could probably design some feature that alerts you when there is a solution to a favorite problem of yours, maybe have an alert on your profile page.

We wouldn't want to overcrowd your email inbox, but if people wanted an email alert we could set that up.

Staff - 5 years ago


text:
How to automatically generate a stack diagram for a PostScript expression?

The following figure shows a PostScript expression and its stack diagrams step by step. Is there any package to generate it out of the box? If there is no such a package, how to generate it automatically for any PostScript expression? I don't want to write my own interpreter for sure.

Any methods are welcome.

-
Do you need it just for debugging? Or do you want to write a PS manual? For the first task I use pstack PS command. –  AlexG Feb 13 at 13:12
@AlexG: I want to write a tutorial about PostScript so it must be typeset by (La)TeX. –  The Last Error Feb 13 at 13:13
I've got a postscript procedure to print the stack on one line. This might be useful in generating the values for arbitrary code. –  luser droog Feb 14 at 1:42
Yes, it was useful. –  luser droog Feb 14 at 19:58

Using bash or a similar command line, executing

s="";for i in 4  2  1 add 1 sub add ; do  s="$s$i"; echo " $s pstack" | gs -q -sDEVICE=pbm | sed -e "s/GS>/\\\\foo{$i}{/" -e "s/GS<[0-9]*>/}/" ; done

produces

\foo{4}{4
}\foo{2}{2
4
}\foo{1}{1
2
4
4
}\foo{1}{1
3
4
}\foo{sub}{2
4
}

and then if you wrap that in some latex:

\documentclass{article}

\def\foo#1#2{%
\parbox[t]{3em}{\centering
\textbf{#1}%
\xfoo#2\$}} \def\xfoo#1 {\ifx\$#1\else\\#1 \expandafter\xfoo\fi}

\begin{document}

% s="";for i in 4  2  1 add 1 sub add ; do  s="$s$i"; echo " $s pstack" | gs -q -sDEVICE=pbm | sed -e "s/GS>/\\\\foo{$i}{/" -e "s/GS<[0-9]*>/}/" ; done

\foo{4}{4
}\foo{2}{2
4
}\foo{1}{1
2
4
4
}\foo{1}{1
3
4
}\foo{sub}{2
4
}

\end{document}

You get

-

Just for fun (or typing exercise or whatever) with TikZ.

It's not complete, but should be trivial to implement the remaining postscript stack commands.

\documentclass[border=0.125cm]{standalone}
\usepackage{tikz}

\makeatletter
\newcount\stacktop
\def\stackclear{\global\stacktop=0\relax}

\def\stackpush#1{%
\expandafter\xdef\csname stack@item@\the\stacktop\endcsname{#1}%
}
\def\stackpeek#1#2{%
\pgfmathparse{int(#1)}%
\edef#2{\csname stack@item@\pgfmathresult\endcsname}%
}
\def\stackpop#1{%
\ifnum\stacktop>0\relax
\edef#1{\csname stack@item@\the\stacktop\endcsname}%
\fi%
}

\def\stackswap#1#2{%
\pgfmathparse{int(#1)}\let\a=\pgfmathresult
\pgfmathparse{int(#2)}\let\b=\pgfmathresult
\edef\tmp{\csname stack@item@\a\endcsname}%
\expandafter\xdef\csname stack@item@\a\endcsname{\csname stack@item@\b\endcsname}%
\expandafter\xdef\csname stack@item@\b\endcsname{\tmp}%
}

\def\stackroll{%
\stackpop\R%
\stackpop\r%
\pgfmathparse{int(\R < 0 ? -\R : \R)}\let\RR=\pgfmathresult
\pgfmathloop%
\ifnum\pgfmathcounter>\RR\relax
\else%
\ifnum\R<0\relax%
\stackrollneg%
\else%
\stackrollpos%
\fi%
\repeatpgfmathloop%
}

\def\stackrollpos{%
\begingroup%
\pgfmathloop%
\ifnum\pgfmathcounter=\r
\else%
\stackswap{\stacktop-\pgfmathcounter+1}{\stacktop-\pgfmathcounter}%
\repeatpgfmathloop%
\endgroup%
}

\def\stackrollneg{%
\begingroup%
\pgfmathloop%
\ifnum\pgfmathcounter=\r
\else%
\stackswap{\stacktop-\r+\pgfmathcounter+1}{\stacktop-\r+\pgfmathcounter}%
\repeatpgfmathloop%
\endgroup%
}

\def\at{@}

\def\stackmathparse#1{%
\pgfmathparse{(#1) == int(#1) ? int(#1) : (#1)}%
}
\tikzset{%
postscript parse/.code={%
\stackclear%
\tikzset{ps/parse={#1 @}}%
},
ps/.cd,
parse/.code args={#1 #2}{%
\def\rest{#2}%
\def\current{#1}%
\tikzset{ps/commands/#1={#2}}%
\tikzset{xshift=1cm}
\node at (0,.75) {#1};
\foreach \i [evaluate={\j=int(\stacktop-\i);}] in {0,...,5}
\node [draw, minimum width=.75cm, minimum height=0.5cm] at (0,-\i/2) {\stackpeek{\j}{\x}\x};
\ifx\rest\at%
\else
\tikzset{ps/parse={#2}}%
\fi%
},
commands/.cd,
.unknown/.code={\stackpush{\current}},
exch/.code={\stackswap{\stacktop}{\stacktop-1}},
roll/.code={\stackroll},
dup/.code={\stackpeek{\stacktop}{\x}\stackpush{\x}},
mul/.code={\stackpop{\x}\stackpop{\y}\stackmathparse{\y*\x}\stackpush{\pgfmathresult}},
sub/.code={\stackpop{\x}\stackpop{\y}\stackmathparse{\y-\x}\stackpush{\pgfmathresult}},
div/.code={\stackpop{\x}\stackpop{\y}\stackmathparse{\y/\x}\stackpush{\pgfmathresult}}
}

\begin{document}
\begin{tabular}{l}
\begin{tikzpicture}
\end{tikzpicture}
\\[0.25in]
\begin{tikzpicture}
\tikzset{postscript parse={4 3 2 1 3 1 roll 3 -1 roll}}
\end{tikzpicture}
\\[0.25in]
\begin{tikzpicture}
\tikzset{postscript parse={3 2 dup mul 5 add exch div}}
\end{tikzpicture}
\end{tabular}
\end{document}

-

For rendering such a stack, I provide the below solution. But as Jake points out, it does not digest a raw postscript expression. However, see the end of this answer to see how I can digest David's bash output.

Here, I use a bunch of nested stacks. The \psdepth (depth of stack tube), \pswidth (width of stack tube), and \psrule (stack rule thickness) may all be tuned.

REEDITED to make the input syntax easier. There is no limit to the stack depth, as there was in an earlier EDIT.

\documentclass{article}
\usepackage[usestackEOL]{stackengine}
\usepackage{ifthen}
\def\psdepth{2cm}
\def\pswidth{.5cm}
\def\psrule{.15ex}
\def\psbar{\rule[-\psdepth]{\psrule}{\psdepth}}
\def\pspipe{\psbar\kern\pswidth\psbar}
\def\pscell#1{\stackunder{\footnotesize#1}{\rule{\pswidth}{\psrule}}}
\newcounter{index}
\makeatletter
\newcommand\psstack[2]{%
\getargsC{#2}%
\setcounter{index}{0}%
\def\psstackdata{}%
\whiledo{\theindex<\narg}{%
\stepcounter{index}%
\protected@edef\thisarg{\csname arg\romannumeral\theindex\endcsname}%
\protected@edef\psstackdata{%
\psstackdata\protect\pscell{\thisarg}}%
\ifthenelse{\theindex<\narg}{\protected@edef\psstackdata{%
\psstackdata \\}}{}%
}%
\sffamily\def\stacktype{L}%
\stackunder{%
\def\stacktype{S}\stackunder{#1}{\pspipe}%
}{%
\def\stacktype{S}\setstackgap{S}{3pt}\expandafter%
\Shortunderstack\expandafter{\psstackdata}%
}%
\hspace{1ex}%
}
\makeatother
\begin{document}
\psstack{4}{4}
\psstack{2}{2 4}
\psstack{1}{1 2 4}
\psstack{exch}{2 1 4}
\psstack{1}{1 3 4}
\psstack{sub}{2 4}
\end{document}

Defining \foo as

\newcommand\foo[2]{%
\getargsC{#2}%
\setcounter{index}{0}%
\def\psstackdata{}%
\whiledo{\theindex<\numexpr\narg-1}{%
\stepcounter{index}%
\protected@edef\thisarg{\csname arg\romannumeral\theindex\endcsname}%
\protected@edef\psstackdata{%
\psstackdata\protect\pscell{\thisarg}}%
\ifthenelse{\theindex<\narg}{\protected@edef\psstackdata{%
\psstackdata \\}}{}%
}%
\sffamily\def\stacktype{L}%
\stackunder{%
\def\stacktype{S}\stackunder{#1}{\pspipe}%
}{%
\def\stacktype{S}\setstackgap{S}{3pt}\expandafter%
\Shortunderstack\expandafter{\psstackdata}%
}%
\hspace{1.85ex}%
}

in my syntax allows one to digest David's bash output and present it with my rendering.

-
I think the OP wants to generate the diagram automatically from a PS expression. –  Jake Feb 13 at 13:22
@Jake I see what you mean. But I don't know enough about "postscript" expressions" to do the conversion. But perhaps a front end to this code could be adapted to feed it the data. –  Steven B. Segletes Feb 13 at 13:30

The automatic generation is easy to realize with LuaTeX, which I leave to the reader ...

\documentclass{article}
\usepackage{array,multido}
\newcount\stackNo  \def\maxStackNo{6}
\makeatletter
\newtoks\ps@stack

\newcommand*\psstack[2]{%
\sffamily\stackNo=0
\ps@stack={\,\tabular[t]{ |c| }
\multicolumn{1}{c}{\makebox[0pt]{\Large#1}}}
\expandafter\psstack@i#2,,\@nil}
\ifx\relax#2\relax\def\next{\psstack@ii}%
\else\def\next{\psstack@i#2,#3\@nil}%
\fi\next}
\def\psstack@ii{%
\loop
\expandafter\ifnum\the\stackNo<\maxStackNo
\repeat
\the\ps@stack \ps@stack={}%
}
\makeatother
\begin{document}
\psstack{4}   {4}
\psstack{2}   {2,4}
\psstack{1}   {1,2,4}
\psstack{exch}{2,1,4}
\psstack{1}   {1,3,4}
\psstack{sub} {2,4}
\end{document}

-
Really nice solution, Herbert! –  Svend Tveskæg Feb 13 at 16:06
@SvendTveskæg see Jake's comment on the first answer, I believe the question wants the stack to be determined not supplied –  David Carlisle Feb 13 at 16:09
@DavidCarlisle I missed that. Then I guess it isn't that nice after all. :) –  Svend Tveskæg Feb 13 at 16:13
Is it possible to use PSTricks to automatically construct the diagram? (because in my opinion, PSTricks has a direct access to PostScript then it should be possible) –  The Last Error Feb 14 at 1:00

As for generating the content for the stack pictures, I've been inspired by this thread to clean up some old code and now we can generate nice traces for arbitrary code.

The code is posted to comp.lang.postscript, as it's more directly pertinent there, as this is also a step-wise debugger. The code is mostly level-1 postscript with the exception of << and >> and could potentially be down-ported to run on level-1 interpreters, but it is quite wasteful of memory and might not be practical to use in memory-constrained environments without a garbage collector.

For these code fragments:

1 2 3 add add
6 eq { 8 9 add = } { 9 10 add = } ifelse

And:

 1 2 3 add add
6 eq { 7 } if

9 {
5
count 4 gt {
exit
} if
} repeat

{ 55 exit } loop

(continuation) =

0 1 10 {
dup 5 eq {exit} if
} for

I get the following stack trace output:

GPL Ghostscript 9.06 (2012-08-08)
This software comes with NO WARRANTY: see the file PUBLIC for details.
%|-
1  %|- 1
2  %|- 1 2
3  %|- 1 2 3
6  %|- 6 6
eq  %|- true
ifelse  %|-
8  %|- 8
9  %|- 8 9
= 17

%|-
1  %|- 1
2  %|- 1 2
3  %|- 1 2 3
6  %|- 6 6
eq  %|- true
{7}  %|- true {7}
if  %|-
7  %|- 7
9  %|- 7 9
{5 count 4 gt {exit} if}  %|- 7 9 {5 count 4 gt {exit} if}
repeat  %|- 7
5  %|- 7 5
count  %|- 7 5 2
4  %|- 7 5 2 4
gt  %|- 7 5 false
{exit}  %|- 7 5 false {exit}
if  %|- 7 5
8  %|- 7 5 8
{5 count 4 gt {exit} if}  %|- 7 5 8 {5 count 4 gt {exit} if}
repeat  %|- 7 5
5  %|- 7 5 5
count  %|- 7 5 5 3
4  %|- 7 5 5 3 4
gt  %|- 7 5 5 false
{exit}  %|- 7 5 5 false {exit}
if  %|- 7 5 5
7  %|- 7 5 5 7
{5 count 4 gt {exit} if}  %|- 7 5 5 7 {5 count 4 gt {exit} if}
repeat  %|- 7 5 5
5  %|- 7 5 5 5
count  %|- 7 5 5 5 4
4  %|- 7 5 5 5 4 4
gt  %|- 7 5 5 5 false
{exit}  %|- 7 5 5 5 false {exit}
if  %|- 7 5 5 5
6  %|- 7 5 5 5 6
{5 count 4 gt {exit} if}  %|- 7 5 5 5 6 {5 count 4 gt {exit} if}
repeat  %|- 7 5 5 5
5  %|- 7 5 5 5 5
count  %|- 7 5 5 5 5 5
4  %|- 7 5 5 5 5 5 4
gt  %|- 7 5 5 5 5 true
{exit}  %|- 7 5 5 5 5 true {exit}
if  %|- 7 5 5 5 5
exit  %|- 7 5 5 5 5
{55 exit}  %|- 7 5 5 5 5 {55 exit}
loop  %|- 7 5 5 5 5
55  %|- 7 5 5 5 5 55
exit  %|- 7 5 5 5 5 55
(continuation)  %|- 7 5 5 5 5 55 (continuation)
= continuation
%|- 7 5 5 5 5 55
0  %|- 7 5 5 5 5 55 0
1  %|- 7 5 5 5 5 55 0 1
10  %|- 7 5 5 5 5 55 0 1 10
{dup 5 eq {exit} if}  %|- 7 5 5 5 5 55 0 1 10 {dup 5 eq {exit} if}
for  %|- 7 5 5 5 5 55 0
dup  %|- 7 5 5 5 5 55 0 0
5  %|- 7 5 5 5 5 55 0 0 5
eq  %|- 7 5 5 5 5 55 0 false
{exit}  %|- 7 5 5 5 5 55 0 false {exit}
if  %|- 7 5 5 5 5 55 0
1  %|- 7 5 5 5 5 55 0 1
1  %|- 7 5 5 5 5 55 0 1 1
10  %|- 7 5 5 5 5 55 0 1 1 10
{dup 5 eq {exit} if}  %|- 7 5 5 5 5 55 0 1 1 10 {dup 5 eq {exit} if}
for  %|- 7 5 5 5 5 55 0 1
dup  %|- 7 5 5 5 5 55 0 1 1
5  %|- 7 5 5 5 5 55 0 1 1 5
eq  %|- 7 5 5 5 5 55 0 1 false
{exit}  %|- 7 5 5 5 5 55 0 1 false {exit}
if  %|- 7 5 5 5 5 55 0 1
2  %|- 7 5 5 5 5 55 0 1 2
1  %|- 7 5 5 5 5 55 0 1 2 1
10  %|- 7 5 5 5 5 55 0 1 2 1 10
{dup 5 eq {exit} if}  %|- 7 5 5 5 5 55 0 1 2 1 10 {dup 5 eq {exit} if}
for  %|- 7 5 5 5 5 55 0 1 2
dup  %|- 7 5 5 5 5 55 0 1 2 2
5  %|- 7 5 5 5 5 55 0 1 2 2 5
eq  %|- 7 5 5 5 5 55 0 1 2 false
{exit}  %|- 7 5 5 5 5 55 0 1 2 false {exit}
if  %|- 7 5 5 5 5 55 0 1 2
3  %|- 7 5 5 5 5 55 0 1 2 3
1  %|- 7 5 5 5 5 55 0 1 2 3 1
10  %|- 7 5 5 5 5 55 0 1 2 3 1 10
{dup 5 eq {exit} if}  %|- 7 5 5 5 5 55 0 1 2 3 1 10 {dup 5 eq {exit} if}
for  %|- 7 5 5 5 5 55 0 1 2 3
dup  %|- 7 5 5 5 5 55 0 1 2 3 3
5  %|- 7 5 5 5 5 55 0 1 2 3 3 5
eq  %|- 7 5 5 5 5 55 0 1 2 3 false
{exit}  %|- 7 5 5 5 5 55 0 1 2 3 false {exit}
if  %|- 7 5 5 5 5 55 0 1 2 3
4  %|- 7 5 5 5 5 55 0 1 2 3 4
1  %|- 7 5 5 5 5 55 0 1 2 3 4 1
10  %|- 7 5 5 5 5 55 0 1 2 3 4 1 10
{dup 5 eq {exit} if}  %|- 7 5 5 5 5 55 0 1 2 3 4 1 10 {dup 5 eq {exit} if}
for  %|- 7 5 5 5 5 55 0 1 2 3 4
dup  %|- 7 5 5 5 5 55 0 1 2 3 4 4
5  %|- 7 5 5 5 5 55 0 1 2 3 4 4 5
eq  %|- 7 5 5 5 5 55 0 1 2 3 4 false
{exit}  %|- 7 5 5 5 5 55 0 1 2 3 4 false {exit}
if  %|- 7 5 5 5 5 55 0 1 2 3 4
5  %|- 7 5 5 5 5 55 0 1 2 3 4 5
1  %|- 7 5 5 5 5 55 0 1 2 3 4 5 1
10  %|- 7 5 5 5 5 55 0 1 2 3 4 5 1 10
{dup 5 eq {exit} if}  %|- 7 5 5 5 5 55 0 1 2 3 4 5 1 10 {dup 5 eq {exit} if}
for  %|- 7 5 5 5 5 55 0 1 2 3 4 5
dup  %|- 7 5 5 5 5 55 0 1 2 3 4 5 5
5  %|- 7 5 5 5 5 55 0 1 2 3 4 5 5 5
eq  %|- 7 5 5 5 5 55 0 1 2 3 4 5 true
{exit}  %|- 7 5 5 5 5 55 0 1 2 3 4 5 true {exit}
if  %|- 7 5 5 5 5 55 0 1 2 3 4 5
exit GS<12>

-

format: plain


text:
Deep learning side-channel analysis on large-scale traces - Archive ouverte HAL Access content directly
Conference Papers Year : 2020

Deep learning side-channel analysis on large-scale traces

(1, 2) , (3) , (1) , (1) , (3) , (1) , (1)
1
2
3
Loïc Masure
• Function : Correspondent author
• PersonId : 1120736

Connectez-vous pour contacter l'auteur
Eleonora Cagli
• Function : Author
Marie-Angela Cornélie
• Function : Author
Cécile Dumas
• Function : Author
Laurent Maingault
• Function : Author

Abstract

$Code\ polymorphism$ is a way to efficiently address the challenge of automatically applying the hiding of sensitive information leakage, as a way to protect cryptographic primitives against side-channel attacks (SCA) involving layman adversaries. Yet, recent improvements in SCA, involving more powerful threat models, e.g., using deep learning, emphasized the weaknesses of some hiding countermeasures. This raises two questions. On the one hand, the security of code polymorphism against more powerful attackers, which has never been addressed so far, might be affected. On the other hand, using deep learning SCA on code polymorphism would require to scale the state-ofthe-art models to much larger traces than considered so far in the literature. Such a case typically occurs with code polymorphism due to the unknown precise location of the leakage from one execution to another. We tackle those questions through the evaluation of two polymorphic implementations of AES, similar to the ones used in a recent paper published in TACO 2019 [6]. We show on our analysis how to efficiently adapt deep learning models used in SCA to scale on traces 32 folds larger than what has been done so far in the literature. Our results show that the targeted polymorphic implementations are broken within 20 queries with the most powerful threat models involving deep learning, whereas 100,000 queries would not be sufficient to succeed the attacks previously investigated against code polymorphism. As a consequence, this paper pushes towards the search of new polymorphic implementations secured against state-of-the-art attacks, which currently remains to be found.

Dates and versions

cea-03483683 , version 1 (16-12-2021)

Identifiers

• HAL Id : cea-03483683 , version 1
• DOI :

Cite

Loïc Masure, Nicolas Belleville, Eleonora Cagli, Marie-Angela Cornélie, Damien Couroussé, et al.. Deep learning side-channel analysis on large-scale traces: A Case Study on a Polymorphic AES. ESORICS 2020: Computer Security, Sep 2020, Guildford, United Kingdom. pp.440-460, ⟨10.1007/978-3-030-58951-6_22⟩. ⟨cea-03483683⟩

68 View


text:
1. ## Factorial limit

How do we show that

$\lim_{x \rightarrow \infty} \, \frac {e^x (x-1)!}{x!} = + \infty \, .$

I know that the factorial functionen approaches infinity faster than most other elementary functions e.g. $e^x$. But I am not sure how to think when we have a factorial function in both the nominator and denominator.

2. ## Re: Factorial limit

$\frac{(x - 1)!}{x!}\ =\ \text{... ?}$

3. ## Re: Factorial limit

I would start by cancelling. Since $x! = x(x-1)(x-2)\dots 1$ and $(x-1)! = (x-1)(x-2)\dots 1$, $\frac{x!}{(x-1)!}=x$ and so $\lim_{x \rightarrow \infty} \, \frac {e^x (x-1)!}{x!} = \lim_{x \rightarrow \infty} \, \frac {e^x}{x}$. And now I'll bet it looks like problems you've done before.

- Hollywood

P.S. I have to start writing faster - tom@ballooncalculus beat me to the answer.

4. ## Re: Factorial limit

Originally Posted by tom@ballooncalculus
$\frac{(x - 1)!}{x!}\ =\ \text{... ?}$
Haha, of course! I have no idea why I completely forgot the definition of factorial. Too much calculus...


text:
Author Information - Maple Programming Help

Author Information

 The following statements should be used when referencing Maple.

 If you are publishing a book that includes references to Maple products or publications, the following line should appear in the copyright section at the beginning of the book.
 "Maple is a trademark of Waterloo Maple Inc."
 If you are publishing a research paper, any Maple work should be acknowledged, and the above trademark statement should be included.
 In acknowledging any Maple work, a statement similar to the following should be used. (Changes with respect to the exact use of Maple are expected.)
 "The computations in this paper were performed by using Maple™."

Referencing the Maple Manuals

 Use the following information to reference the use of the Maple manuals.
 • Maple User Manual. Toronto: Maplesoft, a division of Waterloo Maple Inc., 2005-2015.
 • Maple Programming Guide. Toronto: Maplesoft, a division of Waterloo Maple Inc., 2011-2015.

Referencing the Maple Product

 Use the following statement to reference the use of the Maple product.
 "Maple (specify release). Maplesoft, a division of Waterloo Maple Inc., Waterloo, Ontario."


text:
# Levi-Civita tensor for ccgrg Mathematica package

I'm just learning to use the ccgrg package for computing Riemann curvatures etc in Mathematica. The package has most of the useful geometric tensors as built-in functions, but I can't find a function for obtaining the Hodge dual of a tensor, or equivalently the Levi-Civita tensor. Is there one?

Mathematica itself has a function LeviCivitaTensor[d] built in, but it uses the indices in a different manner than ccgrg (and seems to be the Levi-Civita symbol rather than the tensor as it misses the $$\sqrt{|g|}$$ that is required of a general-coordinate tensor). Converting the way the entries are referenced looks rather indirect and inelegent.

Any suggestions?

Added comment: I think I have found a nasty bug in the ccgrg package. I tried computing $$R^{ijmn}R_{ijmn}$$ for the Kerr metric by evaluating

Sum[tRiemannR[i,j,m,n]tRiemannR[-i,-j,-m,-n]
,{i,dim},{j,dim},{m,dim},{n,dim}]

as illustrated in the documentation in arXiv:1603.05819 eq 11. It did not get the correct answer. With the ccgrg convention, the indices are summed frm 1 to 4. I noticed that the incorrect answer no longer depended on the mass parameter $$m$$ however. A bit of digging shows that $$m$$ was everywhere replaced by the number 4. It seems that the way they re-implement the mathematica "Sum" function replaces the $$m$$ in the expressions with the last value (here 4) of the dummy summation index $$m$$ in "Sum". i.e. the summation variables are not private to the subroutine that uses them. This is a bit off-putting. I don't think that the regular Sum[expression, {m,1,4}] does this.

• Re. your last expression: shouldn't the period be a comma? – AccidentalFourierTransform Mar 9 '18 at 16:31
• @AccidentalFourierTransform. Yes. A typo in the post only. What I evaluated had a proper comma. – mike stone Mar 9 '18 at 18:22

The conflict of variables for the Kerr spacetime, you mentioned, is of the type

Sum[{a, b, c, d}[[a]], {a, 4}]

1 + b + c + d

This is an internal conflict of arguments of Sum. Basically, this is possible to define in ccgrg some additional functions, to prevent conflicts like that, but any prevention cost the evaluation time. So, we would rather leave this to users' responsibility. You are right - some warning notes about that should be in the package.

Antisymmetric tensor is denoted by:

\ [Eta] \ [DoubleDagger].

The code in the package is a bit different, but what it essentially does for covariant components is

etacov[a_, b__] := Sign[metricDet] Sqrt[Sign[metricDet] metricDet] Signature[{a, b}];

and then is extended to contravariant and mixed components in the standard way. Since etacov is defined as function of variable number of argumets, so is \ [Eta] \ [DoubleDagger]. This number is in no way related to the space dimension (yet!). Be carefull.

• Thanks a ton! I've figured out how to work around my original Sum problem. Nw I'll play with the Eta dagger-dagger tensor and the etacov. It's a great package. – mike stone Mar 11 '18 at 18:43


text:
# Minimal value of the quadratic form $\mathbf{x}^t A \mathbf x$ subject to the contraint $\mathbf{x}^t \mathbf x = 1$

Let $$m$$ be the minimal value of the quadratic form $$\mathbf{x}^t A \mathbf x$$ subject to the contraint $$\mathbf{x}^t \mathbf x = 1$$.

Given a vector on the unit circle in which this minimal value is attained.

$$A=\left[\begin{array}{cc} -\frac{7}{4} & \frac{3}{4}\\ \frac{3}{4} & \frac{1}{4} \end{array}\right]$$

$$\left[\begin{array}{c} \frac{3}{\sqrt{10}}\\ -\frac{1}{\sqrt{10}} \end{array}\right] \text { or } \left[\begin{array}{c} -\frac{3}{\sqrt{10}}\\ -\frac{1}{\sqrt{10}} \end{array}\right]$$

I calculated the eigenvectors and eigenvalues and tried to fill them in to the formula: $$\mathbf x_k = c_1 \lambda_1^k \mathbf v_1 + c_2 \lambda_2^k \mathbf v_2$$ and this is not really solving the problem.

What do I need to do tho solve this question?

• Look here – A.Γ. Aug 6 at 11:37
• The answer is eigenvectors, but your eigenvectors are not correct. – mert Aug 6 at 12:30
• @A.Γ. Make that an answer, since it solves the problem entirely – Ant Aug 6 at 13:14

The Lagrange function is $$L\left(x,\lambda\right)=x^{\top}Ax+\lambda\left(1-x^{\top}x\right)$$ Derivative wrt $$x$$ yields $$2Ax-2\lambda x=0\implies\left(A-\lambda I\right)x=0$$ means $$x$$ is in the null space of $$A-\lambda I$$ and $$\left|A-\lambda I\right|=0$$. So the rule is to find the eigenvectors of $$A$$. Then, normalize them to $$x^{\top}x=1$$.


text:
# A new measurement of direct CP violation in two pion decays of the neutral kaon

@article{Fanti1999ANM,
title={A new measurement of direct CP violation in two pion decays of the neutral kaon},
author={The NA48 Collaboration V. Fanti and E. al.},
journal={Physics Letters B},
year={1999},
volume={465},
pages={335-348}
}
• Published 1999
• Physics
• Physics Letters B
• Abstract The NA48 experiment at CERN has performed a new measurement of direct CP violation, based on data taken in 1997 by simultaneously collecting KL and KS decays into π0π0 and π+π−. The result for the CP violating parameter Re (e ′ /e) is (18.5±4.5(stat)±5.8(syst))×10−4.
209 Citations


text:
Faculty of Physics
M.V.Lomonosov Moscow State University
Regular Article

# Simulation of back and transmission sputtering of atoms under the ion bombardment of single-crystal and quasiamorphous two-component targets

## V.N. Samoilov, V.A. El'tekov, B. Fritzsch, N.G. Anan'eva

### Moscow University Physics Bulletin 1987. 42. N 6. P. 72

• Article
Annotation

A dynamic model of a block of atoms is used to compare the sputtering parameters of two-component single-crystal and amorphous targets. The simulation is performed for the case of ion bombardment of the (0001) plane of VSi$_2$ single crystal and a corresponding quasiamorphous target with Ne$^+$ ions with energies of 10 keV, incident normally.

Rissian citation:
В.Н. Самойлов, В.А. Эльтеков, Б. Фритч, Н.Г. Ананьева.
Вестн. Моск. ун-та. Сер. 3. Физ. Астрон. 1987. № 6. С. 65.
Authors
V.N. Samoilov, V.A. El'tekov, B. Fritzsch, N.G. Anan'eva
Department of General Physics for the Physics Faculty, Faculty of Physics, Moscow State University, Leninskie Gory, Moscow, 119992, Russia

### Science News of the Faculty of Physics, Lomonosov Moscow State University

This new information publication, which is intended to convey to the staff, students and graduate students, faculty colleagues and partners of the main achievements of scientists and scientific information on the events in the life of university physicists.


text:
Transformations in the complex plane

Written by H. A. Verrill and I. Breeze, 2020/21.

Program for exploring transformations of the complex plane, drawing fundamental domains for subgroups of PSL(2,Z). Works on safari, with mouse.

>

Farey Symbol: will appear here if a group is chosen

Variables

• Matrix:
 M =

Polygon:
Domains for SL2(Z):
Domain for
change group: Γ0 ()

change polygon by vertex
Vertices: pj = (a + ib)/c
 j a b c


text:
# Math Help - What does this notation imply?

1. ## What does this notation imply?

See attached image.

I am not sure of how to use the bracketed numbers [0, 1-1/n] for each case.

Any help appreciated,
thanks

2. ## Re: What does this notation imply?

first is simply taking the infinite union of different intervals

second is infinite intersections of similar interval ranges.

3. ## Re: What does this notation imply?

I understand that, although not what is meant with the added [0, 1-1n]

4. ## Re: What does this notation imply?

it's a closed interval.

5. ## Re: What does this notation imply?

Still not entirely sure what you mean,
would you care to be more specific?

6. ## Re: What does this notation imply?

consider case when n=1, we have a degenerate closed interval, limiting n to infinite creates a set from [0,1]

7. ## Re: What does this notation imply?

Hi again,
I don't mean to come off as rude or ungrateful, as you are offering me help out of your spare time for nothing.
However, I get the feeling you are being vague on purpose with your replies.

If that is not the case, then I apologise, I am somewhat frustrated. If it is the case, can you please stop trying to confuse me?

Thanks.

8. ## Re: What does this notation imply?

i do not understand

9. ## Re: What does this notation imply?

Originally Posted by 99.95
I don't mean to come off as rude or ungrateful, as you are offering me help out of your spare time for nothing.
However, I get the feeling you are being vague on purpose with your replies.
If that is not the case, then I apologise, I am somewhat frustrated. If it is the case, can you please stop trying to confuse me?
Anyone of us can only help if you have a basic idea as to the material that you are asking about. Why were you asked to do a problem containing closed intervals if you do not know how they are defined?

$\left[ {0,1 - {n^{ - 1}}} \right] = \left\{ {x:0 \leqslant x \leqslant 1 - {n^{ - 1}}} \right\}$

$\\n=1,~\{0\}\\n=2,~\left[ {0, {\tfrac{1}{2}}}\right]\\n=3,~\left[ {0, {\tfrac{2}{3}}}}\right]\\\cdots$

10. ## Re: What does this notation imply?

The problem is you never did say what you did understand about the symbols and what it was that you did not. So usagi has been trying to explain every part. Did you try putting numbers into the formula? When n= 1, [0, 1- 1/n] is [0, 1-1]= [0, 0] which is the "singleton" set, {0}. When n= 2, [0, 1- 1/2]= [0, 1/2] which is the closed interval from 0 to 1/2. When n= 3, [0, 1- 1/3]= [0, 2/3] which is the closed interval from 0 to 2/3, etc.

$\cup_{n=2}^\infty [0, 1- \frac{1}{n}]$
means $[0, 0]\cup [0, 1- \frac{1}{2}]\cup [0, 1- \frac{1}{3}]\cup [0, 1-\frac{1}{4}]\cdot\cdot\cdot$
which is the same as ${0}\cup [0, 1/2]\cup [0, 2/3]\cup [0, 3/4]\cdot\cdot\cdot$

You should be able to see that the intervals always have left endpoint 0 and then go up to some 1- 1/n= n/n- 1/n= (n- 1)/n. As n gets larger and larger that goes to 1 (1/2, 2/3, 3/4, 4/5, ... goes to 1) but is never actually equal to 1 so we have every number from 0 (including 0) up to 1 (but NOT including 1).
$\cup_{n=1}^\infty [0, 1- \frac{1}{n}]= [0, 1)$
(Notice that, although every interval in the union is closed the union itself is not.)

11. ## Re: What does this notation imply?

Originally Posted by Plato
Anyone of us can only help if you have a basic idea as to the material that you are asking about. Why were you asked to do a problem containing closed intervals if you do not know how they are defined?

$\left[ {0,1 - {n^{ - 1}}} \right] = \left\{ {x:0 \leqslant x \leqslant 1 - {n^{ - 1}}} \right\}$

$\\n=1,~\{0\}\\n=2,~\left[ {0, {\tfrac{1}{2}}}\right]\\n=3,~\left[ {0, {\tfrac{2}{3}}}}\right]\\\cdots$


text:
## Wald: Ch. 2, Problem 8.b

Find the coefficients in coordinate bases, of the metric tensors for Minkowski space, for "rotating coordinates" defined by

$$t' = t,$$

$$x' = (x^2+y^2)^{-1/2} \cos(\phi - \omega t),$$

$$y' = (x^2+y^2)^{-1/2} \sin(\phi - \omega t),$$

$$z' = z.$$

I think the inverse coordinate transformation should be

$$t = t',$$

$$x = (x'^2+y'^2)^{-1/2} \cos(-\phi + \omega t),$$

$$y = (x^2+y^2)^{-1/2} \sin(-\phi + \omega t),$$

$$z = z'.$$

(EDIT: Insert prime symbols on x and y inside the brackets in the 3rd line of the inverse transformation.)

In Mathematica, I calculated the Jacobian matrix of this inverse transformation, using doubled letters for primed ones:

In[1]:= q = {tt, Sqrt[xx^2 + yy^2]*Cos[-phi + omega*tt],
Sqrt[xx^2 + yy^2]*Sin[-phi + omega*tt], zz}; J =
D[q, {{tt, xx, yy, zz}}]

Out[1]:= {{1, 0, 0, 0}, {omega Sqrt[xx^2 + yy^2] Sin[phi - omega tt], (
xx Cos[phi - omega tt])/Sqrt[xx^2 + yy^2], (yy Cos[phi - omega tt])/
Sqrt[xx^2 + yy^2],
0}, {omega Sqrt[xx^2 + yy^2] Cos[phi - omega tt], -((
xx Sin[phi - omega tt])/Sqrt[xx^2 + yy^2]), -((
yy Sin[phi - omega tt])/Sqrt[xx^2 + yy^2]), 0}, {0, 0, 0, 1}}

Then I calculated the new coefficients of the metric tensors thus:

In[2]:= g = DiagonalMatrix[{-1, 1, 1, 1}]; gg =
Transpose[J].g.J

Out[2]: {{-1 + omega^2 (xx^2 + yy^2) Cos[phi - omega tt]^2 +
omega^2 (xx^2 + yy^2) Sin[phi - omega tt]^2, 0, 0,
0}, {0, (xx^2 Cos[phi - omega tt]^2)/(xx^2 + yy^2) + (
xx^2 Sin[phi - omega tt]^2)/(xx^2 + yy^2), (
xx yy Cos[phi - omega tt]^2)/(xx^2 + yy^2) + (
xx yy Sin[phi - omega tt]^2)/(xx^2 + yy^2),
0}, {0, (xx yy Cos[phi - omega tt]^2)/(xx^2 + yy^2) + (
xx yy Sin[phi - omega tt]^2)/(xx^2 + yy^2), (
yy^2 Cos[phi - omega tt]^2)/(xx^2 + yy^2) + (
yy^2 Sin[phi - omega tt]^2)/(xx^2 + yy^2), 0}, {0, 0, 0, 1}}

The result is symmetric, but both the Jacobian matrix and the new coefficient matrix of the metric tensor field have determinant zero. I guess this means I'm doing something wrong, since the determinant of the latter matrix is used to measure spacetime volumes, but volume wouldn't be well defined if a particular volume could be zero when measured in one chart, and nonzero in another. Any suggestions?
 PhysOrg.com science news on PhysOrg.com >> Ants and carnivorous plants conspire for mutualistic feeding>> Forecast for Titan: Wild weather could be ahead>> Researchers stitch defects into the world's thinnest semiconductor
 Blog Entries: 1 Recognitions: Gold Member Science Advisor It took me a moment to notice this issue, but there is something fishy about the transform. For given z and t, any x, y on the circle (x^2+Y^2)=k produce the same x', y' values. Thus, a circle in (x,y,z,t) gets mapped to a point in (x',y',z',t'). That's not a valid coordinate transform.
 Ah, thanks, I see what's amiss now. I omitted his final condition: tan(phi) = y/x. Setting phi = ArcTan[y/x] gives a Jacobian matrix with determinant 1, and a metric matrix with determinant -1, as expected.

Blog Entries: 1
Recognitions: