Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

I did use my function:

Input:

```
list : [6,6,6,6]$
expand(CombOGF(list)/6^4);
```

Output:

```
x^24/1296+x^23/324+(5*x^22)/648+(5*x^21)/324+(35*x^20)/1296+(7*x^19)/162+(7*x^18)/108+(29*x^17)/324+(149*x^16)/1296+(5*x^15)/36+(103*x^14)/648+(14*x^13)/81+(77*x^12)/432+(14*x^11)/81+
(103*x^10)/648+(5*x^9)/36+(149*x^8)/1296+(29*x^7)/324+(7*x^6)/108+(7*x^5)/162+(35*x^4)/1296+(5*x^3)/324+(5*x^2)/648+x/324+1/1296
```

And the term with exponent 20 has the coefficient of 35/1296.

*Last edited by anonimnystefy (2012-04-30 08:00:36)*

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

Now supposing 2 die had faces of 2,4,6,8,10,12 and 2 other die had faces of 1,3,5,7,9,11.

All four die are thrown once. What is the probability of them summing to 20 or more?

**In mathematics, you don't understand things. You just get used to them.Of course that result can be rigorously obtained, but who cares?Combinatorics is Algebra and Algebra is Combinatorics.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

493/648?

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

That is not correct.

**In mathematics, you don't understand things. You just get used to them.Of course that result can be rigorously obtained, but who cares?Combinatorics is Algebra and Algebra is Combinatorics.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Thought so.

Here lies the reader who will never open this book. He is forever dead.

Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

What did you have a problem with?

**In mathematics, you don't understand things. You just get used to them.Of course that result can be rigorously obtained, but who cares?Combinatorics is Algebra and Algebra is Combinatorics.**

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Altering the code to acompany the numbers on the dice.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

There is a rather succinct method to do that in mathematics. It is called

summation notation. It is perfect. It is implemented in Maxima. That is why I suggested you use

math commands to do math tasks.

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

I did use the summation un a part of my code.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

But you did not use parameters with the summation. Then the code is simple, fast and

complete.

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Iwill try today you function. But I do not like that I have to type everything agin to make a GF for more dice.Here for 100 dice,I could just make code (agin to your disliking) to make me a list of 100 omes. I just put that list into my function and I am done.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

You are misunderstanding my reasoning. It is not an arbitrary decision. It is not bobbym's

function.

1) Built in functions are faster and use less memory than procedural code.

2) Your function can not handle gf's that increment by more than one. Remember yours

did not get the right answer.

3) Supposing you were throwing 10 million die? Do you want to create a list of

10 million numbers? My function does not grow in size when the problem does

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

The first one is right.

The second one is not correct. I made a new one that uses the parameter n for the increment.

Third one is also right.

4)Is yyour function applicable to dice with more sides?

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

Of course!

About 2) Your new function is probably larger, uses more memory and is slightly slower.

In mine it easy to do things like that with no overhead increase. Bet it took you a couple of hours to

add your addition. In mine additions are part of the notation.

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Nope,just one multiplication by n.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

But I hope you can see that the one I want you to use is smaller.

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Yes,I will try your way.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

Is there something done?

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Not yet. No access to Maxima yet.

Here lies the reader who will never open this book. He is forever dead.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Hi bobbym

Check out this link:A pdf file on GFs in counting problems

It isn't very much,but does explain some crucial things.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

Hi anonimnystefy;

I disagree it is quite good.

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Who said it wasn't good. Everything that you need is in there. Maybe a few more solved harder examples and it would be even better.

Hay,I found somewhere a GF for partitions of a number but I disagree with the formula. Could you post the partition GF you think is right?

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

Depends on what you are partitioning.

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,544

Partitions of a number.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 87,247

Which numbers?

Of course that result can be rigorously obtained, but who cares?

Combinatorics is Algebra and Algebra is Combinatorics.

Offline