Skip to content

Commit

Permalink
Fix Latex syntax in Docs Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
fargolo committed Oct 13, 2023
1 parent ab15ee3 commit 33fe261
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ julia>p_binary_words_doub_runl(6,200) #e.g. 100000011010... or 01111110101...

# Restricted summands problem

Solve Polya partitions with restricted summands (denumerants) problem (Flajolet & Sedgewick, p.43).
For instance, what is the number of ways of giving change of 99 cents using pennies (1 cent), nickels (5 cents), dimes (10 cents) and quarters (25 cents).
Solving Polya partitions with restricted summands (denumerants) problem (Flajolet & Sedgewick, p.43).
What is the number of ways of giving change of 99 cents using pennies (1 cent), nickels (5 cents), dimes (10 cents) and quarters (25 cents)?

That is, the number of ways to obtain 99 by summing 1s,5s,10s and 25s.

``99 = k_1 1 + k_2 5 + k_3 10 + k_4 25 ``.

The generating function is:``P(z) = SEQ(z)*SEQ(z^5)*SEQ(z^10)*SEQ(z^25)`` and the solution is the
cofficient of ``z^99`` in the expansion: ``[z^99] T(P(z))``.
The generating function is:``P(z) = SEQ(z)*SEQ(z^5)*SEQ(z^{10})*SEQ(z^{25})`` and the solution is the
cofficient of ``z^{99}`` in the expansion: ``[z^{99}] T(P(z))``.

Function `restricted_sum_part_gf(r)` returns the generating function for elements in `r` and `restricted_sum_part(k,r)` returns the coefficient in ``z^k`` for the generating function with elements in `r`.

Expand Down

0 comments on commit 33fe261

Please sign in to comment.