# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

3 Pages

### hw6_solutions

Course: CSCI 303, Spring 2010
School: USC
Rating:

Word Count: 538

#### Document Preview

303 CSCI Homework 6 Problem 1 (31.1-1): Prove that there are innitely many primes. Solution 1: Assume that there are only nitely many primes, p1 , p2 , . . . , pk . Let k n=1+ i=1 pi Then for all i {1, 2, . . . , k }, if you divide n by pi the remainder is 1. By the fundamental theorem of arithmatic, all numbers can be written as a product of prime factors. Since none of the primes divide n, it cannot be the...

Register Now

#### Unformatted Document Excerpt

Coursehero >> California >> USC >> CSCI 303

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
303 CSCI Homework 6 Problem 1 (31.1-1): Prove that there are innitely many primes. Solution 1: Assume that there are only nitely many primes, p1 , p2 , . . . , pk . Let k n=1+ i=1 pi Then for all i {1, 2, . . . , k }, if you divide n by pi the remainder is 1. By the fundamental theorem of arithmatic, all numbers can be written as a product of prime factors. Since none of the primes divide n, it cannot be the product of prime factors, and we have a contradiction. Therefore our assumption that there are only nitely many primes must be false, so there are innitely many primes. Problem 2 (31.1-7): For any integer k > 0, we say that an integer n is a kth power if there exists an integer a such that ak = n. We say that n > 1 is a nontrivial power if it is a k th power for some integer k > 1. Show how to determine if a given -bit integer n is a nontrivial power in time polynomial in . Solution 2: Given an n of bits, we wish to check whether there exist integers a and k such that ak = n. Note that a 2 because 1k = 1 for all k , and n must be greater than 1 to be a nontrivial power. This implies that k is at most lg n , because a lg n +1 > n for all a 2. To determine if n is a nontrivial power, all we need to do is check whether any of n1/2 , n1/3 , . . . , n1/ lg n are integers. Checking whether the mth root of n is an integer can be done in time polynomial in , and we need to check at most roots (since lg n ), so determining whether n is a nontrivial power can be done in time polynomial in . Problem 3 (Derived from 31.2-2): Use the extended-Euclids algorithm to compute gcd(899, 493) and numbers x and y such that 899x + 493y = gcd(899, 493). Show your work. Solution 3: (eq 1) (eq 2) (eq 3) (eq 4) (eq 5) (eq 6) 899 = (1) 899 + (0) 493 493 = (0) 899 + (1) 493 406 = (1) 899 + (1)493 = (eq 1) 1 (eq 2) 87 = (1)899 + (2) 493 = (eq 2) 1 (eq 3) 58 (5) = 899 + (9)493 = (eq 3) 4 (eq 4) 29 = (6)899 + (11) 493 = (eq 4) 1 (eq 5) (since (since (since (since 899 493 493 406 406 87 87 58 = 1) = 1) = 4) = 1) Finally, we see that 58 = 2 29, so gcd(899, 493) = 29, and 29 = (6)899 + (11)493. Problem 4 (Not in book): Your RSA private key is 7, 33 . Digitally sign the message M = 9. Show your work. 1 Solution 4: To digitally sign the message, we need to compute 97 mod 33. 97 = 9 92 94 = 9 81 812 Here, we need to compute 81 mod 33, and we nd that 81 = (2)33 + 15, so 81 15 (mod 33). 97 9 15 152 9 15 225 (mod 33) (mod 33) (mod 33). Next, we need to compute 225 mod 33, and we nd that 225 = (6)33 + 27, so 225 27 97 9 15 27 135 27 (mod 33) (mod 33) (mod 33). Next, we need to compute 135 mod 33, and we nd that 225 = (4)33 + 3, so 135 3 97 3 27 81 15 Because we found 81 15 (mod 33) earlier. (mod 33) (mod 33) (mod 33) Therefore, the digital signature of the message M = 9 is Sig = 15. Problem 5 (31.7-1): Consider an RSA key set with p = 11, q = 29, n = 319, and e = 3. What value of d should be used in the secret key? What is the encryption of the message M = 100? Show your work. Solution 5: p = 11 n=pq = 319 e=3 We need to compute d. To do so, we use the extended-Euclids algorithm with inputs 280 and 3. 280 = (1)280 + (0)3 3 = (0)280 + (1)3 1 = (1)280 + (93)3 2 q = 29 (n) = (p 1) (q 1) = 10 28 = 280 So d = 93 + 280 = 187. Lets check it. 3(187) = 561 561 1 (mod 280) The secret key is 187, 319 . Now we wish to encrypt M = 100 using the public key 3, 319 . We need to nd 1003 mod 319. 1003 = 100 1002 = 100 10 000 We need to compute 10 000 mod 319, and we nd that 10 000 = (31)319 + 111, so 10 000 111 (mod 319). 1003 100 111 11 100 (mod 319) (mod 319) (mod 319). Similarly, we nd that 11 100 = (34)319 + 254, so 11 100 254 1003 254 So the cyphertext is C = 254. (mod 319) 3
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

USC - CSCI - 303
CSCI 303 Homework 7In the following problems, N = cfw_1, 2, 3, . . . is the set of natural numbers, the symbol means there exists, the symbol means for all, the symbol means halts, and the symbol means does not halt. Bi (x) is the ith SBASIC program run
USC - CSCI - 303
CSCI 303 Homework 7In the following problems, N = cfw_1, 2, 3, . . . is the set of natural numbers, the symbol means &quot;there exists&quot;, the symbol means &quot;for all&quot;, the symbol means &quot;halts&quot;, and the symbol means &quot;does not halt&quot;. Bi (x) is the ith SBASIC prog
University of Texas - MATH - 340L
University of Texas - MATH - 340L
University of Texas - MATH - 340L
Griggs - ECON - 110
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURECHAPTER 3WIRED &amp; WIRELESS COMMUNICATIONWired and Wireless Transmission MediaShort Answer Questions: Submit your written answers to the instructor.1. Complete the following table. Rank the wired and wireless transmission media
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURESPOTLIGHT 3HOME NETWORKSConvergenceDiscussion Questions: Be prepared to discuss the following questions in class.1. The future of home networking is convergencethat is, tying in other home devices such asappliances, alarm sy
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURECHAPTER 3WIRED &amp; WIRELESS COMMUNICATIONWired and Wireless CommunicationDiscussion Questions: Be prepared to discuss the following questions in class.1. Wireless networking technology is becoming popular because it offers mobi
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURECHAPTER 3WIRED &amp; WIRELESS COMMUNICATIONConferencing Applications1. Because of the increased availability and reduced cost of network connectivity, thefield of conferencing has grown tremendously. Research and define the follo
Griggs - ECON - 110
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURECHAPTER 3WIRED &amp; WIRELESS COMMUNICATIONWired and Wireless ApplicationsShort Answer Questions: Submit your written answers to the instructor.1. Many people are eliminating the use of landlines from their homes. What types of
Griggs - ECON - 110
Griggs - ECON - 110
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURECHAPTER 5APPLICATION SOFTWARE:TOOLS FOR PRODUCTIVITYApplication SoftwareShort Answer Questions: Submit your written answers to the instructor.1. Companies must decide between building customized software and purchasing off-t
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURECHAPTER 5APPLICATION SOFTWARE:TOOLS FOR PRODUCTIVITYBuy versus BuildShort Answer Questions: Submit your written answers to the instructor.1. Imagine that you are the head of the accounting department, and you need to decide
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURECHAPTER 5APPLICATION SOFTWARE:TOOLS FOR PRODUCTIVITYApplication Software1. Companies sometimes use additional programmers from other countries to helpthem develop or maintain applications. What are some of the reasons that a
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURESPOTLIGHT 5MICROSOFT OFFICECollaborationDiscussion Questions: Be prepared to discuss the following questions in class.1. Collaboration is defined as the technologies and tools that enable users to access information, sharein
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURESPOTLIGHT 5MICROSOFT OFFICEOffice ToolsShort Answer Questions: Submit your written answers to the instructor.1. The success of the Microsoft Office suite is due to its full functionality and its integration. Which products i
Griggs - ECON - 110
COMPUTERS ARE YOUR FUTURECHAPTER 5APPLICATION SOFTWARE:TOOLS FOR PRODUCTIVITYApplication Software Upgrades and LicensingDiscussion Questions: Be prepared to discuss the following questions in class.1. Software vendors routinely release new applicati
Griggs - ECON - 110
Chapter 1. Key term and conceptsalgorithmA mathematical or logical procedure for solving a pA system unit that contains all of the coall-in-one computercomponents, including input components and the diPrograms that enable you to do something useful
Griggs - ECON - 110
Chapter 2: The Internet and the World Wide WebAn Internet service that enables you to contact a distant computer system to which you have no accessanonymous FTPrights, log on to its public directories, and transfer files from that computer to your own.
Griggs - ECON - 110
applicationsoftwareProgramsthatenableyoutodosomethingusefulwiththecomputer,suchas writingoraccounting(asopposedtoutilities,whichareprogramsthathelpyou maintainthecomputer).autosaveAsoftwarefeaturethatbacksupopendocumentsatauserspecifiedinterval.bet
Griggs - ECON - 110
Chapter 32G Second-generation cellular techonology that quickly replaced most analogcellular services.3G Third- generation cellular techonology that user radio signals to transmitvoice, text, images, and video data.4G Fourth- generation cellular tech
Griggs - ECON - 110
1,2/30System software : All the software used to operate and maintain a computer system,including the operating system and utility programs.There are 2 types of software : system software and application software.Application software : Programs that e
Griggs - ECON - 110
1. - Describe my experiences with the Internet: I usually read news on the Internet and I always use yahoo messenger to chat withmy friends.- Identify the browser and e-mail software application that you have used: I have used the Mozilla firefox and
Griggs - ECON - 110
1.What is the difference between bandwidth and throughput? What Internetapplications require high bandwidth?Bandwidth: is the theoretical maximum amount of data that can be sent through a specifictransmission medium at one time (per second)Throughput
Griggs - ECON - 110
1. What is the difference between bandwidth and throughput? What Internet applicationsrequire high bandwidth?Bandwidth: is the theoretical maximum amount of data that can be sent through a specifictransmission medium at one time (per second)Throughput
Griggs - ECON - 110
3/214Share wareUse on try before you buybasic. After using for aspecificed trial period, youmust pay a registration feeor violate the copyrightEx: IDM, surprise software4/214Free wareGiven away for free, cantturn around and sell it forprofitP
Griggs - ECON - 110
IntroductiontoComputerbyDr.NguyenMinhHoangSaigonICT,HVUhoang.dhbk@gmail.com20111LecturesnnCoursename:IntroductiontoComputer(CPTR105)No.ofSessions:14+2exams(midterm&amp;final)nnThursday(8:30AM11:30AM)3hours/weekOfficehoursnnAfterlecturestimeo
Griggs - ECON - 110
IntroductiontoComputerSpotlight1:EthicsbyDr.NguyenMinhHoangSaigonICT,HVUhoang.dhbk@gmail.com2011@byDr.NguyenMinhHoang,SaigonICT,HVU,20111ComputersAreYourFutureTenthEditionSpotlight1:EthicsCopyright 2009 Pearson Education, Inc. Publishing as Pr
Griggs - ECON - 110
Griggs - ECON - 110
Griggs - ECON - 110
IntroductiontoComputerApplicationSoftware:Internetprograms1@byDr.NguyenMinhHoang,SaigonICT,HVU,2011WhatwewilllearnnnnHelpuserscommunicate,learn,andinteractthroughtheInternetThesessioncovers:Email,IMsoftware,Webbrowsers,VideoconferencingMicroso
Griggs - ECON - 110
IntroductiontoComputerbyDr.NguyenMinhHoangSaigonICT,HVUhoang.dhbk@gmail.com20101LecturesnnCoursename:IntroductiontoComputer(CPTR105)No.ofSessions:14+2exams(midterm&amp;final)nnThursday(8:30AM11:30AM)3hours/weekOfficehoursnnAfterlecturestimeo
Griggs - ECON - 110
IntroductiontoComputerSpotlight1:EthicsbyDr.NguyenMinhHoangSaigonICT,HVUhoang.dhbk@gmail.com2010@byDr.NguyenMinhHoang,SaigonICT,HVU,20101ComputersAreYourFutureTenthEditionSpotlight1:EthicsCopyright 2009 Pearson Education, Inc. Publishing as Pr
Griggs - ECON - 110
Griggs - ECON - 110
Griggs - ECON - 110
Griggs - ECON - 110
IntroductiontoComputerLecture3:Wired&amp;WirelessCommunication1@byDr.NguyenMinhHoang,SaigonICT,HVU,2010@byDr.NguyenMinhHoang,SaigonICT,HVU,2010Wired&amp;WirelessCommunication2@byDr.NguyenMinhHoang,SaigonICT,HVU,2010WhatYouWillLearnnnnDefinebandwidthan
Griggs - ECON - 110
A(n) _bit_ is the smallest piece of information with which a computer can work.Because a computer uses direct current (DC) and wall outlets use alternating current (AC), a(n) _power supply _ is needed to convert the current.The _ motherboard _ is the
Griggs - ECON - 110
CHNG TRNH O TO C NHN QUN TR KINH DOANH QUC TWebsite: www.griggs.edu.vn Email: gabba@griggs.edu.vnINTRODUCTIONTOCOMPUTERTESTBANKTimeallocated:120minutes.Chapter 6 Inside the System Unit1) Hardware performance:A) is independent of the operating system
Griggs - ECON - 110
Griggs - ECON - 110
Short Answer1. Explain the difference between RAM and ROM. Why are both types of memory used in acomputer?RAM, which means random access memory, is volatile. The contents of RAM will beerased when a computer is turned off. ROM, which means read-only m
Griggs - ECON - 110
Short Answer1. If you have used a notebook computer, which of the various pointing devicestrackball,touchpad, or pointing stickhave you used? Which input device do you prefer? Explainwhy. Would you consider using an auxiliary mouse (a regular mouse tha
Griggs - ECON - 110
HUMANITIESNguyen, Ngoc ThoVice Dean, Faculty of Culturology,University of Social Sciences and HumanitiesCHINESE PHILOSOPHY1. Yin-yang philosophya. Dualism T duy lng phnAll of nature are considered to be in pairs. Ex: tall-short;fat-slim, beautiful
Griggs - ECON - 110
HUMANITIESNguyen, Ngoc ThoVice Dean, Faculty of Culturology,University of Social Sciences and HumanitiesIV- TRADITIONAL BELIEFS AND RELIGIONS1. Traditional beliefs+ Fertility worshipsWishes of fertility of (1) the nature (the crops); (2) humanbein
Griggs - ECON - 110
HUMANITIESNguyen, Ngoc ThoVice Dean, Faculty of Culturology,University of Social Sciences and HumanitiesV- PERFORMING ARTS1. Practical trainings-Thai danceKhmer danceLao danceRussian danceSamba danceBy Thuong Cong Minh and Phan Hong Diem Linh
Griggs - ECON - 110
HUMANITIESNguyen, Ngoc ThoVice Dean, Faculty of Culturology,University of Social Sciences and HumanitiesIII- COGNITIVE CULTURE1. Yin-yang philosophya. Dualism T duy lng phnAll of nature are considered to be in pairs. Ex: tall-short;fat-slim, beaut
Griggs - ECON - 110
HUMANITIESNguyen, Ngoc ThoVice Dean, Faculty of Culturology,University of Social Sciences and HumanitiesII- PHILOSOPHY1. Oriental philosophiesd. Chinese philosophyII- PHILOSOPHY1. Oriental philosophiesd. Chinese philosophyXia-Shang-Zhou-Qin-Han-
Griggs - ECON - 110
IntroductiontoComputerbyDr.NguyenMinhHoangSaigonICT,HVUhoang.dhbk@gmail.com20101LecturesnnCoursename:IntroductiontoComputer(CPTR105)No.ofSessions:14+2exams(midterm&amp;final)nnThursday(8:30AM11:30AM)3hours/weekOfficehoursnnAfterlecturestimeo
Griggs - ECON - 110
IntroductiontoComputerSpotlight1:EthicsbyDr.NguyenMinhHoangSaigonICT,HVUhoang.dhbk@gmail.com2010@byDr.NguyenMinhHoang,SaigonICT,HVU,20101ComputersAreYourFutureTenthEditionSpotlight1:EthicsCopyright 2009 Pearson Education, Inc. Publishing as Pr
Griggs - ECON - 110
NHNG NN VN MINH MT CHU M 1NGUYN NGC THChu M c phn cn li cath gii bit n t th k 15 caTy lch, c gi l Tn th gii.Tuy nhin, chu M thc cht khngh l chu lc mi v trong lch svng t ny tng c rt nhiu nnvn minh hnh thnh, pht trin huyhong ri sp trc khi ngichu u
Griggs - ECON - 110
Nhng nn vn minh mt chu MK 2: Monte Alban v vn minh ZapotecNGUYN NGC THVo cui thi k Hnh thnh(th k 5-7 trCN), thung lngOaxaca (nay thuc Mexico) chuynmnh. Nhiu cng ng c dnOlmec n nh c v khai phthung lng. Th nhng thng bangMonte Alban mi thc s nh hnh
Griggs - ECON - 110
K 3: NHNG NN VN MINH MT CHU M:Thnh bang TeotihuacanNGUYN NGC THTh k th nht sau Cngnguyn,kthcaTeotihuacan l Cuicuilo sp, m ra giai on pht trinhuy hong ca vn minhthnh th Teotihuacan (naythuc bang Mxico, ncMexico). C th ni thnhbang Teotihuacan
Griggs - ECON - 110
CC NN VN MINH MT CHU M:K 4: THNH TULA V VN MINH TOLTECNGUYN NGC THu th k 8, thnh bang Teotihuacan b cc b lc pha b c trn xu ng v chinhphc, t mt dn nh hng v li tn. Trong su t 200 nm sau , thung lngOaxaca ri rc, phn tn. Vo khong nm 950, thnh Tula bt u n
Griggs - ECON - 110
QUC AZTECNGUYN NGC THNgi Aztec cn gi l ngi Mexica, du du cacc b lc Chichimec v Toltec - thi k hu c in (thk 5 15) l nhng ngi tha k cc di sn vn ha l ngdanh trc nh Teotihuacan v Tula. u th k 13,thnh Tula ca ngi Toltec b cc b lc Chimitec lchu hn t pha
Griggs - ECON - 110
K 6: VN MINH MAYANguyn Ngc ThVn minh Maya bt u xut hin t cui thi k Hnh thnh (tr c th k 2 sauCng nguyn) nhng ch thc s hng thnh vo thi k C i n (200-500) v H u c in (500 1500) trong lch s Trung M. Trn i th c th phn vn minh Mayathi C in lm hai giai on: v
Griggs - ECON - 110
PART 1: BOOK OF THE DEAD IN EGYPTIAN MYTHOLOGY&quot;The Book of Dead&quot; is the usual name given to the ancient Egyptian funerary text called the&quot;Spells of Coming&quot; (or &quot;Going&quot;) &quot;Forth By Day.&quot; The Book of the Dead was intended to assistthe deceased in the afte
Griggs - ECON - 110
I - GUIDELINES FOR PRESENTATIONSGroup 1: Judaic traditionMaterials: textbook page 96-101; World philosophies pgs 223-2421. The history of Israel and the origin of the Israelites. Timelines. Israelite diaspora.2. The worship of Yahweh and the birth of
Griggs - ECON - 110
http:/www.stanford.edu/~siegelr/bhutan/penispage.html:Bhutanese penis pageThe people of Bhutan frequently decorate the outsides of their houses and shops with a varietyof images - tigers, dragons, birds, and so on. One of the most common themes is the