## when Maple meets a major holiday

by:

Ever year about this time, somewhat geeky holiday-themed content makes the rounds on the internet.  And I realized that even though I have seen much of this content already, I still enjoy seeing it again. (Why wouldn’t I want to see a Dalek Christmas tree every year?)

So in the spirit of internet recycling, here are a couple of older-but-still-fun Maple applications with a Christmas/holiday theme for your enjoyment.

Talkin’ Turkey

The Physics of Santa Claus

Other examples (old or new) are most welcome, if anyone wants to share.

eithne

## The Burnside legacy

by:

Greetings to all.

It is a new year (for some time now) and I am writing to indicate that the mathematical adventures with cycle index computations and Maple continue!

Here are the previous installments:

My purpose this time is to alert readers who might be interested to a new cycle index computation that is neither an application of the classical form of the Polya Enumeration Theorem (PET) nor of Power Group Enumeration. The former counts objects being distributed into slots with a group acting on the slots and the latter objects going into slots with a second group which permutes the objects in addition to the slots being permuted. What I am about to present treats a third possible case: when the slot permutation group and the object permutation group are one and the same and act simultaneously (not exactly the same but induced by the action of a single group).

This requires quite radical proceedings in the etymological sense of the word, which is to go back to the roots of a problem. It seems that after working with the PET sooner or later one is confronted with enumeration problems that demand the original unmitigated power of Burnside's lemma, sometimes called the lemma that is not Burnside's. This is the case with the following problem. Suppose you have an N-by-N matrix whose entries are values from 1 to N, with all assignments allowed and the symmetric group on N elements acts on the row and column indices permuting rows and columns as well as the entries simultaneously. We ask how many such matrices there are taking these double symmetries into account. This also counts the number of closed binary operations on a set of N elemnents and there is a discussion as well as the Maple code (quite simple in my opinion and no more than a few lines) that solves this problem at the following Math Stackexchange link, which uses Lovasz Formula for the cycle index of the symmetric group which some readers may remember.

In continuing the saga of Polya and Burnside exploration I have often reflected on how best to encapsulate these techniques in a Maple package. With this latest installment it would appear that a command to do Burnside enumeration probably ought to be part of such a package.

Best regards,

Marko Riedel

## Power Group Enumeration with Maple.

by:

Greetings to all.

This past year I have on occasion shared mathematical adventures with cycle index computations and Maple, e.g. at these links:

Befitting the season I am sending another post to continue this series of cycle index computations. I present two Maple implementations of Power Group Enumeration as described by Harary and Palmer in their book "Graphical Enumeration" and by Fripertinger in his paper "Enumeration in Musical Theory." It was a real joy working with Maple to implement the computational aspects of their work, i.e. the Power Group Enumeration Theorem. Moreover the resulting software is easy to read, simple and powerful and has a straightforward interface, taking advantage of many different capabilities present in Maple.

The problem I am treating is readily described. Consider a cube in 3 space and its symmetries under rotation, i.e. rigid motions. We ask in how many different ways we may color the edges of the cube with at most N colors where all colors are completely interchangable, i.e. have the symmetric group acting on them in addition to the edge permutation group of the cube. At the following Math Stackexchange Link  I have posted the Maple code to implement the algorithms / formulas of Harary / Palmer / Fripertinger to solve this problem. The reader is invited to study and test these algorithms. It seems to me an excellent instance of computational combinatorics fun.

To conclude I would like to point out that these algorithms might be candidates for a Polya Enumeration Theorem (PET) package that I have been suggesting for a future Maple release at the above posts, the algorithms being of remarkable simplicity while at the same time providing surprisingly sophisticated combinatorics and enumeration methods.

Season's greetings!

Marko Riedel

## Fascinating cycle indices with Maple.

by:

Greetings to all.

As some of you may remember I made several personal story type posts concerning my progress in solving enumeration problems with the Polya Enumeration Theorem (PET). This theorem would seem to be among the most exciting in mathematics and it is of an amazing simplicity so that I never cease to suggest to mathematics teachers to present it to gifted students even before university. My previous efforts are documented at your site, namely at this MaplePrimes link I and this MaplePrimes link II.

I have been able to do another wonderful cycle index computation using Maple recently and I would like to share the Maple code for this problem, which is posted at Math StackExchange.com (this post includes the code) This time we are trying to compute the cycle index of the automorphism group of the 3-by-3-by-3 cube under rotations and reflections. I suggest you try this problem yourself before you look at my solution. Enjoy!

I mentioned in some of my other posts concerning PET that Maple really ought to come with a library of cycle indices and the functions to manipulate them. I hope progress has been made on this issue. I had positive feedback on this at the time here at your website. Do observe that you have an opportinuity here to do very attractive mathematics if you prepare a worksheet documenting cycle index facilities that you may eventually provide. This is good publicity owing to the fact that you can include images of the many geometric objects that appear which all look quite enticing and moreover potential readers get rewarded quickly as they discover that it takes little effort to master this theorem and proceed to work with symmetries themselves and investigate them. This sort of thing also makes nice slides.

With best wishes for happy combinatorics computing,

Marko Riedel

## Beta Prime Distribution in Maple...

Hi all,

I have been trying to plot in Maple a Beta Prime Distribution using the Statistics package. I have define it through its density function and its range with the command

U := Distribution(PDF = (proc (x) options operator, arrow; x^(alpha-1)*(1+x)^(-alpha-beta)/Beta(alpha, beta) end proc), Support = 0 .. infinity)

and then assigned it to a random variable Z with the command

Z := RandomVariable(U)

Now I wanted to plot the density...

## Number Sequence

by: Maple

Fridays Killer Questions 7city Learning:

Question) The number sequence is: 2 1 3 6 5 11 18 17 which number should come after 17?

## Pirates and Gold

by: Maple

Fridays Killer Questions 7city Learning:

Question) You're the captain of a pirate ship and your crew gets to vote on how the gold is divided up. If fewer than half of the pirates agree with you, you die. How do you recommend apportioning the gold in such a way that you get a good share of the booty, but still survive?

Answer) You divide the booty evenly between the top 51% of the crew.

## Clock and Degrees

by:

Fridays Killer Questions 7city Learning:

Question) Calculate the number of degrees between the hour hand and the minute hand of a clock (non digital) that reads 3:15.

Answer) The minute hand will be horizontal and the hour hand will also almost be horizontal but it will have moved ¼ of an hour 12 hours=360 degrees, 6 hours = 180 degrees, 3 hours =90 degrees, 1 hour = 30 degrees, ¼ of an hour=7.5 degrees

## Containers and Water

by: Maple

Fridays Killer Questions 7city Learning:

Question) You have two containers, one holds five gallons, the other holds three. You can have as much water as you want. Measure exactly four gallons of water into the five gallon container.

Answer) Fill up the three-gallon container and pour it into the five-gallon container. Do it again – there will be one gallon left in the three-gallon container. Empty the five, pour in the one,...

## Water and Berries..

by: Maple

Fridays Killer Questions 7city Learning:

Question) You have 100 kg of berries. 99% of the weight of berries is water. Time passes and some amount of water evaporates, so our berries are now 98% water. What is the weight of berries now?

Answer) The unexpected, yet correct, answer is 50 kg. It seems like a tiny amount of water has evaporated so how can the weight have changed that much? There is clearly 1 kg of solid matter in the...

## Balls and Weight...

by: Maple

Fridays Killer Questions 7city Learning:

Question) There are eight balls, one of which is slightly heavier than the others. You have a two-armed scale, which you are allowed to use only twice. Find the ball that’s heavier.

Answer) Put three balls on each side of the scale. If the arms are equal, you know the heavy ball is one of the two remaining. If the arms are unequal, take the three balls on the heavier side, pick two and weigh them against each other.

## Truthtown or Liartown?

by: Maple

Fridays Killer Questions 7city Learning:

Question)
You’re trying to get to Truthtown. You come to a fork in the road. One road leads to Truthtown (where everyone tells the truth), the other to Liartown (where everyone lies). At the fork in the road is a man from one of those towns -- but which one? You get to ask him one question to discover the way. What’s the question?

## A ball and a bat

by: Maple

Daniel Kahneman - Thinking Fast and Slow

1) A bat and ball cost \$1.10.
2) The bat costs one dollar more than the ball.
3) How much does the ball cost?

x+y=1.1; x=cost of the bat, y=cost of the ball.
y=x+1; substituting for y
x+(x+1)=1.1;
2x=0.1;
x=0.05; the cost of the ball
y=1.05; the cost of the bat

The right answer is 5 cents.
The intuitive, appealing, and wrong number is, of course 10 cents.

## longitude and latitude

by: Maple

Following on from the 3D plots of the Earth globes in comments to an earlier post, here's some hacky code to grab longtitude and latitude.

(nb. This code attempts to send the IP address of your primary DNS to www.geobytes.com so don't run it if you don't want that action.)

```if kernelopts(platform)="windows" then
res:=ssystem("ipconfig /all"): res:=res[2];
StringTools:-Search("Primary Dns Suffix",res);
ans:=StringTools:-Split(res[%+36..%+70])[1];
else
ans:=ssystem("hostname -y"...```

## Finding maximum and minimum values...

I have a region x^2 + y^2 <= 1 and y>=0. It's temperature function is f(x,y) x^2 - 2y^2 + x + y. How do I find the max and min temperatures on the lower boundary y=0?

I took the derivatives with respect to x and with respect to y such that:

fx:=diff(f(x,y),x);

fy:=diff(f(x,y),x);

Then I used fsolve({fx=0, fy=0},{x,y}) which game me (-0.5, 0.25)

Is there really only one critical point on that lower bound...

 1 2 Page 1 of 2
﻿