# class7 numbertheory s.pdf - Harvard University Computer...

• 4

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 2 out of 4 pages.

Harvard UniversityComputer Science 20In-Class Problems 7 - Number TheoryExecutive SummaryDivisibility: Ifn6= 0 andaare integers, we say thatndividesa(and writen|a) if there exists anmsuch thata=nm. Whenn|awe also saynis a divisor ofaandais a multiple ofn.The Division Algorithm/Theorem: Ifaanddare integers anddis positive, then there areuniqueintegersqandrsuch thata=dq+rand 0r < d.Euclidean GCD Algorithm:gcd (a , b :p o s i t i v ei n t e g e r s )x:=a ,y:=bwhile(y>0)r:=remainder (x , y)x:=yy:=rreturnxPROBLEM 1Prove the following claim directly from the definition of “divides” (i.e. don’t use facts about divides provedin class or the book). A direct proof should work. You should not have/need a fraction or a division sign inyour proof. Make sure all your variables are defined and quantified properly!Claim: For any integersp,q, andr, wherepis non-zero, ifp|3qand 3q|r, thenp|3q+r.Solution.Hints:Ensure that students identify the givens and the assumptions they should make from the antecedentof the implication.Encourage students to translate/unpack the divides operator into an algebraic expression by using thedefinition.Ensure students are using the divides operator in the correct order. Read “4|12” as “4 divides 12”,which means 12 can be divided by 4 with no remainder.Ensure students have introducedp,qandrcorrectly at the beginning of the proof (they might use“let...” or “for any...”. Their domain should be specified. The hypotheses then specify their relation-ships.Ensure that students are not using facts about divisibility other than the definition.Students should not have a fraction or a division sign anywhere in the proof.

Course Hero member to access this document

Course Hero member to access this document

End of preview. Want to read all 4 pages?

Course Hero member to access this document

Term
Fall
Professor
McKay
Tags
Negative and non negative numbers, Prime number, Euclidean algorithm