Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
combstruct[gfseries] - return the series of the generating functions associated with a grammar
Calling Sequence
gfseries(spec, typ, var, tags)
Parameters
spec
-
combinatorial specification
typ
labeling type; 'labeled' or 'unlabeled'
var
variable to use in the generating functions
tags
(optional) list of lists; each list contains a variable tag followed by the Epsilon nonterminal name(s) associated with that tag
Description
The gfseries function returns a table containing the generating functions, in series form, that count the objects associated with each production in the grammar.
Each nonterminal has an associated equation which uses the nonterminal name as the name of the equation. For example, would be the generating function for .
If the objects are labeled, exponential generating functions are produced. If the objects are unlabeled, ordinary generating functions are used.
Objects can be marked (tagged) by forming the product of that object with a named Epsilon and associating a tag with that Epsilon.
If the tag is a variable name, the resulting series has an extra variable that marks the object. The same tag can be associated with more than one Epsilon name. The tag does not need to be a variable.
The gfseries function uses the series command to generate the series. Thus, the order of the result is controlled by the Order environment variable.
For information on how to write specifications, see combstruct and combstruct[specification].
Examples
An example of a labeled binary tree.
Mark the leaf nodes of an unlabeled general tree.
See Also
combstruct, combstruct[gfeqns], combstruct[gfsolve], combstruct[specification]
Download Help Document