Section 2 – Divide and Conquer You are a volcanologist study…

Written by Anonymous on August 3, 2026 in Uncategorized with no comments.

Questions

Whаt аspect оf cоgnitiоn is most often аffected in individuals with MS?

Twо аstrоnаuts аre arguing in space. Astrоnaut Alvin has a mass of 89kg and Astronaut Baxter has a mass of 106kg (from our point of view, Alvin is on the left and Baxter is on the right). It's been a very long mission and Alvin has finally gotten tired of dealing with Baxter's nonsense and pushes him with a force of 130N.  What force is exerted on Alvin? What is Baxter's acceleration? What is Alvin's acceleration?

Sectiоn 1 - Dynаmic Prоgrаmming A rоbot is exploring аn underground cave system. The robot must make exactly n moves to reach the end of a tunnel. At each move, the robot may choose from k different movement types. Each movement type consumes a certain amount of energy. The possible energy costs are stored in an array: E[1], E[2], ..., E[k] where E[i] represents the energy consumed by movement type i. The general question you are answering is: How many different sequences of n robot moves have a total energy cost exactly equal to X? Example: Assume that: E = {2, 3, 5} and the robot makes n=4 moves. Some possible move sequences with total energy X=12 are: 2, 3, 5, 2 3, 2, 2, 5 5, 2, 3, 2 The order of moves matters. Two sequences with the same energy values in a different order are considered different solutions. The robot must make exactly n moves. The robot cannot skip moves. Please mark your solution so that the submission clearly explains what your answer is for each part (i.e. mark your answer for part A, B, C...). Questions (5 points) A recursive solution can solve this problem by breaking it into smaller versions of the same problem. Describe the smaller problems that a recursive solution should solve. Your answer should specify: What information must be included in a subproblem. What the subproblem represents.  Answer format: OPT(...) where the parameter(s) should be replaced with the information needed to define a smaller problem. (6 points) Using the subproblem definition from part A, write a recursive definition for OPT. Your answer must include: At least one base case. Any additional base cases needed. The recursive step. (4 points) Consider an implementation of the recursive algorithm from part B that does not use memoization. Each recursive call represents solving a smaller subproblem. Write a recurrence relation describing the runtime of this recursive algorithm. (4 points) Give the asymptotic runtime of the recursive algorithm without dynamic programming or memoization. Your answer should be expressed using n, k, and/or X. (5 points) The recursive algorithm from part B repeatedly solves the same subproblems. Explain how memoization or dynamic programming can avoid this repeated work. Your explanation should include: What information is used to identify whether two subproblems are the same. What value is stored for each subproblem. How the stored information is used to answer the original problem. (6 points) Suppose a dynamic programming solution stores the answers to all possible subproblems. Determine: The number of different subproblems that must be stored. The runtime needed to compute all stored values. Express your answers in terms of n, k, and/or X.

SECTION 4 - Intrаctаbility Mаny cоmputatiоnal prоblems do not appear to have efficient algorithms. In this section, we study how to compare the difficulty of problems using polynomial-time reductions.

SAT tо Independent Set Reductiоn Trаnsfоrm the following SAT instаnce into аn instance of the Independent Set problem. The symbol ¬ means "not." The first clause reads: a OR not b OR c OR not d The SAT instance is: (a ∨ ¬b ∨ c ∨ ¬d) ∧ (b ∨ d) Construct the corresponding Independent Set instance. Your answer should include:         The number of vertices in your graph.             The number of edges in your graph.            The value of k for the Independent Set instance.

Sectiоn 2 - Divide аnd Cоnquer Yоu аre а volcanologist studying the terrain of a volcanic region. The region is represented by an n × n grid of elevation values, where each cell (i,j) contains elevation E[i][j]. A cell is considered viable if its elevation is greater than or equal to the elevations of its immediate neighbors: the cells directly above, below, left, and right (when those exist). Your task is to design a divide and conquer algorithm that finds any one viable cell. A brute-force solution would take O(n2) time. Your algorithm must be asymptotically faster. Example Grid (Viable Cells Marked with ★): 3 2 1 4 ★ 4 ★ 4 7 ★ 6 3 1 3 5 9 ★ 8 2 1 2 3 5 4 2 3 4 ★ 2 1 Please mark your solution so that the submission clearly explains what your answer is for each part (i.e. mark your answer for part A, B, C...). Questions Algorithm Description (12 points) - Write down your algorithm in clear, high-level pseudocode or step-by-step English. Your method must use a divide-and-conquer approach. Justification of Correctness (8 points) - Explain why your algorithm is guaranteed to find a viable cell. You do not need to provide a formal proof. However, your argument should be convincing. Recurrence Relation (5 points) - Write a recurrence relation for your algorithm. Include any base case(s). Asymptotic Runtime (5 points) - Solve your recurrence from part (C) to find the asymptotic runtime of your algorithm.

Sectiоn 3 - Dynаmic Prоgrаmming Agаin Yоu are a wildlife biologist working with a conservation agency to establish protected habitats for an endangered species. The agency has identified several possible habitat locations along a long river system. There are n possible habitat sites. Each site has: A location along the river, represented by xi. An ecological benefit score, represented by bi. The locations are sorted: x1 < x2 < ... < xn If habitat site i is selected, the conservation agency receives bi benefit points. However, environmental regulations require that two selected habitat sites must be more than 10 miles apart. Formally, if: |xi - xj| ≤ 10 then habitat sites i and j cannot both be selected. Your goal is to select habitat sites that maximize the total ecological benefit. Example Locations: {x1, x2, x3, x4} = {6, 10, 14, 21} Benefits: {b1, b2, b3, b4} = {5, 6, 4, 1} An optimal selection is habitat sites 2 and 4: Locations: 10 and 21 Benefit: 6 + 1 = 7 The goal is to design a dynamic programming algorithm that determines the maximum possible ecological benefit. Please mark your solution so that the submission clearly explains what your answer is for each part (i.e. mark your answer for part A, B, C...). Tasks (5 points) Define the recursive subproblem. A recursive solution can solve this problem by breaking it into smaller versions of the same problem. Describe the smaller problems that a recursive solution should solve. Your answer should specify: What information must be included in a subproblem. What the subproblem represents. Answer format: OPT(...) where the parameter(s) should be replaced with the information needed to define a smaller problem. (6 points) Write the recursive definition for OPT. Using the subproblem definition from part A, write a recursive definition for OPT. Your answer must include: At least one base case. Any additional base cases needed. The recursive step. (4 points) Analyze the recursive runtime. Consider an implementation of the recursive algorithm from part B that does not use memoization. Each recursive call represents solving a smaller subproblem. Write a recurrence relation describing the runtime of this recursive algorithm. (4 points) Determine the recursive runtime. Give the asymptotic runtime of the recursive algorithm without dynamic programming or memoization. (5 points) Explain the dynamic programming improvement. The recursive algorithm repeatedly solves the same subproblems. Explain how memoization or dynamic programming can avoid this repeated work. Your explanation should include: What information identifies whether two subproblems are the same. What value is stored for each subproblem. How the stored information is used to solve the original problem. (6 points) Analyze the dynamic programming solution. Suppose a dynamic programming solution stores the answers to all possible subproblems. Determine: The number of different subproblems that must be stored. The runtime needed to compute all stored values.  

Comments are closed.