Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CS6515 Exam 2 – 100% Solved Questions | Algorithms, Graph Theory, RSA, Modular Arithmetic | 2025/2026

Rating
-
Sold
-
Pages
29
Grade
A+
Uploaded on
01-10-2025
Written in
2025/2026

This document contains a complete set of solved questions for Exam 2 of the CS6515 - Graduate Algorithms course, applicable to the 2025/2026 academic cycle. It serves as a high-yield, exam-focused study resource covering both theoretical foundations and algorithmic applications. Topics include modular arithmetic (modulo operations, multiplicative inverses, Fermat’s and Euler’s theorems), number theory (GCD, extended Euclidean algorithm), RSA encryption and decryption, primality testing, and efficient exponentiation. In-depth graph algorithms are covered comprehensively: BFS, DFS, Dijkstra, Bellman-Ford, Floyd-Warshall, Topological Sort, Strongly Connected Components (SCC), 2SAT, and Minimum Spanning Tree algorithms (Kruskal and Prim). Max flow algorithms such as Ford-Fulkerson and Edmonds-Karp are also thoroughly explained, alongside residual network construction and applications like image segmentation and min-cut problems. This document is especially suited for: Graduate students in Computer Science Students preparing for Georgia Tech’s CS6515: Introduction to Graduate Algorithms Learners studying for technical coding interviews involving graph theory and number theory Anyone reviewing for advanced algorithm courses across U.S. universities With precise algorithm definitions, runtime analysis, and worked-out examples, this guide is designed to reinforce both conceptual clarity and practical problem-solving speed. Keywords: CS6515, algorithms exam, graph algorithms, modular arithmetic, RSA encryption, Fermat’s theorem, Euler’s theorem, BFS, DFS, Dijkstra, Bellman-Ford, Floyd-Warshall, Kruskal’s algorithm, Prim’s algorithm, Ford-Fulkerson, Edmonds-Karp, max flow, min cut, 2SAT, SCC, MST, Euclidean algorithm, runtime analysis, Georgia Tech

Show more Read less
Institution
CS6515
Course
CS6515

Content preview

CS6515 - Exam 2 Algorithms 2025/2026
Exam Questions and Answers | 100%
Solved



Equivalence - 🧠 ANSWER ✔✔"x ≡ y (mod N) means that x/N and y/N have

the same remainder

a ≡ b (mod N) and c ≡ d (mod N) then:

a + c ≡ a + d ≡ b + c ≡ b + d (mod N)

a - c ≡ a - d ≡ b - c ≡ b - d (mod N)

a ** c ≡ a ** d ≡ b ** c ≡ b ** d (mod N)

ka ≡ kb (mod N) for any integer k

ak ≡ bk (mod N) for any natural number k

a + k ≡ b + k (mod N) for any integer k

a + b = c, then a (mod N) + b (mod N) ≡ c (mod N)

,a ** b = c, then a (mod N) ** b (mod N) ≡ c (mod N)"


Multiplicative Inverse - 🧠 ANSWER ✔✔"Exists iff x and N are relatively

prime

Is unique 1 ≤ inverse < N if it exists

z is the multiplicative inverse of x if zx ≡ 1 (mod N)

z ≡ x^(−1) (mod N)

x ≡ z^(−1) (mod N)"


Greatest Common Divisor - 🧠 ANSWER ✔✔"gcd(x,y) = largest number that

divides both x and y

gcd(x,y) = gcd(x mod y, y)"


Relatively Prime - 🧠 ANSWER ✔✔iff gcd(a,b) = 1


Fermat's Little Theorem - 🧠 ANSWER ✔✔"If p is a prime number:


a^p≡ a (mod p)

a^p-1 ≡ 1 (mod p) for 1 ≤ a ≤ p−1

a^(p-1) ≡ 1 (mod p) if a mod p ≠ 0

a^((p-1)*k) ≡ 1 (mod p) if a mod p ≠ 0 and any natural number k

, r is a prime number iff a^(r-1) ≡ 1 (mod r) for 1 ≤ a ≤ r−1"


Euler's totient function - 🧠 ANSWER ✔✔"N = pq where p and q are distinct

prime numbers

Denoted as ϕ(N)

- How many numbers from 1 to n are relatively prime to n

- 1 ≤ x ≤ N such that gcd(N,x) = 1

- ϕ(p) = p-1 where p is a prime number

- ϕ(p^2) = p(p-1) where p is a prime number

- ϕ(N) = (p-1)(q-1)"


Euler's Theorem - 🧠 ANSWER ✔✔"N = pq where p and q are distinct prime

numbers

If a,N are relatively prime:

a^ϕ(N) ≡ 1 (mod N)

a^(p-1)(q-1) ≡ 1 (mod pq)

a^ϕ(N)k ≡ 1 (mod N)

a^(p-1)(q-1)k ≡ 1 (mod pq)"



COPYRIGHT©NINJANERD 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE. PRIVACY
STATEMENT. ALL RIGHTS RESERVED
3

Written for

Institution
CS6515
Course
CS6515

Document information

Uploaded on
October 1, 2025
Number of pages
29
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$15.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Thumbnail
Package deal
CS6515 EXAM COMPLETE PACKAGE DEAL
-
2 2025
$ 22.88 More info

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.
NinjaNerd Liberty University
View profile
Follow You need to be logged in order to follow users or courses
Sold
382
Member since
2 year
Number of followers
6
Documents
14915
Last sold
4 days ago
NinjaNerd

Here You will All Documents and Package Deals Offered by Seller NinjaNerd.

3.5

74 reviews

5
26
4
14
3
16
2
4
1
14

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions