Beruflich Dokumente
Kultur Dokumente
< <
4 4
0 and 3000 0
i.e. (2000) & (3000)
Between two opposite signs of polynomial there always exist at least one real root.
Root (x) must lies between 2000 and 3000
There
N N
f ve f ve
>
= = +
------------------------
( )
6
6
.......08120
2) 7 7 ends with 2 End digit of ...812
6 7 42 , Subtracting it from ...812 ......081
f e e
e f e
=
= = 2
and eliminating last digit . 42
----------------------
( )
5 2 6
.....0770
3) 21 7 756 7 ends with 7 End digit of ...77
7 ends with 7-6=1 d 3 756+7d 777, ......8077
Su
f e f d d
d
+ = +
= =
btracting it from ...8077 and eliminating last digit . 777
4 3 5
----------------------
.....3700
4) 28 21 f e f + ( )
6
7 28*216 21*18 7 ends with 0 End digit of ...370
7 ends with =4 c 2
cdef 2361 -------
ed f c d
c
+ = + +
=
= -------------------(1)
Now we extract most significant 2 digit i.e. ab by forward approach as below
5 4 3 2 7 7 35 6 34 5 2 6 33 7
(10 10 10 10 10 ) ( ) *10 (7 ) *10 (21 7 ) *10 ....... a b c d e f a a b a b a c e + + + + + = + + + + +
2 1 3
i.e. 194
66
7
219
7
181
0 5 6 8 ....... 8 1 2 1
7
I. Initialization
2 1 0
1 2 1 0
1 2 3
th
Number to extract n root
(Number in decimal notation)
( Arranging digits of number N
......
=
1)
= ...
m
m m
mn n mn n mn n
D D D D D D
G G G GG
N
+ + +
=
1 2
2 2 1 0
1
1 2 1 0
into 'n digit group' from right to left)
(10 10 .... 10 10 )
th
MSB (R) = Highest n power of integer th
Assume R
= ( )
... 2)
3)
m m
m m
n
m m m
a a a a a
a
m
N a a a a a
+ + + + +
=
= =
1
0
at is less than or equal to
Divisor
R ( )
n * ( )
4)
5)
n
n
m m
m
G
m
G a
a
=
=
GENERIC ALGORITHM
i)
7
194 2 a a =
7
194 194 128 66 a = =
ii)
6
6
667
7 667 1
7*2
] [ a b b b =
6
667 7 667 448 219 a b = =
iii)
5 2 6
21 7 2197 a b a c +
5 2 6
21*32*1 448 2197 448 (2197 672)
1525
[ ] 3
448
2197 21 7 1525 448*3
1525
Remainder( )=181
448
c c
c c
a b a c
+
=
+ =
=
0 < (c =3 ) < 10 value of b is correct.
21 -----------------------(2) ab =
1
7
(19477056866406726525123713030989808121) 212361 abcdef = =
( From equation (1) and (2) )
II. Iteration
1
1 1
to c
)
For
GD R *10
ND ( )
( )
( k = 1 to m )
, ,....., , ,.....,
i)
ii)
{
k
k
k
k m k
m m m m
k
k
where
D
GD a a a
a a a a a a
C
C
+ =
=
oefficient of 10
It is given as below
mn k
1 1
1 1
( ) 1 /
R = R + Divisor
ND 0 //
iii) if ( )
{
m k m k
k k
k
a a
+ +
=
<
Quotient
Remainder
R
Continue same iteration
}
iv)
m k
k
a
=
=
}
FUTURE ENHANCEMENT
In above algorithm, we
1 2 2
1 2 2 1 0
(10 10 10 .... 10 10 )
m m m n
m m m
a a a a a a
+ + + + + +
1 1
( ) , ,.....,
m m m k
k
a a a C
+
.
listed as below
1) Recursive Approach
Use binomial theorem or
1 1
1 1 1 1
denotes total contribution of ( )
ND ( )
( )
, ,.....,
, ,....., , ,.....,
i)
mn k
m m k m k
m m m m m k m k
D
GD a a a
a a a a a a
+
+ +
+
1 2 2
1 2 2 1 0
oefficient of 10 in expansion . (10 10 10 .... 10 10 )
m m m n
m m m
mn k
a a a a a a
+ + + + + +
1 1
1 1
Validation
/ Decrease Last computed Quotient by 1 ( ) 1 /
R = R + Divisor
ND 0 // iii) if ( )
m k m k
k k
a a
+ +
=
/ Go to step (i) to recompute ND
Quotient
Remainder
/
Continue same iteration
( )
( ) ( ) %
[ ]
k
k k
k
Divisor Divisor
Divisor
ND ND
ND
ND Diviso
=
= r
ENHANCEMENT
In above algorithm, we need to expand multinomial
1 2 2
1 2 2 1 0
(10 10 10 .... 10 10 )
m m m n
m m
a a a a a a
+ + + + + + to compute
( ) . Multinomial can be expanded using various approach that are
Use binomial theorem or Pascal triangle recursively to expand multinomial.
8
1 1 1 1
denotes total contribution of ( ) , ,....., , ,.....,
m m m m m k m k
a a a a a a
+ +
1 2 2
1 2 2 1 0
in expansion . (10 10 10 .... 10 10 )
m m m n
m m
a a a a a a
+ + + + + +
/ Decrease Last computed Quotient by 1 ( ) 1 /
/ Go to step (i) to recompute ND
k
to compute
ultinomial can be expanded using various approach that are
to expand multinomial.
9
2) Algorithmic Approach
Develop or use existing integer processing based faster algorithm to break given
integer power i.e. n into at most m positive integer i.e.
1 0
) ( , ,.....,
m m
p p p
such
that
0 1 2 3 1
0* 1 2 3 .... ( 1)
m m
P P P P m P mP L
+ + + + + + =
In other word , develop efficient algorithm to determine all possible tuple
0 1 2
...., ( , , , )
m
p p p p to solve
0 1 2
...
m
p p p p n + + + + =
1 2 3 1
L
2 3 .... ( 1) 0
k
m m
k
P P P m P mP L k P
+ + + + + =
After computing tuple ,
1 1
( ) , ,.....,
m m m L
L
a a a C
+
can be easily obtained by
using multinomial theorem. Organise tuple and use relation between two tuple to
avoid repetitive factorial computation.
3) Elimination and Retention Approach
Elimination and retention approach provides elegant, systematic way to expand
multinomial. This method will be explored in upcoming book Modern Approach to
Speed Math Secrets. Note that all these algorithm and method for expansion of
multinomial are also useful to compute any integer power of any number. Thus in
future one can enhance this method by developing efficient algorithm to expand
multinomial.
REFERENCES
[1] Bharati Krsna Tirthaji Maharaja, Vedic Mathematics, Motilal Banarasidas Publisher,
Delhi, 1994.
[2] Donald E. Knuth. Generating all n-tuples, 2004. Pre-fascicle 2A of The Art of Computer
Programming A draft of section 7.2.1.1.
http://www-cs-faculty.stanford.edu/knuth/fasc2a.ps.gz.
[3] Antoine Zoghbiu , Ivan Stojmenovic , Fast Algorithms for Generating Integer
Partitions , Intern. Journal of Computer Math., Vol- 70. pp. 319- 332, 1998.
[4] Zoghbi A. (1993), Algorithms of Generating Integer Partition , M . S. Thesis,
University of Ottawa.
[5] Number partition theory http://en.wikipedia.org/wiki/Partition_(number_theory)