{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# ex4 - CS70 Discrete Mathematics for Computer Science Spring...

This preview shows pages 1–2. Sign up to view the full content.

CS70 Discrete Mathematics for Computer Science, Spring 2012 Homework 4 Out: 9 Feb. Due: 5pm, 16 Feb. Instructions: Start each problem on a new sheet. Write your name, section number and “CS70” on every sheet. If you use more than one sheet for a problem, staple them together (but do not staple different problems together). Put your solutions in the boxes on Soda level 2 by 5pm on Thursday: your solution to Q1 goes in box CS70–1, your solution to Q2 goes in box CS70–2, and so on ( five boxes total). You are encouraged to form small groups (two to four people) to work through the homework, but you must write up all your solutions on your own. 1. [Practice with Modular Arithmetic] (a) For each integer x mod 18, say whether or not x has an inverse, and if it does give the inverse. (b) Use Euclid’s algorithm to compute gcd(4725 , 273) . Show clearly the recursive calls made by the algorithm. (c) Use the extended gcd algorithm from class to compute the inverse of 7 mod 220. Show clearly the recursive calls made by the algorithm and the results returned by each call.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}