Friday, January 28, 2011

MathCom_Number Theory-Summeries

The Integers and Division :
     a,b belong to Z {a!=0}
     a|b  ==>  b=a×k  , k is integer
     a : factor / divisor
     b : multiple        
  Ex: 77|7    False {7=77×?}
        7|77    True {77=7*10}
        0|24    Flase {24=0×?}
        24|0    True {0=24×0}
      *Theorem : All a,b,c belong to Z
        1.a != 0  ==> a|0  and a|a
        2.(a|b and a|c) ==> a|(b+c)
        3.a|b ==> a|bc
        4.(a|b and b|c) ==> a|c
        5.[a|(b+c) and a|b] ==> a|c
Prime Number {จำนวนเฉพาะ}{ចំនួនបឋម}
     Prime is p , p > 1
     Prime is the number that has only 1 & itself as divisor / factor
     Beside of Prime number are Composite number {จำนวนประกอบ}
     Prime Factorization : is making the positive integers to equal the multiply by some Prime numbers
           Ex: 100 = 2×2×5×5=2²×5²
    Alogrithm of PrimeNumber:
    --------------------------------------------------------------------------
    boolean isPrime(integer n)
         if ( n < 2 ) return false
         for ( i = 2 to n-1 )
              if ( i|n )  {if n divide by i no left remainder}
                     return false
         return true
    --------------------------------------------------------------------------
The Division
        Theorem :
               (a-r)/d = q
               a = d×q+r   and 0 <= r <= |d|
               a : dividend / ตัวตัง /​​ តំណាងចែក
               d : divisor {d != 0} / ตัวหาร​/  តួចែក
               q : quotient / ผลหาร​ / ផលចែក
               r : remainder / เศษ​​ / សំណល់
Greatest Common Divisor { gcd(x,y) } ตัวหารรวมมาก តួចែករួមធំបំផុត
         gcd(a,b) = d = max(d: d|a and d|b) <=> d|a and d|b and All e belong to Z ,(e|a and e|b) ==> d >= e
         gcd(a,b) = {min of multiply of prime numbers of a & b}
                     Ex : gcd(20,15) = ?
                           20 = 2×2×5 = 2²   × 3^0 × 5
                           15 = 3×5     = 2^0 × 3    × 5
                           gcd(20,15) = 2^0 × 3^0× 5 = 5 #

No comments:

Post a Comment