Unformatted text preview:

CS 6363 Design and Analysis of Algorithms Sample Exam D T Huynh Professor 1 Student Name General Remarks This exam comprises 4 problems Problem 1 is assigned 25 points Problem 2 is assigned 25 points Problem t3 is assigned 25 points and Problem 4 is assigned 25 points Thus the maximum score is 100 points Unless explicitly stated are required for your algorithms and time complexity means worst case no correctness proofs complexity Provide clean answers on the exam booklet Use aditional paper only when necessary This is a closed book exam Good Luck Problem tt 4 Let A l n if it appears all significant as a black box be an array of integers An element x EA is said to be significant at least fn 47 times in A The goal is to design an O n algorithm elements assuming the linear if they exist in A l n SELECTION algorithm to compute l The linear SELECTION algorithm assumes all elements in the input array are distinct In order to apply SELECTION A to obtain a new array B such that all elements should be linear r L e L k f n l l J show how you can modify the elements in the array of B are distinct Your algorithm o r L I vi 7 2 Noting that in case A is sorted a significant element will appear consecutively 1 n 41 times in A in linear show how to use SELECTION on B to compute all significant time Analyze the running at least elements time of your algorithm B 1 1 t J e a Q u b 8 c rrL 7 4 1 1 7 2 2 VL 7 4 6e k a I L e t I C 6 d Cl C l n 1 vi L ft I J J ov J 11v A QfaJ re p u i l 1 CCU AI f f M c PA


View Full Document

UT Dallas CS 6363 - Sample Exam #1

Documents in this Course
Exam #1

Exam #1

5 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec14

lec14

11 pages

lec13

lec13

22 pages

lec12

lec12

8 pages

lec11

lec11

3 pages

lec10new

lec10new

11 pages

lec9

lec9

13 pages

lec8

lec8

9 pages

lec7

lec7

10 pages

lec6

lec6

8 pages

lec4

lec4

5 pages

lec3

lec3

5 pages

lec1

lec1

3 pages

greedy

greedy

4 pages

siphon

siphon

18 pages

hwk5

hwk5

3 pages

Load more
Download Sample Exam #1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Sample Exam #1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Sample Exam #1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?