355f2001-assign-03-combinatorics

355f2001-assign-03-combinatorics - MLC Lab Visit -...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
MLC Lab Visit - Combinatorics in Maple Mth 355 Fall 2001 Assignment 3. Due Oct 17. Mth 355 (a.k.a. Mth 399) Oct 10 2001 Maple 6 Bent E. Petersen Filename: 355f2001-assign-003-combinatorics.mws This worksheet contains a few comments on some of Maple’s combinatorial functions. There are also a few problems for you. The problems constitute Assignment 3. This worksheet was composed fairly quickly and is unlikely to be free of errors. If you find a serious error be sure to mention it in your solution report. > restart; > with(combinat): Warning, the protected name Chi has been redefined and unprotected Stirling Numbers of the second kind, S(r,n) S(r,n), denoted by stirling2(r,n) in Maple, is the number of partitions of a set of cardinality r into n (nonempty) subsets. Clearly we must have nr . You can think of it as the number of ways to place r distinguishable objects into n indistinguishable buckets with no bucket empty. By convention there is one partition of the empty set (the empty partition) with no subsets. > S(0,0) = stirling2(0,0); S(4,0) = stirling2(4,0); S(4,2) = stirling2(4,2); S(7,3) = stirling2(7,3); S(21,4) = stirling2(21,6); = () S, 00 1 = 40 0 = 42 7 = 7 3 301 = 21 4 26585679462804 The last two entries above show that a direct by-hand count may be difficult or infeasible. Bell Numbers The Maple function call bell(n) returns the n-th Bell number. The n-th Bell number is the number of ways that a set with n elements can be partitioned into a union of disjoint (nonempty) subsets. For example, the set {1,2,3,4} and be partioned in the following ways:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{{1},{2},{3},{4}}, {{1,2},{3},{4}}, {{2,3},{1},{4}}, {{3,4},{1}{2}}, {{1,4}.{2},{3}}, {{1,3},{2},{4}} {{1,2},{3,4}}, {{2,3},{4,1}}, {{3,4},{1,2}}, {{1,4},{2,3}}, {{1,2,3},{4}}, {{2,3,4},{1}}, {{3,4,1},{2}}, {{4,2,1},{3}}, {{1,2,3,4}}, so in 15 ways. Let’s see what Maple says > bell(4); 15 The Bell numbers grow fairly quickly with n, > ’bell(8)’ = bell(8); ’bell(10)’ = bell(10); ’bell(20)’ = bell(20); = () bell 8 4140 = bell 10 115975 = bell 20 51724158235372 Clearly a direct enumeration like the one we did above rapidly becomes impractical. From the definition it is clear that > ’bell(r)’ = Sum(’S(r,n)’,n=0. .r); = bell r = n 0 r S, rn Let’s check this relation for the case enumerated above: > sum(stirling2(4,n),n=0. .4); 15 There are a number of interpretations of Bell numbers. For example, consider the problem of putting r distinguishable objects into r indistinguishable buckets (in no particular order, since otherwise we could distinguish them). Each arrangement may be considered a partition of the set of objects. Thus the number of ways is bell(n). Number of factorizations of a square-free natural number A natural number is square-free if it has no square factors. Such a number is a product of distinct primes. In this case we can find all factorization by partitioning the set of prime factors and multiplying out the ones corresponding to subsets in the partition. Thus the number of factorizations is bell(r) where r is the number of (distinct) prime factors.
Background image of page 2
For example, 210 is the product of the primes 2, 3, 5 and 7 and so has bell(4) = 15 factorizations.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

355f2001-assign-03-combinatorics - MLC Lab Visit -...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online