hw4 - CS 173: Discrete Structures, Spring 2010 Homework 4...

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

View Full Document Right Arrow Icon
CS 173: Discrete Structures, Spring 2010 Homework 4 This homework contains 5 problems worth a total of 50 points. It is due on Friday, 19 February at 4pm. 1. Set Operations [16 points] Suppose you were given the following sets: A = { Piano , { Violin , Viola , Cello } , Guitar } B = {{ Flute, Piccolo } , Cymbals } C = { Piano , Flute } D = {{ Violin, Viola, Cello } , { Flute, Piccolo }} List the elements of the set for the following expressions: (a) A D (b) B C (c) A - ( B - C ) (d) A P ( B C ) (e) ( B D ) × C (f) | P ( B D ) | (g) { X P ( A ) : | X | is not prime } (h) { X ( P ( A ) P ( B )) : | X | ≡ 3 (mod 2) } 2. Euclidean algorithm [4 points] Trace the execution of the Euclidean algorithm (lecture 10 or p 229 in Rosen) on the inputs a = 837 and b = 2015. That is, give a table showing the values of the main variables ( x , y , r ) for each pass through the loop. Explicitly indicate what the output value is.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/09/2011 for the course CS 173 taught by Professor Erickson during the Spring '08 term at University of Illinois, Urbana Champaign.

Page1 / 2

hw4 - CS 173: Discrete Structures, Spring 2010 Homework 4...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online