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

PRG 211 Algorithms & Logic - Finals Mock Exam Review - UOPX 2025.

Rating
-
Sold
-
Pages
28
Grade
A+
Uploaded on
28-05-2025
Written in
2024/2025

PRG 211 Algorithms & Logic - Finals Mock Exam Review - UOPX 2025.PRG 211 Algorithms & Logic - Finals Mock Exam Review - UOPX 2025.PRG 211 Algorithms & Logic - Finals Mock Exam Review - UOPX 2025.











Whoops! We can’t load your doc right now. Try again or contact support.

Document information

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

Subjects

Content preview

PRG 211 Algorithms & Logic for
Computer Programming

Finals Mock Exam Review

(Questions & Solutions)

2025




©2025

, Question 1:
Consider an algorithm with the following recurrence:
T(n) = 3T(n/2) + n.
Using the Master Theorem, what is the time complexity of the algorithm?
- A. Θ(n)
- B. Θ(n log n)
- C. Θ(n^log_2(3))
- D. Θ(n^2)

ANS: C. Θ(n^log_2(3))
Rationale: Here, a = 3 and b = 2. We compute exponent log_b(a) =
log_2(3) ≈ 1.585. Since f(n) = n is O(n^(log_2(3)-ε)) (for ε ≈ 0.585), by
Master Theorem (Case 1) the time complexity is Θ(n^log_2(3)).

---

Question 2:
Which algorithmic paradigm is best described by solving a problem
recursively by breaking it into two or more independent subproblems
and then combining their solutions?
- A. Greedy algorithms
- B. Dynamic programming
- C. Divide-and-conquer
- D. Backtracking

ANS: C. Divide-and-conquer
Rationale: Divide‐and‐conquer splits the problem into independent
subproblems, solves each recursively, and merges the solutions. It is
distinct from dynamic programming, where overlapping subproblems are
stored to avoid re-computation.

---
©2025

, Question 3:
A Turing machine is considered the gold standard for a computational
model because it can simulate any algorithm. This concept is captured by
which property?
- A. Turing Completeness
- B. Decidability
- C. Determinism
- D. Finite state operation

ANS: A. Turing Completeness
Rationale: Turing completeness means that a computational model
(like a Turing machine) can simulate any other Turing complete system. It
is the benchmark for what is computable.

---

Question 4:
The Boolean Satisfiability Problem (SAT) is important in computational
complexity because it was the first problem to be proven NP-complete.
Which theorem established this result?
- A. Cook’s Theorem
- B. Gödel’s Incompleteness Theorem
- C. Rice’s Theorem
- D. Bellman’s Principle

ANS: A. Cook’s Theorem
Rationale: Cook’s Theorem (1971) established that SAT is NP-complete,
meaning that any problem in NP can be reduced to SAT in polynomial
time, forming the basis of NP-completeness.

---

Question 5:
Which complexity class contains decision problems that can be solved in
©2025

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.
MedGrad Walden University
View profile
Follow You need to be logged in order to follow users or courses
Sold
29
Member since
2 year
Number of followers
10
Documents
3344
Last sold
1 week ago

Hi there! I'm a former nursing student who loves to share my knowledge and help others succeed. On this account, you'll find my past study notes and papers for nursing and other programs that I've taken or reviewed. They are high-quality, well-organized and easy to understand. Whether you need a quick refresher, a detailed explanation or a sample essay, I've got you covered. Follow me and get access to the best resources for your studies. Trust me, you won't regret it!

Read more Read less
2.6

5 reviews

5
0
4
0
3
3
2
2
1
0

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