100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

CS 6515 Exam 1 QUESTIONS WITH SOLUTION

Rating
-
Sold
-
Pages
8
Grade
A
Uploaded on
25-05-2025
Written in
2024/2025

Binary Search Runtime - O(log n) Merge Sort Runtime - O(n log n) Naive Multiplication of n-bit Integers Runtime - O(n²) Fast Multiplication of n-bit Integers (Using Divide and Conquer) Runtime - O(n^log₂3) ≈ O(n¹.⁵⁹) Median Finding Algorithm Runtime - O(n) FFT (Fast Fourier Transform) Runtime - O(n log n) Gauss's Method for Multiplying Complex Numbers (Number of Multiplications) - 3 multiplications Euclid's GCD Algorithm Runtime - O(log(min(a, b))) Strassen's Algorithm for Matrix Multiplication Runtime - O(n^log₂7) ≈ O(n².⁸ⁱ) Recurrence for Naive Multiplication of n-bit Integers - T(n) = 4T(n/2) + O(n) Recurrence for Fast Multiplication (Divide and Conquer) - T(n) = 3T(n/2) + O(n) Gauss's Formula for Multiplying Two Complex Numbers - (a+bi)×(c+di)=(ac−bd)+(ad+bc)i Recurrence for Merge Sort - 2T(n/2) + O(n) Master Theorem Formula - T(n) = aT(n/b) + O(n^d) a = number of recursive calls b = size of partitions in recursive calls d = degree of work done at each recursive step Matrix Multiplication via Strassen's Algorithm (Formula for Recursive Steps) - T(n)= 7T(n/2) + O(n^2) QuickSelect Algorithm Description - Choose a pivot p. Partition A into elements less than p, equal to p, and greater than p. Recursively search one of the partitions based on the value of k and the size of the partitions. Definition of a Good Pivot - A pivot p is good if it lies between the n/4-th smallest and the 3n/4-th smallest element, meaning the partition sizes are at most 3n/4. Recurrence for Algorithm with an Approximate Median - T(n)=T(0.75n)+O(n), which solves to O(n). Recursive Algorithm to Find a Good Pivot (Main Idea) - Break A into n/5 groups of 5 elements.

Show more Read less
Institution
CS 6515
Course
CS 6515

Content preview

CS 6515 Exam


CS 6515 Exam 1 QUESTIONS WITH
SOLUTION
Binary Search Runtime - O(log n)


Merge Sort Runtime - O(n log n)


Naive Multiplication of n-bit Integers Runtime - O(n²)


Fast Multiplication of n-bit Integers (Using Divide and Conquer) Runtime - O(n^log₂3) ≈
O(n¹.⁵⁹)


Median Finding Algorithm Runtime - O(n)


FFT (Fast Fourier Transform) Runtime - O(n log n)


Gauss's Method for Multiplying Complex Numbers (Number of Multiplications) - 3
multiplications


Euclid's GCD Algorithm Runtime - O(log(min(a, b)))


Strassen's Algorithm for Matrix Multiplication Runtime - O(n^log₂7) ≈ O(n².⁸ⁱ)


Recurrence for Naive Multiplication of n-bit Integers - T(n) = 4T(n/2) + O(n)


Recurrence for Fast Multiplication (Divide and Conquer) - T(n) = 3T(n/2) + O(n)

CS 6515 Exam

, CS 6515 Exam




Gauss's Formula for Multiplying Two Complex Numbers -
(a+bi)×(c+di)=(ac−bd)+(ad+bc)i


Recurrence for Merge Sort - 2T(n/2) + O(n)


Master Theorem Formula - T(n) = aT(n/b) + O(n^d)
a = number of recursive calls
b = size of partitions in recursive calls
d = degree of work done at each recursive step


Matrix Multiplication via Strassen's Algorithm (Formula for Recursive Steps) - T(n)=
7T(n/2) + O(n^2)


QuickSelect Algorithm Description - Choose a pivot p.
Partition A into elements less than p, equal to p, and greater than p.
Recursively search one of the partitions based on the value of k and the size of the
partitions.


Definition of a Good Pivot - A pivot p is good if it lies between the n/4-th smallest and
the 3n/4-th smallest element, meaning the partition sizes are at most 3n/4.


Recurrence for Algorithm with an Approximate Median - T(n)=T(0.75n)+O(n), which
solves to O(n).


Recursive Algorithm to Find a Good Pivot (Main Idea) - Break A into n/5 groups of 5
elements.


CS 6515 Exam

Written for

Institution
CS 6515
Course
CS 6515

Document information

Uploaded on
May 25, 2025
Number of pages
8
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Lectsavvy Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
92
Member since
2 year
Number of followers
39
Documents
3668
Last sold
2 months ago
Lectsavvy

Unlock academic success with me! I'm Lectsavvy, your go-to expert for top-notch study materials, notes, and exam prep on Stuvia. Browse my uploads for: Accurate and concise notes Exam-focused study guides Past papers and solutions High-quality summaries Let's ace those exams together! Follow me for updates, and feel free to reach out with any questions or requests.

4.1

16 reviews

5
10
4
0
3
4
2
1
1
1

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions