Young diagrams¶
Partitions and Young diagrams.
A partition \(\lambda = (\lambda_1 \ge \lambda_2 \ge \cdots)\) of \(n\) is drawn as rows of boxes, \(\lambda_i\) boxes in row \(i\). Partitions are plain tuples in weakly decreasing order, and cells are 0-indexed \((i, j)\) pairs. Conjugation transposes the diagram.
The hook of a box is the box itself plus everything to its right and
everything below it; its content is \(c(i, j) = j - i\). The two numbers give
the dimension formulas of dimensions.
Examples:
>>> from schur_weyl import partitions, partition_conjugate, hook_lenght
>>> [*partitions(4)]
[(4,), (3, 1), (2, 2), (2, 1, 1), (1, 1, 1, 1)]
>>> [*partitions(5, max_part=2)]
[(2, 2, 1), (2, 1, 1, 1), (1, 1, 1, 1, 1)]
>>> partition_conjugate((4, 3, 1))
(3, 2, 2, 1)
>>> hook_lenght((4, 3, 1), 0, 0)
6
partitions ¶
partitions(k: int, max_part: Optional[int] = None, max_height: Optional[int] = None, *, min_height: Optional[int] = None, height: Optional[int] = None) -> Generator[tuple[int, ...], None, None]
Generate the partitions of k. All the non-increasing vectors of positive integers summing to k.
The height of a partition is its number of rows, len(lam). Bounding it is the cheaper way to ask for partitions of a given height: the bounds prune the recursion instead of filtering its output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k
|
int
|
The size of the Symmetric group |
required |
max_part
|
Optional[int]
|
The maximum number of columns in any row of the Young tableau. Defaults to None. |
None
|
max_height
|
Optional[int]
|
The maximum number of rows. Defaults to None. |
None
|
min_height
|
Optional[int]
|
The minimum number of rows. Keyword only. Defaults to None. |
None
|
height
|
Optional[int]
|
The exact number of rows, i.e. both bounds at once. Keyword only, and mutually exclusive with min_height / max_height. Defaults to None. |
None
|
Yields:
| Type | Description |
|---|---|
Generator[tuple[int, ...], None, None]
|
The partitions. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If height is combined with min_height or max_height. |
Examples:
Source code in src/schur_weyl/young_diagrams.py
partition_conjugate ¶
Take the conjugate of a partition. Flip/Transpose a Young tableau accross its main diagonal
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
tuple[int, ...]
|
The partition |
required |
Returns:
| Type | Description |
|---|---|
tuple[int, ...]
|
Its conjugate |
Examples:
Source code in src/schur_weyl/young_diagrams.py
hook_lenght ¶
The hook lenght at index ()
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
tuple[int, ...]
|
The partition |
required |
i
|
int
|
the row index (0-indexed) |
required |
j
|
int
|
the column index (0-indexed) |
required |
Returns: int: The hook lenght
Examples:
Source code in src/schur_weyl/young_diagrams.py
cells ¶
All the cells index of a partition
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
tuple[int, ...]
|
The partition |
required |
Yields:
| Type | Description |
|---|---|
Generator[tuple[int, int], None, None]
|
the indexes (0-indexed) |
Examples:
Source code in src/schur_weyl/young_diagrams.py
majorizes ¶
Check if lam majorizes nu
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
tuple[int, ...]
|
a partition |
required |
nu
|
tuple[int, ...]
|
a partition of the same size as lambda. Otherwise the result is undefined |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if lam majorizes nu |
Examples:
>>> majorizes((3, 3), (4, 1, 1))
False
>>> majorizes((4, 1, 1), (3, 3))
False
>>> majorizes((3, 1, 1, 1), (2, 2, 1, 1))
True
>>> majorizes((2, 1), (2, 1))
True
Source code in src/schur_weyl/young_diagrams.py
addable_corners ¶
The cells that can be added to still obtain a valid partition
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
tuple[int, ...]
|
The partition |
required |
Yields:
| Type | Description |
|---|---|
Generator[tuple[int, int], None, None]
|
The indexes of the cells |
Examples:
Source code in src/schur_weyl/young_diagrams.py
removable_corners ¶
The cells that can be removed to still obtain a valid partition
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
tuple[int, ...]
|
The partition |
required |
Yields:
| Type | Description |
|---|---|
Generator[tuple[int, int], None, None]
|
The indexes of the cells |
Examples:
Source code in src/schur_weyl/young_diagrams.py
is_in_partition ¶
Returns true if a cell is in the partition lam
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
tuple[int, ...]
|
the partition |
required |
i
|
int
|
the row index (0-indexed) |
required |
j
|
int
|
the column index (0-indexed) |
required |
Returns:
| Type | Description |
|---|---|
bool
|
true if (i, j) in lam |
Examples: