Discussion:
Testcases for EGS of functorial composition
Ralf Hemmecke
2007-03-02 22:28:18 UTC
Permalink
Hello,

could somebody point me to some good tests case for the exponential
generating series of functorial composition of species?

I've basically finished FC. I is without isotypes and cycle index
series, but "structures" and "generatingSeries" was quite easy.

However, I don't want to commit without a test battery.

Ralf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Martin Rubey
2007-03-02 22:39:40 UTC
Permalink
Post by Ralf Hemmecke
Hello,
could somebody point me to some good tests case for the exponential
generating series of functorial composition of species?
I've basically finished FC. I is without isotypes and cycle index
series, but "structures" and "generatingSeries" was quite easy.
Hey, do you sleep sometimes, too? Or is there two Ralf Hemmecke?

(isotypes are probably as difficult as can be)
Post by Ralf Hemmecke
However, I don't want to commit without a test battery.
I think a good test would be graphs:

FC(Subsets, Combinations(2))

Subsets is implemented in iso-experiments, Combinations *nearly*: "structures"
is missing...

But the first few terms of the generating function are in BLL.

Congratulations, Ralf!


Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Ralf Hemmecke
2007-03-02 23:08:52 UTC
Permalink
Post by Martin Rubey
Hey, do you sleep sometimes, too? Or is there two Ralf Hemmecke?
Yes. Yes. (Although the second one is probably not interested in
combiatorial species.)
Post by Martin Rubey
(isotypes are probably as difficult as can be)
Sure, so we'll first do the easy stuff.
Post by Martin Rubey
Post by Ralf Hemmecke
However, I don't want to commit without a test battery.
FC(Subsets, Combinations(2))
Subsets is implemented in iso-experiments, Combinations *nearly*: "structures"
is missing...
Heh? You did this just for efficiency?

Why can't we use

Subsets = SetSpecies * SetSpecies

and

Combinations(2) = RestrictedSpecies(SetSpecies, 2) * SetSpecies

as is described in BLL?
Post by Martin Rubey
But the first few terms of the generating function are in BLL.
Ah!!! Indeed. I wanted to take that example, but I didn't have the series.

BLL says in section 1.2 (G = simple graph species)

G(x) = \sum_{n=0}^\infty {2^{\binom{n}{2}} \frac{x^n}{n!}}

Thank you.

Ralf

PS: I'll have the same question for CartesianProduct tomorrow, but then
I guess I also need a test for the cycle index series. ... ooops there
is one in BLL, but we don't have oriented cyles yet. :-(

PS2: Are you documenting your code?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Martin Rubey
2007-03-03 08:29:42 UTC
Permalink
Post by Ralf Hemmecke
Why can't we use
Subsets = SetSpecies * SetSpecies
because "Times" needs "Subsets". Does this contradict your design, that
generating series do not need to know about species? (I didn't understand this
design concept, so I might have the wording wrong)
Post by Ralf Hemmecke
and
Combinations(2) = RestrictedSpecies(SetSpecies, 2) * SetSpecies
oh, I think I missed that one. I'll give it a look.
Post by Ralf Hemmecke
PS: I'll have the same question for CartesianProduct tomorrow, but then I
guess I also need a test for the cycle index series. ... ooops there is one
in BLL, but we don't have oriented cyles yet. :-(
PS2: Are you documenting your code?
I was going to document Subsets and Combinations today. But if you think they
are unnecessary, I won't. I simply have too much work to do. What I'll
definitively do is look at the excercise for FunctorialComposition

Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Ralf Hemmecke
2007-03-03 09:29:58 UTC
Permalink
Post by Martin Rubey
Post by Ralf Hemmecke
Why can't we use
Subsets = SetSpecies * SetSpecies
because "Times" needs "Subsets".
Ah... OK this justifies Subset. (Same as Partition for Compose.)
Post by Martin Rubey
Does this contradict your design, that generating series do not need to
know about species? (I didn't understand this
design concept, so I might have the wording wrong)
The wording goes: Remove the concept of "species" and all domains and
functions related to it from AC and the rest will still compile and it
will contain *everything* that appears in src/series.as.nw and
src/gseries.as.nw. The species concept builds on the concept of
FormalPowerSeries and ...GeneratingSeries, but *not* vice versa.

I've just looked at your code... and I will immediately remove the
function export

coerce: % -> Record(subset: SetSpecies L, rest: SetSpecies L);

because Records are a pain in further use. What you actually want is

coerce: % -> SetSpecies L;

subsetAndComplement: % -> Cross(SetSpecies L, SetSpecies L)

You could also leave out the "Cross".

If I now look at the last function... a "subset" always knows about its
superset. Interesting.

I also don't know whether "subsetAndComplement" is the best name for the
function.
Post by Martin Rubey
Post by Ralf Hemmecke
PS2: Are you documenting your code?
I was going to document Subsets and Combinations today. But if you think they
are unnecessary, I won't. I simply have too much work to do.
I am for Subsets, but don't bother with Combinatitions. We can implement
this later if we really need efficiency.
Post by Martin Rubey
What I'll definitively do is look at the excercise for FunctorialComposition
I really wonder what that would help for my wish not to sum over
permuations.

Ralf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Martin Rubey
2007-03-06 08:27:50 UTC
Permalink
I've just looked at your code... and I will immediately remove the function
export
coerce: % -> Record(subset: SetSpecies L, rest: SetSpecies L);
because Records are a pain in further use.
I don't know much about Cross. It seems, that Cross doesn't exist in Axiom.
What you actually want is
coerce: % -> SetSpecies L;
subsetAndComplement: % -> Cross(SetSpecies L, SetSpecies L)
You could also leave out the "Cross".
If I now look at the last function... a "subset" always knows about its
superset. Interesting.
???
I also don't know whether "subsetAndComplement" is the best name for the
function.
Maybe coerce: % -> Partition L? That looks good to me. No, not quite: we need
it ordered, i.e., it is more like coerce: % -> Combination(k)(L). But that
introduces a dependent type, which I dislike...

Subsets and Combinations are really cousins, since a subset is simply "any
combination"...
Post by Martin Rubey
Post by Ralf Hemmecke
PS2: Are you documenting your code?
I was going to document Subsets and Combinations today. But if you think
they are unnecessary, I won't. I simply have too much work to do.
I am for Subsets, but don't bother with Combinatitions. We can implement this
later if we really need efficiency.
OK, I'll document Subset as soon as possible. I guess you still dislike the
extension to MultiSet input. So I'll leave that out, even though it was most of
the work...

Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Loading...