GYutsis 1.1
The GYutsis package contains a text-mode program CycleCostAlgorithm
and a
graphical front end GYutsis
which generates a summation
formula over products of 6-j coefficients for a general angular momenta
recoupling coefficient (or 3n-j coefficients).
For problems upto 15 j's, corresponding with
6 initial angular momenta, the generated formulas are confirmed to be
optimal.
The GYutsis program has 2 modes: normal mode and advanced
mode. When it initially starts it is always in normal mode.
GYutsis: normal mode
In normal mode the generated formula, and thus the number of Wigner
6-j symbols and summations over dummy variables, is only shown when the
graph is completely reduced, i.e. equal to a triangular delta.
Defining a problem and generating the summation formula
In the input field, indicated by the label "YutsisGraph:", one can
enter a general recoupling coefficient in its mathematical standard format or specify a
filename in the current directory (i.e. the directory where
GYutsis
is started) or the last directory used to open a
problem. By pressing the "Browse"-button a standard file-open dialog
opens to select a problem from file. Once a problem is successfully
defined the braket notation of the problem appears in the
"Braket"-field and the "Reduce"- and "Save Braket"-buttons become
active. By pressing the "Reduce"-button a summation formula is
generated and presented in the output field labeled "Summation
formula:", together with the number of Wigner 6-j symbols and the
number of summations over dummy variables in the corresponding fields.
All features described above can also be selected from the menus.
Changing the heuristic of the algorithm
When no triangles or bubbles are available in the Yutsis graph, the
algorithm used to generate the summation formula delegates the task of
selecting an operation to an heuristic. Three heuristics are available:
- Edge Cost Heuristic
- this is the most simple and fastest heuristic: a cost is associated
with each edge, equal to the difference in length of the two smallest
cycles in which the edge participates. The cost of a cycle is defined
as the minimum cost of its edges. This heuristic will interchange the
edge with minimum cost out of the cycle with minimum cost. When two
cycles have the same cost, the cycle for which the minimum edge cost
is most reached is preferred, and if this is equal, the cycle with
minimum total cost is choosen.
For small problems (upto 22 j's) this heuristic suffices, for higher
problems the heavier heuristics provide shorter formulae.
- More Smaller/Less Bigger Heuristic
- this is the default heuristic and for most cases the best choice.
This heuristic considers all possible interchanges making a girth
cycle smaller. An interchange is preferred over an other if it makes
more cycles of length l smaller, or if equal, makes less
bigger. This criterium is repeatedly used for rising l
starting at the girth until a difference found.
- Cycle Count Heuristic
- this heuristic also considers all possible interchanges making
a girth cycle smaller, but prefers an interchange over an other if
it it results in a graph with more cycles of length l.
Again this criterium is used for rising l, starting at
the girth minus 1, until a difference is found.
This heuristic yields shorter formulae than the Edge Cost Heuristic.
For some cases it also performs better than the More Smaller/Less Bigger
Heuristic, but these cases are rare.
Changing the format of the formula
The summation formula can be generated in four different output formats:
- Generic
- a compact, human readable format. This is the default.
- LaTeX
- for the popular typesetting system LaTeX. By default a macro is
used to represent the Wigner 6-j symbol. This can be turned of by
clicking on the "Use macros" checkbox under the Output-menu. Afterwards
the formula will be outputted in plain LaTeX.
- Maple
- for the popular computer algebra package Maple. Macros are
used to represent the Kronecker delta symbol, the triangular symbol
and the Wigner 6-j symbol (they are in fact Maple functions).
- Racah
- for the Maple package Racah (package especially for Racah algebra).
In advanced mode default macros can be printed to the "User"-pane for
the LaTeX and Maple format by pressing the "Print Macros"-button in
the advanced panel or by selecting "Generate Macros" from the
output-menu.
GYutsis: advanced mode
When GYutsis
is in advanced mode the formula corresponding
with the current state of the graph is shown, and the window has an
additional advanced panel at the bottom and a slider in the middle,
allowing the user to redistribute the space between the upper and lower part
of the window.
The advanced panel has a tabbed pane with three panels (left) and
a row of buttons with user operations (right):
- The "User"-pane contains all the ouput generated by the user.
- In the "Operations"-pane all graph operations are logged.
These operations can be:
- compound operations: removing/formatting a triangle,
removing/formatting a bubble or formatting the graph as a triangular delta,
- elementary operations: performing an interchange, removing nodes,
inverting node signs or inverting edge directions.
By formatting we mean the process of locally inverting
node signs and edge directions in order to get the subgraph in the
correct form for applying a rule.
- In the "Rules"-pane all applied
rules are logged from an algorithmic point of view: if we apply an
interchange to reduce a square to a triangle, the square is shown as
"Best Cycle" and the edge wich is interchanged out of the square as
"best edge". From the graph operations point of view this will be an
interchange on the "best edge". In addition equivalent operations
(judged by the used heuristic) are also logged, if apparent.
The user operations are:
- Print Graph
- Outputs the graph in the following format (same example):
3
-0 | j1:-3 j2:-4 j5:+2
-1 | j3:-3 j4:-4 j6:+2
-2 | j5:-0 j6:-1 j7:+5
+3 | j1:+0 j3:+1 j8:-5
+4 | j2:+0 j4:+1 j9:-5
+5 | j8:+3 j9:+4 j7:-2
The first line contains the size of the problem n, for a
general recoupling coefficient with n+1 leaves,
corresponding with a cubic graph of 2n nodes and
3n edges. The next 2n lines contain the
couplings of the graph:
<nodesign><node>|
<edge> <edge>
<edge>
with <edge>:=
<label>:<direction><endpoint>,
where direction is '+' for an incoming edge and '-' for a leaving
edge.
- Save Graph
- Saves the graph graphically in gml-format for the graph drawing tool
Graphlet. The signs of the nodes and the directions of the edges are ignored.
A valid gml-file is generated with all the nodes on one (diagonally oriented)
line. We recommend the graph drawing algorithm "General Graphs (Tunkelang)"
for best results.
Graphlet is free of charge for non commercial use and can be downloaded
from its homepage:
http://www.infosun.fmi.uni-passau.de/Graphlet/
- Save each step
- When this checkbox is selected, the graph will be saved graphically
in gml-format after each step. The filenames will be of the form:
<filename>.k.gml
with <filename>.braket, <filename>.yts or <filename>
the original filename of the Yutsis graph and k the
step number.
When the braket is not saved yet, the filenames will be of
the form:
newgraphx.k.gml
with x a number incremented with each anonymous graph
and k the step number.
- Cycles
- Prints all the girth cycles of the graph.
- Best Cycle
- Prints the cycle the heuristic marks as the best
cycle together with its best edge (if the cycle is bigger than a triangle).
In addition equivalent operations are also printed, if apparent.
- Step
- Performs one step in the reduction process,
i.e. applies one rule.
- Print Macros
- Prints default macros for the selected
output format (only for LaTeX and Maple).
In the case of Maple, these macros contain Maple functions for
the Kronecker delta symbol, the triangular symbol and the Wigner 6-j symbol.
Each of the panes can be cleared by pressing the "clear"-button and
the contents of a pane can be saved to a file by pressing the
"Save to file"-button.
When the "Hide Advanced Panel"-button is pressed the program returns
to normal mode without changing the state of the graph. All features present
in normal mode are off course available in "advanced mode". Again all
operations can be selected from the menus.
GYutsisApplet
There is also an applet version of the program wich has roughly the same
features, but without all "file"-operations. It can be found at
http://caagt.rug.ac.be/yutsis
CycleCostAlgorithm
The GYutsis
program is in fact a graphical front end to
the CycleCostAlgorithm
program for generating a summation
formula. The CycleCostAlgorithm program works in text-mode and has the
following syntax:
Usage: java [-options] CycleCostAlgorithm <YutsisGraph>
<YutsisGraph>:= "<Bra|Ket>" | <filename>
<filename> must be in BRAKET or YTS format
Options:
heuristics:a: run both CycleCountHeuristics and output the best
e: use the EdgeCostHeuristic
b: use the CycleCountHeuristic.MORE_SMALLER_LESS_BIGGER (default)
c: use the CycleCountHeuristic.CYCLE_COUNT
output: G: generic output (same as default but wrapped)
L: LaTeX ouput
M: Maple output
R: Racah output
l: output macros for the LaTeX format
m: output macros for the Maple format
general: v: verbose output (same as "-or")
o: output graph operations
r: output rule selection
g: ouput graph after each step in gml-format
Running the program without arguments prints the usage
above.
The last argument can be a general recoupling coefficient in its
mathematical standard format or a filename defining a general
recoupling coefficient in BRAKET
or
YTS
format.
The heuristic options determine the heuristic to be used:
a
- Run the algorithm once with the
More Smaller/Less Bigger Heuristic,
once with the Cycle Count Heuristic and return
the shortest formula.
e
- The Edge Cost Heuristic will be used.
b
- The More Smaller/Less Bigger Heuristic will be used.
c
- The Cycle Count Heuristic will be used.
The output options define the format of the formula:
G
- generic format. This is the same as the
default but wrapped at 80 characters.
L
- LaTeX format.
M
- Maple format.
R
- Racah format.
l
- Output the default macros for the LaTeX
format and exit.
m
- Output the default macros for the Maple
format and exit.
All the output formats are wrapped at 80 characters.
The general options define the output level of the program:
-
v
- Verbose output: maximum output level; same as
combination of both other options (
or
)
-
o
- Output all operations performed on the
graph. These operations can be compound operations:
removing/formatting a triangle, removing/formatting a bubble or
formatting the graph as a triangular delta; or elementary operations:
removing nodes, inverting node signs or inverting edge directions.
By formatting we mean the process of locally inverting node signs and
edge directions in order to get the subgraph in the correct form
for applying a rule.
-
r
- Output the rules applied, from an algorithmic point of view:
if we apply an interchange to reduce a square to a triangle, the
square is shown as "Best Cycle" and the edge wich is interchanged
out of the square as "best edge". From the graph operations point
of view this will be an interchange on the "best edge". In addition
equivalent operations (judged by the used Heuristic) are also
outputted.
g
- Output the graph graphically in gml-format
after each step. The filename conventions are analogue to those
from the GUI, except that in the case of an anonymous graph x
will be equal to n, with n+1 the number of
initial angular momenta, corresponding with a cubic graph of 2n
nodes and 3n edges.
Mathematical and File Formats
Mathematical Standard Format
The mathematical standard format, e.g.
<((j1,j2)j5,(j3,j4)j6)j7|((j1,j3)j8,(j2,j4)j9)j7>
is the most known format for general recoupling coefficients.
Labels of the form z<number>
can not be used
because new labels resulting from interchanges are of this form.
We will use the example above for describing all formats.
BRAKET Format
The braket file format is simply a file containing a general
recoupling coefficient in its mathematical standard format
on the first line, e.g.:
<((j1,j2)j5,(j3,j4)j6)j7|((j1,j3)j8,(j2,j4)j9)j7><EOF>
It is not needed to specify the intermediate angular momenta:
<((j1,j2),(j3,j4))j|((j1,j3),(j2,j4))j><EOF>
is also accepted. In addition the root label can be dropped too:
<((j1,j2),(j3,j4))|((j1,j3),(j2,j4))><EOF>
The intermediate angular momenta/root will get labels of the form
t<number>, with <number> starting at 1.
Note that in this case it is forbidden to use labels of this form.
YTS Format
This format is in fact a coupling list, i.e. a list of all couplings
when the trees are iterated in post order (right child, left child,
parent), with the left tree first:
<Header>
j1 j2 j5
j3 j4 j6
j5 j6 j7
j1 j3 j8
j2 j4 j9
j8 j9 j7<EOF>
The first line is a header defining the size of the general recoupling
coefficient. There are two valid formats:
- n
- 3n n 1
with n+1 the number of initial angular momenta, corresponding
with a cubic graph of 2n nodes and 3n edges.
The second format is allowed for compatibility with the format used
by the older program NEWGRAPH
. The last token (1)
is ignored and not mandatory.
The two valid headers for our example would be:
-
3
-
9 3 1
Additional line breaks at the end of the file are
tolerated by both file formats.