Differences between revisions 3 and 4
Revision 3 as of 2008-05-24 13:12:42
Size: 975
Comment: Added description of Frobby
Revision 4 as of 2008-05-24 15:16:08
Size: 2787
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 7: Line 6:
== Posets and Semi-Lattices == == Posets and Semi-Lattices (Peter Jipsen and Franco Saliola) ==
Sage now includes basic support for finite posets and semi-lattices. There are several ways to define a finite poset.

A tuple of elements and cover relations:

{{{#!python
sage: Poset(([1,2,3,4,5,6,7],[[1,2],[3,4],[4,5],[2,5]]))
Finite poset containing 7 elements
}}}

Alternatively, using the ''cover_relations=False'' keyword, the relations need not be cover relations (and they will be computed).

{{{#!python
sage: elms = [1,2,3,4]
sage: rels = [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
sage: P = Poset( (elms,rels) ,cover_relations=False); P
Finite poset containing 4 elements
sage: P.cover_relations()
[[1, 2], [2, 3], [3, 4]]
}}}

A list or dictionary of upper covers:

{{{#!python
sage: Poset({'a':['b','c'], 'b':['d'], 'c':['d'], 'd':[]})
Finite poset containing 4 elements
sage: Poset([[1,2],[4],[3],[4],[]])
Finite poset containing 5 elements
}}}

An acyclic DiGraph:

{{{#!python
sage: dag = DiGraph({0:[2,3], 1:[3,4], 2:[5], 3:[5], 4:[5]})
sage: Poset(dag)
Finite poset containing 6 elements
}}}

Once a poset has been created, several methods are available:

{{{#!python
sage: dag = DiGraph({0:[2,3], 1:[3,4], 2:[5], 3:[5], 4:[5]})
sage: P = Poset(dag)

sage: P.has_bottom()
False
sage: P.has_top()
True
sage: P.top()
5

sage: P.linear_extension()
[1, 4, 0, 2, 3, 5]

sage: P.is_meet_semilattice()
False
sage: P.is_join_semilattice()
True

sage: P.mobius_function_matrix()
[ 1 -1 0 0 -1 1]
[ 0 1 0 0 0 -1]
[ 0 0 1 -1 -1 1]
[ 0 0 0 1 0 -1]
[ 0 0 0 0 1 -1]
[ 0 0 0 0 0 1]

sage: type(P(5))
<class 'sage.combinat.posets.elements.PosetElement'>
sage: P(5) < P(1)
False
sage: P(1) < P(5)
True

sage: x = P(4)
sage: [v for v in P if v <= x]
[1, 4]

sage: P.show()
}}}
Line 10: Line 89:
Frobby is software for computations with monomial ideals, and is included in Sage 3.0.2 as an optional spkg. The current functionality of the Sage interface to Frobby is irreducible decomposition of monomial ideals, while work is on-going to expose more of the capabilities of Frobby, such as Hilbert-Poincare series, primary decomposition and Alexander dual. Frobby is orders of magnitude faster than other programs for many of its computations, primarily owing to an optimized implementation of the Slice Algorithm. See [http://www.broune.com/frobby/] for more on Frobby. Frobby is software for computations with monomial ideals, and is included in Sage 3.0.2 as an optional spkg. The current functionality of the Sage interface to Frobby is irreducible decomposition of monomial ideals, while work is on-going to expose more of the capabilities of Frobby, such as Hilbert-Poincare series, primary decomposition and Alexander dual. Frobby is orders of magnitude faster than other programs for many of its computations, primarily owing to an optimized implementation of the Slice Algorithm. See http://www.broune.com/frobby/ for more on Frobby.

Sage 3.0.2 Release Tour

Sage 3.0.2 was released on May 24th, 2008. For the official, comprehensive release notes, see the HISTORY.txt file that comes with the release. For the latest changes see [http://sagemath.org/announce/sage-3.0.2.txt sage-3.0.2.txt].

linear codes (Robert Miller)

Posets and Semi-Lattices (Peter Jipsen and Franco Saliola)

Sage now includes basic support for finite posets and semi-lattices. There are several ways to define a finite poset.

A tuple of elements and cover relations:

   1 sage: Poset(([1,2,3,4,5,6,7],[[1,2],[3,4],[4,5],[2,5]]))
   2 Finite poset containing 7 elements

Alternatively, using the cover_relations=False keyword, the relations need not be cover relations (and they will be computed).

   1 sage: elms = [1,2,3,4]
   2 sage: rels = [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
   3 sage: P = Poset( (elms,rels) ,cover_relations=False); P
   4 Finite poset containing 4 elements
   5 sage: P.cover_relations()
   6 [[1, 2], [2, 3], [3, 4]]

A list or dictionary of upper covers:

   1 sage: Poset({'a':['b','c'], 'b':['d'], 'c':['d'], 'd':[]})
   2 Finite poset containing 4 elements
   3 sage: Poset([[1,2],[4],[3],[4],[]])
   4 Finite poset containing 5 elements    

An acyclic DiGraph:

   1 sage: dag = DiGraph({0:[2,3], 1:[3,4], 2:[5], 3:[5], 4:[5]})
   2 sage: Poset(dag)
   3 Finite poset containing 6 elements

Once a poset has been created, several methods are available:

   1 sage: dag = DiGraph({0:[2,3], 1:[3,4], 2:[5], 3:[5], 4:[5]})
   2 sage: P = Poset(dag)
   3 
   4 sage: P.has_bottom()
   5 False
   6 sage: P.has_top()
   7 True
   8 sage: P.top()
   9 5
  10 
  11 sage: P.linear_extension()
  12 [1, 4, 0, 2, 3, 5]
  13 
  14 sage: P.is_meet_semilattice()
  15 False
  16 sage: P.is_join_semilattice()
  17 True
  18 
  19 sage: P.mobius_function_matrix()
  20 [ 1 -1  0  0 -1  1]
  21 [ 0  1  0  0  0 -1]
  22 [ 0  0  1 -1 -1  1]
  23 [ 0  0  0  1  0 -1]
  24 [ 0  0  0  0  1 -1]
  25 [ 0  0  0  0  0  1]
  26 
  27 sage: type(P(5))
  28 <class 'sage.combinat.posets.elements.PosetElement'>
  29 sage: P(5) < P(1)
  30 False
  31 sage: P(1) < P(5)
  32 True
  33 
  34 sage: x = P(4)
  35 sage: [v for v in P if v <= x] 
  36 [1, 4]
  37 
  38 sage: P.show()

Frobby for monomial ideals (Bjarke Hammersholt Roune)

Frobby is software for computations with monomial ideals, and is included in Sage 3.0.2 as an optional spkg. The current functionality of the Sage interface to Frobby is irreducible decomposition of monomial ideals, while work is on-going to expose more of the capabilities of Frobby, such as Hilbert-Poincare series, primary decomposition and Alexander dual. Frobby is orders of magnitude faster than other programs for many of its computations, primarily owing to an optimized implementation of the Slice Algorithm. See http://www.broune.com/frobby/ for more on Frobby.

ReleaseTours/sage-3.0.2 (last edited 2009-12-26 14:43:17 by Minh Nguyen)