【算法基础】数字的基本性质

Properties of Integers

Well Ordering Principle

Every nonempty set of positive integers contains a smallest member

Division Algorithm

Let a a a and b b b be integers with b > 0 b>0 b>0. Then there exist unique integers q q q and r r r with property that a = b q + r a = bq + r a=bq+r, where 0 ≤ r < b 0 \leq r < b 0r<b.

GCD Is a Linear Combination

Definition Greatest Common Divisor, Relatively Prime Integers

The greatest common divisor of two nonzero integers a and b is the largest of all common divisions of a and b. We denote this integer by g c d ( a , b ) gcd(a, b) gcd(a,b). When g c d ( a , b ) = 1 gcd(a,b) = 1 gcd(a,b)=1, we say a a a and b b b are relatively prime.

Theory

For any nonzero integers a a a and b b b, there exist integers s s s and t t t such that g c d ( a , b ) = a s + b t gcd(a,b) = as + bt gcd(a,b)=as+bt. Moreover, g c d ( a , b ) gcd(a,b) gcd(a,b) is the smallest positive integer of the form a s + b t as + bt as+bt.

Corollary

If a a a and b b b are relatively prime, then exist integers s s s and t t t such that a s + b t = 1 as + bt = 1 as+bt=1.

Euclid’s Lemma p ∣ a b p|ab pab implies p ∣ a p|a pa or p ∣ b p|b pb

If p p p is a prime that divides a b ab ab, then p p p divides a a a or p p p divides b b b.

Fundamental Theory of Arithmetic

Every integer greater than 1 1 1 is a prime or a product of primes. This product is unique, except for the order in which the factors appear. That is, if n = p 1 p 1 ⋅ ⋅ ⋅ p r n = p_1p_1\cdot\cdot\cdot p_r n=p1p1pr and n = q 1 q 2 ⋅ ⋅ ⋅ q s n = q_1q_2\cdot\cdot\cdot q_s n=q1q2qs, where the p ′ s p's ps and the q ′ s q's qs are primes, then r = s r = s r=s and, after renumbering the q ′ s q's qs, we have p i = q i p_i = q_i pi=qi for all i i i.

  • 5
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值