离散数学数论.ppt
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《离散数学数论.ppt》由会员分享,可在线阅读,更多相关《离散数学数论.ppt(127页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、DiscreteMathCS2800Prof.BartSelmanModuleNumberTheoryRosen,Sections3-4to3-7.TheIntegersandDivisionOfcourse,youalreadyknowwhattheintegersare,andwhatdivisionisHowever:Therearesomespecificnotations,terminology,andtheoremsassociatedwiththeseconceptswhichyoumaynotknow.Theseformthebasicsofnumber theory.Vita
2、linmanyimportantalgorithmstoday(hashfunctions,cryptography,digitalsignatures;ingeneral,on-linesecurity).ThedividesoperatorNewnotation:3|12TospecifywhenanintegerevenlydividesanotherintegerReadas“3divides12”Thenot-dividesoperator:5|12TospecifywhenanintegerdoesnotevenlydivideanotherintegerReadas“5doesn
3、otdivide12”Divides,Factor,MultipleLet a,bZ with a0.Defn.:a|b“adividesb”:(c Z:b=ac)“Thereisanintegercsuchthatctimesa equalsb.”Example:312 True,but 37 False.Iffadividesb,thenwesayaisafactororadivisorofb,andbisamultipleofa.Ex.:“b is even”:2|b.Is 0 even?Is 4?ResultsonthedividesoperatorIf a|b and a|c,the
4、n a|(b+c)Example:if 5|25 and 5|30,then 5|(25+30)If a|b,then a|bc for all integers cExample:if 5|25,then 5|25*c for all ints cIf a|b and b|c,then a|cExample:if 5|25 and 25|100,then 5|100(“common facts”but good to repeat for background)DividesRelationTheorem:a,b,c Z:1.a|02.(a|b a|c)a|(b+c)3.a|ba|bc4.(
5、a|b b|c)a|cCorollary:If a,b,c are integers,such that a|b and a|c,then a|mb+nc whenever m and n are integers.Proofof(2)Show a,b,c Z:(a|b a|c)a|(b+c).Leta,b,cbeanyintegerssuchthata|banda|c,andshowthata|(b+c).Bydefn.of|,weknow s:b=as,and t:c=at.Lets,t,besuchintegers.Thenb+c=as+at=a(s+t).So,u:b+c=au,nam
6、elyu=s+t.Thusa|(b+c).QEDDividesRelationCorollary:Ifa,b,careintegers,suchthata|banda|c,thena|mb+ncwhenevermandnareintegers.Proof:Fromprevioustheorempart3(i.e.,a|ba|be)itfollowsthata|mbanda|nc;again,fromprevioustheorempart2(i.e.,(a|b a|c)a|(b+c)itfollowsthata|mb+ncTheDivision“Algorithm”Theorem:Divisio
7、nAlgorithm-Letabeanintegeranddapositiveinteger.Thenthereareuniqueintegersqandr,with0rd,suchthata=dq+r.Itsreallyatheorem,notanalgorithmOnlycalledan“algorithm”forhistoricalreasons.q is called the quotient r is called the remainder d is called the divisor a is called the dividend Whatarethequotientandr
8、emainderwhen101isdividedby11?q is called the quotient r is called the remainder d is called the divisor a is called the dividend 101=11 9+2Wewrite:q=9=101div11r=2=101mod11adqrIf a=7 and d=3,then q=2 and r=1,since 7=(2)(3)+1.If a=7 and d=3,then q=3 and r=2,since 7=(3)(3)+2.So:given positive a and(pos
9、itive)d,in order to get r we repeatedly subtract d from a,as many times as needed so that what remains,r,is less than d.Given negative a and(positive)d,in order to get r we repeatedly add d to a,as many times as needed so that what remains,r,is positive(or zero)and less than d.Theorem:Division“Algor
10、ithm”-Letabeanintegeranddapositiveinteger.Thenthereareuniqueintegersqandr,with0rd,suchthata=dq+r.Proof:Wellusethewell-orderingpropertydirectlythatstatesthateverysetofnonnegativeintegershasaleastelement.a)ExistenceWewanttoshowtheexistenceofqandr,withthepropertythata=dq+r,0rd Note:thissetisnonemptysin
11、ceqcanbeanegativeintegerwithlargeabsolutevalue.Considerthesetofnon-negativenumbersoftheforma-dq,whereqisaninteger.Hmm.Canthissetbeempty?Bythewell-orderingproperty,Shasaleastelement,r=a-dq0.(Existence,cont.)risnon-negative;also,rd.otherwiseifrd,therewouldbeasmallernonnegativeelementinS,namelya-d(q0+1
12、)0.Butthena-d(q0+1),whichissmallerthana-dq0,isanelementofS,contradictingthata-dq0wasthesmallestelementofS.So,itcannotbethecasethatrd,provingtheexistenceof0rdandq.q is called the quotient r is called the remainder d is called the divisor a is called the dividend b)UniquenessSupposeWithoutlossofgenera
13、litywemayassumethatq Q.Subtractingbothequationswehave:d(q-Q)=(R r)(*)So,ddivides(R-r);so,either|d|(R r)|or(R r)=0.SincedR-rd(because)i.e.,|R-r|0.ThisensuresthatitwouldtakeexponentialtimeinthelengthofanIDforanopponentto“fake”adifferentdocumenthavingthesameID.ASimpleHashUsingmodLet the domain and codo
14、main be the sets of all natural numbers below certain bounds:A=aN|a alim,B=bN|b blimThen an acceptable(although not great!)hash function from A to B(when alimblim)is h(a)=a mod blim.It has the following desirable hash function properties:It covers or is onto its codomain B(its range is B).When alim
15、blim,then each bB has a preimage of about the same size,Specifically,|h1(b)|=alim/blim or alim/blim.ASimpleHashUsingmodHowever,it has the following limitations:It is not very random.Why not?It is definitely not cryptographically secure.Given a b,it is easy to generate as that map to it.How?We know t
16、hat for any nN,h(b+n blim)=b.For example,if all as encountered happen to have the same residue mod blim,they will all map to the same b!(see also“spiral view”)But ok,if input data is uniformly distributed.CollisionBecause a hash function is not one-to-one(there are more possible keys than memory loc
17、ations)more than one record may be assigned to the same location we call this situation a collision.What to do when a collision happens?One possible way of solving a collision is to assign the first free location following the occupied memory location assigned by the hashing function.There are other
18、 ways for example chaining(At each spot in the hash table,keep a linked list of keys sharing this hash value,and do a sequential search to find the one we need.)DigitalSignatureApplicationMany digital signature systems use a cryptographically secure(but public)hash function h which maps arbitrarily
19、long documents down to fixed-length(e.g.,1,024-bit)“fingerprint”strings.Document signing procedure:Signature verification procedure:Given a document a and signature c,quickly find as hash b=h(a).Compute b=f 1(c).(Possible if fs inverse f 1 is made public(but not f).)Compare b to b;if they are equal
20、then the signature is valid.Note that if h were not cryptographically secure,then an opponent could easily forge a different document a that hashes to the same value b,and thereby attach someones digital signature to a different document than they actually signed,and fool the verifier!Given a docume
21、nt a to sign,quickly compute its hash b=h(a).Compute a certain function c=f(b)that is known only to the signer This step is generally slow,so we dont want to apply it to the whole document.Deliver the original document together with the digital signature c.What if h was not cryptographically secure?
22、PseudorandomnumbersPseudorandomnumbersComputers cannot generate truly random numbers thats why we call them pseudo-random numbers!LinearCongruentialMethod:Algorithm for generating pseudorandom numbers.Choose 4 integersSeed x0:starting valueModulus m:maximum possible valueMultiplier a:such that 2 a m
23、 Increment c:between 0 and mIn order to generate a sequence of pseudorandom numbers,xn|0 xn echo Hello World|rot13Uryyb Jbeyq echo Uryyb Jbeyq|rot13Hello WorldPrimesandGreatestCommonDivisorPrimenumbersApositiveintegerpisprimeiftheonlypositivefactorsofpare1andpIfthereareotherfactors,itiscompositeNote
24、that1isnotprime!ItsnotcompositeeitheritsinitsownclassAnintegerniscompositeifandonlyifthereexistsanintegerasuchthata|nand1anFundamentaltheoremofarithmeticFundamentalTheoremofArithmetic:Everypositiveintegergreaterthan1canbeuniquelywrittenasaprimeorastheproductoftwoormoreprimeswheretheprimefactorsarewr
25、itteninorderofnon-decreasingsizeExamples100=2*2*5*5182=2*7*1329820=2*2*3*5*7*71In a fundamental sense,primes are the building blocks of the natural numbers.Fundamentaltheoremofarithmetic:StrongInductionfrombeforeShow that if n is an integer greater than 1,then n can be written as the product of prim
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 离散数学 数论
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内