حساب التباديل بالطريقة النسبية

Authors

  • م.م. رافد فياض حمدي

Abstract

To extraction the Permutations by used computer there is a classical method it is recap if we have set of n elements. it's rely upon conversion the numbers from 1 to   in  denary system ( decimal base 10 ) to the system numbers on base n  namely whole orders get the subsequent integer numbers 0 ,1 , 2 , 3 , … , n – 1 and the n base number contain n orders . at each increasing of one we must compare among all numbers in orders if each number different from all other numbers we  consider this number as element of Permutations otherwise  the comparisons fruitless it's mean we must convert entire number from denary system to n base system construction on this will using IF Statements    times such that for calculation  signal of each rearrangement of Permutations we employ the same  figure of IF Statements this operation will duplicate the time that spend to program's execution .

            The program depends on method in this paper extraction the Permutations in(2%) when n  10 from the time that spends in classical program. This percentage decrease when n increase because reduce to   employ   IF Statements   it is approached (e – 1) n! time. from this figure (e – 2) n!  time fruitless of using IF Statement. This method brief by covert denary system numbers from 1 to n! – 1 to factorial system number and this idea is essential of method. first order of factorial number on base 2 , second on base 3 , until last order on base n and factorial number content  n – 1 orders . in this method didn't need to convert unmitigated number but we stopping at appearance first number greater than zero in lower position the base of this order is X in the same time X consider  site that swap begin . the process  start by change the element in location X with the element in location 1 and change element in location X – 2 with the element in location 1 so on continuance until inferior    location grater than 1 this replacement is major think of the method  . The Permutations called relative Permutations since replacement performs on anterior rearrangement not on elementary rearrangement. To account signal of present rearrangement product signal of foregoing rearrangement with -1 power figure replacement in current rearrangement. We see did not construct any comparison among elements them self.

Published

2022-09-19