Writing a recursive definition of the set permutation function

Click For Summary
SUMMARY

The discussion focuses on creating a recursive definition for the set permutation function, specifically for the set A = { T, T, R }. It establishes that the number of unique permutations is calculated using the formula |A|! / ( |'T' elements| ! * |'R' elements| ! ), resulting in three distinct permutations: TTR, TRT, and RTT. The user seeks to express this permutation function recursively, referencing the recursive definition of binomial coefficients as a potential model. The challenge lies in formulating a correct recursive approach for permutations with repeated elements.

PREREQUISITES
  • Understanding of factorial calculations and their properties.
  • Familiarity with recursive functions in programming.
  • Knowledge of combinatorial mathematics, specifically permutations and combinations.
  • Basic understanding of binomial coefficients and Pascal's triangle.
NEXT STEPS
  • Research recursive algorithms for generating permutations, focusing on handling duplicate elements.
  • Study the implementation of factorial functions in programming languages such as Python or Java.
  • Explore combinatorial mathematics resources to deepen understanding of permutations and their properties.
  • Examine examples of recursive definitions in mathematical contexts, particularly in combinatorics.
USEFUL FOR

Mathematicians, computer scientists, and software developers interested in algorithm design, particularly those working on combinatorial problems and recursive functions.

W3bbo
Messages
31
Reaction score
0
(Apologies for the lack of LaTeX formatting - I usually do my typesetting with MathType, but I only have Microsoft Equation Editor on this computer which doesn't have LaTeX export).

This isn't a homework question, but is problem I've discovered I'm facing after diving into another problem, but I digress:

Consider this set, A:

A = { T, T, R }

It has six proper permutations, but only three distinct permutations:

TTR, TRT, RTT

The expression for the number of unique permutations (in this case) is:

|A|! / ( |'T' elements| ! * |'R' elements| ! )

So: 3! / 2! * 1! which is 6/2 == 3

Due to certain requirements, I need to express this function recursively. Because the factorial function is used, I figured I could take it from there.

The expressions below take the permutation-count formula and assumes that every set A is comprised of N 'T' elements, and M 'R' elements and is called "routes".

KSsTC.png


...but I can't figure out how to make it recursive. Note the huge error on the third line down, it does not follow from the line above.

Is a recursive definition even possible?

Thanks!
 
Mathematics news on Phys.org
You can express a binomial coefficient recursively like this (see wikipedia article):
[tex]\begin{pmatrix} n \\ k \end{pmatrix} = \begin{pmatrix} n-1 \\ k-1 \end{pmatrix} + \begin{pmatrix} n-1 \\ k \end{pmatrix}[/tex]

You can interpret this as Pascal's triangle.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
11
Views
12K