Infinite fractions
\[ \text{When is }\ x \mid y \text{ ?} \ \]
x can be represent as
\[ {x} = \prod_{i=1}^n p_{i}^{k} \] \[ \text{where}\ p_{i} =\text{ is a prime factor of } {x} \text{ and } {x} \text{ has } {n} \text{ prime factors.} \] \[ \text{Example: }\ {x} = {12} = {2}^{2} \times {3} \]
We can represent the y by the same way. x divides y ( x is a divisor of y ) if and only if all prime factors of x are available in y prime factorization and each prime factor (p) power (p^a) in x factorization is less than equal to prime factor (p) power (p^b) in y factorization (a <= b).
Or we can say that when GCD(x, y) = x , x divides y.
\[ \text{When is }\ x\nmid y \text{ ?} \ \]
y = q * x + r [ where r < x ]
When reminder (r) is not equal to 0, y is not divisible by x.
Only when r is not equal to zero there are numbers after the decimal point of fraction p/q.
How to get numbers after the decimal point of a fraction ?
We recursively do it until MOD = 0.
initially MOD = y % x. [ % means modulus ]
Suppose numbers after decimal point is D.
Then, D = ( MOD * 10 ) / x. [ we are dealing only decimal numbers now ]
And, MOD = ( MOD * 10 ) % x.
So, x/y contains finite numbers of numerals after the decimal point When all the prime factors which are not available in y factorization or prime power is greater than y factorization but available in 10 factorization{2,5}.
Related problem : A. Finite or not?
Solution :
\[ {x} = \prod_{i=1}^n p_{i}^{k} \] \[ \text{where}\ p_{i} =\text{ is a prime factor of } {x} \text{ and } {x} \text{ has } {n} \text{ prime factors.} \] \[ \text{Example: }\ {x} = {12} = {2}^{2} \times {3} \]
We can represent the y by the same way. x divides y ( x is a divisor of y ) if and only if all prime factors of x are available in y prime factorization and each prime factor (p) power (p^a) in x factorization is less than equal to prime factor (p) power (p^b) in y factorization (a <= b).
Or we can say that when GCD(x, y) = x , x divides y.
\[ \text{When is }\ x\nmid y \text{ ?} \ \]
y = q * x + r [ where r < x ]
When reminder (r) is not equal to 0, y is not divisible by x.
Only when r is not equal to zero there are numbers after the decimal point of fraction p/q.
How to get numbers after the decimal point of a fraction ?
We recursively do it until MOD = 0.
initially MOD = y % x. [ % means modulus ]
Suppose numbers after decimal point is D.
Then, D = ( MOD * 10 ) / x. [ we are dealing only decimal numbers now ]
And, MOD = ( MOD * 10 ) % x.
So, x/y contains finite numbers of numerals after the decimal point When all the prime factors which are not available in y factorization or prime power is greater than y factorization but available in 10 factorization{2,5}.
Related problem : A. Finite or not?
Solution :
Comments
Post a Comment