Understanding Permutations in Fortran Programming

  • Context: Fortran 
  • Thread starter Thread starter kevek
  • Start date Start date
  • Tags Tags
    Fortran Programming
Click For Summary
SUMMARY

This discussion focuses on understanding permutations in Fortran programming, specifically using colored balls as an example to illustrate permutation composition. The user seeks guidance on implementing a subroutine to determine the order of permutations, such as composing (13) and (35) to achieve (153). The conversation highlights the reasons for using Fortran, including legacy code maintenance and performance advantages. Participants encourage sharing pseudocode or existing code to facilitate assistance.

PREREQUISITES
  • Basic understanding of Fortran programming language
  • Familiarity with permutation concepts in mathematics
  • Knowledge of cycle notation for permutations
  • Experience with subroutine implementation in Fortran
NEXT STEPS
  • Research Fortran subroutine syntax and structure
  • Learn about permutation composition and cycle notation
  • Explore optimization techniques in Fortran for performance enhancement
  • Study existing Fortran libraries that handle permutations
USEFUL FOR

This discussion is beneficial for students and developers working on projects requiring Fortran, particularly those dealing with permutations and mathematical computations.

kevek
Messages
12
Reaction score
0
Is there anyone familiar with Fortran programming, who can give me some ideas how can I strart this? Many thanks


Take 5 colored balls(1,2,3,4,5).
The "multiplication" in the group is simply performing them after one another.
Permute the first and third one. Now permute the third and fifth one (note: by third one I mean the one in the third position, not the third ball which is not in the first position).
You have just composed the permutations (13) and (35). In effect, you have moved the first one to the fifth, the fifth one to the third and the third one to the first, so in cycle notation:
(35) o (13) = (153).
(where the composition o is to be read as: "after")
Then as in any group, a power is simply composing the permutation with itself, e.g.
(13)^2 = (13) o (13) = 1
(153)^2 = (153)(153) = (135)


subroutine that determines the order of the permutation
e.g. working out the order is simply composing until you get the identity e.g. (153)^3 = (135)(153) = 1
 
Technology news on Phys.org
Sorry to ask an impertinent question!
Most people who run fortran do so mostly for one of the following reasons:
1. working with existing Fortran code or libraries
2. know fortran for the past 35 years and have no intention or need to learn a new language
3. Fortran will generate the fastest code without much tweaking, a notion not agreed by all, but there is a certain degree of truth to it.
4. Many manual optimization/tweaking techniques are possible.
5. Required by the course instructor.

Do you happen to fall into the last category? Could you share with us the reasons for not using Excel, Java, C, C++, VB, Perl, Python, Mathlab, Maxima, Scilab??
 
cuz it's a part of my project.
 
If I understand correctly, you have to do your project using Fortran, with which you are not yet familiar.

I believe you have certainly acquired some experience in programming of some kind. Would you kindly show us your proposed pseudocode, and if possible, the actual code in Fortran or any other language, so we can better see where we could offer you help, instead of doing the project from scratch for you, which we are not permitted to do in this Forum.

Note:
As a matter of notation, you have quite clearly defined (13) as the permutation of 1 and 3. Could you kindly explain the meaning of the notation (153)=(35) o (13). Where do the digits 153 come from, and how are they ordered?
Could you confirm that the number 1 (without parentheses) represents the identity operator, or does it mean something else?
Hope to hear from you soon.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 6 ·
Replies
6
Views
946
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
4K