0% found this document useful (0 votes)
482 views2 pages

Discrete Math Exam Questions

The document is the midterm examination for a discrete mathematics course. It contains 8 problems covering topics like: 1) Defining big-O and Theta notation for asymptotic growth rates of functions. 2) Showing examples of functions that are or aren't O() or Θ(). 3) Describing pseudocode for an algorithm to find the largest element in a list. 4) Analyzing the time complexity of said algorithm. 5) Describing the bubble sort algorithm and its time complexity. 6) Defining the Fibonacci sequence recursively and finding the 10th number. 7) Providing a recursive algorithm to find the sum of the first n

Uploaded by

Sandeep Saju
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
482 views2 pages

Discrete Math Exam Questions

The document is the midterm examination for a discrete mathematics course. It contains 8 problems covering topics like: 1) Defining big-O and Theta notation for asymptotic growth rates of functions. 2) Showing examples of functions that are or aren't O() or Θ(). 3) Describing pseudocode for an algorithm to find the largest element in a list. 4) Analyzing the time complexity of said algorithm. 5) Describing the bubble sort algorithm and its time complexity. 6) Defining the Fibonacci sequence recursively and finding the 10th number. 7) Providing a recursive algorithm to find the sum of the first n

Uploaded by

Sandeep Saju
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Mathematics 2320 Discrete Mathematics MidtermExamination

October 21 2013
Instructions: Do all problems. Present your solutions in the accompanying booklet in the order that they appear on this paper. No notes, crib sheets or books are allowed. A calculator is allowed. Questions are of equal weight. The test is 2 hours long. 1. Given two function f and g from the set of integers or the set of real numbers to the set of real numbers (a) define precisely what it means for f (x) to be (g (x) (b) define precisely why it means for f (x) not to be O(g (x) in such a way that no negation symbol comes before a logical connective for instance : (x, P (x) Q(x)) x : P (x) Q(x) 2. Show that x log x is O(x2 ) but that x2 is not O(log x). (3.2 no. 12) 3. Show that 4x2 log x + 6x log2 x is (x3 ). (like example 12 p. 215) 4. Describe an algorithm using pseudocode, as in the text or as in lecture notes, that locates the first occurrence of the largest element in a finite list of integers, where the integers in the list are not necessarily distinct (3.1 no. 17) 5. Using the number of comparisons as a measure of complexity, deduce the time complexity of the algorithm in the previous problem 6. Describe the bubble sort algorithm. What is the order of its time complexity? (see online notes) 7. What is the recursive definition that defines the Fibonacci sequence. What is the 10th Fibonacci number? (see page 347)

8. Give a recursive algorithm for finding the sum the first n even positive numbers. ( like 5.4 no. 9)

You might also like