Define the three types of shortest path problems

Assignment Help Data Structure & Algorithms
Reference no: EM131038661

Question:

1. For each recurrence relation below, indicate show and justify its theta class:

a. T(1) = 1; T(n) = 2T(n/2)+5

b. T(1) = 1; T(n) = 2T(n/2) + 2n

c. T(1) = 1; T(n) = T(3n/4) + T(n/6) + 5n

d. Solve the following recurrence T(1) = 1; T(n) = 3T(n/3) + 3

e. Let a and b be real numbers such that 0<a<b. Show that na is in O(nb), but nb is not in O(na).

f. d) Explain why the best case running time of Insertion Sort is O(n) .

Dynamic Programming

2. Assume k is odd and let O(n,k) be the number of ways to write n as the sum of odd positive integers each at most k but not necessarily distinct. Find a recurrence for O(n,k) and explain it.

3. Consider the following recurrence (given a sequence pi) :

C[i,j] = mini≤k<j {C[i, k-1] + C[k + 1, j]} + s=iΣj ps with C[i,i] = 0

a. Draw the table dynamic programming would use to implement this.

b. Write the dynamic programming code to compute C.

Greedy Algorithms

4. In the bin-packing problem, you are given a set of objects with sizes s1, s2, ... ,sn where 0<si<1 (si is the fraction of a box that the ith item will fill). You are to determine to put them in a few boxes of size 1 as possible.

a. Give a greedy strategy for this problem.

b. What order would you have to process the items in order for your solution to be optimal?

5. Consider the following algorithm. T is a binary tree.
fred(T)
{
if (T is null)
return 0
else return (fred(left child of T) + fred(right child of T)
}
a. Give the recurrence relation for the fred function. You do not need to solve the equation, but remember the basis.

b. What does the function fred do?

Mergeable Heaps

6. Why did Binomial heaps NOT require the mark bits and the rules about losing two children?

7. The H be a fibonacci heap with a B4 and a B5 with the min at the root of the B5. Show the structure that would result from ExtractMin(H).

Applying what we have learned

8. Find the most efficient solution for each of the problems below and analyze its running time. In each case, you are given n points in the plane,

(x1, y1),.......(xn,yn)

Hint, the distance from the origin to the ith point is √(xi2 + yi2)

a. Find the smallest circle, centered at the origin, containing all of the points in its interior.

b. Determine whether it is possible to draw a circle centered at the origin containing two or more of the points on its boundary.

c. Given k satisfying 0<=k<=n, find a circle, centered at the origin, such that at most k of the points are in the interior of the circle and at most n-k of the points are in the exterior of the circle.

9. Graph Algorithm Details

a. Define the three types of shortest path problems.

b. Give an example where the shortest path tree from Dijkstra's algorithm is not a minimum spanning tree.

c. Show the DFS forest resulting from running DFS on the graph described by this adjacency list. Label each node with its start and finish times.
1: 2, 5,
2: 1, 3, 5
3: 1, 2, 5
4: 2, 3, 6
5: 1, 2, 3
6: 2, 3, 4

Running Shortest Path Algorithms

10. Show the execution of Prim's algorithm starting at node A on the following graph. Redraw the diagram for each edge that is added (yes, you can write neatly on this entire page)

1702_figure.jpg

NP-Completeness

11. Prove that this problem is in NP: Given n, a number of dice, there are at least k ways of rolling a given value, y.

12. Explain exactly what you have to do to prove that a problem is NP-Complete

13. Which of the following statements is true for all problems X and Y in NP such that X is reducible to Y in polynomial time? (T or F after each one - yes, that can be outside of a box)

a. If Y is NP-complete, then X is NP-complete
b. If Y is in P, then X is in P
c. If X is NP-complete, then Y is in P
d. If Y is not in P, then X is not in P

14. We said that if we had a polynomial time solution to an NP-complete problem X, we would have a polynomial-time solution to every problem in NP. Explain the polynomial-time solution for an arbitrary problem Y in NP.

15. If you have to solve a problem that is NP-Complete, what options do you have?

Looking for an answers to 15 quotations in Algorithm and data structure.

I am looking an answers with a fill explanations

Reference no: EM131038661

Questions Cloud

State the null and alternative hypotheses : Based on information in Statistical Abstract of the United States (116th Edition); the average annual miles driven per vehicle in the United States is 11.1 thousand miles, with c = 600 miles. Suppose that a random sample of 42 vehicles owned by re..
Prepare a research paper about global warming : Prepare a Research Paper about global warming. This research paper should be 5 pages, without the cover page and refereces page. font size is 12, and the whole research should be about.
Are you in favor of further research in biotechnology : Are you in favor of further industrial research in this field? Provide at least one reason for your stance on this issue. What is your academic major?
List the first six elcc standards : List the first six ELCC Standards (Educational Leadership Constituent Council Standards) and describe each briefly as to how they relate to leaders managing an organization for change.
Define the three types of shortest path problems : Why did Binomial heaps NOT require the mark bits and the rules about losing two children - Determine whether it is possible to draw a circle centered at the origin containing two or more of the points on its boundary.
Create a research proposal consisting of three sections : The purpose of the research proposal is to help you to understand your project, to gain direction and feedback on your project, and to establish a blueprint for your project.
Briefly describe the shows main characters : Briefly describe the show's main characters and their relationships then discuss the specific instances of nonverbal communication used in the episode.
Scores on an aptitude test required for entry : The scores on an aptitude test required for entry into a certain job position have a mean of 500 and a standard deviation of 120. If a random sample of 36 applicants has a mean of 546, is there evidence that their mean score is different from the ..
Context of discrimination and harassment : 1. Summarize the case Onacle vs. Sundowner and explain the significance of the case in context of discrimination and harassment based on sex. 2. Summarize the case Drum versus Leeson Electric. Explain which law was violated, by whom, and how.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Describe how to develop a subroutine

Describe how to develop a subroutine.

  Design a bfs-based algorithm

Design a BFS-based algorithm (pseudo code) for directed graph that computes the total number of paths from vertex srcU to vertex destV.

  Calculate the number of page faults using replacement algo

The program should test for 1, 5, 10 , 15 and 20 frames each time, using LRU, FIFO and optimal replacement algorithm, providing the average frame replacements for each.

  Dbms and data mining to imporve customer service

Discuss how a database management system and data mining can help motor vehicle maintenance center improve its services, and what tables would be required in such a database.

  Question about data model

Create a simple data model that outlines a database management system. This model requires to track people's participation in several fitness activities at a fitness center.

  Write a program using bubble sorting

Question :-Write a program using bubble sorting.

  Dynamic-programming algorithm for rod-cutting problem

Consider a modification of the rod-cutting problem in which, in addition to a price pi for each rod, each cut incurs a fixed cost of c. Give a dynamic-programming algorithm to solve this modified problem.

  Definition and purpose of normalization

Explain how 3rd Normal Form can reduce insert, update and delete anomalies

  How to perform i/o operations using interrupt method

To learn how to perform I/O operations using interrupt method and program/implement them using the evaluation toolkit, To evaluate the real-time performance such as sampling rate, interrupt latency, response time and computer loading.

  Find a popular childrens story and write it into an array

Prompt a user to search for a string within the array, returning the position of the search item within the array - Can you give the answer ASAP?

  The provided code reads two sequences of numbers

The provided code reads two sequences of numbers. In this task, you are asked to write a function to insert these numbers into two separate doubly linked lists so that the data are in ascending order

  Design algorithm to produce list of customers

Design an algorithm to produce a list of customers from the Glad Rags Clothing Company's customer master file. Each record on the customer master file contains the customer's number.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd