(l) Represent each of the sets A, B and C using bit strings. Then, use bit string representation and bitwise logical operations to find

Similar documents
1. Represent each of these relations on {1, 2, 3} with a matrix (with the elements of this set listed in increasing order).

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

1. (15 points) Solve the decanting problem for containers of sizes 199 and 179; that is find integers x and y satisfying.

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

Discrete Mathematics Exam File Fall Exam #1

Introduction to Sets and Logic (MATH 1190)

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Fall

UNIT-II NUMBER THEORY

Lesson 19: The Graph of a Linear Equation in Two Variables Is a Line

r=1 The Binomial Theorem. 4 MA095/98G Revision

Odd-Numbered Answers to Exercise Set 1.1: Numbers

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

Power Set of a set and Relations

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012

Summary of Course Coverage

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1

ECS 20 Lecture 9 Fall Oct 2013 Phil Rogaway

To illustrate what is intended the following are three write ups by students. Diagonalization

Properties. Comparing and Ordering Rational Numbers Using a Number Line

CS 341 Homework 1 Basic Techniques

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

Antisymmetric Relations. Definition A relation R on A is said to be antisymmetric

Math Week in Review #5. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both.

1.3 Primitive Recursive Predicates and Bounded Minimalization

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Fundamentals of Discrete Mathematical Structures

Chapter 1: Number and Operations

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

Computer Science 236 Fall Nov. 11, 2010

Strategies for Proofs

11 Sets II Operations

Logic and Discrete Mathematics. Section 2.5 Equivalence relations and partitions

Discrete Mathematics and Probability Theory Fall 2015 Rao Midterm 1

DISCRETE MATHEMATICS

CISC 1400 Discrete Structures

COMP232 - Mathematics for Computer Science

Discrete structures - CS Fall 2017 Questions for chapter 2.1 and 2.2

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

10/11/2018. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings

Modular Arithmetic. Marizza Bailey. December 14, 2015

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Midterm 1

Quiz 1 Solutions. [1 point] No hackers are willing to waltz. Solution. x R(x) S(x) [1 point] No artists are unwilling to waltz.

Review of Operations on the Set of Real Numbers

Today s Topics. What is a set?

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value

CS 441 Discrete Mathematics for CS Lecture 24. Relations IV. CS 441 Discrete mathematics for CS. Equivalence relation

REGULAR GRAPHS OF GIVEN GIRTH. Contents

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

Loop Invariant Examples

Relations. We have seen several types of abstract, mathematical objects, including propositions, predicates, sets, and ordered pairs and tuples.

The word zero has had a long and interesting history so far. The word comes

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

Practice Final. Read all the problems first before start working on any of them, so you can manage your time wisely

1. Relations 2. Equivalence relations 3. Modular arithmetics. ! Think of relations as directed graphs! xry means there in an edge x!

Chapter 3. Set Theory. 3.1 What is a Set?

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

4&5 Binary Operations and Relations. The Integers. (part I)

Indicate the option which most accurately completes the sentence.

CS40-S13: Functional Completeness

CHAPTER 3 FUZZY RELATION and COMPOSITION

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

Proof Techniques Alphabets, Strings, and Languages. Foundations of Computer Science Theory

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Exercise 1.1. Page 1 of 22. Website: Mobile:

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

Algebra 1 Review. Properties of Real Numbers. Algebraic Expressions

following determine whether it is an element, subset or neither of A and

(DMCA101) M.C.A. DEGREE EXAMINATION, MAY First Year INFORMATION TECHNOLOGY

A metric space is a set S with a given distance (or metric) function d(x, y) which satisfies the conditions

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers

Solution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343

Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

CSC Discrete Math I, Spring Sets

(3 Hours) N.B. (1) Question No. 1 is compulsory. (2) Attempt any four from the remaining six questions. (3) Figures to the right indicate full marks.

In this section we take an aside from the normal discussion in algebra.

1 Elementary number theory

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

Discrete Mathematics. Kruskal, order, sorting, induction

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

3. Determine whether f is a function from the set of all bit strings to the set of integers if

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH 1301 DISCRETE MATHEMATICS TIME ALLOWED: 2 HOURS

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Section 4.2 selected answers Math 131 Multivariate Calculus D Joyce, Spring 2014

CSE 215: Foundations of Computer Science Recitation Exercises Set #4 Stony Brook University. Name: ID#: Section #: Score: / 4

CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM

CSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD

Table 1 below illustrates the construction for the case of 11 integers selected from 20.

ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes)

CS February 17

School of Distance Education University of Kerala M.Sc Computer Science Assignment Topics

Hickman County Curriculum Map Geometry First Nine Weeks

Geometry. Copy each word and write the definition from your notes, not the book.

Limits and Continuity: section 12.2

Transcription:

Fall 2004 Ahmed Elgammal CS 205: Sample Final Exam December 6th, 2004 1. [10 points] Let A = {1, 3, 5, 7, 9}, B = {4, 5, 6, 7, 8}, C = {2, 4, 6, 8, 10}, D = {1, 2, 3} and let the universal set be U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} (a) A = (b) A B = (c) B = (d) (A B) C = (e) A (B C) = (f) (B A) (B C) = (g) (A C) = (h) (A C) = (i) P (D) = (j) D (B C) = (k) P (A) = (l) Represent each of the sets A, B and C using bit strings. Then, use bit string representation and bitwise logical operations to find (A B) (B C) 1

2. (a) [2 points] find the dual the following propositions: (q p) (p T ) ( q F ) (b) [3 points] Put the following proposition into a disjunctive normal form: p (q r) (c) [5 points] Let the universe of discourse consists of all students in your class and let C(x) be x has a cat, let D(x) be x has a dog, and let F (x) be x has a ferret. Express each of the following statements in terms of C(x), D(x), F (x), quantifiers, and logical connectives. i. A student in your class has a cat, a dog and a ferret. ii. Some student has a cat and a dog but not a ferret. iii. No student in your class has a cat, a dog, and a ferret. iv. For each of the three animals, cats, dogs, and ferrets, there is a student in your class who has one of these animals as a pet. v. None of the students who have cats have dogs. 2

3. [10 points] Let p, q, and r be the propositions p: You get an A on the final exam q: You do every exercise in this book r: You get an A in this class Write the following propositions using p, q, and r and logical connectives (a) If you do every exercise in this book you will get an A in this class. (b) You get an A in this class only if you get an A in the final exam. (c) To get an A in this class it is necessary for you to get an A in the final (d) Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class. (e) You will get an A in this class if and only if you either do every exercise in this book or you get an A on the final. 3

4. [10 points] Determine the truth value of each of the following statements if the universe of discourse is the set of real numbers (explain your answers). (a) x y(x 2 = y) (b) x y(y 2 = x) (c) x y(xy = 0) (d) x(x 0 y(xy = 1)) (e) x y(y 0 xy = 1) (f) x y((x + 2y = 2) (2x + 4y = 5)) (g) x y(y 2 x = 1) (h) x y z(z = (x + y)/2) (i)!x(x 2 = 1) (j)!x P (x) xp (x) 4

5. [14 points] Consider the following relations on the set of all real numbers. Determine whether each of them is reflexive, symmetric, antisymmetric or transitive. Fill in your answers as yes or no in the table provided. Relation Reflexive? Symmetric? Antisymmetric? Transitive? x + y = 0 x = 2y xy = 0 xy 1 x y x is multiple of y x = y 2 5

6. [12 points] Let R and S be relations on the set {1, 2, 3, 4} where R = {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)} and S = {(2, 1), (3, 1), (3, 2), (4, 2)}. Find each of the following: (a) r(r) (the reflexive closure of R) (write your final answer in zero-one matrix form) (b) s(s) (the symmetric closure of S) (write your final answer in zero-one matrix form) (c) The composite of R and S, i.e., S R = (write your final answer in zero-one matrix form) (d) The composite of S and R, i.e., R S = (write your final answer in zero-one matrix form) 6

(e) R 2, R 3, R 4 (write your final answer in zero-one matrix form) (f) Find the transitive closure of R (write your final answer in zero-one matrix form) 7

7. [10 points] Let A be the set of integers and let R be the relation on A A defined by: (a, b)r(c, d) iff a + d = b + c (a) Prove that R is an equivalence relation. (b) Now let A = {1, 2, 3,, 14, 15} and let R be defined on A A as above. Find the equivalence class of (2,7) 8

8. [10 points] (a) Prove that the inclusion relation is a partial ordering on the power set of a set S. (b) Is (P (S), ) totally ordered? explain why. (c) Let S = {a, b, c} Draw a Hasse diagram for (P (S), ). 9

9. (a) [5 points] Prove that if n is an integer and n 3 + 5 is odd then n is even (b) [5 points] Prove that n 2 is divisible by a prime p if and only if n is divisible by p. 10

10. (a) [5 points] Prove that 6 7 2 is irrational. (you can use the theorem: 2 is irrational) (b) [5 points] Prove or disprove that if r is any rational number and s is any irrational number, then r/s is irrational 11

11. (a) [6 points] Use mathematical induction to prove that for all integers n 0, 2 3n 1 is divisible by 7. (b) [6 points] Use mathematical induction to prove that n+1 i 2 i = n 2 n+2 + 2 for all integers n 0 i=1 12

12. [10 points] Determine whether 1011 belongs to each of these regular sets: (a) 10 1 (b) 1(01) 1 (c) (10) (11) (d) (10) 1011 (e) (1 00)(01 0)1 13