注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

一路

To find the final symmetry & beauty

 
 
 

日志

 
 
 
 

Reading TAOCP note 1: Basics laws on congruence and proofs (original blog)  

2011-08-22 02:45:09|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

(The following variables are all integer, as we now discuss problems in basic number theory)

If x and y has relation x mod z = y mod z, we say x is congruent to y modulo z. Denoted by expression (modulo z). There are four basic laws on congruent.

Law 1. If and ,then and (modulo m).

Law 2. If and , and if a is relatively prime to m () then (modulo m).

Law 3. If (modulo m) if and only if (modulo mn).

Law 4. If r is relative prime to s(), then (modulo rs) if and only if (modulo r) and (modulo s).

 

If you know the following reality, these four laws are very easy to give proof to.

  1. If a and b are relatively prime, then a-xb and b are relatively prime (x is an integer.
  2. If a and b are relatively prime, the lease common multiple (L.C.M.) is ab.
  3. If a is relatively prime to x and (modulo x), then b is also relatively prime to x.

 

Now I only give proof to Law 4 as an example.

Sufficient:

As (modulo rs), then a and b must have relation a = b +krs, So, (modulo r) and (modulo s).

Necessary:

As (modulo r) and (modulo s). So, a=b+mr and a=b+ns, this means a-b is common multiple of r and s, also r is relatively prime to s. So a-b is greater or equal to rs and can be written as a-b=krs, So (modulo rs).

 

Reference:

[1] The Art of Computer Programming Volume 1. Donald.E.Knuth

  评论这张
 
阅读(740)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017