hw1 - Discrete Computational Structures, CSE 2353, Fall...

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: Discrete Computational Structures, CSE 2353, Fall 2009 Homework # 1, 100 Points, Due 09/22/09 1. [20] Suppose that the universal set U is defined as U = {x | x Є N and 0 < x < 11}. Express each of the following sets with bit string representation where the ith bit in the string is 1 if element i is in the universal set and 0 otherwise. a) {0, 3, 4, 5} b) {1, 3, 9, 10} c) {2, 4, 6, 8, 11} d) For the same universal set, find the set specified by the following bit strings: 1111001111, 0101010101, 1000000001 2. [20] Construct the truth table for each of the following statement formulas: a) (~p Λ (p V q)) q b) ((p q) Λ (q r)) (p r) c) (p Λ (p q)) q d) ((p V q) Λ (p r) Λ (q r)) r 3. [20] Show the intermediate values of the array A = [5, 3, 1, 0, 4, 2, 6, 7] as it is sorted by: a) Bubble Sort Algorithm b) Insertion Sort Algorithm c) Merge Sort Algorithm 4. [20] Find out GCD (d) of (a=72, b=99) using the Euclid Algorithm. Find integers x and y such that d = ax + by. Describe your method of finding x and y. 5. [20] Using Prime testing algorithm, show the intermediate steps of testing whether 97 is a prime number or not. ...
View Full Document

This note was uploaded on 11/11/2009 for the course CSE 2353 taught by Professor Bhanukapoor during the Spring '09 term at SMU.

Ask a homework question - tutors are online