Discrete Structures CRN Test 3 Version 1 CMSC 2123 Spring 2011

Size: px
Start display at page:

Download "Discrete Structures CRN Test 3 Version 1 CMSC 2123 Spring 2011"

Transcription

1 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring Print your name on your scantron in the space labeled NAME.. Print CMSC 13 in the space labeled SUBJECT. 3. Print the date, , in the space labeled DATE.. Print your CRN, 1858, in the space labeled PERIOD. 5. Print the test number and version, T1/V1, in the space labeled TEST NO. 6. You may not consult your neighbors, colleagues, or fellow students to answer the questions on this test. 7. Mark the best selection that satisfies the question True/False: Mark selection a if the statement is true or selection b if the statement is false. 7.. Multiple Choice: If selection b is better that selections a and d, then mark selection b. Mark only one selection. Please note that there are five possible answers for question 9 unlike other questions on the test that have only four possible answers. 8. Darken your selections completely. Make a heavy black mark that completely fills your selection. 9. Answer all 50 questions. 10. Record your answers on SCANTRON form 88-E (It is green!) 11. Submit your completed scantron to your instructor on Monday, May, 011 at 11:00 a.m. in room MCS

2 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring Let X = {1,3,5,7,9} and Y = {n 1 n N}, then X Y.. The Well-Ordering Principle can be used to prove that the set of integers has a minimum element. 3. If a b, then gcd(a, b) = b.. The decimal number 1 is represented by the hexadecimal symbol C. 5. The decimal number is equivalent to the binary number The sum of the unsigned binary numbers = A loop invariant is a set of statements that are false when a loop is entered and become true on the final exit from the loop. 8. If p is prime and p ab where a and b are positive integers, then p a and p b. 9. Assume A is any set and P(A) is the power set under the inclusion relation. Then A is an upper bound and is a lower bound for any subset of P(A). 10. Let f = {(x, x 3 + 3) x Z}, where Z is the set of integers. Then the range of f, Im(f), is Z. 11. Let X be a finite set, and let f: x x be a function. If f is one-to-one and Im(f) = X, then f is a one-to-one correspondence.

3 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring If x = 3.98, then the floor of x, x = The linear congruence 9x 1(mod 36) has a solution. 1. The solution of the recurrence relation a n = a n 1 a n, where n, with initial conditions a 0 = 3 and a 1 = 1 is a n = + 3n. 15. Let f be a function of n,where n is the size of the list to be processed. The term asymptotic refers to the study of functions where are unaffected by the size of n. 16. Let f(x) and g(x) be real-valued functions. Then f(x) = O(g(x)) if there exists positive constants, c,and x 0, such that f(x) c g(x) x x Let f(n) = Θ g(n), then f(n) = Θ(h(n)) 18. The selection sort efficiency is O(n ) 19. Let X = { 3,, 1,0,1,}, Y = {3,,5,6,7}, and f = {(,3), ( 1,6), (0,), (1,5), (,7)}. f is a function. 0. Consider the function f: S Z, wheref = {(x, x ) x S}, S = { 3,, 1,0,1,,3}. f is onto Z. 3

4 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring Let A and B be subsets of the universal set U. Of which law is A B = (A B) an example? a. Absorptive law b. Distributive law c. DeMorgan s law d. Idempotency law. Which of the following is true? a. is a prime number and -5 is a nonnegative number. b. 5 is a negative integer if and only if pigs can fly. c. 1 is a prime number or - is not a negative number d. If 3 is not an even integer, then -3 is not a negative integer. 3. To determine whether the argument given below is valid, you would need to construct a truth table for which of the following? p (q r) p ~q p r a. (p (q r) (p ~q) (p r ) b. (p (q r) (p ~q) (p r ) c. (p (q r) (p ~q) (p r ) d. (p (q r) (p ~q) (p r ). Which of the following is false? a. 35 div 8 = b. 19 mod 3 = 73 c. 17 div = 8 d. 39 mod 7 = 5. Compute the binary sum: a b c d What would be the inductive step using the first principle of mathematical induction to prove that n > n for all n 0? a. to show that 0 > 0 b. to show that k > k, where kis an integer and k 0, implies that k+1 > k + 1 is true c. to show that k+1 > k for all k 0 d. to show that k > k for all k 0 7. Let A = {1,,3,} and B = {x, y, z}. If relation R = {(1, y), (, x), (3, z), (, y)}, then which of the following is NOT correct? a. R x b. (, x) R c. R(y) = d. Both b and c.

5 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring Let A be the set of all real numbers and relation R defined on A by R = {(x, y) A A x + y = 9}. Which of the following is true? a. Domain of R, D(R) = {t 0 t 3} b. Range of R, Im(R) = {t 0 t 3} c. Domain of R, D(R) = Range of R, Im(R) = {t 3 t 3} d. Both a and b 9. Let A = {1,,3,,5} and let R be the relation on A defined by R = {(1,3), (,1), (,), (,5), (3,), (,3), (,), (5,1), (5,3)}. Which of the following is true? a. (,) R b. R = R 3 c. R 3 = R d. R 1 = R 30. Which of the following relations defined on the given set is not a partial order relation? a. Power set of A = {a, b, c, d} under inclusion. b. A = {a, b, c, d} R = {(a, a), (b, c), (c, d), (d, d)} c. A = {1,,3,,5} R = {(x, y) x y} d. A = {1,,3,,5,6,7,8,9,10} R = {(x, y) x y} 31. Which of the following relations on set A = {1,,3,} is an equivalence relation? a. R = {(1,1), (,), (3,3), (,), (1,), (,1)}. b. R = {(1,1), (,), (3,3), (1,), (,1)}. c. R = {(1,1), (,), (3,3), (,), (1,)}. d. R = {(1,1), (,), (3,3), (,), (1,), (,1), (,3), (3,)}. 3. Which of the following relations f are functions from the set X to the set Y? a. X = { 3, 1,0,1,}, Y = {3,,5,6,7}, and f = {(,3), ( 1,6), (0,), (1,5), (,7)} b. X = { 3, 1,0,1,}, Y = {3,,5,6,7}, and f = {( 3,3), (,3), ( 1,6), (0,), (,6), (1,5), (,7)} c. X = Q = Y, defined by f n = n + m for all n Q. m m d. X = { 3, 1,0,1,}, Y = {3,,5,6,7}, and f = {(,3), (0,), ( 3,6), ( 1,7), (1,5), (,7)} 5

6 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring Let A = {1,,3,} and B = {a, b, c, d} be sets. Which of the following arrow diagrams is NOT a function from A into B? 1 a 1 a b b 3 c 3 c d d a. c 1 a 3 b c Both a and c d b, d. 3. Which of the following functions does NOT have an inverse? a. X = {x Z < x 5}, Y = {y Z 1 < y 8}, f: X Y defined by f(x) = x + 3 for all x X. b. f: Z Z, f(x) = x + 7 for all x Z c. f: R R, f(x) = x 5 for all x R. d. f: Q Q, f(x) = 8x for all x Q. 35. Consider the sequence:, 3, 5, 8, 1, 17,. Which of the following is a correct representation this sequence? a. a 1 = and a n = a n (a n 1) b. a n = a n 1 + a n c. a 1 = and a n = a n 1 + (n 1) d. a 1 = and a n = a n 1 + n 6

7 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring i=0 36. Consider the sum i(i 1) equivalent sum is: 6 j= 1 j= 1 5 j= 1 j= 1 a. j(j 1) b. j(j 1) c. j(j + 1) d. j(j + 1). If we change the index variable to j = i 1, then the 37. Let A be the set of lowercase English alphabet. Suppose s 1 = oicu and s = rmt. The concatenation of s 1 and s is: a. oicurmt b., the empty set c. 7 d. orimctu 38. Let S = {x, y, z}. Define on S by the following multiplication table: * x y z x x x x Figure 38. Multiplication table for question 38 a. x is identity of (S, ) b. y is identity of (S, ) c. z is identity of (S, ) d. (S, ) does not have an identity y z x x 39. A solution of the congruence 3x = 7(mod 13) is: a. 3 b. 11 c. 1 d What is the remainder when 1! +! ! is divided by 1? a. 9 b. c. 1 d. 7 y z z x 7

8 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring Which of the following ISBNs is valid? a b c d X. Find T(n), the timing function for the code fragment in figure. for (i=0;i<n;i++) { m=n; while (m>1) m=m/; } a. T(n) = 3n log n + 3n + ) b. T(n) = 3n log n + 3n + ) c. T(n) = n log n + 3n + ) d. T(n) = n log n + 3n + ) Figure. Code Fragment for Question. 3. Which of the following is a recurrence relation? a. a n = 3a n 1 + a n n b. a n = n 1 n 1 c. a n+1 = (a n)! n 1 n! a. Both a and c. Give the recurrence relation for the sequence 1, 5, 5, 15, a. a 1 = 1, a n+1 = 5 n b. a 1 = 1, a n+1 = 5a n c. a n = 5 n for n 1 d. a 1 = 1, a n = 5a n+1 for n 1 5. Which of the following is a linear homogeneous recurrence relation? a. a n = 3na n 1 + a n b. a n = 3a n c. a n = 3a n 1 + a n d. a n = a n a n 1 6. Find the solution to the recurrence relation a n = a n 1 where a 0 = 1. a. The solution is a sequence, 1,,, 8, b. The solution is c. The solution is a sequence, 1,, 16, 6, d. The solution is 1 8

9 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring Find the sum of the sequence n. a. n + n b. c. d. n(n+1) n(n 1) n(n 1) 8. What do we normally disregard when we count the number of operations in an algorithm? a. relational operations b. I/O operations c. assignment statements d. arithmetic operators 9. Find T(n), the timing function for the code fragment in figure 9? sum=0; for (a=0;a<n;a++) { for (b=0;b<a;b++) { sum++; } } a. T(n) = 3 n + 5 n + 3 b. T(n) = 3 n + 11 n + 3 c. T(n) = 3n + n + 3 d. T(n) = 3 n + 5 n + 3 Figure 9. Code Fragment for Question 9. 9

10 Discrete Structures CRN 1858 Test 3 Version 1 CMSC 13 Spring Given that array L is sorted in ascending order, what is the time complexity of member function search given in figure 50? class List { int size; int count; int* L; public: int search(int key) { int h=count;l=0; while (l<h) { int m=(l+h)/; if (L[m]=key) return m; if (L[m]<key) h=m-1; else l=m+1; } } return -1; a. T(n) = O(n ) b. T(n) = O(n) c. T(n) = O(log n) d. T(n) = O(n log n) //Maximum number of available entries in the List. //Number of occupied entries in the List. //Index of the entry containing the largest value //Points to a dynamically allocated array of integers used to //implement the list //Search the list for an entry whose value matches the key //The key could not be found in the list Figure 50. Code Fragment for Question

Discrete Structures CRN Test 3 Version 1 CMSC 2123 Autumn 2013

Discrete Structures CRN Test 3 Version 1 CMSC 2123 Autumn 2013 . Print your name on your scantron in the space labeled NAME. 2. Print CMSC 223 in the space labeled SUBJECT. 3. Print the date 2-2-203, in the space labeled DATE. 4. Print your CRN, 786, in the space

More information

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS 2013 MATH 122: Logic and Foundations Instructor and section (check one): K. Mynhardt [A01] CRN 12132 G. MacGillivray [A02] CRN 12133 NAME: V00#: Duration: 3

More information

Computer Organization I Test 1/Version 1 CMSC 2833 Autumn 2007

Computer Organization I Test 1/Version 1 CMSC 2833 Autumn 2007 . Print your name on your scantron in the space labeled NAME. 2. Print CMSC 2833 in the space labeled SUBJECT. 3. Print the date, 9-20-2007, in the space labeled DATE. 4. Print your CRN, 2393, in the space

More information

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points Introduction to Discrete Mathematics 3450:208 Test 1 1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : The inverse of E : The

More information

D I S C R E T E M AT H E M AT I C S H O M E W O R K

D I S C R E T E M AT H E M AT I C S H O M E W O R K D E PA R T M E N T O F C O M P U T E R S C I E N C E S C O L L E G E O F E N G I N E E R I N G F L O R I D A T E C H D I S C R E T E M AT H E M AT I C S H O M E W O R K W I L L I A M S H O A F F S P R

More information

Propositional Logic. What is discrete math? Tautology, equivalence, and inference. Applications

Propositional Logic. What is discrete math? Tautology, equivalence, and inference. Applications What is discrete math? Propositional Logic The real numbers are continuous in the senses that: between any two real numbers there is a real number The integers do not share this property. In this sense

More information

Exam in Discrete Mathematics

Exam in Discrete Mathematics Exam in Discrete Mathematics First Year at the Faculty of Engineering and Science and the Technical Faculty of IT and Design June 4th, 018, 9.00-1.00 This exam consists of 11 numbered pages with 14 problems.

More information

Cartesian Products and Relations

Cartesian Products and Relations Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) : (a A) and (b B)}. The following points are worth special

More information

Homework 1 Submission

Homework 1 Submission Homework Submission Sample Solution; Due Date: Thursday, May 4, :59 pm Directions: Your solutions should be typed and submitted as a single pdf on Gradescope by the due date. L A TEX is preferred but not

More information

Induction and Recursion

Induction and Recursion . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Induction and Recursion

More information

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

Name (please print) Mathematics Final Examination December 14, 2005 I. (4) Mathematics 513-00 Final Examination December 14, 005 I Use a direct argument to prove the following implication: The product of two odd integers is odd Let m and n be two odd integers Since they are odd,

More information

Chapter-2 Relations and Functions. Miscellaneous

Chapter-2 Relations and Functions. Miscellaneous 1 Chapter-2 Relations and Functions Miscellaneous Question 1: The relation f is defined by The relation g is defined by Show that f is a function and g is not a function. The relation f is defined as It

More information

i=1 i B[i] B[i] + A[i, j]; c n for j n downto i + 1 do c n i=1 (n i) C[i] C[i] + A[i, j]; c n

i=1 i B[i] B[i] + A[i, j]; c n for j n downto i + 1 do c n i=1 (n i) C[i] C[i] + A[i, j]; c n Fundamental Algorithms Homework #1 Set on June 25, 2009 Due on July 2, 2009 Problem 1. [15 pts] Analyze the worst-case time complexity of the following algorithms,and give tight bounds using the Theta

More information

MATH 2200 Final Review

MATH 2200 Final Review MATH 00 Final Review Thomas Goller December 7, 01 1 Exam Format The final exam will consist of 8-10 proofs It will take place on Tuesday, December 11, from 10:30 AM - 1:30 PM, in the usual room Topics

More information

ECE608 Midterm 1 Spring 2009 THEN PUT YOUR ADDRESS ON EVERY PAGE OF THE EXAM! NAME: Neatness counts. We will not grade what we cannot read.

ECE608 Midterm 1 Spring 2009 THEN PUT YOUR  ADDRESS ON EVERY PAGE OF THE EXAM! NAME: Neatness counts. We will not grade what we cannot read. ECE608 Midterm Spring 2009 Please fill in the following information. THEN PUT YOUR EMAI ADDRESS ON EVERY PAGE OF THE EXAM! NAME: Email (please put complete address): Neatness counts. We will not grade

More information

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

PROBLEMS ON CONGRUENCES AND DIVISIBILITY PROBLEMS ON CONGRUENCES AND DIVISIBILITY 1. Do there exist 1,000,000 consecutive integers each of which contains a repeated prime factor? 2. A positive integer n is powerful if for every prime p dividing

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.5 Direct Proof and Counterexample V: Floor and Ceiling Copyright Cengage Learning. All

More information

Growth of Functions. As an example for an estimate of computation time, let us consider the sequential search algorithm.

Growth of Functions. As an example for an estimate of computation time, let us consider the sequential search algorithm. Function Growth of Functions Subjects to be Learned Contents big oh max function big omega big theta little oh little omega Introduction One of the important criteria in evaluating algorithms is the time

More information

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth Sets We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth century. Most students have seen sets before. This is intended

More information

Module 1: Analyzing the Efficiency of Algorithms

Module 1: Analyzing the Efficiency of Algorithms Module 1: Analyzing the Efficiency of Algorithms Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS 39217 E-mail: natarajan.meghanathan@jsums.edu What is an Algorithm?

More information

Discrete Structures May 13, (40 points) Define each of the following terms:

Discrete Structures May 13, (40 points) Define each of the following terms: Discrete Structures May 13, 2014 Prof Feighn Final Exam 1. (40 points) Define each of the following terms: (a) (binary) relation: A binary relation from a set X to a set Y is a subset of X Y. (b) function:

More information

CSC 125 :: Final Exam May 3 & 5, 2010

CSC 125 :: Final Exam May 3 & 5, 2010 CSC 125 :: Final Exam May 3 & 5, 2010 Name KEY (1 5) Complete the truth tables below: p Q p q p q p q p q p q T T T T F T T T F F T T F F F T F T T T F F F F F F T T 6-15. Match the following logical equivalences

More information

NOTE: You have 2 hours, please plan your time. Problems are not ordered by difficulty.

NOTE: You have 2 hours, please plan your time. Problems are not ordered by difficulty. EXAM 2 solutions (COT3100, Sitharam, Spring 2017) NAME:last first: UF-ID Section NOTE: You have 2 hours, please plan your time. Problems are not ordered by difficulty. (1) Are the following functions one-to-one

More information

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS. 4 Functions Before studying functions we will first quickly define a more general idea, namely the notion of a relation. A function turns out to be a special type of relation. Definition: Let S and T be

More information

CS 361, Lecture 14. Outline

CS 361, Lecture 14. Outline Bucket Sort CS 361, Lecture 14 Jared Saia University of New Mexico Bucket sort assumes that the input is drawn from a uniform distribution over the range [0, 1) Basic idea is to divide the interval [0,

More information

Fall 2016 Test 1 with Solutions

Fall 2016 Test 1 with Solutions CS3510 Design & Analysis of Algorithms Fall 16 Section B Fall 2016 Test 1 with Solutions Instructor: Richard Peng In class, Friday, Sep 9, 2016 Do not open this quiz booklet until you are directed to do

More information

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers. MATH 4 Summer 011 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 1 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 2 Section 5.1 3 Section Summary Mathematical Induction Examples of

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page (16 points) Circle T if the corresponding statement is True or F if it is False.

Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page (16 points) Circle T if the corresponding statement is True or F if it is False. Name CMSC203 Fall2008 Exam 2 Solution Key Show All Work!!! Page ( points) Circle T if the corresponding statement is True or F if it is False T F GCD(,0) = 0 T F For every recursive algorithm, there is

More information

Module 1: Analyzing the Efficiency of Algorithms

Module 1: Analyzing the Efficiency of Algorithms Module 1: Analyzing the Efficiency of Algorithms Dr. Natarajan Meghanathan Associate Professor of Computer Science Jackson State University Jackson, MS 39217 E-mail: natarajan.meghanathan@jsums.edu Based

More information

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013 Fall 2013 Student Responsibilities Reading: Textbook, Section 3.7, 4.1, & 5.2 Assignments: Sections 3.6, 3.7, 4.1 Proof Worksheets Attendance: Strongly Encouraged Overview 3.6 Integers and Algorithms 3.7

More information

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics. Section 2.1 Introduction Sets are one of the basic building blocks for the types of objects considered in discrete mathematics. Important for counting. Programming languages have set operations. Set theory

More information

Recursive Definitions

Recursive Definitions Recursive Definitions Example: Give a recursive definition of a n. a R and n N. Basis: n = 0, a 0 = 1. Recursion: a n+1 = a a n. Example: Give a recursive definition of n i=0 a i. Let S n = n i=0 a i,

More information

Fall 2017 Test II review problems

Fall 2017 Test II review problems Fall 2017 Test II review problems Dr. Holmes October 18, 2017 This is a quite miscellaneous grab bag of relevant problems from old tests. Some are certainly repeated. 1. Give the complete addition and

More information

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd() Student Responsibilities Week 8 Mat 2345 Week 8 Reading: Textbook, Section 3.7, 4.1, & 5.2 Assignments: Sections 3.6, 3.7, 4.1 Induction Proof Worksheets Attendance: Strongly Encouraged Fall 2013 Week

More information

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Problem 1: Specify two different predicates P (x) and

More information

CSC 125 :: Final Exam December 14, 2011

CSC 125 :: Final Exam December 14, 2011 1-5. Complete the truth tables below: CSC 125 :: Final Exam December 14, 2011 p q p q p q p q p q p q T T F F T F T F (6 9) Let p be: Log rolling is fun. q be: The sawmill is closed. Express these as English

More information

CSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!!

CSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!! CSCE 222 Discrete Structures for Computing Review for Exam 2 Dr. Hyunyoung Lee 1 Strategy for Exam Preparation - Start studying now (unless have already started) - Study class notes (lecture slides and

More information

Induction and recursion. Chapter 5

Induction and recursion. Chapter 5 Induction and recursion Chapter 5 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms Mathematical Induction Section 5.1

More information

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms REVIEW QUESTIONS Chapter 1: Foundations: Sets, Logic, and Algorithms 1. Why can t a Venn diagram be used to prove a statement about sets? 2. Suppose S is a set with n elements. Explain why the power set

More information

Math 109 September 1, 2016

Math 109 September 1, 2016 Math 109 September 1, 2016 Question 1 Given that the proposition P Q is true. Which of the following must also be true? A. (not P ) or Q. B. (not Q) implies (not P ). C. Q implies P. D. A and B E. A, B,

More information

MATH 2200 Final LC Review

MATH 2200 Final LC Review MATH 2200 Final LC Review Thomas Goller April 25, 2013 1 Final LC Format The final learning celebration will consist of 12-15 claims to be proven or disproven. It will take place on Wednesday, May 1, from

More information

MATH FINAL EXAM REVIEW HINTS

MATH FINAL EXAM REVIEW HINTS MATH 109 - FINAL EXAM REVIEW HINTS Answer: Answer: 1. Cardinality (1) Let a < b be two real numbers and define f : (0, 1) (a, b) by f(t) = (1 t)a + tb. (a) Prove that f is a bijection. (b) Prove that any

More information

Computer Organization I CRN Test 3/Version 1 CMSC 2833 CRN Spring 2017

Computer Organization I CRN Test 3/Version 1 CMSC 2833 CRN Spring 2017 . Print your name on your SANTRON in the space labeled NAME. 2. Print MS 2833 in the space labeled SUBJET. 3. Print the date 5-3-27, in the space labeled DATE. 4. Print your RN in the space labeled PERIOD.

More information

Chapter 2 - Basics Structures

Chapter 2 - Basics Structures Chapter 2 - Basics Structures 2.1 - Sets Definitions and Notation Definition 1 (Set). A set is an of. These are called the or of the set. We ll typically use uppercase letters to denote sets: S, A, B,...

More information

CMSC Discrete Mathematics SOLUTIONS TO FIRST MIDTERM EXAM October 18, 2005 posted Nov 2, 2005

CMSC Discrete Mathematics SOLUTIONS TO FIRST MIDTERM EXAM October 18, 2005 posted Nov 2, 2005 CMSC-37110 Discrete Mathematics SOLUTIONS TO FIRST MIDTERM EXAM October 18, 2005 posted Nov 2, 2005 Instructor: László Babai Ryerson 164 e-mail: laci@cs This exam contributes 20% to your course grade.

More information

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel Lecture Notes on DISCRETE MATHEMATICS Eusebius Doedel c Eusebius J. Doedel, 009 Contents Logic. Introduction............................................................................... Basic logical

More information

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 1. Translate each of the following English sentences into formal statements using the logical operators (,,,,, and ). You may also use mathematical

More information

Section Summary. Relations and Functions Properties of Relations. Combining Relations

Section Summary. Relations and Functions Properties of Relations. Combining Relations Chapter 9 Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations Closures of Relations (not currently included

More information

MATH 363: Discrete Mathematics

MATH 363: Discrete Mathematics MATH 363: Discrete Mathematics Learning Objectives by topic The levels of learning for this class are classified as follows. 1. Basic Knowledge: To recall and memorize - Assess by direct questions. The

More information

Module 1. Integers, Induction, and Recurrences

Module 1. Integers, Induction, and Recurrences Module 1. Integers, Induction, and Recurrences This module will look at The integers and the natural numbers. Division and divisors, greatest common divisors Methods of reasoning including proof by contradiction

More information

Conversions between Decimal and Binary

Conversions between Decimal and Binary Conversions between Decimal and Binary Binary to Decimal Technique - use the definition of a number in a positional number system with base 2 - evaluate the definition formula ( the formula ) using decimal

More information

PUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES. Notes

PUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES. Notes PUTNAM PROBLEMS SEQUENCES, SERIES AND RECURRENCES Notes. x n+ = ax n has the general solution x n = x a n. 2. x n+ = x n + b has the general solution x n = x + (n )b. 3. x n+ = ax n + b (with a ) can be

More information

Math 230 Final Exam, Spring 2008

Math 230 Final Exam, Spring 2008 c IIT Dept. Applied Mathematics, May 15, 2008 1 PRINT Last name: Signature: First name: Student ID: Math 230 Final Exam, Spring 2008 Conditions. 2 hours. No book, notes, calculator, cell phones, etc. Part

More information

Algorithms CMSC Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse

Algorithms CMSC Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse Algorithms CMSC-27200 Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse Instructor: László Babai Last updated 02-14-2015. Z denotes the set of integers. All variables in

More information

MAS114: Exercises. October 26, 2018

MAS114: Exercises. October 26, 2018 MAS114: Exercises October 26, 2018 Note that the challenge problems are intended to be difficult! Doing any of them is an achievement. Please hand them in on a separate piece of paper if you attempt them.

More information

0 Sets and Induction. Sets

0 Sets and Induction. Sets 0 Sets and Induction Sets A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a A to denote that a is an element of the set

More information

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2. Chapter 2 Chapter Summary Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.6) Section 2.1 Section Summary Definition of sets Describing

More information

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Chapter : Logic Topics:. Statements, Negation, and Compound Statements.2 Truth Tables and Logical Equivalences.3

More information

Data structures Exercise 1 solution. Question 1. Let s start by writing all the functions in big O notation:

Data structures Exercise 1 solution. Question 1. Let s start by writing all the functions in big O notation: Data structures Exercise 1 solution Question 1 Let s start by writing all the functions in big O notation: f 1 (n) = 2017 = O(1), f 2 (n) = 2 log 2 n = O(n 2 ), f 3 (n) = 2 n = O(2 n ), f 4 (n) = 1 = O

More information

Week Some Warm-up Questions

Week Some Warm-up Questions 1 Some Warm-up Questions Week 1-2 Abstraction: The process going from specific cases to general problem. Proof: A sequence of arguments to show certain conclusion to be true. If... then... : The part after

More information

Problem Points Score Total 100

Problem Points Score Total 100 Final Exam A. Miller Spring 2005 Math 240 0 Show all work. No books, no calculators, no cell phones, no pagers, no electronic devices of any kind. However you can bring to the exam one 8.5 by 11 cheat

More information

Notation Index. gcd(a, b) (greatest common divisor) NT-16

Notation Index. gcd(a, b) (greatest common divisor) NT-16 Notation Index (for all) B A (all functions) B A = B A (all functions) SF-18 (n) k (falling factorial) SF-9 a R b (binary relation) C(n,k) = n! k! (n k)! (binomial coefficient) SF-9 n! (n factorial) SF-9

More information

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence Section 2.4 1 Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations 2 Introduction Sequences are ordered lists of

More information

CS Non-recursive and Recursive Algorithm Analysis

CS Non-recursive and Recursive Algorithm Analysis CS483-04 Non-recursive and Recursive Algorithm Analysis Instructor: Fei Li Room 443 ST II Office hours: Tue. & Thur. 4:30pm - 5:30pm or by appointments lifei@cs.gmu.edu with subject: CS483 http://www.cs.gmu.edu/

More information

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Definition: A binary relation R from a set A to a set B is a subset R A B. Example: Chapter 9 1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R A B. Example: Let A = {0,1,2} and B = {a,b} {(0, a), (0, b), (1,a), (2, b)} is a relation from A to B.

More information

Written Homework #1: Analysis of Algorithms

Written Homework #1: Analysis of Algorithms Written Homework #1: Analysis of Algorithms CIS 121 Fall 2016 cis121-16fa-staff@googlegroups.com Due: Thursday, September 15th, 2015 before 10:30am (You must submit your homework online via Canvas. A paper

More information

Discrete Mathematics CS October 17, 2006

Discrete Mathematics CS October 17, 2006 Discrete Mathematics CS 2610 October 17, 2006 Uncountable sets Theorem: The set of real numbers is uncountable. If a subset of a set is uncountable, then the set is uncountable. The cardinality of a subset

More information

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60 MATH 213 Chapter 2: Basic Structures Dr. Eric Bancroft Fall 2013 Dr. Eric Bancroft MATH 213 Fall 2013 1 / 60 Chapter 2 - Basics Structures 2.1 - Sets 2.2 - Set Operations 2.3 - Functions 2.4 - Sequences

More information

5 + 9(10) + 3(100) + 0(1000) + 2(10000) =

5 + 9(10) + 3(100) + 0(1000) + 2(10000) = Chapter 5 Analyzing Algorithms So far we have been proving statements about databases, mathematics and arithmetic, or sequences of numbers. Though these types of statements are common in computer science,

More information

Time Analysis of Sorting and Searching Algorithms

Time Analysis of Sorting and Searching Algorithms Time Analysis of Sorting and Searching Algorithms CSE21 Winter 2017, Day 5 (B00), Day 3 (A00) January 20, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Big-O : How to determine? Is f(n) big-o of g(n)?

More information

Propositional Logic, Predicates, and Equivalence

Propositional Logic, Predicates, and Equivalence Chapter 1 Propositional Logic, Predicates, and Equivalence A statement or a proposition is a sentence that is true (T) or false (F) but not both. The symbol denotes not, denotes and, and denotes or. If

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH There are 10 types of people in the world: those who understand binary and those who don't. Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Define the

More information

Algorithms CMSC Homework set #1 due January 14, 2015

Algorithms CMSC Homework set #1 due January 14, 2015 Algorithms CMSC-27200 http://alg15.cs.uchicago.edu Homework set #1 due January 14, 2015 Read the homework instructions on the website. The instructions that follow here are only an incomplete summary.

More information

String Matching. Thanks to Piotr Indyk. String Matching. Simple Algorithm. for s 0 to n-m. Match 0. for j 1 to m if T[s+j] P[j] then

String Matching. Thanks to Piotr Indyk. String Matching. Simple Algorithm. for s 0 to n-m. Match 0. for j 1 to m if T[s+j] P[j] then String Matching Thanks to Piotr Indyk String Matching Input: Two strings T[1 n] and P[1 m], containing symbols from alphabet Σ Goal: find all shifts 0 s n-m such that T[s+1 s+m]=p Example: Σ={,a,b,,z}

More information

Preparing for the CS 173 (A) Fall 2018 Midterm 1

Preparing for the CS 173 (A) Fall 2018 Midterm 1 Preparing for the CS 173 (A) Fall 2018 Midterm 1 1 Basic information Midterm 1 is scheduled from 7:15-8:30 PM. We recommend you arrive early so that you can start exactly at 7:15. Exams will be collected

More information

1 2 3 style total. Circle the correct answer; no explanation is required. Each problem in this section counts 5 points.

1 2 3 style total. Circle the correct answer; no explanation is required. Each problem in this section counts 5 points. 1 2 3 style total Math 415 Examination 3 Please print your name: Answer Key 1 True/false Circle the correct answer; no explanation is required. Each problem in this section counts 5 points. 1. The rings

More information

Discrete Math Notes. Contents. William Farmer. April 8, Overview 3

Discrete Math Notes. Contents. William Farmer. April 8, Overview 3 April 8, 2014 Contents 1 Overview 3 2 Principles of Counting 3 2.1 Pigeon-Hole Principle........................ 3 2.2 Permutations and Combinations.................. 3 2.3 Binomial Coefficients.........................

More information

MASTERS EXAMINATION IN MATHEMATICS

MASTERS EXAMINATION IN MATHEMATICS MASTERS EXAMINATION IN MATHEMATICS PURE MATHEMATICS OPTION FALL 2007 Full points can be obtained for correct answers to 8 questions. Each numbered question (which may have several parts) is worth the same

More information

Review Problems for Midterm Exam II MTH 299 Spring n(n + 1) 2. = 1. So assume there is some k 1 for which

Review Problems for Midterm Exam II MTH 299 Spring n(n + 1) 2. = 1. So assume there is some k 1 for which Review Problems for Midterm Exam II MTH 99 Spring 014 1. Use induction to prove that for all n N. 1 + 3 + + + n(n + 1) = n(n + 1)(n + ) Solution: This statement is obviously true for n = 1 since 1()(3)

More information

Problem Set 1 Solutions

Problem Set 1 Solutions Introduction to Algorithms September 24, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Piotr Indyk and Charles E. Leiserson Handout 7 Problem Set 1 Solutions Exercise 1-1. Do Exercise

More information

CMSC Discrete Mathematics FINAL EXAM Tuesday, December 5, 2017, 10:30-12:30

CMSC Discrete Mathematics FINAL EXAM Tuesday, December 5, 2017, 10:30-12:30 CMSC-37110 Discrete Mathematics FINAL EXAM Tuesday, December 5, 2017, 10:30-12:30 Name (print): Email: This exam contributes 40% to your course grade. Do not use book, notes, scrap paper. NO ELECTRONIC

More information

A set is an unordered collection of objects.

A set is an unordered collection of objects. Section 2.1 Sets A set is an unordered collection of objects. the students in this class the chairs in this room The objects in a set are called the elements, or members of the set. A set is said to contain

More information

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant). Sets and Functions 1. The language of sets Informally, a set is any collection of objects. The objects may be mathematical objects such as numbers, functions and even sets, or letters or symbols of any

More information

COM S 330 Homework 05 Solutions. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem.

COM S 330 Homework 05 Solutions. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem. Problem 1. [5pts] Consider our definitions of Z, Q, R, and C. Recall that A B means A is a subset

More information

Divide and Conquer. CSE21 Winter 2017, Day 9 (B00), Day 6 (A00) January 30,

Divide and Conquer. CSE21 Winter 2017, Day 9 (B00), Day 6 (A00) January 30, Divide and Conquer CSE21 Winter 2017, Day 9 (B00), Day 6 (A00) January 30, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Merging sorted lists: WHAT Given two sorted lists a 1 a 2 a 3 a k b 1 b 2 b 3 b

More information

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications n-bit unsigned integer representation Represent integer x as sum of powers of 2: If x = n 1 i=0 b i 2 i where each b i

More information

Math.3336: Discrete Mathematics. Mathematical Induction

Math.3336: Discrete Mathematics. Mathematical Induction Math.3336: Discrete Mathematics Mathematical Induction Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall 2018

More information

Set Basics. P. Danziger

Set Basics. P. Danziger - 5 Set Basics P. Danziger 1 Set Basics Definition 1 (Cantor) A set is a collection into a whole of definite and separate objects of our intuition or thought. (Russell) Such that given an object x and

More information

Part II. Number Theory. Year

Part II. Number Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 Paper 3, Section I 1G 70 Explain what is meant by an Euler pseudoprime and a strong pseudoprime. Show that 65 is an Euler

More information

Exam in Discrete Mathematics

Exam in Discrete Mathematics Exam in Discrete Mathematics First Year at The TEK-NAT Faculty June 10th, 2016, 9.00-13.00 This exam consists of 11 numbered pages with 16 problems. All the problems are multiple choice problems. The answers

More information

MAT 243 Test 2 SOLUTIONS, FORM A

MAT 243 Test 2 SOLUTIONS, FORM A MAT Test SOLUTIONS, FORM A 1. [10 points] Give a recursive definition for the set of all ordered pairs of integers (x, y) such that x < y. Solution: Let S be the set described above. Note that if (x, y)

More information

MATH 114 Fall 2004 Solutions to practice problems for Final Exam

MATH 114 Fall 2004 Solutions to practice problems for Final Exam MATH 11 Fall 00 Solutions to practice problems for Final Exam Reminder: the final exam is on Monday, December 13 from 11am - 1am. Office hours: Thursday, December 9 from 1-5pm; Friday, December 10 from

More information

7.4 DO (uniqueness of minimum-cost spanning tree) Prove: if all edge weights are distinct then the minimum-cost spanning tree is unique.

7.4 DO (uniqueness of minimum-cost spanning tree) Prove: if all edge weights are distinct then the minimum-cost spanning tree is unique. Algorithms CMSC-700 http://alg1.cs.uchicago.edu Homework set #7. Posted -19. Due Wednesday, February, 01 The following problems were updated on -0: 7.1(a), 7.1(b), 7.9(b) Read the homework instructions

More information

Countable and uncountable sets. Matrices.

Countable and uncountable sets. Matrices. Lecture 11 Countable and uncountable sets. Matrices. Instructor: Kangil Kim (CSE) E-mail: kikim01@konkuk.ac.kr Tel. : 02-450-3493 Room : New Milenium Bldg. 1103 Lab : New Engineering Bldg. 1202 Next topic:

More information

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, } Integers and Division 1 The Integers and Division This area of discrete mathematics belongs to the area of Number Theory. Some applications of the concepts in this section include generating pseudorandom

More information

(1) Which of the following are propositions? If it is a proposition, determine its truth value: A propositional function, but not a proposition.

(1) Which of the following are propositions? If it is a proposition, determine its truth value: A propositional function, but not a proposition. Math 231 Exam Practice Problem Solutions WARNING: This is not a sample test. Problems on the exams may or may not be similar to these problems. These problems are just intended to focus your study of the

More information

Discrete Structures Homework 1

Discrete Structures Homework 1 Discrete Structures Homework 1 Due: June 15. Section 1.1 16 Determine whether these biconditionals are true or false. a) 2 + 2 = 4 if and only if 1 + 1 = 2 b) 1 + 1 = 2 if and only if 2 + 3 = 4 c) 1 +

More information

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel LECTURE NOTES on DISCRETE MATHEMATICS Eusebius Doedel 1 LOGIC Introduction. First we introduce some basic concepts needed in our discussion of logic. These will be covered in more detail later. A set is

More information