permutation is to combine several objects from a group with respect to the order. In the permutation, the sequence considered.
{1,2,3} is not equal to {2,3,1} and {3,1,2}
This is an example program:
#include < iostream.h >
#include < conio.h >
int faktorial ( int x ) ;
void main ( )
{
int n,r, Permutasi;
cout << " Program Menghitung Permutasi(nPr)"; cout << " Masukkan Nilai n : "; cin >> n ;
cout << " Masukkan Nilai r : "; cin >> r ;
Permutasi = faktorial (n)/faktorial( n - r ) ;
cout<<" Permutasinya adalah : " << Permutasi ; getch ( ) ; } int faktorial (int n) { int fak ; if (n<=1) { fak=1 ; } else { fak = n * faktorial(n - 1) ; } return ( fak ) ; } If the sequence of note and every object that is available can be selected or used only once then the number of permutations that exist are:
where " n " is the number of objects that you can choose, " r " is the numbermust be selected and ! is the factorial symbol.
where " n " is the number of objects that you can choose, " r " is the numbermust be selected and ! is the factorial symbol.
For example, there is a vote within an organization. Candidates to choose from there is five people. Who gets the most votes will be appointed chairman of the organization. Who received the second highest votes will be appointed vice chairman. And who got the third highest votes will become secretary. How many polling results that may occur? By using the above formula then there are 5! / ( 5 - 3 )! = 60 permutations.
{1,2,3} is not equal to {2,3,1} and {3,1,2}
This is an example program:
#include < iostream.h >
#include < conio.h >
int faktorial ( int x ) ;
void main ( )
{
int n,r, Permutasi;
cout << " Program Menghitung Permutasi(nPr)"; cout << " Masukkan Nilai n : "; cin >> n ;
cout << " Masukkan Nilai r : "; cin >> r ;
Permutasi = faktorial (n)/faktorial( n - r ) ;
cout<<" Permutasinya adalah : " << Permutasi ; getch ( ) ; } int faktorial (int n) { int fak ; if (n<=1) { fak=1 ; } else { fak = n * faktorial(n - 1) ; } return ( fak ) ; } If the sequence of note and every object that is available can be selected or used only once then the number of permutations that exist are:
where " n " is the number of objects that you can choose, " r " is the numbermust be selected and ! is the factorial symbol.
where " n " is the number of objects that you can choose, " r " is the numbermust be selected and ! is the factorial symbol.
For example, there is a vote within an organization. Candidates to choose from there is five people. Who gets the most votes will be appointed chairman of the organization. Who received the second highest votes will be appointed vice chairman. And who got the third highest votes will become secretary. How many polling results that may occur? By using the above formula then there are 5! / ( 5 - 3 )! = 60 permutations.



Posting Komentar