Appendix A: Review of Necessary Mathematics
Page 1 of 38
Appendix A: Review of Necessary Mathematics
Except for the material that is marked
or
this text does not require that you have a strong
background in mathematics. In particular, it is not assumed th
Chapter 7: Introduction to Computational Complexity - The Sorting Problem
Page 1 of 17
Chapter 7: Introduction to Computational ComplexityThe Sorting Problem
We presented a quadratic-time sorting algorithm (Exchange Sort) in Section 1.1. If computer scien
Chapter 3: Dynamic Programming
Page 1 of 44
Chapter 3: Dynamic Programming
Overview
Recall that the number of terms computed by the divide -and-conquer algorithm for determining the nth
Fibonacci term (Algorithm 1.6) is exponential in n. The reason is tha
Chapter 1: Algorithms - Efficiency, Analysis, and Order
Page 1 of 43
Chapter 1: AlgorithmsEfficiency, Analysis,
and Order
This text is about techniques for solving problems using a computer. By "technique" we do not mean a
programming style or a programmi
Chapter 2: Divide-and-Conquer
Page 1 of 41
Chapter 2: Divide-and-Conquer
Overview
Our first approach to designing algorithms, divide-and-conquer, is patterned after the brilliant strategy
employed by the French emperor Napoleon in the Battle of Austerlitz
CSC 510
Name_
Homework #3
Collaborators_
(1) We have seen that the Dynamic Programming algorithm for the Traveling Salesman
Problem has a time complexity of T(n) = (n - 1)(n 2)2n-3 . Suppose that on our present
computer we can run an instance of n = 5 in
Homework #8
Mergesort has the following recurrence equation in the worst case:
W(n) = 2W(n/2) + n - 1
W(1) = 0
We saw that this has the solution W(n) = n lg n - n + 1, so W(n) (n log n).
Consider Ternary Mergesort, where an array of n numbers is divided a
CS C 5 10 Name
ltJV’YLs'LL/wvfzjgﬁz #9 Collaborators
\ A For the traveling Salesman Problem we have the following directed graph
giVen as an adjacency matrix W. The value in the ill1 row and thejth column gives the
direct distance from vertex ito vertex j
CSC 510 Midterm 1(A) Name K E I
Spring 2015
Answer all questions on the exam itself. If you need extra room, use the backs of
pages, but indicate clearly for the graders where your ﬁnal answer is. Show all your
work so that partial credit can be given in
' i
CSC 510 Midterm I Nameﬂﬂﬂ
Spring 2016
In each ofthe foliowing questions, circle the letter corresponding to the one
correct answer.
1. (10 points)
(ign)~1 . (ignioi
@ :[1 - 3.] (a) 2971-5—11
b 193—1
(b)%[1~ 32] “n
[c)1-n‘93
4- i
(d)4[;}§* 1} @None o
csc 510 Name K EI
Midterm 2 — Fall 2015
l. (20 points) For each question, circle the one correct answer.
1. For n = 32, in the worst case Merge Sort w0uld be expected to perform
how many comparisons?
(a) (32)2 = 1024
_® 129
(c) 320
(d) 64
2. For n = 32, i
CSC 510 Name
Midterm 2 — Fall 2015
I. (20 points) For each question, circle the one correct answer.
1. For n = 32, in the worst case Merge Sort would be expected to perform
how many comparisons?
(a) (32)2 = 1024
(b) 129
(c) 320
(d) 64
2. For n = 32, in
CSC 510
Midterm I
Name_
Spring 2014
Answer all questions on the exam itself. If you need extra room, use the backs of
pages, but indicate clearly for the graders where your final answer is. Show all
CSC 510
Homework #1
Evaluate the following summations:
100
1. i =
i =1
Name_
(Collaborators_)
100
2. 1 =
lg n
100
3. n =
i =1
4. i =
i =1
i =1
lg n
lg n
5. i =
i=0
lg n
6
CSC 510 Name
Homework, #1L
7 Collaborators
V For the Traveling SalesnianPr‘oblem We ‘ M 7 ’i'
an adjacency matrix W. The value in the ith row and thejth column gives the direct distance from
vertex zto vertex j. For example, the distance from v3 to v5 is
CSC 510
Name_
Homework #16
Collaborators_
Consider the n-Queens Problem for n = 5; i.e., placing 5 queens on a 5 x 5
chessboard so that no two queens threaten each other along any row, column, or
diagonal. Assume, as in the textbook example of the 4-Queen
CSC 510
Name_
Homework #15
Collaborators_
The Sum of Subsets Problem is outlined on pp. 204-9 of the textbook in the context of a
Backtracking algorithm. Basically, given n positive integers and a positive integer W, the
goal is to find all subsets of the
csc 510 Midterm I NameJSEL—_
Spring 2014 ‘1.
Answer all questions on the exam itself. If you need extra room, use the backs of
pages, but indicate clearly for the graders where your final answer is. Show all your
work so that’partial credit can be given i
Chapter 5: Backtracking
Page 1 of 32
Chapter 5: Backtracking
If you were trying to find your way through the well-known maze of hedges by Hampton Court Palace in England, you
would have no choice but to follow a hopeless path until you reached a dead end.
Chapter 11: Introduction to Parallel Algorithms
Page 1 of 22
Chapter 11: Introduction to Parallel Algorithms
Overview
Suppose you want to build a fence in your backyard and it's necessary to dig 10 deep holes, one for each
fence post. Realizing that it wo
Index
Page 1 of 25
Index
A
Note: Specific algorithms are in boldface.
Procedures are in italics.
(n2) algorithm, 26-31
A(n). See Average-case time complexity analysis
Abductive inference, 255-264
Best-First Search with Branch-and-Bound Pruning, 263-264
de
Index
Page 1 of 25
Index
A
Note: Specific algorithms are in boldface.
Procedures are in italics.
(n2) algorithm, 26-31
A(n). See Average-case time complexity analysis
Abductive inference, 255-264
Best-First Search with Branch-and-Bound Pruning, 263-264
de
Index
Page 1 of 25
Index
A
Note: Specific algorithms are in boldface.
Procedures are in italics.
(n2) algorithm, 26-31
A(n). See Average-case time complexity analysis
Abductive inference, 255-264
Best-First Search with Branch-and-Bound Pruning, 263-264
de
Chapter 9: Computational Complexity and Interactability - An Introduction to the Theory . Page 1 of 38
Chapter 9: Computational Complexity and
InteractabilityAn Introduction to the Theory
of NP
Consider the following scenario based on a story in Garey and