text:
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Bib Ind

### 3 Bipartitions and blocks

In this chapter we describe the functions in Semigroups for creating and manipulating bipartitions and semigroups of bipartitions. We begin by describing what these objects are.

A partition of a set $$X$$ is a set of pairwise disjoint non-empty subsets of $$X$$ whose union is $$X$$. A partition of $$X$$ is the collection of equivalence classes of an equivalence relation on $$X$$, and vice versa.

Let $$n\in$$$$\mathbb{N}$$, let $$\mathbf{n}$$$$= \{1, 2, \ldots, n\}$$, and let $$-$$$$\mathbf{n}$$$$= \{-1, -2, \ldots, -n\}$$.

The partition monoid of degree $$n$$ is the set of all partitions of $$\mathbf{n}$$$$\cup$$-$$\mathbf{n}$$ with a multiplication we describe below. To avoid conflict with other uses of the word "partition" in GAP, and to reflect their definition, we have opted to refer to the elements of the partition monoid as bipartitions of degree $$n$$; we will do so from this point on.

Let $$x$$ be any bipartition of degree $$n$$. Then $$x$$ is a set of pairwise disjoint non-empty subsets of $$\mathbf{n}$$$$\cup$$-$$\mathbf{n}$$ whose union is $$\mathbf{n}$$$$\cup$$-$$\mathbf{n}$$; these subsets are called the blocks of $$x$$. A block containing elements of both $$\mathbf{n}$$ and -$$\mathbf{n}$$ is called a transverse block. If $$i$$, $$j$$$$\in$$$$\mathbf{n}$$$$\cup$$-$$\mathbf{n}$$ belong to the same block of a bipartition $$x$$, then we write ($$i$$, $$j$$)$$\in$$$$x$$.

Let $$x$$ and $$y$$ be bipartitions of degree $$n$$. Their product $$x$$$$y$$ can be described as follows. Define $$\mathbf{n}$$'$$= \{1', 2', \ldots, n'\}$$. From $$x$$, create a partition $$x$$' of the set $$\mathbf{n}$$$$\cup$$$$\mathbf{n}$$' by replacing each negative point -$$i$$ in a block of $$x$$ by the point $$i$$', and create from $$y$$ a partition $$y$$' of the set $$\mathbf{n}$$'$$\cup$$-$$\mathbf{n}$$ by replacing each positive point $$i$$ in a block of $$y$$ by the point $$i$$'. Then define a relation on the set $$\mathbf{n}$$$$\cup$$$$\mathbf{n}$$'$$\cup$$-$$\mathbf{n}$$, where $$i$$ and $$j$$ are related if they are related in either $$x$$' or $$y$$', and let $$p$$ be the transitive closure of this relation. Finally, define $$x$$$$y$$ to be the bipartition of degree $$n$$ defined by the restriction of the equivalence relation $$p$$ to the set $$\mathbf{n}$$$$\cup$$-$$\mathbf{n}$$.

Equivalently, the product $$x$$$$y$$ is defined to be the bipartition where $$i$$,$$j$$$$\in$$$$\mathbf{n}$$$$\cup$$-$$\mathbf{n}$$ (we assume without loss of generality that $$i$$$$\geq$$$$j$$) belong to the same block of $$x$$$$y$$ if either:

• $$i$$=$$j$$,

• $$i$$, $$j$$ $$\in$$ $$\mathbf{n}$$ and $$($$$$i$$,$$j$$$$)$$$$\in$$ $$x$$, or

• $$i$$, $$j$$ $$\in$$ -$$\mathbf{n}$$ and $$($$$$i$$,$$j$$$$)$$$$\in$$ $$y$$;

or there exists $$r\in$$$$\mathbb{N}$$ and $$k(1), k(2),\ldots, k(r)\in \mathbf{n}$$ , and one of the following holds:

• $$r=2s-1$$ for some $$s\geq 1$$ , $$i$$$$\in$$$$\mathbf{n}$$, $$j$$$$\in$$ -$$\mathbf{n}$$ and

$(i,-k(1))\in x,\ (k(1),k(2))\in y,\ (-k(2),-k(3))\in x,\ \ldots,\qquad$

$\qquad\ldots,\ (-k(2s-2),-k(2s-1))\in x,\ (k(2s-1),j)\in y;$

• $$r=2s$$ for some $$s\geq 1$$ , and either $$i$$,$$j$$$$\in$$$$\mathbf{n}$$, and

$(i,-k(1))\in x,\ (k(1),k(2))\in y,\ (-k(2),-k(3))\in x,\ \ldots, (k(2s-1), k(2s))\in y,\ (-k(2s), j)\in x,$

or $$i$$,$$j$$$$\in$$-$$\mathbf{n}$$, and

$(i,k(1))\in y,\ (-k(1),-k(2))\in x,\ (k(2),k(3))\in y,\ \ldots, (-k(2s-1), -k(2s))\in x,\ (k(2s), j)\in y.$

This multiplication can be shown to be associative, and so the collection of all bipartitions of any particular degree is a monoid; the identity element of the partition monoid of degree $$n$$ is the bipartition $$\left\{\{i,-i\}:i\in\mathbf{n}\right\}$$. A bipartition is a unit if and only if each block is of the form $$\{$$$$i$$,-$$j$$$$\}$$ for some $$i$$, $$j$$$$\in$$$$\mathbf{n}$$. Hence the group of units is isomorphic to the symmetric group on $$\mathbf{n}$$.

Let $$x$$ be a bipartition of degree $$n$$. Then we define $$x$$$$^*$$ to be the bipartition obtained from $$x$$ by replacing $$i$$ by -$$i$$ and -$$i$$ by $$i$$ in every block of $$x$$ for all $$i$$$$\in$$$$\mathbf{n}$$. It is routine to verify that if $$x$$ and $$y$$ are arbitrary bipartitions of equal degree, then

$(x^*)^*=x,\quad xx^*x=x,\quad x^*xx^*=x^*,\quad (xy)^*=y^*x^*.$

In this way, the partition monoid is a regular *-semigroup.

A bipartition $$x$$ of degree $$n$$ is called planar if there do not exist distinct blocks $$A, U \in$$ $$x$$, along with $$a, b \in A$$ and $$u, v \in U$$, such that $$a < u < b < v$$. Define $$p$$ to be the bipartition of degree $$n$$ with blocks $$\left\{\{i, -(i+1)\}:i\in\{1,\ldots,n-1\right\}\}$$ and $$\{n,-1\}$$ . Note that $$p$$ is a unit. A bipartition $$x$$ of degree $$n$$ is called annular if $$x = p^{i} y p^{j}$$ for some planar bipartition $$y$$ of degree $$n$$, and some integers $$i$$ and $$j$$.

From a graphical perspective, as on Page 873 in [HR05], a bipartition of degree $$n$$ is planar if it can be represented as a graph without edges crossing inside of the rectangle formed by its vertices $$\mathbf{n}$$$$\cup$$-$$\mathbf{n}$$. Similarly, as shown in Figure 2 in [Aui12], a bipartition of degree $$n$$ is annular if it can be represented as a graph without edges crossing inside an annulus.

#### 3.1 The family and categories of bipartitions

##### 3.1-1 IsBipartition
 ‣ IsBipartition( obj ) ( category )

Returns: true or false.

Every bipartition in GAP belongs to the category IsBipartition. Basic operations for bipartitions are RightBlocks (3.5-5), LeftBlocks (3.5-6), ExtRepOfObj (3.5-3), LeftProjection (3.2-4), RightProjection (3.2-5), StarOp (3.2-6), DegreeOfBipartition (3.5-1), RankOfBipartition (3.5-2), multiplication of two bipartitions of equal degree is via *.

##### 3.1-2 IsBipartitionCollection
 ‣ IsBipartitionCollection( obj ) ( category )
 ‣ IsBipartitionCollColl( obj ) ( category )

Returns: true or false.

Every collection of bipartitions belongs to the category IsBipartitionCollection. For example, bipartition semigroups belong to IsBipartitionCollection.

Every collection of collections of bipartitions belongs to IsBipartitionCollColl. For example, a list of bipartition semigroups belongs to IsBipartitionCollColl.

#### 3.2 Creating bipartitions

There are several ways of creating bipartitions in GAP, which are described in this section. The maximum degree of a bipartition is set as 2 ^ 29 - 1. In reality, it is unlikely to be possible to create bipartitions of degrees as small as 2 ^ 24 because they require too much memory.

##### 3.2-1 Bipartition
 ‣ Bipartition( blocks ) ( function )

Returns: A bipartition.

Bipartition returns the bipartition x with equivalence classes blocks, which should be a list of duplicate-free lists whose union is [-n .. -1] union [1 .. n] for some positive integer n.

Bipartition returns an error if the argument does not define a bipartition.

gap> x := Bipartition([[1, -1], [2, 3, -3], [-2]]);
<bipartition: [ 1, -1 ], [ 2, 3, -3 ], [ -2 ]>

##### 3.2-2 BipartitionByIntRep
 ‣ BipartitionByIntRep( list ) ( operation )

Returns: A bipartition.

It is possible to create a bipartition using its internal representation. The argument list must be a list of positive integers not greater than n, of length 2 * n, and where i appears in the list only if i-1 occurs earlier in the list.

For example, the internal representation of the bipartition with blocks

[1, -1], [2, 3, -2], [-3]

has internal representation

[1, 2, 2, 1, 2, 3]

The internal representation indicates that the number 1 is in class 1, the number 2 is in class 2, the number 3 is in class 2, the number -1 is in class 1, the number -2 is in class 2, and -3 is in class 3. As another example, [1, 3, 2, 1] is not the internal representation of any bipartition since there is no 2 before the 3 in the second position.

In its first form BipartitionByIntRep verifies that the argument list is the internal representation of a bipartition.

See also IntRepOfBipartition (3.5-4).

gap> BipartitionByIntRep([1, 2, 2, 1, 3, 4]);
<bipartition: [ 1, -1 ], [ 2, 3 ], [ -2 ], [ -3 ]>

##### 3.2-3 IdentityBipartition
 ‣ IdentityBipartition( n ) ( operation )

Returns: The identity bipartition.

Returns the identity bipartition with degree n.

gap> IdentityBipartition(10);
<block bijection: [ 1, -1 ], [ 2, -2 ], [ 3, -3 ], [ 4, -4 ],
[ 5, -5 ], [ 6, -6 ], [ 7, -7 ], [ 8, -8 ], [ 9, -9 ], [ 10, -10 ]>

##### 3.2-4 LeftOne
 ‣ LeftOne( x ) ( attribute )
 ‣ LeftProjection( x ) ( attribute )

Returns: A bipartition.

The LeftProjection of a bipartition x is the bipartition x * Star(x). It is so-named, since the left and right blocks of the left projection equal the left blocks of x.

The left projection e of x is also a bipartition with the property that e * x = x. LeftOne and LeftProjection are synonymous.

gap> x := Bipartition([
>   [1, 4, -1, -2, -6], [2, 3, 5, -4], [6, -3], [-5]]);;
gap> LeftOne(x);
<block bijection: [ 1, 4, -1, -4 ], [ 2, 3, 5, -2, -3, -5 ],
[ 6, -6 ]>
gap> LeftBlocks(x);
<blocks: [ 1*, 4* ], [ 2*, 3*, 5* ], [ 6* ]>
gap> RightBlocks(LeftOne(x));
<blocks: [ 1*, 4* ], [ 2*, 3*, 5* ], [ 6* ]>
gap> LeftBlocks(LeftOne(x));
<blocks: [ 1*, 4* ], [ 2*, 3*, 5* ], [ 6* ]>
gap> LeftOne(x) * x = x;
true

##### 3.2-5 RightOne
 ‣ RightOne( x ) ( attribute )
 ‣ RightProjection( x ) ( attribute )

Returns: A bipartition.

The RightProjection of a bipartition x is the bipartition Star(x) * x. It is so-named, since the left and right blocks of the right projection equal the right blocks of x.

The right projection e of x is also a bipartition with the property that x * e = x. RightOne and RightProjection are synonymous.

gap> x := Bipartition([[1, -1, -4], [2, -2, -3], [3, 4], [5, -5]]);;
gap> RightOne(x);
<block bijection: [ 1, 4, -1, -4 ], [ 2, 3, -2, -3 ], [ 5, -5 ]>
gap> RightBlocks(RightOne(x));
<blocks: [ 1*, 4* ], [ 2*, 3* ], [ 5* ]>
gap> LeftBlocks(RightOne(x));
<blocks: [ 1*, 4* ], [ 2*, 3* ], [ 5* ]>
gap> RightBlocks(x);
<blocks: [ 1*, 4* ], [ 2*, 3* ], [ 5* ]>
gap> x * RightOne(x) = x;
true

##### 3.2-6 StarOp
 ‣ StarOp( x ) ( operation )
 ‣ Star( x ) ( attribute )

Returns: A bipartition.

StarOp returns the unique bipartition g with the property that: x * g * x = x, RightBlocks(x) = LeftBlocks(g), and LeftBlocks(x) = RightBlocks(g). The star g can be obtained from x by changing the sign of every integer in the external representation of x.

gap> x := Bipartition([[1, -4], [2, 3, 4], [5], [-1], [-2, -3], [-5]]);
<bipartition: [ 1, -4 ], [ 2, 3, 4 ], [ 5 ], [ -1 ], [ -2, -3 ],
[ -5 ]>
gap> y := Star(x);
<bipartition: [ 1 ], [ 2, 3 ], [ 4, -1 ], [ 5 ], [ -2, -3, -4 ],
[ -5 ]>
gap> x * y * x = x;
true
gap> LeftBlocks(x) = RightBlocks(y);
true
gap> RightBlocks(x) = LeftBlocks(y);
true

##### 3.2-7 RandomBipartition
 ‣ RandomBipartition( [rs, ]n ) ( operation )
 ‣ RandomBlockBijection( [rs, ]n ) ( operation )

Returns: A bipartition.

If n is a positive integer, then RandomBipartition returns a random bipartition of degree n, and RandomBlockBijection returns a random block bijection of degree n.

If the optional first argument rs is a random source, then this is used to generate the bipartition returned by RandomBipartition and RandomBlockBijection.

Note that neither of these functions has a uniform distribution.

gap> x := RandomBipartition(6);
<bipartition: [ 1, 2, 3, 4 ], [ 5 ], [ 6, -2, -3, -4 ], [ -1, -5 ], [ -6 ]>
gap> x := RandomBlockBijection(4);
<block bijection: [ 1, 4, -2 ], [ 2, -4 ], [ 3, -1, -3 ]>

#### 3.3 Changing the representation of a bipartition

It is possible that a bipartition can be represented as another type of object, or that another type of GAP object can be represented as a bipartition. In this section, we describe the functions in the Semigroups package for changing the representation of bipartition, or for changing the representation of another type of object to that of a bipartition.

The operations AsPermutation (3.3-5), AsPartialPerm (3.3-4), AsTransformation (3.3-3) can be used to convert bipartitions into permutations, partial permutations, or transformations where appropriate.

##### 3.3-1 AsBipartition
 ‣ AsBipartition( x[, n] ) ( operation )

Returns: A bipartition.

AsBipartition returns the bipartition, permutation, transformation, or partial permutation x, as a bipartition of degree n.

There are several possible arguments for AsBipartition:

permutations

If x is a permutation and n is a positive integer, then AsBipartition(x, n) returns the bipartition on [1 .. n] with classes [i, i ^ x] for all i = 1 .. n.

If no positive integer n is specified, then the largest moved point of x is used as the value for n; see LargestMovedPoint (Reference: LargestMovedPoint for a permutation).

transformations

If x is a transformation and n is a positive integer such that x is a transformation of [1 .. n], then AsTransformation returns the bipartition with classes $$(i)f ^ {-1}\cup \{i\}$$ for all i in the image of x.

If the positive integer n is not specified, then the degree of x is used as the value for n.

partial permutations

If x is a partial permutation and n is a positive integer, then AsBipartition returns the bipartition with classes [i, i ^ x] for i in [1 .. n]. Thus the degree of the returned bipartition is the maximum of n and the values i ^ x where i in [1 .. n].

If the optional argument n is not present, then the default value of the maximum of the largest moved point and the largest image of a moved point of x plus 1 is used.

bipartitions

If x is a bipartition and n is a non-negative integer, then AsBipartition returns a bipartition corresponding to x with degree n.

If n equals the degree of x, then x is returned. If n is less than the degree of x, then this function returns the bipartition obtained from x by removing the values exceeding n or less than -n from the blocks of x. If n is greater than the degree of x, then this function returns the bipartition with the same blocks as x and the singleton blocks i and -i for all i greater than the degree of x

pbrs

If x is a pbr satisfying IsBipartitionPBR (4.5-8) and n is a non-negative integer, then AsBipartition returns the bipartition corresponding to x with degree n.

gap> x := Transformation([3, 5, 3, 4, 1, 2]);;
gap> AsBipartition(x, 5);
<bipartition: [ 1, 3, -3 ], [ 2, -5 ], [ 4, -4 ], [ 5, -1 ], [ -2 ]>
gap> AsBipartition(x);
<bipartition: [ 1, 3, -3 ], [ 2, -5 ], [ 4, -4 ], [ 5, -1 ],
[ 6, -2 ], [ -6 ]>
gap> AsBipartition(x, 10);
<bipartition: [ 1, 3, -3 ], [ 2, -5 ], [ 4, -4 ], [ 5, -1 ],
[ 6, -2 ], [ 7, -7 ], [ 8, -8 ], [ 9, -9 ], [ 10, -10 ], [ -6 ]>
gap> AsBipartition((1, 3)(2, 4));
<block bijection: [ 1, -3 ], [ 2, -4 ], [ 3, -1 ], [ 4, -2 ]>
gap> AsBipartition((1, 3)(2, 4), 10);
<block bijection: [ 1, -3 ], [ 2, -4 ], [ 3, -1 ], [ 4, -2 ],
[ 5, -5 ], [ 6, -6 ], [ 7, -7 ], [ 8, -8 ], [ 9, -9 ], [ 10, -10 ]>
gap> x := PartialPerm([1, 2, 3, 4, 5, 6], [6, 7, 1, 4, 3, 2]);;
gap> AsBipartition(x, 11);
<bipartition: [ 1, -6 ], [ 2, -7 ], [ 3, -1 ], [ 4, -4 ], [ 5, -3 ],
[ 6, -2 ], [ 7 ], [ 8 ], [ 9 ], [ 10 ], [ 11 ], [ -5 ], [ -8 ],
[ -9 ], [ -10 ], [ -11 ]>
gap> AsBipartition(x);
<bipartition: [ 1, -6 ], [ 2, -7 ], [ 3, -1 ], [ 4, -4 ], [ 5, -3 ],
[ 6, -2 ], [ 7 ], [ -5 ]>
gap> AsBipartition(Transformation([1, 1, 2]), 1);
<block bijection: [ 1, -1 ]>
gap> x := Bipartition([[1, 2, -2], [3], [4, 5, 6, -1],
>                      [-3, -4, -5, -6]]);;
gap> AsBipartition(x, 0);
<empty bipartition>
gap> AsBipartition(x, 2);
<bipartition: [ 1, 2, -2 ], [ -1 ]>
gap> AsBipartition(x, 8);
<bipartition: [ 1, 2, -2 ], [ 3 ], [ 4, 5, 6, -1 ], [ 7 ], [ 8 ],
[ -3, -4, -5, -6 ], [ -7 ], [ -8 ]>
gap> x := PBR(
> [[-1, 1, 2, 3, 4], [-1, 1, 2, 3, 4],
>  [-1, 1, 2, 3, 4], [-1, 1, 2, 3, 4]],
> [[-1, 1, 2, 3, 4], [-2], [-3], [-4]]);;
gap> AsBipartition(x);
<bipartition: [ 1, 2, 3, 4, -1 ], [ -2 ], [ -3 ], [ -4 ]>
gap> AsBipartition(x, 2);
<bipartition: [ 1, 2, -1 ], [ -2 ]>
gap> AsBipartition(x, 4);
<bipartition: [ 1, 2, 3, 4, -1 ], [ -2 ], [ -3 ], [ -4 ]>
gap> AsBipartition(x, 5);
<bipartition: [ 1, 2, 3, 4, -1 ], [ 5 ], [ -2 ], [ -3 ], [ -4 ],
[ -5 ]>
gap> AsBipartition(x, 0);
<empty bipartition>

##### 3.3-2 AsBlockBijection
 ‣ AsBlockBijection( x[, n] ) ( operation )

Returns: A block bijection.

When the argument x is a partial perm and n is a positive integer which is greater than the maximum of the degree and codegree of x, this function returns a block bijection corresponding to x. This block bijection has the same non-singleton classes as g := AsBipartition(x, n) and one additional class which is the union the singleton classes of g.

If the optional second argument n is not present, then the maximum of the degree and codegree of x plus 1 is used by default. If the second argument n is not greater than this maximum, then an error is given.

This is the value at x of the embedding of the symmetric inverse monoid into the dual symmetric inverse monoid given in the FitzGerald-Leech Theorem [FL98].

When the argument x is a partial perm bipartition (see IsPartialPermBipartition (3.5-15)) then this operation returns AsBlockBijection(AsPartialPerm(x)[, n]).

gap> x := PartialPerm([1, 2, 3, 6, 7, 10], [9, 5, 6, 1, 7, 8]);
[2,5][3,6,1,9][10,8](7)
gap> AsBipartition(x, 11);
<bipartition: [ 1, -9 ], [ 2, -5 ], [ 3, -6 ], [ 4 ], [ 5 ],
[ 6, -1 ], [ 7, -7 ], [ 8 ], [ 9 ], [ 10, -8 ], [ 11 ], [ -2 ],
[ -3 ], [ -4 ], [ -10 ], [ -11 ]>
gap> AsBlockBijection(x, 10);
Error, Semigroups: AsBlockBijection (for a partial perm and pos int):
the 2nd argument must be strictly greater than the maximum of the
degree and codegree of the 1st argument,
gap> AsBlockBijection(x, 11);
<block bijection: [ 1, -9 ], [ 2, -5 ], [ 3, -6 ],
[ 4, 5, 8, 9, 11, -2, -3, -4, -10, -11 ], [ 6, -1 ], [ 7, -7 ],
[ 10, -8 ]>
gap> x := Bipartition([[1, -3], [2], [3, -2], [-1]]);;
gap> IsPartialPermBipartition(x);
true
gap> AsBlockBijection(x);
<block bijection: [ 1, -3 ], [ 2, 4, -1, -4 ], [ 3, -2 ]>

##### 3.3-3 AsTransformation
 ‣ AsTransformation( x ) ( attribute )

Returns: A transformation.

When the argument x is a bipartition, that mathematically defines a transformation, this function returns that transformation. A bipartition x defines a transformation if and only if its right blocks are the image list of a permutation of [1 .. n] where n is the degree of x.

See IsTransBipartition (3.5-12).

gap> x := Bipartition([[1, -3], [2, -2], [3, 5, 10, -7],
>                      [4, -12], [6, 7, -6], [8, -5], [9, -11],
>                      [11, 12, -10], [-1], [-4], [-8], [-9]]);;
gap> AsTransformation(x);
Transformation( [ 3, 2, 7, 12, 7, 6, 6, 5, 11, 7, 10, 10 ] )
gap> IsTransBipartition(x);
true
gap> x := Bipartition([[1, 5], [2, 4, 8, 10],
>                      [3, 6, 7, -1, -2], [9, -4, -6, -9],
>                      [-3, -5], [-7, -8], [-10]]);;
gap> AsTransformation(x);
Error, Semigroups: AsTransformation (for a bipartition):
the argument does not define a transformation,

##### 3.3-4 AsPartialPerm
 ‣ AsPartialPerm( x ) ( operation )

Returns: A partial perm.

When the argument x is a bipartition that mathematically defines a partial perm, this function returns that partial perm.

A bipartition x defines a partial perm if and only if its numbers of left and right blocks both equal its degree.

See IsPartialPermBipartition (3.5-15).

gap> x := Bipartition([[1, -4], [2, -2], [3, -10], [4, -5],
>                      [5, -9], [6], [7], [8, -6], [9, -3], [10, -8],
>                      [-1], [-7]]);;
gap> IsPartialPermBipartition(x);
true
gap> AsPartialPerm(x);
[1,4,5,9,3,10,8,6](2)
gap> x := Bipartition([[1, -2, -4], [2, 3, 4, -3], [-1]]);;
gap> IsPartialPermBipartition(x);
false
gap> AsPartialPerm(x);
Error, Semigroups: AsPartialPerm (for a bipartition):
the argument does not define a partial perm,

##### 3.3-5 AsPermutation
 ‣ AsPermutation( x ) ( attribute )

Returns: A permutation.

When the argument x is a bipartition that mathematically defines a permutation, this function returns that permutation.

A bipartition x defines a permutation if and only if its numbers of left, right, and transverse blocks all equal its degree.

See IsPermBipartition (3.5-14).

gap> x := Bipartition([[1, -6], [2, -4], [3, -2], [4, -5],
>                      [5, -3], [6, -1]]);;
gap> IsPermBipartition(x);
true
gap> AsPermutation(x);
(1,6)(2,4,5,3)
gap> AsBipartition(last) = x;
true

#### 3.4 Operators for bipartitions

f * g

returns the composition of f and g when f and g are bipartitions.

f < g

returns true if the internal representation of f is lexicographically less than the internal representation of g and false if it is not.

f = g

returns true if the bipartition f equals the bipartition g and returns false if it does not.

##### 3.4-1 PartialPermLeqBipartition
 ‣ PartialPermLeqBipartition( x, y ) ( operation )

Returns: true or false.

If x and y are partial perm bipartitions, i.e. they satisfy IsPartialPermBipartition (3.5-15), then this function returns AsPartialPerm(x) < AsPartialPerm(y).

##### 3.4-2 NaturalLeqPartialPermBipartition
 ‣ NaturalLeqPartialPermBipartition( x, y ) ( operation )

Returns: true or false.

The natural partial order $$\leq$$ on an inverse semigroup S is defined by s $$\leq$$ t if there exists an idempotent e in S such that s = et. Hence if x and y are partial perm bipartitions, then x $$\leq$$ y if and only if AsPartialPerm(x) is a restriction of AsPartialPerm(y).

NaturalLeqPartialPermBipartition returns true if AsPartialPerm(x) is a restriction of AsPartialPerm(y) and false if it is not. Note that since this is a partial order and not a total order, it is possible that x and y are incomparable with respect to the natural partial order.

##### 3.4-3 NaturalLeqBlockBijection
 ‣ NaturalLeqBlockBijection( x, y ) ( operation )

Returns: true or false.

The natural partial order $$\leq$$ on an inverse semigroup S is defined by s $$\leq$$ t if there exists an idempotent e in S such that s = et. Hence if x and y are block bijections, then x $$\leq$$ y if and only if x contains y.

NaturalLeqBlockBijection returns true if x is contained in y and false if it is not. Note that since this is a partial order and not a total order, it is possible that x and y are incomparable with respect to the natural partial order.

gap> x := Bipartition([[1, 2, -3], [3, -1, -2], [4, -4],
>                      [5, -5], [6, -6], [7, -7],
>                      [8, -8], [9, -9], [10, -10]]);;
gap> y := Bipartition([[1, -2], [2, -1], [3, -3],
>                      [4, -4], [5, -5], [6, -6], [7, -7],
>                      [8, -8], [9, -9], [10, -10]]);;
gap> z := Bipartition([Union([1 .. 10], [-10 .. -1])]);;
gap> NaturalLeqBlockBijection(x, y);
false
gap> NaturalLeqBlockBijection(y, x);
false
gap> NaturalLeqBlockBijection(z, x);
true
gap> NaturalLeqBlockBijection(z, y);
true

##### 3.4-4 PermLeftQuoBipartition
 ‣ PermLeftQuoBipartition( x, y ) ( operation )

Returns: A permutation.

If x and y are bipartitions with equal left and right blocks, then PermLeftQuoBipartition returns the permutation of the indices of the right blocks of x (and y) induced by Star(x) * y.

PermLeftQuoBipartition verifies that x and y have equal left and right blocks, and returns an error if they do not.

gap> x := Bipartition([[1, 4, 6, 7, 8, 10], [2, 5, -1, -2, -8],
>                      [3, -3, -6, -7, -9], [9, -4, -5], [-10]]);;
gap> y := Bipartition([[1, 4, 6, 7, 8, 10], [2, 5, -3, -6, -7, -9],
>                      [3, -4, -5], [9, -1, -2, -8], [-10]]);;
gap> PermLeftQuoBipartition(x, y);
(1,2,3)
gap> Star(x) * y;
<bipartition: [ 1, 2, 8, -3, -6, -7, -9 ], [ 3, 6, 7, 9, -4, -5 ],
[ 4, 5, -1, -2, -8 ], [ 10 ], [ -10 ]>

#### 3.5 Attributes for bipartitons

In this section we describe various attributes that a bipartition can possess.

##### 3.5-1 DegreeOfBipartition
 ‣ DegreeOfBipartition( x ) ( attribute )
 ‣ DegreeOfBipartitionCollection( x ) ( attribute )

Returns: A positive integer.

The degree of a bipartition is, roughly speaking, the number of points where it is defined. More precisely, if x is a bipartition defined on 2 * n points, then the degree of x is n.

The degree of a collection coll of bipartitions of equal degree is just the degree of any (and every) bipartition in coll. The degree of collection of bipartitions of unequal degrees is not defined.

gap> x := Bipartition([[1, 7, -3, -8], [2, 6],
>                      [3], [4, -7, -9], [5, 9, -2],
>                      [8, -1, -4, -6], [-5]]);;
gap> DegreeOfBipartition(x);
9
gap> S := BrauerMonoid(5);
<regular bipartition *-monoid of degree 5 with 3 generators>
gap> IsBipartitionCollection(S);
true
gap> DegreeOfBipartitionCollection(S);
5

##### 3.5-2 RankOfBipartition
 ‣ RankOfBipartition( x ) ( attribute )
 ‣ NrTransverseBlocks( x ) ( attribute )

Returns: The rank of a bipartition.

When the argument is a bipartition x, RankOfBipartition returns the number of blocks of x containing both positive and negative entries, i.e. the number of transverse blocks of x.

NrTransverseBlocks is just a synonym for RankOfBipartition.

gap> x := Bipartition([[1, 2, 6, 7, -4, -5, -7], [3, 4, 5, -1, -3],
>                      [8, -9], [9, -2], [-6], [-8]]);
<bipartition: [ 1, 2, 6, 7, -4, -5, -7 ], [ 3, 4, 5, -1, -3 ],
[ 8, -9 ], [ 9, -2 ], [ -6 ], [ -8 ]>
gap> RankOfBipartition(x);
4

##### 3.5-3 ExtRepOfObj
 ‣ ExtRepOfObj( x ) ( operation )

Returns: A partition of [1 .. 2 * n].

If n is the degree of the bipartition x, then ExtRepOfObj returns the partition of [-n .. -1] union [1 .. n] corresponding to x as a sorted list of duplicate-free lists.

gap> x := Bipartition([[1, 5, -3], [2, 4, -2, -4], [3, -1, -5]]);
<block bijection: [ 1, 5, -3 ], [ 2, 4, -2, -4 ], [ 3, -1, -5 ]>
gap> ExtRepOfObj(x);
[ [ 1, 5, -3 ], [ 2, 4, -2, -4 ], [ 3, -1, -5 ] ]

##### 3.5-4 IntRepOfBipartition
 ‣ IntRepOfBipartition( x ) ( attribute )

Returns: A list of positive integers.

If x is a bipartition with degree n, then IntRepOfBipartition returns the internal representation of x: a list of length 2 * n containing positive integers which correspond to the blocks of x.

If i is in [1 .. n], then list[i] refers to the point i; if i is in [n + 1 .. 2 * n], then list[i] refers to the point n - i (a negative point). Two points lie in the same block of the bipartition if and only if their entries in the list are equal.

See also BipartitionByIntRep (3.2-2).

gap> x := Bipartition([[1, -3], [3, 4], [2, -1, -2], [-4]]);
<bipartition: [ 1, -3 ], [ 2, -1, -2 ], [ 3, 4 ], [ -4 ]>
gap> IntRepOfBipartition(x);
[ 1, 2, 3, 3, 2, 2, 1, 4 ]

##### 3.5-5 RightBlocks
 ‣ RightBlocks( x ) ( attribute )

Returns: The right blocks of a bipartition.

RightBlocks returns the right blocks of the bipartition x.

The right blocks of a bipartition x are just the intersections of the blocks of x with [-n .. -1] where n is the degree of x, the values in transverse blocks are positive, and the values in non-transverse blocks are negative.

The right blocks of a bipartition are GAP objects in their own right, and are not simply a list of blocks of x; see 3.6 for more information.

The significance of this notion lies in the fact that bipartitions x and y are $$\mathscr{L}$$-related in the partition monoid if and only if they have equal right blocks.

gap> x := Bipartition([[1, 4, 7, 8, -4], [2, 3, 5, -2, -7],
>                      [6, -1], [-3], [-5, -6, -8]]);;
gap> RightBlocks(x);
<blocks: [ 1* ], [ 2*, 7* ], [ 3 ], [ 4* ], [ 5, 6, 8 ]>
gap> LeftBlocks(x);
<blocks: [ 1*, 4*, 7*, 8* ], [ 2*, 3*, 5* ], [ 6* ]>

##### 3.5-6 LeftBlocks
 ‣ LeftBlocks( x ) ( attribute )

Returns: The left blocks of a bipartition.

LeftBlocks returns the left blocks of the bipartition x.

The left blocks of a bipartition x are just the intersections of the blocks of x with [1..n] where n is the degree of x, the values in transverse blocks are positive, and the values in non-transverse blocks are negative.

The left blocks of a bipartition are GAP objects in their own right, and are not simply a list of blocks of x; see 3.6 for more information.

The significance of this notion lies in the fact that bipartitions x and y are $$\mathscr{R}$$-related in the partition monoid if and only if they have equal left blocks.

gap> x := Bipartition([[1, 4, 7, 8, -4], [2, 3, 5, -2, -7],
>                      [6, -1], [-3], [-5, -6, -8]]);;
gap> RightBlocks(x);
<blocks: [ 1* ], [ 2*, 7* ], [ 3 ], [ 4* ], [ 5, 6, 8 ]>
gap> LeftBlocks(x);
<blocks: [ 1*, 4*, 7*, 8* ], [ 2*, 3*, 5* ], [ 6* ]>

##### 3.5-7 NrLeftBlocks
 ‣ NrLeftBlocks( x ) ( attribute )

Returns: A non-negative integer.

When the argument is a bipartition x, NrLeftBlocks returns the number of left blocks of x, i.e. the number of blocks of x intersecting [1 .. n] non-trivially.

gap> x := Bipartition([[1, 2, 3, 4, 5, 6, 8], [7, -2, -3],
>                      [-1, -4, -7, -8], [-5, -6]]);;
gap> NrLeftBlocks(x);
2
gap> LeftBlocks(x);
<blocks: [ 1, 2, 3, 4, 5, 6, 8 ], [ 7* ]>

##### 3.5-8 NrRightBlocks
 ‣ NrRightBlocks( x ) ( attribute )

Returns: A non-negative integer.

When the argument is a bipartition x, NrRightBlocks returns the number of right blocks of x, i.e. the number of blocks of x intersecting [-n .. -1] non-trivially.

gap> x := Bipartition([[1, 2, 3, 4, 6, -2, -7], [5, -1, -3, -8],
>                      [7, -4, -6], [8], [-5]]);;
gap> RightBlocks(x);
<blocks: [ 1*, 3*, 8* ], [ 2*, 7* ], [ 4*, 6* ], [ 5 ]>
gap> NrRightBlocks(x);
4

##### 3.5-9 NrBlocks
 ‣ NrBlocks( blocks ) ( attribute )
 ‣ NrBlocks( f ) ( attribute )

Returns: A positive integer.

If blocks is some blocks or f is a bipartition, then NrBlocks returns the number of blocks in blocks or f, respectively.

gap> blocks := BlocksNC([[-1, -2, -3, -4], [-5], [6]]);
<blocks: [ 1, 2, 3, 4 ], [ 5 ], [ 6* ]>
gap> NrBlocks(blocks);
3
gap> x := Bipartition([
>   [1, 5], [2, 4, -2, -4], [3, 6, -1, -5, -6], [-3]]);
<bipartition: [ 1, 5 ], [ 2, 4, -2, -4 ], [ 3, 6, -1, -5, -6 ],
[ -3 ]>
gap> NrBlocks(x);
4

##### 3.5-10 DomainOfBipartition
 ‣ DomainOfBipartition( x ) ( attribute )

Returns: A list of positive integers.

If x is a bipartition, then DomainOfBipartition returns the domain of x. The domain of x consists of those numbers i in [1 .. n] such that i is contained in a transverse block of x, where n is the degree of x (see DegreeOfBipartition (3.5-1)).

gap> x := Bipartition([[1, 2], [3, 4, 5, -5], [6, -6],
>                      [-1, -2, -3], [-4]]);
<bipartition: [ 1, 2 ], [ 3, 4, 5, -5 ], [ 6, -6 ], [ -1, -2, -3 ],
[ -4 ]>
gap> DomainOfBipartition(x);
[ 3, 4, 5, 6 ]

##### 3.5-11 CodomainOfBipartition
 ‣ CodomainOfBipartition( x ) ( attribute )

Returns: A list of positive integers.

If x is a bipartition, then CodomainOfBipartition returns the codomain of x. The codomain of x consists of those numbers i in [-n .. -1] such that i is contained in a transverse block of x, where n is the degree of x (see DegreeOfBipartition (3.5-1)).

gap> x := Bipartition([[1, 2], [3, 4, 5, -5], [6, -6],
>                      [-1, -2, -3], [-4]]);
<bipartition: [ 1, 2 ], [ 3, 4, 5, -5 ], [ 6, -6 ], [ -1, -2, -3 ],
[ -4 ]>
gap> CodomainOfBipartition(x);
[ -5, -6 ]

##### 3.5-12 IsTransBipartition
 ‣ IsTransBipartition( x ) ( property )

Returns: true or false.

If the bipartition x defines a transformation, then IsTransBipartition returns true, and if not, then false is returned.

A bipartition x defines a transformation if and only if the number of left blocks equals the number of transverse blocks and the number of right blocks equals the degree.

gap> x := Bipartition([[1, 4, -2], [2, 5, -6], [3, -7],
>                      [6, 7, -9], [8, 9, -1], [10, -5],
>                      [-3], [-4], [-8], [-10]]);;
gap> IsTransBipartition(x);
true
gap> x := Bipartition([[1, 4, -3, -6], [2, 5, -4, -5],
>                      [3, 6, -1], [-2]]);;
gap> IsTransBipartition(x);
false
gap> Number(PartitionMonoid(3), IsTransBipartition);
27

##### 3.5-13 IsDualTransBipartition
 ‣ IsDualTransBipartition( x ) ( property )

Returns: true or false.

If the star of the bipartition x defines a transformation, then IsDualTransBipartition returns true, and if not, then false is returned.

A bipartition is the dual of a transformation if and only if its number of right blocks equals its number of transverse blocks and its number of left blocks equals its degree.

gap> x := Bipartition([[1, -8, -9], [2, -1, -4], [3],
>                      [4], [5, -10], [6, -2, -5], [7, -3],
>                      [8], [9, -6, -7], [10]]);;
gap> IsDualTransBipartition(x);
true
gap> x := Bipartition([[1, 4, -3, -6], [2, 5, -4, -5],
>                      [3, 6, -1], [-2]]);;
gap> IsTransBipartition(x);
false
gap> Number(PartitionMonoid(3), IsDualTransBipartition);
27

##### 3.5-14 IsPermBipartition
 ‣ IsPermBipartition( x ) ( property )

Returns: true or false.

If the bipartition x defines a permutation, then IsPermBipartition returns true, and if not, then false is returned.

A bipartition is a permutation if its numbers of left, right, and transverse blocks all equal its degree.

gap> x := Bipartition([
>   [1, 4, -1], [2, -3], [3, 6, -5], [5, -2, -4, -6]]);;
gap> IsPermBipartition(x);
false
gap> x := Bipartition([[1, -3], [2, -4], [3, -6], [4, -1],
>                      [5, -5], [6, -2], [7, -8], [8, -7]]);;
gap> IsPermBipartition(x);
true

##### 3.5-15 IsPartialPermBipartition
 ‣ IsPartialPermBipartition( x ) ( property )

Returns: true or false.

If the bipartition x defines a partial permutation, then IsPartialPermBipartition returns true, and if not, then false is returned.

A bipartition x defines a partial permutation if and only if the numbers of left and right blocks of x equal the degree of x.

gap> x := Bipartition([
>   [1, 4, -1], [2, -3], [3, 6, -5], [5, -2, -4, -6]]);;
gap> IsPartialPermBipartition(x);
false
gap> x := Bipartition([[1, -3], [2], [-4], [3, -6], [4, -1],
>                      [5, -5], [6, -2], [7, -8], [8, -7]]);;
gap> IsPermBipartition(x);
false
gap> IsPartialPermBipartition(x);
true

##### 3.5-16 IsBlockBijection
 ‣ IsBlockBijection( x ) ( property )

Returns: true or false.

If the bipartition x induces a bijection from the quotient of [1 .. n] by the blocks of f to the quotient of [-n .. -1] by the blocks of f, then IsBlockBijection return true, and if not, then it returns false.

A bipartition is a block bijection if and only if its number of blocks, left blocks and right blocks are equal.

gap> x := Bipartition([[1, 4, 5, -2], [2, 3, -1], [6, -5, -6],
>                      [-3, -4]]);;
gap> IsBlockBijection(x);
false
gap> x := Bipartition([[1, 2, -3], [3, -1, -2], [4, -4], [5, -5]]);;
gap> IsBlockBijection(x);
true

##### 3.5-17 IsUniformBlockBijection
 ‣ IsUniformBlockBijection( x ) ( property )

Returns: true or false.

If the bipartition x is a block bijection where every block contains an equal number of positive and negative entries, then IsUniformBlockBijection returns true, and otherwise it returns false.

gap> x := Bipartition([[1, 2, -3, -4], [3, -5], [4, -6],
> [5, -7], [6, -8], [7, -9], [8, -1], [9, -2]]);;
gap> IsBlockBijection(x);
true
gap> x := Bipartition([[1, 2, -3], [3, -1, -2], [4, -4],
> [5, -5]]);;
gap> IsUniformBlockBijection(x);
false

##### 3.5-18 CanonicalBlocks
 ‣ CanonicalBlocks( blocks ) ( attribute )

Returns: Blocks of a bipartition.

If blocks is the blocks of a bipartition, then the function CanonicalBlocks returns a canonical representative of blocks.

In particular, let C(n) be a largest class such that any element of C(n) is blocks of a bipartition of degree n and such that for every pair of elements x and y of C(n) the number of signed, and similarly unsigned, blocks of any given size in both x and y are the same. Then CanonicalBlocks returns a canonical representative of a class C(n) containing blocks where n is the degree of blocks.

gap> B := BlocksNC([[-1, -3], [2, 4, 7], [5, 6]]);
<blocks: [ 1, 3 ], [ 2*, 4*, 7* ], [ 5*, 6* ]>
gap> CanonicalBlocks(B);
<blocks: [ 1*, 2* ], [ 3*, 4*, 5* ], [ 6, 7 ]>

#### 3.6 Creating blocks and their attributes

As described above the left and right blocks of a bipartition characterise Green's $$\mathscr{R}$$- and $$\mathscr{L}$$-relation of the partition monoid; see LeftBlocks (3.5-6) and RightBlocks (3.5-5). The left or right blocks of a bipartition are GAP objects in their own right.

In this section, we describe the functions in the Semigroups package for creating and manipulating the left or right blocks of a bipartition.

##### 3.6-1 IsBlocks
 ‣ IsBlocks( obj ) ( category )

Returns: true or false.

Every blocks object in GAP belongs to the category IsBlocks. Basic operations for blocks are ExtRepOfObj (3.6-3), RankOfBlocks (3.6-4), DegreeOfBlocks (3.6-5), OnRightBlocks (3.7-1), and OnLeftBlocks (3.7-2).

##### 3.6-2 BlocksNC
 ‣ BlocksNC( classes ) ( function )

Returns: A blocks.

This function makes it possible to create a GAP object corresponding to the left or right blocks of a bipartition without reference to any bipartitions.

BlocksNC returns the blocks with equivalence classes classes, which should be a list of duplicate-free lists consisting solely of positive or negative integers, where the union of the absolute values of the lists is [1 .. n] for some n. The blocks with positive entries correspond to transverse blocks and the classes with negative entries correspond to non-transverse blocks.

This method function does not check that its arguments are valid, and should be used with caution.

gap> BlocksNC([[1], [2], [-3, -6], [-4, -5]]);
<blocks: [ 1* ], [ 2* ], [ 3, 6 ], [ 4, 5 ]>

##### 3.6-3 ExtRepOfObj
 ‣ ExtRepOfObj( blocks ) ( operation )

Returns: A list of integers.

If n is the degree of a bipartition with left or right blocks blocks, then ExtRepOfObj returns the partition corresponding to blocks as a sorted list of duplicate-free lists.

gap> blocks := BlocksNC([[1, 6], [2, 3, 7], [4, 5], [-8]]);;
gap> ExtRepOfObj(blocks);
[ [ 1, 6 ], [ 2, 3, 7 ], [ 4, 5 ], [ -8 ] ]

##### 3.6-4 RankOfBlocks
 ‣ RankOfBlocks( blocks ) ( attribute )
 ‣ NrTransverseBlocks( blocks ) ( attribute )

Returns: A non-negative integer.

When the argument blocks is the left or right blocks of a bipartition, RankOfBlocks returns the number of blocks of blocks containing only positive entries, i.e. the number of transverse blocks in blocks.

NrTransverseBlocks is a synonym of RankOfBlocks in this context.

gap> blocks := BlocksNC([[-1, -2, -4, -6], [3, 10, 12], [5, 7],
>                        [8], [9], [-11]]);;
gap> RankOfBlocks(blocks);
4

##### 3.6-5 DegreeOfBlocks
 ‣ DegreeOfBlocks( blocks ) ( attribute )

Returns: A non-negative integer.

The degree of blocks is the number of points n where it is defined, i.e. the union of the blocks in blocks will be [1 .. n] after taking the absolute value of every element.

gap> blocks := BlocksNC([[-1, -11], [2], [3, 5, 6, 7], [4, 8], [9, 10],
>                        [12]]);;
gap> DegreeOfBlocks(blocks);
12

##### 3.6-6 ProjectionFromBlocks
 ‣ ProjectionFromBlocks( blocks ) ( attribute )

Returns: A bipartition.

When the argument blocks is the left or right blocks of a bipartition, this operation returns the unique bipartition whose left and right blocks are equal to blocks.

If blocks is the left blocks of a bipartition x, then this operation returns a bipartition equal to the left projection of x. The analogous statement holds when blocks is the right blocks of a bipartition.

gap> x := Bipartition([[1], [2, -2, -3], [3], [-1]]);
<bipartition: [ 1 ], [ 2, -2, -3 ], [ 3 ], [ -1 ]>
gap> ProjectionFromBlocks(LeftBlocks(x));
<bipartition: [ 1 ], [ 2, -2 ], [ 3 ], [ -1 ], [ -3 ]>
gap> LeftProjection(x);
<bipartition: [ 1 ], [ 2, -2 ], [ 3 ], [ -1 ], [ -3 ]>
gap> ProjectionFromBlocks(RightBlocks(x));
<bipartition: [ 1 ], [ 2, 3, -2, -3 ], [ -1 ]>
gap> RightProjection(x);
<bipartition: [ 1 ], [ 2, 3, -2, -3 ], [ -1 ]>

#### 3.7 Actions on blocks

Bipartitions act on left and right blocks in several ways, which are described in this section.

##### 3.7-1 OnRightBlocks
 ‣ OnRightBlocks( blocks, x ) ( operation )

Returns: The blocks of a bipartition.

OnRightBlocks returns the right blocks of the product g * x where g is any bipartition whose right blocks are equal to blocks.

gap> x := Bipartition([[1, 4, 5, 8], [2, 3, 7], [6, -3, -4, -5],
>                      [-1, -2, -6], [-7, -8]]);;
gap> y := Bipartition([[1, 5], [2, 4, 8, -2], [3, 6, 7, -3, -4],
>                      [-1, -6, -8], [-5, -7]]);;
gap> RightBlocks(y * x);
<blocks: [ 1, 2, 6 ], [ 3*, 4*, 5* ], [ 7, 8 ]>
gap> OnRightBlocks(RightBlocks(y), x);
<blocks: [ 1, 2, 6 ], [ 3*, 4*, 5* ], [ 7, 8 ]>

##### 3.7-2 OnLeftBlocks
 ‣ OnLeftBlocks( blocks, x ) ( operation )

Returns: The blocks of a bipartition.

OnLeftBlocks returns the left blocks of the product x * y where y is any bipartition whose left blocks are equal to blocks.

gap> x := Bipartition([[1, 5, 7, -1, -3, -4, -6], [2, 3, 6, 8],
>                      [4, -2, -5, -8], [-7]]);;
gap> y := Bipartition([[1, 3, -4, -5], [2, 4, 5, 8], [6, -1, -3],
>                      [7, -2, -6, -7, -8]]);;
gap> LeftBlocks(x * y);
<blocks: [ 1*, 4*, 5*, 7* ], [ 2, 3, 6, 8 ]>
gap> OnLeftBlocks(LeftBlocks(y), x);
<blocks: [ 1*, 4*, 5*, 7* ], [ 2, 3, 6, 8 ]>

#### 3.8 Semigroups of bipartitions

Semigroups and monoids of bipartitions can be created in the usual way in GAP using the functions Semigroup (Reference: Semigroup) and Monoid (Reference: Monoid); see Chapter 6 for more details.

It is possible to create inverse semigroups and monoids of bipartitions using InverseSemigroup (Reference: InverseSemigroup) and InverseMonoid (Reference: InverseMonoid) when the argument is a collection of block bijections or partial perm bipartions; see IsBlockBijection (3.5-16) and IsPartialPermBipartition (3.5-15). Note that every bipartition semigroup in Semigroups is finite.

##### 3.8-1 IsBipartitionSemigroup
 ‣ IsBipartitionSemigroup( S ) ( filter )
 ‣ IsBipartitionMonoid( S ) ( filter )

Returns: true or false.

A bipartition semigroup is simply a semigroup consisting of bipartitions. An object obj is a bipartition semigroup in GAP if it satisfies IsSemigroup (Reference: IsSemigroup) and IsBipartitionCollection (3.1-2).

A bipartition monoid is a monoid consisting of bipartitions. An object obj is a bipartition monoid in GAP if it satisfies IsMonoid (Reference: IsMonoid) and IsBipartitionCollection (3.1-2).

Note that it is possible for a bipartition semigroup to have a multiplicative neutral element (i.e. an identity element) but not to satisfy IsBipartitionMonoid. For example,

gap> x := Bipartition([
> [1, 4, -2], [2, 5, -6], [3, -7], [6, 7, -9], [8, 9, -1],
> [10, -5], [-3], [-4], [-8], [-10]]);;
gap> S := Semigroup(x, One(x));
<commutative bipartition monoid of degree 10 with 1 generator>
gap> IsMonoid(S);
true
gap> IsBipartitionMonoid(S);
true
gap> S := Semigroup([
> Bipartition([
>   [1, -3], [2, -8], [3, 8, -1], [4, -4], [5, -5], [6, -6],
>   [7, -7], [9, 10, -10], [-2], [-9]]),
> Bipartition([
>   [1, -1], [2, -2], [3, -3], [4, -4], [5, -5], [6, -6],
>   [7, -7], [8, -8], [9, 10, -10], [-9]])]);;
gap> One(S);
fail
gap> MultiplicativeNeutralElement(S);
<bipartition: [ 1, -1 ], [ 2, -2 ], [ 3, -3 ], [ 4, -4 ], [ 5, -5 ],
[ 6, -6 ], [ 7, -7 ], [ 8, -8 ], [ 9, 10, -10 ], [ -9 ]>
gap> IsMonoid(S);
false

In this example S cannot be converted into a monoid using AsMonoid (Reference: AsMonoid) since the One (Reference: One) of any element in S differs from the multiplicative neutral element.

For more details see IsMagmaWithOne (Reference: IsMagmaWithOne).

##### 3.8-2 IsBlockBijectionSemigroup
 ‣ IsBlockBijectionSemigroup( S ) ( property )
 ‣ IsBlockBijectionMonoid( S ) ( filter )

Returns: true or false.

A block bijection semigroup is simply a semigroup consisting of block bijections. A block bijection monoid is a monoid consisting of block bijections.

An object in GAP is a block bijection monoid if it satisfies IsMonoid (Reference: IsMonoid) and IsBlockBijectionSemigroup.

See IsBlockBijection (3.5-16).

##### 3.8-3 IsPartialPermBipartitionSemigroup
 ‣ IsPartialPermBipartitionSemigroup( S ) ( property )
 ‣ IsPartialPermBipartitionMonoid( S ) ( filter )

Returns: true or false.

A partial perm bipartition semigroup is simply a semigroup consisting of partial perm bipartitions. A partial perm bipartition monoid is a monoid consisting of partial perm bipartitions.

An object in GAP is a partial perm bipartition monoid if it satisfies IsMonoid (Reference: IsMonoid) and IsPartialPermBipartitionSemigroup.

See IsPartialPermBipartition (3.5-15).

##### 3.8-4 IsPermBipartitionGroup
 ‣ IsPermBipartitionGroup( S ) ( property )

Returns: true or false.

A perm bipartition group is simply a semigroup consisting of perm bipartitions.

See IsPermBipartition (3.5-14).

##### 3.8-5 DegreeOfBipartitionSemigroup
 ‣ DegreeOfBipartitionSemigroup( S ) ( attribute )

Returns: A non-negative integer.

The degree of a bipartition semigroup S is just the degree of any (and every) element of S.

gap> DegreeOfBipartitionSemigroup(JonesMonoid(8));
8
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Bib Ind

generated by GAPDoc2HTML


text:
Hide

# Problem JJust Enough Water

As you may remember, in The $2\, 016$ ICPC Nha Trang Regional Contest, the problem Reservoir, we have built a reservoir near the Red River. The reservoir can be viewed as a rectangular box with unit-length width. Its length can be divided into $n$ sections of unit-length, the $i$-th section having height of $h_ i$ units. We assume that the left and right of the reservoir has height of $0$, i.e. $h_0 = h_{n+1} = 0$.

After the rain, some of the sections of the reservoir are filled with water. Naturally, water flows from higher places to lower places, so water flows to both the left and the right of the reservoir.

An example of the cross section of the reservoir along its length and height dimensions is shown in the following illustration:

In the above picture:

• $n = 9, h = [1, 4, 1, 2, 2, 4, 1, 2, 1]$.

• The reservoir is filled with $8$ units of water.

It was found that the reservoir does not hold enough water, thus we have decided to raise the height of some sections. It costs $1$ dollar to raise the height of one section by $1$ unit. We have a total budget of $k$ dollars.

What is the maximum number of units of water the reservoir can hold?

## Input

• The first line contains two integers $n$ and $k$ $(1 \le n, k \le 12)$.

• The second line contains exactly $n$ integers $h_1, h_2, \ldots , h_ n$ $(1 \leq h_ n \leq 10^9)$, representing the height of $n$ sections.

## Output

Print a single integer — the maximum amount of water the reservoir can hold.

## Explanation of the first sample

Initially, the reservoir looks like the above-mentioned figure. The figure below demonstrates an optimal way to maximize the amount of water that the reservoir can hold. Yellow cells show how we raise sections’ height. Green cells show extra water that the reservoir can hold.

Sample Input 1 Sample Output 1
9 2
1 4 1 2 2 4 1 2 1

11

CPU Time limit 1 second
Memory limit 1024 MB

format: plain


text:
# Anyons in an exactly solved model and beyond

Authors
Type
Published Article
Publication Date
Dec 31, 2007
Submission Date
Jun 17, 2005
Identifiers
DOI: 10.1016/j.aop.2005.10.005
Source
arXiv
License
Unknown
External links

## Abstract

A spin 1/2 system on a honeycomb lattice is studied. The interactions between nearest neighbors are of XX, YY or ZZ type, depending on the direction of the link; different types of interactions may differ in strength. The model is solved exactly by a reduction to free fermions in a static $\mathbb{Z}_{2}$ gauge field. A phase diagram in the parameter space is obtained. One of the phases has an energy gap and carries excitations that are Abelian anyons. The other phase is gapless, but acquires a gap in the presence of magnetic field. In the latter case excitations are non-Abelian anyons whose braiding rules coincide with those of conformal blocks for the Ising model. We also consider a general theory of free fermions with a gapped spectrum, which is characterized by a spectral Chern number $\nu$. The Abelian and non-Abelian phases of the original model correspond to $\nu=0$ and $\nu=\pm 1$, respectively. The anyonic properties of excitation depend on $\nu\bmod 16$, whereas $\nu$ itself governs edge thermal transport. The paper also provides mathematical background on anyons as well as an elementary theory of Chern number for quasidiagonal matrices.

Seen <100 times


text:
# Compression of gases

Why do gases heat up when compressed? I know that the collision rate between particles increases when they are compressed. But why does increase in collision rate increase heat?

• Feb 8 '18 at 15:47

From a macroscopic perspective, the work energy theorem/1st Law of Thermodynamics with $dW = P.dV$ solves your question.


text:
×

# Nobel-winner Watson: Do antioxidants promote cancer?

Antioxidant foods and pills could heighten the risk of cancer and diabetes, argues the co-discoverer of the structure of DNA

ANTIOXIDANTS have long been touted as powerful disease-preventing agents. Billions of dollars are spent annually on antioxidant supplement pills. Untold additional sums are spent by health-conscious consumers loading up on antioxidant-rich foods like blueberries and blackberries. However, claims that these products let human beings live healthier and longer lives do not stand up to serious scrutiny.

Many, many clinical trials reveal that they lead to virtually no improvement in the functioning of our cardiovascular systems. There is less data about antioxidants and cancer but the most recent large-scale trial to see whether the antioxidant vitamin E prevents cancer was halted when not only was no benefit shown, but slightly more prostate cancer was observed in vitamin E takers.

It is easy to see how antioxidants came to be regarded as an aid to health. The oxidising molecules, or oxidants, that they neutralise in our bodies, though essential to normal biological function, are toxic in excess. They damage DNA and proteins, and so can cause cancer. But this simplistic view overlooks overlooks evidence that a more complex system is at play (Open Biology, doi.org/kpp). For example, vegetables such as Brussels sprouts and broccoli that have been linked with anti-cancer benefits may actually generate these benefits through their ability to promote pro-oxidative cellular processes rather than antioxidative ones.

The fact that antioxidant dietary supplementation might lead to more not less cancer should come as no surprise to the world's better-informed cancer therapists, who know that ionising radiation treatment kills cancer cells largely through creation of oxidants called reactive oxygen species (ROS). And though it was generally believed that major chemotherapy drugs like paclitaxel kill each cancer through different means, there now is a growing consensus that they too are highly effective generators of the powerful oxidant superoxide, the hydrogen radical and hydrogen peroxide, the three major components of ROS.

This at last explains the long-disturbing findings that when a cancer becomes resistant to one form of chemotherapy, it simultaneously becomes resistant to all the other, better chemotherapy agents, as well as to further radiation therapies.

Recent research on pancreatic cancer has demonstrated that in cells of aggressive, resource-hungry tumours, antioxidant levels are greatly elevated. These endogenous antioxidants – synthesised by the body – arise to keep ROS from triggering sensors that initiate a process called apoptosis, or programmed cell death. This raises an important possibility: if we can learn how to reduce antioxidant levels specifically in cancer cells, we may be able to successfully treat many types of late-stage cancers that are now incurable.

To understand how we might achieve this goal, we first need to understand better how the body controls antioxidant levels. In the absence of ROS, levels of cellular antioxidants are normally kept to very low levels by an enzyme called Keap 1 ubiquitin ligase. This destroys a transcription factor – a molecule that controls gene expression – called Nrf2 that is used to turn on synthesis of the major antioxidants. When, however, ROS levels rise to therapeutically effective levels, Nrf2 transcription factors somehow become liberated and direct the synthesis of some 10 different antioxidants that destroy ROS.

I suspect that once a cell is committed to moving through the cell cycle to replicate, it turns up antioxidant synthesis to protect the vulnerable single-stranded chains of replicating DNA. Though most cancer therapists have long suspected that cells undergoing division are most vulnerable to cell-killing agents, the truth may be just the opposite. The recent important observation that populations of stem cells have relatively high antioxidant levels may be due in part to their higher content of cells undergoing cell division...

http://www.newscientist.com/article/mg21729080.200-nobelwinner-watson-do-antioxidants-promote-cancer.html?full=true

Note by N K
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:

Working

- 3 years, 4 months ago


text:
# 1.7 | Transformations of Functions

Let $$c$$ be a positive real number. Vertical and horizontal shifts in the graph of $$y = f(x)$$ are represented as follows:

1. Vertical shift $$c$$ units upward:
$$h(x) = f(x) + c$$
2. Vertical shift $$c$$ units downward:
$$h(x) = f(x) – c$$
3. Horizontal shift $$c$$ units to the right:
$$h(x) = f(x-c)$$
4. Horizontal shift $$c$$ units to the left:
$$h(x) = f(x+c)$$
Reflections in the coordinate axes of the graph of $$y = f(x)$$ are represented as follows.

1. Reflection in the $$x$$-axis:
$$h(x) = -f(x)$$
2. Reflection in the $$y$$-axis:
$$h(x) = f(-x)$$
A vertical stretch of the graph $$y = f(x)$$ is represented by $$g(x) = c f(x),$$ where $$c>1$$. A vertical shrink is represented by $$g(x) = c f(x),$$ where $$0 < c < 1$$. A horizontal stretch is represented by $$g(x) = f(c x),$$ where $$0 < c < 1$$. A horizontal shrink is represented by $$g(x)= f(c x),$$ where $$c > 1.$$


text:
## CryptoDB

### Paper: Attack on an Identification Scheme Based on Gap Diffie-Hellman Problem

Authors: Zhen-Feng ZHANG Jing XU Deng-Guo FENG URL: http://eprint.iacr.org/2003/153 Search ePrint Search Google In [KK], a new identification scheme based on the Gap Diffie-Hellman problem was proposed at SCIS 2002, and it is shown that the scheme is secure against active attacks under the Gap Diffie-Hellman Intractability Assumption. Paradoxically,this identification scheme is totally breakable under passive attacks. In this paper, we show that any adversary holding only public parameters of the scheme can convince a verifier with probability 1.
##### BibTeX
@misc{eprint-2003-11867,
title={Attack on an Identification Scheme Based on Gap Diffie-Hellman Problem},
booktitle={IACR Eprint archive},
keywords={cryptographic protocols / identification scheme, Gap Diffie-Hellman, weil-pairing},
url={http://eprint.iacr.org/2003/153},
note={ zfzhang@is.iscas.ac.cn 12265 received 31 Jul 2003},
author={Zhen-Feng ZHANG and Jing XU and Deng-Guo FENG},
year=2003
}


text:
# Add bars and annotations when using pgf-umlsd

I am using pgf-umlsd to draw a messaging diagram. At the moment, it looks like this:

\documentclass{article}
\usepackage{float}
\usepackage{tikz}
\usetikzlibrary{positioning, fit, calc, shapes, arrows, arrows.new}
\usepackage[underline=false]{pgf-umlsd}
\begin{document}

\begin{figure}[H]
\centering
\begin{sequencediagram}
\newinst{c}{Client}
\newinst[6]{s}{Server}

\mess[1]{c}{A}{s}
\mess[1]{s}{B}{c}
\mess[1]{c}{A}{s}
\mess[1]{s}{B}{c}
\mess[1]{c}{...}{s}
\mess[1]{s}{...}{c}
\stepcounter{seqlevel}
\mess[1]{s}{C}{c}

\end{sequencediagram}
\caption{Client-Server messaging}
\end{figure}
\end{document}

I wonder how to do the following based on what I have:

1. Add vertical bar on the line below Server to cover the distance between an incoming arrow and an outgoing one.

2. To the right of each bar, add text annotation to describe what the server does between receiving a particular message and sending out another.

3. Add 3 vertical dots right above message C to denote that more exchanges of messages A and B occur before Server sends C.

I looked through the manual of pgf-umlsd, but didn't find any example of such drawing.

-
Your code does not compile as it is. Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Claudio Fiandrino Jan 20 at 8:36
@ClaudioFiandrino, thanks for the reminder. I have amended the code to show the complete example. –  Skyork Jan 20 at 15:21

All you need is in pgf-umlsd.sty code. Next is \mess declaration in v0.7.

% message between threads
% Example:
\newcommand{\mess}[4][0]{
\stepcounter{seqlevel}
\path
(#2)+(0,-\theseqlevel*\unitfactor-0.7*\unitfactor) node (mess from) {};
\path
(#4)+(0,-\theseqlevel*\unitfactor-0.7*\unitfactor) node (mess to) {};
\draw[->,>=angle 60] (mess from) -- (mess to) node[midway, above]
{#3};

\node (#3 from) at (mess from) {};
\node (#3 to) at (mess to) {};
}

This command draws an arrow (with a possible label (parameter #3) and certain delay (optional parameter #1)) between to threads (parameter #2 and parameter #4). Finally, and that's good for you, it declares to nodes (#3 from) at message's origin and (#3 to) at messages end.

This means that after \mess[1]{c}{A}{s} you can use nodes A from and A to to add some comments with:

\node[left=0mm of A from] {First message};
\node[right=0mm of A to] {First message received};

Be careful because if you use the same comment/label for two or more messages only the last message can be referenced with nodes. In your example, all comments must be added just after the message.

Same nodes can be used to draw a line between messages arrivals and departures.

The solution for your last problem was to place dots with the help of previous (C from) and (C to) nodes.

The complete code looks like this

\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgf-umlsd}
\begin{document}

\begin{sequencediagram}
\newinst{c}{Client}
\newinst[6]{s}{Server}

\mess[1]{c}{A}{s}
\node[left=0mm of A from] {First message};
\node[right=0mm of A to] {First message received};
\mess[1]{s}{B}{c}
\node[right=0mm of B from] {Ack to First message};
\draw[line width=3pt] (A to) -- (B from);
\mess[1]{c}{A}{s}
\node[right=0mm of A to] {Something else happens here};
\mess[1]{s}{B}{c}
\mess[1]{c}{...}{s}
\mess[1]{s}{...}{c}
\stepcounter{seqlevel}
\mess[1]{s}{C}{c}
\path(C from) -- (C to) node[midway, above=1cm]
{\vdots};

\end{sequencediagram}
\end{document}

And the result is

Update

If you want to change the font (or any other parameter) for comments added via \node, just add it in node options, i.e., \node[right=0mm of A to, font=\small\ttfamily] {Something else happens here};.

But if you need to change font options for message content you need to change \mess command declaration. In next code, I've added a fifth parameter to \mess which will be used to set node options for message content. My example shows how to do it with explicit options, but you can declare some style and use it there. As you can see, even with no changes, you need to include an empty fifth parameter in every \mess command.

\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgf-umlsd}

% Example:
\renewcommand{\mess}[5][0]{
\stepcounter{seqlevel}
\path
(#2)+(0,-\theseqlevel*\unitfactor-0.7*\unitfactor) node (mess from) {};
\path
(#4)+(0,-\theseqlevel*\unitfactor-0.7*\unitfactor) node (mess to) {};
\draw[->,>=angle 60] (mess from) -- (mess to) node[midway, above,#5]
{#3};

\node (#3 from) at (mess from) {};
\node (#3 to) at (mess to) {};
}

\begin{document}

\begin{sequencediagram}
\newinst{c}{Client}
\newinst[6]{s}{Server}

\mess[1]{c}{A}{s}{font=\Large, text=red}
\node[left=0mm of A from] {First message};
\node[right=0mm of A to] {First message received};
\mess[1]{s}{B}{c}{}
\node[right=0mm of B from] {Ack to First message};
\draw[line width=3pt] (A to) -- (B from);
\mess[1]{c}{A}{s}{font=\itshape, draw=blue}
\node[right=0mm of A to, font=\small\ttfamily] {Something else happens here};
\mess[1]{s}{B}{c}{}
\mess[1]{c}{...}{s}{}
\mess[1]{s}{...}{c}{}
\stepcounter{seqlevel}
\mess[1]{s}{C}{c}{}
\path(C from) -- (C to) node[midway, above=\unitfactor]
{\vdots};

\end{sequencediagram}
\end{document}

-
thanks a lot for the detailed explanation! A quick follow-up question: how can I configure the font size of annotation? Is this done via tikz rather than pgf-umlsd`? –  Skyork Jan 21 at 3:27


text:
# Matrix Problem

This topic is 4489 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a mesh for which I am writing a shader. The shader requires the worldMatrix of the mesh, however, my Matrix contains the camera.viewProjection. How do I obtain the worldMatrix of the Mesh without effecting the camera Matrix?

##### Share on other sites
What does the world matrix of the mesh have to do with the camera?
A world matrix transforms from the mesh's object/local space to world space, and is totally independent of the camera.

##### Share on other sites
Coder, sorry if I wrote that poorly.

In my app creating a Matrix will effect the output to the screen, my camera matrix.

All I want to know is how to obtain the world matrix of a loaded mesh, so that I can pass it to a HLSL shader?

##### Share on other sites
Does nobody have any ideas?

Surely, obtaining the worldMatrix of a mesh is a routine thing?

##### Share on other sites
Quote:
 Original post by MooMansunDoes nobody have any ideas?

A lot of people have given you quite a lot of ideas and comments on this topic already. Isn't this the second/third time you've tried this?

Quote:
 Original post by MooMansunSurely, obtaining the worldMatrix of a mesh is a routine thing?

USING the world matrix on a mesh (either via a shader of fixed-func) is very common. What you seem to be asking is almost the inverse of that. You don't typically get a world matrix FROM a mesh, instead you manipulate a mesh BY a world matrix.

hth
Jack

##### Share on other sites
What do you mean by 'obtain the world matrix of a loaded mesh'? A mesh by itself doesn't have a world matrix (other than identity) unless you supply one. In other words, you decide what the world matrix for the mesh is; it's not something you have to 'ask for'.

I don't use D3D, but my understanding is that the device stores the view and 'world' matrices separately. So perhaps you're asking how to query the device for the world matrix? That doesn't make much sense though, because presumably you're the one who set the world matrix in the first place. But maybe my lack of D3D knowledge is getting me into trouble here...

One last thought. Maybe you're moving your camera around, but leaving your mesh stationary. In that case, the mesh world matrix is the identity matrix. So you might try submitting that to the shader and seeing if it works.

##### Share on other sites
Thanks guys,

I have tried everything that everyone has suggested. Under D3D, you set the device.Transform.world to the worldMatrix and the device.Transform.View to the viewMatrix.

"You don't typically get a world matrix FROM a mesh, instead you manipulate a mesh BY a world matrix."

I do understand that the mesh is manipulated by the worldMatrix, however, how do I get the worldMatrix in the first place?

The calling of Matrix.Identity returns my cameraMatrix (viewMatrix), not the worldMatrix of the mesh.

##### Share on other sites
Quote:
 I do understand that the mesh is manipulated by the worldMatrix, however, how do I get the worldMatrix in the first place?
It may be that we're not making our points very well. What both jj and I are trying to say is that you don't get the world matrix for a mesh, you make it. You are in control! You have the power! There is no 'world matrix' but what you create...

Seriously though, I'm guessing that the D3D world matrix defaults to identity. Or maybe you have to set it explicitly - I'm not sure. In any case, unless you apply some transform or another, the mesh matrix is identity.

Of course it's also possible that we're misunderstanding your question...
Quote:
 The calling of Matrix.Identity returns my cameraMatrix (viewMatrix), not the worldMatrix of the mesh.
What do you mean? It may be that you already know this material, but perhaps some clarification is in order. An identity matrix is a matrix with all major diagonal elements set to 1, and all other elements set to 0. The 4x4 case looks like this:
[1 0 0 0][0 1 0 0][0 0 1 0][0 0 0 1]
It has the property that anything you multiply by it remains unchanged. In this sense it is the matrix equivalent of the scalar value 1. With regard to matrix transformation, it is usually used as the 'starting point' for a series of transformations, or to create the effect of no transformations at all.

##### Share on other sites
I tried to use Matrix.Identity as my worldMatrix, however, my shader then shades the mesh relative to the camera position, not the position of the mesh.

##### Share on other sites
Perhaps the problem is in the shader. I've included it here:

//--------------------------------------------------------------------------------------
// File: Directional_Light.fx
//
// A Directional Light HLSL file for the CustomUI sample.
// Implementing HWT&L.
//
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
// Global variables
//--------------------------------------------------------------------------------------
float4x4 worldMatrix; // World matrix for object
float4x4 worldViewProjection; // World * View * Projection matrix
texture sceneTexture;

//Sampler state for texture lookup
sampler g_samScene =
sampler_state
{
Texture = <sceneTexture>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
};

//Return variables for VertScene
struct VS_OUTPUT
{
float4 Pos : POSITION;
float4 Light : TEXCOORD1;
float3 Norm : TEXCOORD2;
float2 Tex : TEXCOORD0;
};

VS_OUTPUT VertScene( float4 Pos : POSITION, float2 Tex : TEXCOORD0, float3 Normal : Normal )
{
VS_OUTPUT Out = (VS_OUTPUT)0;
Out.Pos = mul( Pos, worldViewProjection );
float4 Lite = (0.20, -0.76, -0.62, 0.99); //static test output light vector
float4 Lite2 = normalize(Lite);
Out.Light = Lite2;
Out.Norm = normalize(mul(Normal, worldMatrix));
Out.Tex = Tex;

return Out;
}

float4 PixScene( float2 Tex : TEXCOORD0, float4 Light: TEXCOORD1, float3 Norm : TEXCOORD2 ) : COLOR
{
float4 tex = tex2D( g_samScene, Tex );
float4 ambient = (0.1, 0.1, 0.1, -0.2);
float4 diffuse = (0.99, 0.99, 0.99, 0.4);

return saturate(tex + ambient + diffuse * dot(Norm, Light)); // +specular;)
}

//--------------------------------------------------------------------------------------
// Techniques
//--------------------------------------------------------------------------------------
technique RenderScene
{
pass P0
{
}
}

##### Share on other sites
Hm. Wish I could help further, but I don't know that much about shaders. I will point out the following line:

Out.Pos = mul( Pos, worldViewProjection );

Which suggests to me that the shader is using the view/projection matrix in its computations. If so, that could explain why the shader effect is changing as the camera moves. It seems that if the above line accessed the identity matrix instead, the shader results would be the same regardless of camera position.

Then again, I haven't done much work with shaders, so you should probably ignore anything I have to say on that subject :)

##### Share on other sites
Are you setting the device.Transform.World and device.Transform.View matrices? These are only for the fixed function pipeline, whereas you are using the programmable pipeline (i.e. a shader). You need to explicitly calculate the world * view * projection matrix, then set the worldViewProjection matrix in the shader with SetValue().

##### Share on other sites
"Are you setting the device.Transform.World and device.Transform.View matrices? These are only for the fixed function pipeline, whereas you are using the programmable pipeline (i.e. a shader). You need to explicitly calculate the world * view * projection matrix, then set the worldViewProjection matrix in the shader with SetValue()."

No, I haven't set device.Transform.World, because I am not using fixed functions.

My problem is that I need to know how to calculate the worldMatrix for 'world * view * projection matrix'.

##### Share on other sites
Matrix Multiplication: (code from my engine)

// a * b = ostatic void MatrixMultiply(Matrix* a, Matrix* b, Matrix* o) {	o->m11 = a->m11*b->m11 + a->m12*b->m21 + a->m13*b->m31 + a->m14*b->m41;	o->m12 = a->m11*b->m12 + a->m12*b->m22 + a->m13*b->m32 + a->m14*b->m42;	o->m13 = a->m11*b->m13 + a->m12*b->m23 + a->m13*b->m33 + a->m14*b->m43;	o->m14 = a->m11*b->m14 + a->m12*b->m24 + a->m13*b->m34 + a->m14*b->m44;	o->m21 = a->m21*b->m11 + a->m22*b->m21 + a->m23*b->m31 + a->m24*b->m41;	o->m22 = a->m21*b->m12 + a->m22*b->m22 + a->m23*b->m32 + a->m24*b->m42;	o->m23 = a->m21*b->m13 + a->m22*b->m23 + a->m23*b->m33 + a->m24*b->m43;	o->m24 = a->m21*b->m14 + a->m22*b->m24 + a->m23*b->m34 + a->m24*b->m44;	o->m31 = a->m31*b->m11 + a->m32*b->m21 + a->m33*b->m31 + a->m34*b->m41;	o->m32 = a->m31*b->m12 + a->m32*b->m22 + a->m33*b->m32 + a->m34*b->m42;	o->m33 = a->m31*b->m13 + a->m32*b->m23 + a->m33*b->m33 + a->m34*b->m43;	o->m34 = a->m31*b->m14 + a->m32*b->m24 + a->m33*b->m34 + a->m34*b->m44;	o->m41 = a->m41*b->m11 + a->m42*b->m21 + a->m43*b->m31 + a->m44*b->m41;	o->m42 = a->m41*b->m12 + a->m42*b->m22 + a->m43*b->m32 + a->m44*b->m42;	o->m43 = a->m41*b->m13 + a->m42*b->m23 + a->m43*b->m33 + a->m44*b->m43;	o->m44 = a->m41*b->m14 + a->m42*b->m24 + a->m43*b->m34 + a->m44*b->m44;}

You should be able to figure it out to apply it to D3D matrices (since the mXY correspond directly to the D3D ones)

Need more explaining? Mathworld Article.

##### Share on other sites
The maths is not the problem, multiplying matrices is easy enough. If I have a mesh memory, how do I find/set the worldMatrix correctly for it?

##### Share on other sites
Tell me where in worldspace you want it rendered, and what orientation and I'll give you the matrix.

It'll cost you the life of your first born child though, should you fail to guess my name by her 8th birthday.

##### Share on other sites
"Tell me where in worldspace you want it rendered, and what orientation and I'll give you the matrix."

This is something I am not sure of. I have just loaded a mesh to act as a 'level' or 'map'. The connection between a mesh and a matrix is something I am lost on.

If I try to create a Matrix (Matrix m = ...), this affects my camera matrix (viewMatrix).

##### Share on other sites
Well, there's hardly a point to using a matrix transform if you don't need to transform anything (or if you don't know what transforms you want to apply). As a rule of thumb, if you don't know what to use it for you shouldn't be using it.

I suggest you go back and learn about how D3D handles matrices before you even think about attempting HLSL stuff.

##### Share on other sites
Its not that I need to apply a transform. I need the worldMatrix so that I can pass this value to the HLSL shader.

I have been searching, no luck.

##### Share on other sites
Since you're not applying a transform, the world matrix is defined as

[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]

(you owe me your first born)

##### Share on other sites
That is the identity matrix. This makes the shading relative to my camera position, not the position between the light and the mesh.

##### Share on other sites
So I guess that means you actually do need to apply a transform then.

##### Share on other sites
Normally the world matrix is created by using a few basic transform matrices, such as the translation matrix, rotation matrix, and the scaling matrix. The translation matrix simply moves all the vertices alike, thus translating the object from one point to another without changing its direction or form.
http://www.programmersheaven.com/2/world-view

So the translation matrix, rotation matrix, and the scaling matrix multiplied together will provide the worldMatrix.

How exactly?

##### Share on other sites
They're multiplied together:

World = Identity;
World *= Scaling;
World *= Rotation;
World *= Translation;

##### Share on other sites
Something like this:

worldFix = Matrix.Identity
worldFix *= Matrix.Translation(-center);

So, what do I use for scale that will keep the matrix the same?


text:
# For a specific wiring in a building, the full load current is 10 A. what will be the maximum permissible leakage current?

Free Practice With Testbook Mock Tests

## Options:

1. 0.008 A

2. 0.002 A

3. 0.005 A

4. 0.003 A

### Correct Answer: Option 2 (Solution Below)

This question was previously asked in

PGCIL Diploma Trainee EE Official Paper (Held on 17 Dec 2020)

## Solution:

Concept:

Full Load Current(IFL): A full load current is a maximum current that electrical equipment is designed to carry under rated conditions.

Leakage current(Ilek): A leakage current is an electric current in an unwanted conductive path under normal operating conditions.

Note: According to IE Rule 48, the maximum permissible value of leakage current should not be exceeded beyond the $$\frac{1}{{5000}}$$ times of full load current.

Insulation Resistance(IR): An insulation resistance (IR) is the total resistance between any two points separated by electrical insulation.

It is given by,

$$IR = \frac{{Supply\;Voltage}}{{{I_{lekage}}}}$$

Note: IR of a cable is also given as:

$$IR = \frac{\rho }{{2\pi l}}{\log _e}\frac{{{r_2}}}{{{r_1}\;}}$$

Where ρ is the resistivity of cable on Ωm

l is the length of cable in the metre.

r1 is the radius of core in metre

r2 is the radius of cable in metre

Calculation:

Given, IFL = 10 A

According to IE Rule 48:

$${{\rm{I}}_{{\rm{lek}}}} = \frac{{{{\rm{I}}_{{\rm{FL}}}}}}{{5000}} = \frac{{10}}{{5000}} = 0.002{\rm{\;A}}$$


text:
# What is the molarity of a solution that is made by diluting 50.00 mL of a 4.74 M solution of HCl to 250.00 mL?

May 16, 2018

$\text{0.948 M}$

#### Explanation:

Use this equation

${\text{M"_1"V"_1 = "M"_2"V}}_{2}$

$\text{M"_2 = ("M"_1"V"_1)/("V"_2) = ("4.74 M"× 50.00 cancel"mL")/(250.00 cancel"mL") = "0.948 M}$


text:
# NCERT Solutions for Class 12 Physics Chapter 3 Current Electricity

### Let us start reading the preparation article Regarding CBSE 12 Class

NCERT solutions for class 12 Physics chapter 3 Current Electricity: Current is the flow of electric charge through a given area. And we cannot see this current but we can experience it. An example is an electric shock. If we want to utilize the charge flow we must have a closed path. NCERT class 12 Physics solutions for chapter 3 Current Electricity explains you about the factors affecting the current flow, how current is flowing in a conductor, basics laws related to current electricity and circuit analysis and a few measuring devices. In this page, we also provide you with NCERT solutions for class 12 Physics chapter 3 Current Electricity in detail.

Do you know how current is produced? And how it reaches our home? There are many methods of production of current. It may be using fuel, steam, water, nuclear power etc. These methods are not there in NCERT solutions for class 12 Physics chapter 3 Current Electricity. If you are interested you can search for these. Here we present the solution of the NCERT 12 chapter 3 current electricity. The exercises in this chapter will help you to boost your knowledge.

NCERT Class 12 Chapter 3 Current Electricity deals with the following topics

3.1 Introduction
3.2 Electric Current
3.3 Electric Currents In Conductors
3.4 Ohm’s Law
3.5 Drift Of Electrons And The Origin Of Resistivity
3.5.1 Mobility
3.6 Limitations Of Ohm’s Law
3.7 Resistivity Of Various Materials
3.8 Temperature Dependence Of Resistivity
3.9 Electrical Energy, Power
3.10 Combination Of Resistors – Series And Parallel
3.11 Cells, Emf, Internal Resistance
3.12 Cells In Series And In Parallel
3.13 Kirchhoff’s Rules
3.14 Wheatstone Bridge
3.15 Meter Bridge
3.16 Potentiometer

NCERT solutions for class 12 Physics chapter 3 Current Electricity introduces two basic laws which are Ohm’s law and Kirchoff's law. Using these laws you can solve most of the problems related to the chapter.

• A simple form of Ohm’s law is

V=IR, where V is the voltage applied across the conductor, I is the current through the conductor. This law is valid under a constant condition of temperature and pressure. And all the materials do not obey Ohm’s law. Usually, conductors obey Ohm’s law.

The second law related to NCERT solutions for class 12 Physics chapter 3 Current Electricity is Kirchoff’s law. There are two laws

1. Kirchoff’s current law or junction law: the law states that current entering a junction = current leaving the junction
2. Kirchoff’s voltage law: in a closed circuit algebraic sum of voltages =0

NCERT solutions for class 12 Physics chapter 3 Current Electricity is given below in detail:

View all solved exercise questions of Chapter 3 Current Electricity here.

## NCERT Solutions for Class 12 Physics- Chapter wise

 Chapter 1 Electric Charges and Fields Chapter 2 Electrostatic Potential and Capacitance Chapter 4 Moving charges and magnetism Chapter 5 Magnetism and Matter Chapter 6 Electromagnetic Induction Chapter 7 Alternating Current Chapter 8 Electromagnetic Waves Chapter 9 Ray Optics and Optical Instruments Chapter 10 Wave Optics Chapter 11 Dual nature of radiation and matter Chapter 12 Atoms Chapter 13 Nuclei Chapter 14 Semiconductor Electronics: Materials, Devices and Simple Circuits


text:
MySQL Forums

Re: Triggers question!
Posted by: Max Molina
Date: August 25, 2016 10:06PM

I understand why its bad practice, after a lot more reading. However due to the statistical analysis software im suing, and for the sake of data reading of some of the users, we do it this way. Thanks for the tip, I'll keep it in mind since im already using a foreign key.

I have a different issue now. I-ve succefully created the following trigger>

DELIMITER \$\$
CREATE TRIGGER `aio_mtltp` AFTER INSERT ON `master_table_ltp`
FOR EACH ROW
BEGIN
INSERT INTO imhq(RECORD_ID, Tipo_de_Estudio, Año, Codigo_Interno, Iniciales_del_Px, Edad, Sexo)
VALUES (NEW.RECORD_ID, NEW.Tipo_de_Estudio, NEW.Año, NEW.Codigo_Interno, NEW.Edad, NEW.Sexo, NEW.Iniciales_del_Px);
END IF;
END;\$\$
DELIMITER ;

Andim trying to add a record to a table, like this>

INSERT INTO `master_table_ltp` (`RECORD_ID`, `Tipo_de_Estudio`, `Año`, `Codigo_Interno`, `Iniciales_del_Px`, `Sexo`, `Edad`, `Servicio_Solicitante`, `Roche_Hospital`, `Especimen`, `Macro`, `Diagnóstico`, `Validado_por`, `Subtipo_de_Linfoma_T`, `Laminillas_Obtenidas`, `Laminillas_representativas`, `Caso_revisado`, `Bloque_Obtenido`, `Punch`, `IMQH_Solicitada`, `N_de_Marcadores_Solicitados`) VALUES (NULL, 'P', '13', '4566', 'MMA', 'M', '28', 'Hospital Universitario', NULL, 'bto', 'bto', 'bto', 'bto', 'bto', 'SI', 'bto', 'NO', 'NO', 'NO', 'SI', '6')

and it gives me back the following error>

#1109 - Unknown table 'master_table_ltp' in field list

Any ideas where i went wrong?

The mysql code is created by phpMyadmin. So im kinda confused.

Subject
Views
Written By
Posted
1073
August 25, 2016 03:09PM
457
August 25, 2016 06:35PM
Re: Triggers question!
520
August 25, 2016 10:06PM
412
August 26, 2016 08:48AM
513
August 26, 2016 02:51PM
496
August 26, 2016 07:26PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.


text:
# Continuing to use the heartwork chart from Question 1: Are the variables of Animal Type and Medicine Effectiveness independent or

###### Question:

Continuing to use the heartwork chart from Question 1: Are the variables of Animal Type and Medicine Effectiveness independent or dependent? Prove Your answer mathematically for credit Edit View Insert Format Tools Table 12pt Paragraph 4 4~ 2v T?~ | 0~ @~ D~ | ? | !

#### Similar Solved Questions

##### Use the Venn diagram to determine the roster form of set An BncSet A nB n C in roster form is (Type whole number: Use comma t0 separate answers as needed:)
Use the Venn diagram to determine the roster form of set An Bnc Set A nB n C in roster form is (Type whole number: Use comma t0 separate answers as needed:)...
##### Which expression represents the phrase three more than f
which expression represents the phrase three more than f?a.)3-fb.)f+3c.)34+3d.)f-3...
##### You manage a plant that mass-produces engines by teams of workers using assembly machines. The technology...
You manage a plant that mass-produces engines by teams of workers using assembly machines. The technology is summarized by the production function qequals=2020KL where q is the number of engines per week, K is the number of assembly machines, and L is the number of labor teams. ...
##### What are the threats to Romeo and Juliet's happiness
What are the threats to Romeo and Juliet's happiness? and How many times does the word "night" appear in Romeo and Juliet?...
##### 4. (a) Considering the general molecular formula for Alcohols (R-OH), what can you tell about the...
4. (a) Considering the general molecular formula for Alcohols (R-OH), what can you tell about the physical properties of Alcohols? (i.e. boiling point, miscibility in water...) (b) Compare the boiling points of 1-butene, propanal and 1-propanol explaining the reasoning behind it. (10 marks)...
##### Hi,I need help with the following question:A mass spectrometer of 500 resolution, calculate the smallestmass difference the machine can resolve for molecules around 200Daltons, and around 3000 Daltons.
hi, I need help with the following question: A mass spectrometer of 500 resolution, calculate the smallest mass difference the machine can resolve for molecules around 200 Daltons, and around 3000 Daltons....
##### Wnlch of the followng would havr the lovestETa0Fechz Mgs NeArHorelnfonmnlcnccdeddeletmnireMn;NsArletitp{In Beneral what cond tians wouid bret encouare olutiluty A Lnlid Mlatealed hich kutic cnct heeaua law uur uce "irctin low atraspher< preseure, cnu tuuh anpetature organate Mcte ow Iempctatute; tugh Iottice enciry Vleoute lorumount tulonuunig colutlon Iormalian higth _ (nc soluute, high amour of opitation dur ng Ihe scaubon tormation ad @gh magnitude tchation enetey olthe Iem hich Temp
Wnlch of the followng would havr the lovest ETa 0Fechz Mgs NeAr Horelnfonmnlc nccded deletmnire Mn;Ns Arletitp{ In Beneral what cond tians wouid bret encouare olutiluty A Lnlid Mlatealed hich kutic cnct heeaua law uur uce "irctin low atraspher< preseure, cnu tuuh anpetature organate Mcte ow...
##### Which of the following is a false statement about health savings accounts (HSAs)? a.HSAs are available...
Which of the following is a false statement about health savings accounts (HSAs)? a.HSAs are available to any taxpayer using a health plan purchased through the state or federal exchange under the Affordable Care Act. b.Distributions from HSAs which are not used to pay qualifying medical expenses ar...
##### Question 14 Two different formulas of an oxygenated motor fuel are being tested to study their...
Question 14 Two different formulas of an oxygenated motor fuel are being tested to study their road octane numbers. The variance of road octane number for formula 1 is o 1.5 1L.S, and for formula 2 it is 1 o5 = 12. normality (a) Test the hypotheses Ho: μ-μ2 versus H1:HI < μ2 using &alpha...
##### Solve each system using the elimination method. If a system is inconsistent or has dependent equations, say so. $\begin{array}{l} \frac{1}{2} x+\frac{1}{3} y=\frac{49}{18} \\ \frac{1}{2} x+2 y=\frac{4}{3} \end{array}$
Solve each system using the elimination method. If a system is inconsistent or has dependent equations, say so. $\begin{array}{l} \frac{1}{2} x+\frac{1}{3} y=\frac{49}{18} \\ \frac{1}{2} x+2 y=\frac{4}{3} \end{array}$...
##### 6. a) Consider a direct mapped cache with 10 blocks of 10 words each. Suppose main...
6. a) Consider a direct mapped cache with 10 blocks of 10 words each. Suppose main memory is 1000 words. For each memory address below say what cache block it maps to, what is the offset, and what is the tag. 934, 666, 348, 522...
##### A Lamborghini Diablo hand an engine that could generate 530 horsepower. The cross-sectional area of the...
A Lamborghini Diablo hand an engine that could generate 530 horsepower. The cross-sectional area of the car is 2.2 m^2. The drag coefficient for the car is 0.26. Assume the density of the air is 1.29 kg/m^3. If the force of drag is the only force resisting the option of the car (ie. there are no oth...
##### FunctionLineFind the slope of the given Ilne- siopeDetermine the slope of any Ilne parallel to the given line siopeFlnd f()=Find the polnt on ((x) whure the tangcntDurllcitho alven ine(xY)Findequatlon of the Ilne tangent t0 the graph of f(*) und parallel t0 the alven Ilne.
Function Line Find the slope of the given Ilne- siope Determine the slope of any Ilne parallel to the given line siope Flnd f()= Find the polnt on ((x) whure the tangcnt Durllci tho alven ine (xY) Find equatlon of the Ilne tangent t0 the graph of f(*) und parallel t0 the alven Ilne....
##### 6isQuestionGiven the following acids and their Ka vaHCIOAHOAcHCNL0x10718x10-54.9x 10*103.5x 1074Which of the following sets shows the correct order of increasing conjugate base strength?CN"OAcCIO4CN"CIO4OAc "CIO4" OAcCN-CIO:OAc" CN ;
6is Question Given the following acids and their Ka va HCIOA HOAc HCN L0x107 18x10-5 4.9x 10*10 3.5x 1074 Which of the following sets shows the correct order of increasing conjugate base strength? CN" OAc CIO4 CN" CIO4 OAc " CIO4" OAc CN- CIO: OAc" CN ;...
##### Solve the following IVPv" +y = e'-'S(t _ 1)y(0) = 1, y(0) = 0.
Solve the following IVP v" +y = e'-'S(t _ 1) y(0) = 1, y(0) = 0....
##### At March 31, account balances after adjustments for Wide Screen are as follows: Accounts Cash Supplies...
At March 31, account balances after adjustments for Wide Screen are as follows: Accounts Cash Supplies Equipment Accumulated Depreciation-Equipment Accounts Payable Owner's, Capital Owner's, Drawings Ticket Revenue Service Revenue Advertising Expense Supplies Expense Depreciation Expense Ren...
##### Which one should I choose？ why？ Table 16-2 In the following duopoly game, the two firms...
which one should I choose？ why？ Table 16-2 In the following duopoly game, the two firms can either set the price of their product high or low. The game is represented in the table below. Firm B High Price High Price Firm A gets $1000 Firm B gets$1000 Firm A gets $800 Firm B gets$800 ...


text:
# Gibbs free energy can be expressed as a function of P,T and n but are enthalpy and internal energy also (partially) functions of n?

$$G=G(P,T,n)$$ $$\mathrm dG=V\,\mathrm dP-S\,\mathrm dT+\mu\,\mathrm dn=\left(\frac{\partial G}{\partial P}\right)_{T,n}\,\mathrm dP+\left(\frac{\partial G}{\partial T}\right)_{P,n}\,\mathrm dT+\left(\frac{\partial G}{\partial n}\right)_{T,P}\,\mathrm dn$$

This allows open systems to be considered (where $\mathrm dn$ does not equal zero). However, can enthalpy, internal energy and Helmholtz free energy also be treated in this way to allow for open systems?

• I'm not really sure what you are asking. Do you mean, is it as simple as adding a $(\frac {\partial X}{\partial n})dn$ term, where $X$ is the state function of interest? In that case no .. for example, Helmholz free energy is defined as the useful work that can be obtained from a closed thermodynamic system at constant T. The definition of Gibbs free energy includes the open nature of the system, and the state function has the corresponding "natural" thermodynamic variables, P,T and n. – dtmoore1971 Jan 9 '15 at 19:17
• Because that's specifically how it is defined. Also, it's not that enthalpy (and other function) don't allow for open systems to be considered .. the enthalpy is part of the Gibbs free energy, after all. It's more that open systems are not part of the natural definitions of those other state functions. You can define the exact differential of helmholz free energy for an open systems .. you just add $\sum_i\mu_idn_i$, so the definition is still in terms of chemical potential, which relates to changes in the Gibbs free energy with composition. – dtmoore1971 Jan 9 '15 at 19:36
• What I mean is that the derivation of the Gibbs free energy was specifically done to include the effects of composition changes .. this is not true of the other functions. See here for a short explanation of how the natural thermodynamic variables are obtained. Regarding the other point, I understand .. that's why my original comment said "no, you can't just do that" ... you can still account for open systems, you just can't do it that way. – dtmoore1971 Jan 9 '15 at 20:05
• Thank you. Although it does show that one can do it for internal energy. Also, searching enthalpy in wikipedia I was able to find the expression that involved the $\sum_i\mu_idn_i$ term. With all due respect, are you absolutely sure you are right? – RobChem Jan 9 '15 at 20:18
• I am not sure why you seem to find my comments inconsistent. I have said that you CAN account for the effects of open systems on thermodynamic state functions by adding $\sum_i\mu_idn_i$ to the exact differential. I have also said (although not directly) that $\mu_i=(\frac {\partial G}{\partial n_i})_{T,P}$ is always the definition of the chemical potential. I said you CANNOT add the analogous quantity $\sum_i(\frac {\partial A}{\partial n_i})_{T,V}dn_i$ to the exact differential of Helmholz free energy (for example) to allow for open systems. Yes, I am sure that is all correct. – dtmoore1971 Jan 9 '15 at 20:30

• The definition $\mu_i = \left(\frac{\partial{A}}{\partial{n_i}}\right)_{T,V,n_{j \neq i}}$ is very useful for gases in general - they are frequently described by equations of state (EoS) in (T,V,N)-coordinates (e.g. ideal gas law, SRK etc.), which makes Helmholtz free energy the most suitable thermodynamic potential. A practical example is the calculation of phase equilibria, but there are many others. – Kjetil Sonerud May 2 '15 at 14:06


text:
# Hyperbolic sine and landau notation

I have given a function $f$:

$$f = \begin{pmatrix} \sinh(x_1 x_2) \\ \cosh(x_1 x_2) \end{pmatrix}$$

We have to show that this is possible:

$$f = \begin{pmatrix} 2x_1 x_2 \\ 1 \end{pmatrix} + \mathcal O \left( \|x\|^3 \right)$$

We have used the exponential defininition of the hyperbolic function, but we always end up with terms that grow with $\sum_n \frac 1{n!}(x_1 x_2)^n$, which seem to be more than the given $\mathcal O \left( \|x\|^3 \right)$.

We are not sure how to get from $\|x\|^3$ to $x_1 x_2$. How do we attack this problem?

-
You are taking Big-O in which direction? The statement you want to show is only true as $x\to 0$, not when $\|x\|\to\infty$.
Note that strictly speaking the use of Landau notation requires specifying "as $x\to a$" for the limit $a$ in which you are evaluating. Sometimes it is clear from context what $a$ is (usually $0$ or $\infty$), but as you see from your question, it is generally much more clear if the limit $a$ is specified explicitly. –  Willie Wong May 23 '12 at 9:09
The problem does not say anything. But since we got it right with $a = 0$, I guess that is meant … –  queueoverflow May 23 '12 at 9:24


text:
An problem on bounded linear operator

Let $X$ and $Y$ be normed linear spaces and let $x(\neq 0)\in X,y(\neq 0)\in Y$. I want to show that there exists a bounded linear operator $T:X\to Y$ such that $Tx=y$.

Let for every $T\in B(X,Y)$, $Tx\neq y$. Then by Hahn-Banach theorem there exists $f\in X^*$ such that $f(Tx)\neq f(y)$. But here I am not getting any contradiction. Please suggest!

Construct a bounded linear functional $T: X\to \mathbb R$ so that $T(x) = 1$ (Consequence of Hahn Banach Theorem). Then the bounded linear operator you want is $\iota \circ T$, where $\iota :\mathbb R \to Y$ is given by $\iota(s) = sy$.


text:
# Sequence question

1. Sep 26, 2005

### happyg1

Hi,
Here's the question:
If {sn} is oscillating and not bounded, and {tn} is bounded, then {sn+tn} is oscillating and not bounded.
True or False?

I have tried for a while to find a counterexample, but I can't. I am leaning towards saying that this is true....but then I have to prove it. Am I correct in saying that it's true?
I have also started trying to prove it, but I'm having a hard time. Any clarification or advice will be appreciated.
CC

2. Sep 26, 2005

### AKG

{sn} is not bounded, and let's say that it's not bounded above in particular. Let t be inf{tn}. Then (sn + tn) > (sn + t) for all n, so if {sn + t} is not bounded above, then neither is {sn + tn}. But if {sn + t} is bounded, then there is some K such that sn + t < K for all n, so sn < K - t for all n, so {sn} is bounded above, contradiction.

3. Sep 27, 2005

### happyg1

Hi,
Thanks for the help. I was trying to prove it directly and I wound up with a bunch of nonsense. I understand the problem now, and I have worked the other 3 that were giving me headaches.
Thanks
CC

4. Sep 27, 2005

### HallsofIvy

Staff Emeritus
What, precisely, do you mean by "oscillating"? I have seen it used to mean that terms alternate sign or simply to mean that sn-1< sn but sn> sn+1.

5. Oct 6, 2005

### happyg1

Our definition of oscillating is a sequence that diverges but not to + infinity or - infinity.