|
56 | 56 |
|
57 | 57 | *) |
58 | 58 |
|
| 59 | +(* :Mathematica Version: 0.6.0 for Mathics |
| 60 | + This is Mathematica Version 0.6 adapted for Mathics. |
| 61 | +*) |
| 62 | + |
| 63 | + |
59 | 64 | BeginPackage["DiscreteMath`CombinatoricaV0.6`"] |
60 | 65 |
|
61 | 66 | Graph::usage = "Graph[g,v] is the header for a graph object where g is an adjacency matrix and v is a list of vertices." |
|
378 | 383 |
|
379 | 384 | NumberOfSpanningTrees::usage = "NumberOfSpanningTrees[g] computes the number of distinct labeled spanning trees of graph g." |
380 | 385 |
|
| 386 | +(* Not yet |
381 | 387 | NumberOfTableaux::usage = "NumberOfTableaux[p] uses the hook length formula to count the number of Young tableaux with shape defined by partition p." |
| 388 | + *) |
382 | 389 |
|
383 | 390 | OrientGraph::usage = "OrientGraph[g] assigns a direction to each edge of a bridgeless, undirected graph g, so that the graph is strongly connected." |
384 | 391 |
|
|
420 | 427 |
|
421 | 428 | RandomKSubset::usage = "RandomKSubset[l,k] returns a random subset of set l with exactly k elements." |
422 | 429 |
|
| 430 | +(* Not yet... |
423 | 431 | RandomPartition::usage = "RandomPartition[n] constructs a random partition of integer n." |
424 | 432 |
|
425 | 433 | RandomPermutation1::usage = "RandomPermutation1[n] sorts random numbers to generate a random permutation." |
426 | 434 |
|
427 | 435 | RandomPermutation2::usage = "RandomPermutation2[n] uses random transpositions to generate random permutations." |
428 | 436 |
|
| 437 | +
|
429 | 438 | RandomPermutation::usage = "RandomPermutation[n] returns a random permutation of length n." |
| 439 | + *) |
430 | 440 |
|
431 | 441 | RandomSubset::usage = "RandomSubset[l] creates a random subset of set l." |
432 | 442 |
|
|
500 | 510 |
|
501 | 511 | TableauClasses::usage = "TableauClasses[p] partitions the elements of permutation p into classes according to their initial columns during Young tableaux construction." |
502 | 512 |
|
| 513 | +(* |
503 | 514 | TableauQ::usage = "TableauQ[t] returns True if and only if t represents a Young tableau." |
| 515 | + *) |
504 | 516 |
|
505 | 517 | TableauxToPermutation::usage = "TableauxToPermutation[t1,t2] constructs the unique permutation associated with Young tableaux t1 and t2, where both tableaux have the same shape. " |
506 | 518 |
|
|
1156 | 1168 | NextComposition[l_List] := |
1157 | 1169 | Join[{Apply[Plus,l]},Table[0,{Length[l]-1}]] /; Last[l]==Apply[Plus,l] |
1158 | 1170 |
|
| 1171 | +(* Not yet |
1159 | 1172 | TableauQ[{}] = True |
1160 | 1173 | TableauQ[t_List] := |
1161 | 1174 | And [ |
|
1164 | 1177 | Apply[ GreaterEqual, Map[Length,t] ], |
1165 | 1178 | Apply[ GreaterEqual, Map[Length,TransposeTableau[t]] ] |
1166 | 1179 | ] |
| 1180 | + *) |
1167 | 1181 |
|
1168 | 1182 | TransposeTableau[tb_List] := |
1169 | 1183 | Block[{t=Select[tb,(Length[#]>=1)&],row}, |
|
1280 | 1294 | y |
1281 | 1295 | ] |
1282 | 1296 |
|
| 1297 | +(* Not yet |
1283 | 1298 | NumberOfTableaux[{}] := 1 |
1284 | 1299 | NumberOfTableaux[s_List] := |
1285 | 1300 | Block[{row,col,transpose=TransposePartition[s]}, |
|
1291 | 1306 | ] |
1292 | 1307 |
|
1293 | 1308 | NumberOfTableaux[n_Integer] := Apply[Plus, Map[NumberOfTableaux, Partitions[n]]] |
| 1309 | + *) |
1294 | 1310 |
|
1295 | 1311 | CatalanNumber[n_] := Binomial[2n,n]/(n+1) /; (n>=0) |
1296 | 1312 |
|
|
3315 | 3331 | StronglyConnectedComponents, |
3316 | 3332 | Subsets, |
3317 | 3333 | TableauClasses, |
| 3334 | +(* |
3318 | 3335 | TableauQ, |
3319 | 3336 | TableauxToPermutation, |
3320 | 3337 | Tableaux, |
| 3338 | + *) |
3321 | 3339 | ToAdjacencyLists, |
3322 | 3340 | ToCycles, |
3323 | 3341 | ToInversionVector, |
|
0 commit comments