MATH2068_Number Theory and Cryptography_2013 Semester 2_math2068-2011sols
猴博士数据结构与算法

猴博士数据结构与算法
猴博士数据结构与算法是一本经典的计算机科学教材,主要介绍了数据结构和算法的基本概念、原理和应用。
该书由美国计算机科学家托马斯·H·科尔曼(Thomas H. Cormen)等人共同编写,首次出版于1990年,目前已经成为世界各大高校计算机科学专业的必读教材之一。
猴博士数据结构与算法通过简明易懂的语言和丰富的示例,系统地介绍了各种常见的数据结构和算法,包括数组、链表、栈、队列、树、图、排序、查找等。
该书不仅详细解释了每种数据结构和算法的特点、操作和应用场景,还给出了具体的实现代码和运行时间分析,使读者能够深入理解并灵活应用这些概念和技巧。
猴博士数据结构与算法的特点之一是强调算法的设计原则和分析方法。
书中介绍了常见的算法设计技巧,如贪心算法、动态规划算法和分治算法,并给出了实际问题的解决思路和算法设计过程。
此外,书中还介绍了算法的复杂度分析方法,包括时间复杂度和空间复杂度,并给出了一些常见算法的分析结果,帮助读者评估算法的效率和性能。
猴博士数据结构与算法不仅适用于计算机科学专业的学生和教师,也适用于从事软件开发和算法研究的工程师和科研人员。
通过学习该教材,读者可以全面了解数据结构和算法的基本原理和应用,提高编程和问题解决的能力,并为进一步学习和研究提供了良好的基础。
数学与现代密码学

数学与现代密码学数学与现代密码学之间有着紧密的联系。
密码学是一门研究信息安全的学科,而数学为密码学提供了重要的理论基础。
本文将探讨数学在现代密码学中的应用,以及它们之间的互动关系。
一、对称密码学对称密码是一种常见的加密方式,它使用相同的密钥进行加密和解密。
数学在对称密码学中发挥了重要的作用,特别是在密钥生成和密钥管理方面。
例如,数学中的随机数生成器可以用来生成安全的随机密钥。
同时,数学中的代数和数论理论也可以用来分析对称密码算法的安全性。
二、非对称密码学非对称密码学使用不同的密钥进行加密和解密,广泛应用于现代通信和电子商务中。
数学在非对称密码学中发挥了重要的作用,特别是在公钥密码学中。
公钥密码学基于数学中的数论问题,例如大整数的分解问题和离散对数问题。
通过这些数学问题的困难性,非对称密码算法能够提供强大的安全性保证。
三、椭圆曲线密码学椭圆曲线密码学是一种基于椭圆曲线数论问题的密码学体系。
与传统的公钥密码学相比,椭圆曲线密码学使用更短的密钥长度,并提供了相同或更高的安全性。
椭圆曲线密码学利用椭圆曲线上的离散对数问题,而椭圆曲线数论是数学中的一个重要研究领域。
四、信息论信息论研究信息的传输、存储和处理,以及信息的度量和通信中的可靠性等问题。
在密码学中,信息论为密码系统的设计提供了理论基础。
通过信息论的概念,我们可以量化密码算法的安全性,并进行安全性分析和改进。
五、量子密码学量子密码学是一种基于量子力学原理的密码学体系,旨在抵御量子计算机对传统密码算法的攻击。
量子密码学借助量子力学中的随机性和不可复制性,提供了更高的安全性保障。
量子密码学与数学的结合非常紧密,涉及到复杂的矩阵运算、概率论和多变量多项式等数学概念。
总结数学与现代密码学密不可分,数学为密码学提供了重要的理论基础和技术支持。
无论是对称密码学、非对称密码学、椭圆曲线密码学还是量子密码学,数学在密码算法的设计、密钥管理和安全性分析等方面发挥了重要作用。
量子计算对密码学的挑战

量子计算对密码学的挑战随着科技的不断发展,全球各领域都在积极追求更加高效且安全的计算方式。
而在这一领域中,量子计算正逐渐崭露头角。
量子计算是基于量子力学原理的计算方式,具有强大的并行计算能力,可以解决一些传统计算机很难或者无法解决的问题。
然而,正因为量子计算的强大能力,它也对传统密码学提出了巨大的挑战。
传统密码学依赖于一些基本原理,例如大整数因数分解和离散对数问题。
这些问题是目前计算机无法有效解决的,因此构建在这些难题之上的密码系统被认为是安全的。
然而,量子计算机可以运用量子算法,如Shor算法,有效地解决大整数分解和离散对数等经典密码学所依赖的问题。
大整数因数分解是RSA加密算法的基础,而离散对数问题则构成了椭圆曲线密码学(ECC)以及Diffie-Hellman密钥交换协议的基石。
量子计算机的出现将这些基础问题迎刃而解,这意味着传统密码学系统在面对量子计算机时可能变得不再安全。
当量子计算能力达到一定水平时,目前广泛使用的非对称密码算法和快速分布式秘密共享方案都会受到威胁。
对称密码学也不例外,虽然目前还没有量子算法可以破解常用的对称密码算法,但是量子计算的崛起无疑加剧了对称密码学算法的不可靠性。
在当前局势下,保护密码通信的唯一办法是引入适应量子计算机的新一代密码学。
为了应对这种挑战,学者们已经开始研究和开发量子安全密码学。
量子安全密码学是一种不依赖于大整数因数分解和离散对数的加密方法。
它基于量子力学的原理,采用了一些能够抵御量子计算机攻击的技术,例如量子密钥分发(QKD)和量子密码。
这些技术利用了量子力学的不可克隆性,确保了消息传递的安全性。
然而,要实现量子安全密码学广泛应用于实际中,还有很多技术和工程问题需要解决。
首先,量子计算机的发展仍然面临着很多技术难题,如量子比特的稳定性和噪声问题。
要使量子计算机能够可靠地运行,并且具备足够的计算能力,仍然需要更多的研发和创新。
其次,量子安全密码学技术的实际部署和应用也需要考虑到其成本问题。
公钥密码学的数学基础

公钥密码学的数学基础公钥密码学是一种采用数学方法来确保数据安全的技术,主要用于加密通信和认证。
它涉及大量的数学原理和技术,例如数论、代数、密码、编码和其他一些有关计算机安全的理论和技术。
数论中的基本概念有素数、素数的分解、欧拉函数、离散对数问题和乘法原理等。
素数的性质可用来设计公钥密码系统。
欧拉函数是一个估算不同数字的素数因子的强大工具,它可以帮助安全系统进行更复杂的加密和认证。
离散对数问题和乘法原理是两种重要的数学理论,它们可以用来破译和解决古典的公钥密码。
代数是一门研究属性和关系的数学学科。
代数在公钥密码学中也得到了广泛应用,特别是在密码变换和基于椭圆曲线加密中。
在密码变换中,代数学家们提出了许多算法,如Rijndael、Twofish 和AES,以帮助用户安全地加密和解密数据。
基于椭圆曲线加密利用椭圆曲线上的点来进行加密和解密,而这里面也用到了许多代数的原理。
密码学主要涉及密码分析和安全性评估。
密码分析是一种利用统计加密算法来评估和攻击加密系统的技术。
它旨在检测密码系统中潜在的漏洞,并尽可能地破解密码。
安全性评估是一种对加密系统进行合理测试和评估的方法,以确定其是否可以抵御恶意攻击和其他威胁。
编码是一种用来表示数据的技术,它可以帮助保护数据免受攻击和窃取。
为了确保编码技术的安全性,一般使用许多复杂的数学原理。
例如,RSA算法就是一种基于大整数的加密算法,它可以非常有效地加密信息。
最后,公钥密码学还涉及计算机安全的一些理论和技术,如访问控制、身份验证和安全协议等。
计算机安全的目的是保护用户的数据和信息安全,因此它也涉及各种安全算法和技术,以解决面临的安全挑战。
猴博士高数提取码

猴博士高数提取码
【最新版】
目录
1.猴博士高数提取码的背景和含义
2.猴博士高数提取码的获取方法和使用技巧
3.猴博士高数提取码对学习和生活的影响和价值
正文
一、猴博士高数提取码的背景和含义
猴博士高数提取码,源于网络上一段关于高等数学教学的视频。
视频中的老师以风趣幽默的语言,深入浅出地讲解高等数学知识,受到了广大网友的喜爱。
其中,老师常用“猴博士高数提取码”这个说法来形象地比喻解题过程中需要用到的关键思路或知识点。
二、猴博士高数提取码的获取方法和使用技巧
要获取猴博士高数提取码,首先需要观看相关视频,了解高等数学的基本概念和解题方法。
在观看过程中,要注意以下几点:
1.理解老师讲解的知识点,弄清楚其中的逻辑关系和推导过程。
2.及时记录和总结老师提到的猴博士高数提取码,形成自己的知识体系。
3.多做练习题,将所学知识应用到实际问题中,提高解题能力。
4.学会灵活运用猴博士高数提取码,善于从中提炼出关键信息,快速解决问题。
三、猴博士高数提取码对学习和生活的影响和价值
猴博士高数提取码对于学习和生活具有重要的影响和价值:
1.帮助学生更好地理解和掌握高等数学知识,提高学习成绩。
2.培养学生的逻辑思维能力和分析问题、解决问题的能力。
3.将所学知识应用到实际生活中,解决生活中的问题,提高生活品质。
4.激发学生对数学学科的兴趣,培养学生的学术素养和综合素质。
总之,猴博士高数提取码是一种寓教于乐的教学方法,对于提高学生的数学素养和综合能力具有重要的意义。
密码学中的数学原理

密码学中的数学原理密码学是研究如何在通信过程中保护信息安全的学科,它涉及到许多数学原理和算法。
在密码学中,数学原理起着至关重要的作用,它们为加密和解密提供了坚实的理论基础。
本文将介绍密码学中一些重要的数学原理,包括模运算、RSA算法、离散对数问题等。
一、模运算模运算是密码学中常用的数学运算之一,它在加密算法中扮演着重要的角色。
在模运算中,我们需要计算一个数除以另一个数的余数。
例如,对于整数a和b,a mod b的结果就是a除以b的余数。
模运算在密码学中广泛应用于数据加密和密钥生成过程中,能够保证数据的安全性和可靠性。
二、RSA算法RSA算法是一种非对称加密算法,它是基于大数分解的数学原理。
RSA算法的安全性建立在两个大素数相乘的难解性上。
在RSA算法中,用户生成一对公钥和私钥,公钥用于加密数据,私钥用于解密数据。
RSA算法被广泛应用于数字签名、数据加密等领域,是当前最常用的加密算法之一。
三、离散对数问题离散对数问题是密码学中的一个重要数学难题,它是许多加密算法的基础。
在离散对数问题中,给定一个素数p、一个整数a和一个整数b,要求找到满足a^x ≡ b (mod p)的x值。
离散对数问题的难解性保证了许多加密算法的安全性,如Diffie-Hellman密钥交换算法和椭圆曲线密码算法等。
四、椭圆曲线密码算法椭圆曲线密码算法是一种基于椭圆曲线数学原理的加密算法,它具有高效性和强安全性的特点。
椭圆曲线密码算法利用椭圆曲线上的点运算来实现数据加密和数字签名,被广泛应用于移动通信、物联网等领域。
椭圆曲线密码算法是当前密码学领域研究的热点之一,具有很高的研究和应用价值。
五、费马小定理费马小定理是密码学中常用的数学原理之一,它可以用来验证素数和进行模幂运算。
费马小定理表明,对于任意素数p和整数a,a^(p-1) ≡ 1 (mod p)。
费马小定理在RSA算法、Miller-Rabin素性测试等算法中发挥着重要作用,是密码学中不可或缺的数学工具之一。
抽象代数在密码学中的应用

抽象代数在密码学中的应用密码学作为一门研究保证信息安全的学科,发展至今已经成为信息安全领域中不可或缺的一部分。
而抽象代数作为密码学中的一种基础理论,具有广泛的应用。
本文将探讨抽象代数在密码学中的应用及其重要性。
一、引言随着信息技术的飞速发展,对于信息安全的需求也越来越迫切。
在信息传输和存储过程中,如何保护数据的机密性、完整性和可用性成为了重要的研究方向。
密码学作为应对信息安全挑战的一个重要领域,通过加密算法和密钥管理等手段,确保信息在传输和储存过程中不被非法获取、篡改。
二、抽象代数的基本概念抽象代数是数学的一个分支,研究的是代数结构及其之间的关系。
其中,群论、环论和域论被广泛应用于密码学领域。
群论研究的是集合和二元运算之间的结构,它的三个基本性质:封闭性、结合律和单位元,对密码学中的加密和解密操作有着重要的影响。
环论研究的是具有两个二元运算的集合,其中加密算法中常使用的置换算法和置换群就属于环论的研究范畴。
域论是数学中一个重要的概念,用于描述一类具有加法和乘法两种运算的数学结构。
三、对称加密算法中的抽象代数应用对称加密算法是一种使用相同密钥进行加密和解密的算法,其安全性主要依赖于密钥的保护和密钥的长度。
抽象代数中的群论和环论为对称加密算法提供了基础理论支持。
例如,DES(数据加密标准)算法是一种使用56位密钥对数据进行加密和解密的对称加密算法。
DES 算法中应用了64位的置换操作和16轮的复杂变换过程,而这些变换过程正是基于环论的置换群的性质设计而成。
四、非对称加密算法中的抽象代数应用非对称加密算法是一种使用公钥加密和私钥解密的算法,其安全性建立在数论中的大数因式分解和离散对数难题上。
其中,离散对数问题是抽象代数中的一个重要研究课题。
RSA算法是最早应用到非对称密码学中的公钥密码系统,其加密和解密过程主要基于大数分解和离散对数。
而离散对数这一困难问题的求解正是依靠抽象代数中群论和环论的知识。
五、密码学中的抽象代数扩展理论除了群论、环论和域论在密码学中的应用外,抽象代数的其他拓展理论也被密码学家们广泛探索和应用。
当今最难的数学猜想

数学世界最难的数学猜想霍奇猜想霍奇猜想是代数几何的一个重大的悬而未决的问题。
由威廉·瓦伦斯·道格拉斯·霍奇提出,它是关于非奇异复代数簇的代数拓扑和它由定义子簇的多项式方程所表述的几何的关联的猜想,属于世界十大数学难题之一。
庞加莱猜想庞加莱猜想是法国数学家庞加莱提出的一个猜想,其中三维的情形被俄罗斯数学家格里戈里·佩雷尔曼于2003年左右证明。
2006年,数学界最终确认佩雷尔曼的证明解决了庞加莱猜想。
后来,这个猜想被推广至三维以上空间,被称为“高维庞加莱猜想”。
提出这个猜想后,庞加莱一度认为自己已经证明了它。
黎曼假说概述有些数具有特殊的属性,它们不能被表示为两个较小的数字的乘积,如2,3,5,7,等等。
这样的数称为素数(或质数),在纯数学和应用数学领域,它们发挥了重要的作用。
所有的自然数中的素数的分布并不遵循任何规律。
然而,德国数学家黎曼(1826年—1866年)观察到,素数的频率与一个复杂的函数密切相关。
四色猜想四色猜想的内容是“任何一张地图只用四种颜色就能使具有共同边界的国家着上不同的颜色。
”也就是说在不引起混淆的情况下一张地图只需四种颜色来标记就行。
用数学语言表示即“将平面任意地细分为不相重叠的区域,每一个区域总可以用1234这四个数字之一来标记而不会使相邻的两个区域得到相同的数字。
”这里所指的相邻区域是指有一整段边界是公共的。
如果两个区域只相遇于一点或有限多点就不叫相邻的。
因为用相同的颜色给它们着色不会引起混淆。
哥德巴赫猜想1742年6月7日,德国数学家哥德巴赫在写给著名数学家欧拉的一封信中,提出了两个大胆的猜想:1、任何不小于6的偶数,都是两个奇质数之和;2、任何不小于9的奇数,都是三个奇质数之和。
这就是数学史上著名的“哥德巴赫猜想”。
显然,第二个猜想是第一个猜想的推论。
因此,只需在两个猜想中证明一个就足够了。
同年6月30日,欧拉在给哥德巴赫的回信中,明确表示他深信哥德巴赫的这两个猜想都是正确的定理,但是欧拉当时还无法给出证明。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
8036Semester22011The University of SydneyFACULTY OF SCIENCEMATH2068and MATH2988Number Theory and CryptographyNovember,2011Lecturer:R.B.HowlettTime allowed:two hoursThe question paper must not be removed from theexamination roomNo notes or books are to be taken into the examination room.Only approved non-programmable calculators are allowed.The MATH2068paper hasfive questions.The MATH2988paper has one extra question(on the back page).The questions are of equal value.Question6is for MATH2988only..../21.(i )Use a Vigen`e re cipher with keyword CAT to encrypt the plaintext messageOCELOT.(ii )Let M =c 1c 2c 3...c be a message which is a sequence of letters from thealphabet {A ,B ,...,Z }.(a)What is a digraph ,and what is the definition of the digraph coinci-dence index of M ?(b)If the sequence M were generated by choosing successive letters in-dependently with all letters having equal probability of being choseneach time,what would be the expected value of the digraph coinci-dence index?(c)If M is ordinary English text,written in upper case letters andstripped of spacing and punctuation,would you expect the digraphcoincidence index to be greater than,less than,or the same as theanswer to Part (ii )(b)?(Give a brief reason.)(iii )A long intercepted message M is reliably known to have been encryptedwith a block transposition cipher.If the (2,7)-decimation of M withperiod 9has coincidence index 0.0047and the (3,5)-decimation of M ofperiod 8has coincidence index 0.0072,what conclusions should you draw?Solution:(i )A B C D E F G H I J K L M N O P Q R S T U V W X Y Z012345678910111213141516171819202122232425plaintext:1424111419key:20192019ciphertext:16223131412Thus encryption produces QCXNOM.(ii )(a)A digraph is a pair of adjacent letters.The digraph coincidenceindex of M is the probability that two randomly chosen digraphsof M coincide.(More exactly,for each x and each y in the al-phabet {A ,B ,...,Z }let n xy be the number of occurrences of xyas a digraph of M :thus n xy is the number of elements of the set{i ∈Z |1≤i ≤ −1and (c i ,c i −1)=(x,y )}.Then the digraph coincidence index of M is x,y (n xy /( −1))2,where the sum is overall 262possible values of (x,y ).)(b)The expected value of the probability that a randomly chosen di-graph equals a given digraph xy is (1/26)2,and so the expectedvalue of the probability that two independently chosen digraphsboth equal xy is (1/26)4.The expectedvalue of the digraph co-incidence index is therefore x,y (1/26)4=(1/26)2,since there are262possible values for (x,y )..../3(c)If M is a piece of ordinary English then the frequency distribution ofthe digraphs of M will be uneven,in the sense that the frequency ofsome digraphs will be much greater than (1/26)2and the frequencyof others will be much less than (1/26)2.The result is that thedigraph coincidence index will be much larger than the (1/26)2of (b)above.(The minimum value of k i =1p 2i subject to the constraint that all p i are nonnegative and k i =1p i =1occurs when all p iequal 1/k .)(iii )You should conclude that the block length for the cipher is 8and thatwhen the ciphertext is split into eight-letter blocks the third and fifthletters of each block were originally adjacent letters of the plaintext.2.(i )An affine cipher is a substitution cipher defined by a rule of the formi →mi +n (mod 26),for some fixed integers m,n ,where the letters A to Z are identified withresidues modulo 26in the usual way (A ↔0,B ↔1,etc.).The pair (m,n )is called the key .(a)If the key is (8,16),encipher the message BEN .(b)A sample of ciphertext known to have been produced by an affinecipher is found to consist of 2000letters altogether,of which thetwo most common are J (271occurrences)and N (199occurrences).Assuming that these represent the most common letters in English,determine the key.(ii )Let n =(d d −1...d 0)8;that is,when the integer n is expressed in base8notation its digits are d ,d −1,...,d 0.(a)Explain what this means,and illustrate your answer by finding the base 10representation of n =(2145)8.(b)Prove that n ≡d 0+d 1+···+d (mod 7).Solution:(i )(a)Numerically BEN is (1,4,13).Now8×1+16=248×4+16=48≡22(mod 26)8×13+16=120≡16(mod 26)and converting (24,22,16)back into letters produces YWQ ..../4(b)Note that numerically J↔9and N↔13.The most common letterof English is E↔4and the second most common is T↔19.So weneed tofind m and n such that4m+n≡9(mod26),(1)19m+n≡13(mod26).(2) Subtracting(1)from(2)gives15m≡4(mod26),whence15m≡30(mod26).By coprime cancellation this gives m≡2(mod26),andsubstituting back into(1)gives n≡1(mod26).So the key is(m,n)=(2,1).(ii)(a)The notation means that n=d 8 +d −18 −1+···+d181+d080.Thus(2145)8=2×83+82+4×8+5,which is1125in base10notation.(b)Since8≡1(mod7)and congruence respects addition and multi-plication,it follows that8k≡1k≡1(mod7)for all nonnegativeintegers k,andn≡d 1 +d −11 −1+···+d11+d0≡d0+d1+···+d (mod7),as required.3.(i)Find the order of4modulo each of the primes11and23,and thenfindthe residue of41112modulo253.(You are given that253=11×23.) (ii)Prove that if n,a and b are integers such that n|ab and gcd(n,a)=1 then n|b.You may use the fact that integers r and s exist satisfyingrn+sa=gcd(n,a).(iii)Show that if p is a prime number and t an integer such that t2≡1 (mod p),then either t≡1(mod p)or t≡−1(mod p).Solution:(i)If p is any odd prime then4(p−1)/2=2p−1≡1(mod p),by Fermat’s Little Theorem,and so ord p(4)must be a divisor of(p−1)/2.Since ord p(4)can only be1if p|(4−1)=3,it follows that ord11(4)=5and ord23(4)=11.Write N for the residue of41112modulo253.Since ord11(4)=5it follows that if n and m are arbitrary nonnegative integers then4n≡4m(mod11)if and only if n≡m(mod5).So N≡41112≡42≡5(mod11),giving N=11k+5for some integer k.Similarly4n≡4m(mod23)ifand only if n≡m(mod11),and since1112≡1(mod11)it follows thatN≡41112≡4(mod23).Hence11k+5≡4(mod23).../5and therefore11k≡−1≡22(mod23)and coprime cancellation yields k≡2(mod23).So k=23h+2for someinteger h,and henceN=11k+5=11(23h+2)+5=253h+27.Since0≤N<253it follows that N=27.(ii)Assume that n,a and b are integers such that n|ab and gcd(n,a)=1.Since gcd(n,a)=1there exist integers r and s such that rn+sa=1,and multiplying through by b gives rnb+sab=b.Since n|ab there existsan integer t such that ab=tn,and so it follows thatb=rnb+sab=rbn+stn=(rb+st)n.Since r,b,s and t are all integers,so is rb+st.Hence n|b,as required.(iii)Assume that p is prime and t an integer with t2≡1(mod p),and suppose that p is not a divisor of t−1.Then gcd(p,t−1)=p,since gcd(p,t−1)is a divisor of t−1.Since the only divisors of p are p and1,and sincegcd(p,t−1)is a divisor of p,it follows that gcd(p,t−1)=1.Now sincep|(t2−1)=(t−1)(t+1)and gcd(p,t−1)=1it follows from Part(ii)above that p|(t+1).So either p|(t−1),which gives t≡1(mod p),orp|(t+1),which gives t≡−1(mod p),as required.4.(i)A user of the RSA cryptosystem has chosen(2329127,331)as the publickey.Given that2063is a factor of2329127,determine the private key.(ii)Suppose that you are user of the Elgamal cryptosystem and that your public key is(p,b,k)=(43,3,41)and your private key is m=6.(a)Check that the necessary relationship between the private key andthe public key is satisfied.(b)You receive the message 2,[1,20,21] .Decrypt it.(iii)Let S={0,1,2,3,4,5,6,7,8,9},and let a1,a2,a3,...be an infinite se-quence of elements of S such that a i+1is determined by a i for every i.(That is,a i+1=f(a i)for some function f from S to S.)Show that thereexists a positive integer k such that a2k=a k.Solution:(i)In the RSA cryptosystem the public key aways has the form(n,e) where n is the product of two distinct primes and e is coprime toφ(n).Moreover,the private key is then(n,d),where d is the inverse of e mod-uloφ(n).Since we are given that n=2329127and2063is a divisor of.../62329127we conclude that2063and2329127/2063=1129are both prime, and soφ(n)=2062×1128=2325936.Applying the extended Euclidean Algorithm tofind the inverse of331modulo2325936yields the following table.23259363313301070261330017026−70271011−We conclude that331×7027−1×2325936=1,and so the inverse of331 moduloφ(n)is7027.So the private key must be(2329127,7027).(ii)(a)The required relationship is that b m computed in residue arithmetic modulo p must equal k.Noting that86is a multiple of43,wefindthat modulo4336=32×34=9×81≡9×−5=−45≡41as required.(b)The scrambling factor is thefirst component of the ciphertext raisedto the power m,computed in residue arithmetic modulo p.So inthis case it is the residue modulo43of26=64.That is,the scram-bling factor is21.Observe that2×21=−1in residue arithmeticmodulo43;so21−1=−2=41(in residue arithmetic modulo43).Hence the deciphered message is[1×21−1,20×21−1,21×21−1]=[41,20×−2,1]=[41,−40,1]=[41,3,1](iii)Since a1,a2,...,a11all lie in the set S,and S has only10distinct el-ements,there must exist integers i and j with1≤i<j≤11anda i=a j.We now use induction on m to show that a i+m=a j+m for allintegers m≥0.When m=0the statement is a i=a j,which we already know to be true,and this starts the induction.Now if a i+m=a j+m for some nonnegative integer m thena i+m+1=f(a i+m)=f(a j+m)=a j+m+1,which shows that if the statement is true for m then it is also true for m+1,completing the induction.Put n=j−i,noting that n>0since j>i.The statement thata i+m=a j+m for all m≥0can be restated as a i+m=a(i+n)+m for all.../7m ≥0,or a h =a h +n for all h ≥i (writing h for i +m ).We proceed toshow that a r =a r +qn for all integers q ≥0and r ≥i ,using inductionon q .The case q =0is obvious and starts the induction.Now supposethat q is a nonnegative integer such that a r =a r +qn for all integers r ≥i .If r ≥i then certainly r +qn ≥i ,since q and n are nonnegative,andsince a h =a h +n for all h ≥i it follows that a r +qn =a r +qn +n =a r +(q +1)nfor all r ≥i .Hence a r =a r +(q +1)n for all r ≥i ,as required to completeour induction.Choose any integer s with s ≥i/n .Then sn ≥i (since n >0),and soa sn =a sn +qn for all q ≥0(putting r =sn in the statement just proved).In particular this holds for q =s ,and so a k =a 2k holds with k =sn .5.(i )Let p be an odd prime and n ≡−1(mod p ).Let q be prime divisor of N = p −1i =0n ip =1+n p +n 2p +···+n (p −1)p .Find ord q (n ),and thenshow that q ≡1(mod p 2).(ii )Let p be an odd prime.(a)Show that if k is a positive integer then p k ≡3(mod 4)if and onlyif p ≡3(mod 4)and k is odd.(b)Let be a positive integer and let s be the sum of the positive divisors of p .Show that s is odd if and only if is even.(c)Again let be a positive integer and s be the sum of the positivedivisors of p .Show that s ≡2(mod 4)if and only if and p ≡1(mod 4)and ≡1(mod 4).(iii )Using Part (ii ),show that if n is an odd perfect number then n =p m 2for some integers p , and m such that p is prime and p ≡ ≡1(mod 4).Solution:(i )Since p −1i =0n ip is a geometric series with common ratio n p ,withp terms and with 1as the first term,the geometric series formula givesN =((n p )p −1)/(n p −1)=(n p 2−1)/(n p −1).Since q is a divisor of N it is a divisor of (n p −1)N =n p 2−1;that is,n p 2≡1(mod q ).So ord q (n )is a divisor of p 2.Suppose,for a contradiction,that ord q (n )is a divisor of p .This impliesthat n p ≡1(mod q ).SoN =p −1i =0(n p )i ≡p −1 i =01i ≡p (mod q ),.../8and since q is a divisor of N it follows that p ≡0(mod q ).Since p and q areboth primes this forces q =p ,and since we are given that n ≡−1(mod p )it follows that n ≡−1(mod q ).And so n p ≡(−1)p ≡−1(mod q ),sincep is odd.This gives our desired contradiction,since n p ≡1(mod q )andcertainly 1≡−1(mod q )(since 2is not divisible by the odd prime q ).We conclude that ord q (n )is a divisor of p 2that is not a divisor of p ,and since p is a prime the only such number is p 2itself.So ord q (n )=p 2.If n were a multiple of q then we would have n p 2≡0(mod q ),contraryto the fact that n p 2≡1(mod q ).So n is not a multiple of q ,and Fermat’sLittle Theorem tells us that n q −1≡1(mod q ).Hence ord q (n )is a divisorof q −1.Thus p 2|(q −1),and so q ≡1(mod p 2).(ii )(a)Since p is odd the remainder when p is divided by 4must be either 1or 3.So either p ≡1(mod 4)or p ≡3≡−1(mod 4).In the formercase,if k is any positive integer then p k ≡1k ≡1≡−1(mod p )(since p is not a divisor of 2).In the latter casep k ≡(−1)k ≡ +1(mod p )if k is even,−1(mod p )if k is odd.Thus,since −1≡3(mod 4),we have shown that if p ≡3(mod 4)and k is odd then p k ≡3(mod 4),and in all other cases p k ≡3(mod 4),as required.(b)The positive divisors of p are the integers p i for i ∈{0,1,2,...,p }.Thus s =1+p +p 2+···+p = i =0p i .Since p is odd,p ≡1(mod 2).So s ≡i =01i (mod 2);that is,s ≡ +1(mod 2).So s is even if and only if is odd,as required.(c)Suppose first that p ≡−1(mod 4).Thens =1+p +p 2+···+p ≡1+(−1)+(−1)2+···+(−1) (mod 4)and if is odd the right hand side is zero,since the total number ofterms is even and every second term cancels the term that precedesit.On the other hand,if is even then the last term on the righthand side is 1,and the preceding terms cancel out in pairs,leaving1as the value of the right hand side.So if p ≡−1(mod 4)then sis congruent mod 4to either 0or 1,but never congruent to 2.On the other hand,if p ≡1(mod 4)then p i ≡1(mod 4)for all i ,and so s = i =0p i ≡ i =01≡ +1(mod 4),giving s ≡2(mod 4)if and only if ≡1(mod 4),as required..../9(iii)Suppose that n is an odd perfect number,and let p1,p2,...,p k be the prime divisors of n.Thusn=p 11p 22···p kkfor some positive integers 1, 2,..., k,and since the sum-of-divisorsσfunction is multiplicative,σ(n)=σ(p 11)σ(p 2)2···σ(p kk).We are given that n is perfect;so by definition n equals the sum of all the proper divisors n.Henceσ(n)=2n.Observe that since n is odd this quantity is divisible by2but not by4.But2n is the product of thepositive integersσ(p ii ),for i from1to k,and it follows that exactly oneof these numbers are even(since if two or more were even their product would be divisible by at least22,and if none were even their product would not be divisible by2).Moreover the one that is even must be congruent to2mod4,since if it were congruent to0mod4then the product would be divisible by4.Renumbering the factors if necessary,we may assume thatσ(p 11)iscongruent to2mod4,andσ(p ii )is odd for all i from2to k.By(ii)(b)it follows that i is even when2≤i≤k,and so we may write i=2h i in these cases.And by(ii)(c)it follows that p1≡1(mod4)and 1≡1 (mod4).Thusn=p 11(p2h22p2h33···p2h kk)=p m2where m=p h22p h33···p h kk and p=p1is a prime congruent to1(mod4)and = 1is a positive integer congruent to1(mod4),as required.6.(MATH2988students only)(i)Let n be a positive integer.Prove thatd|nφ(d)=n.(ii)Let a1>a2>a3>···>a k be the successive remainders generated when the Euclidean Algorithm is used to determine d=gcd(a,b),where(a1,a2)=(a,b)and a k=d.Show that k<2log2(a)+1.(iii)Let n be an integer greater than1.Show that n is not a divisor of2n−1.(Consider ord p(2)for prime divisors of n.)Solution:(i)Consider the n fractions0n ,1n,2n,...,n−1n,and in each case cancelaway the greatest common divisor of the numerator and the denominator, producing a fraction that is in its lowest terms.The resulting fractions.../10all have the form id where i and d are coprime,0≤i<d,and d|n.Foreach given divisor d of n the total number of possible values for i isφ(d), since this is the size of the set{i|0≤i<d and gcd(i,d)=1},and theyall occur since id =idn,where dd =n.So the total number of fractionswe end up with isd|nφ(d),and since we started out with n fractionswe conclude thatd|nφ(d)=n,as required.(ii)According to the rules that define the Euclidean algorithm,the sequence a1,a2,...,a k is generated as follows:if i∈{2,3,...,k−1}then a i+1is the remainder obtained when a i is divided into a i−1.That is,a i+1=a i−1−q i a i(1)where q i is the largest integer less than or equal to a i−1/a i.Let i∈{2,3,...,k−2}be arbitrary;we shall show that a i+2<12a i.This is obviously true if a i+1≤12a i,since a i+2<a i+1.But if a i+1>12a ithen1<a i/a i+1<2,and so the quotient q i+1obtained when a i is divided by a i+1is1.Thus by(1)above,with i replaced by i+1,a i+2=a i−a i+1<a i−12a i=12a i.So in either case we have a i+2<12a i,as claimed.It follows by induction that if is any positive integer with1+2 ≤kthen a1+2 <2− a1.When =1this reduces to a3<12a1,which isa i+2<12a i in the case i=1,and for the inductive step observe that if>1and a1+2( −1)<2−( −1)a1then,by a i+2<12a i in the case i=2 −1,a1+2 <12a2 −1<12(2−( −1)a1)=2− a1,as required to complete the induction.Moreover,a totally analogous induction gives a2+2 <2− a2for each positive integer with2+2 ≤k.If k=1+2 is odd then by the previous paragraph we have thata k<2− a1,and so2 ≤2 a k<a1,whence <log2a1=log2a and k=2 +1<2log2a+2.If k=2 is even then the previous paragraph gives a k<2−( −1)a2<2−( −1)a,and so2( −1)≤2( −1)a k<a,whence −1<log2a and k=2 <2log2a+2.So in either case k=2log2a+2.(iii)Suppose that n>1is a divisor of2n−1.By the Fundamental Theorem of Arithmetic,n has at least one prime divisor.Choose p to be the least.../118036Semester22011Page11 prime divisor of n.Since p|n and n|(2n−1)it follows that p|(2n−1),and so2n≡1(mod p).Hence ord p(2)is a divisor of n.Obviously2isnot a multiple of p(since2n≡0(mod p));so Fermat’s Little Theoremgives2p−1≡1(mod p),and hence ord p(2)≤p−1.So we have shownthat ord p(2)is a divisor of n that is less than the smallest prime divisorof n.So ord p(2)=1,which is absurd since21≡1(mod p).So if n>1then assuming also that n|(2n−1)leads to a contradiction.So n is nota divisor of2n−1.。