Determine a good asymptotic upper bound

Assignment Help Data Structure & Algorithms
Reference no: EM132314822

Assignment - Advanced Algorithm Analysis

Aim: This assignment is designed to evaluate/improve your critical thinking and problem solving skills. It also evaluate/improve your coding skill.

1. For a tree T, let nI denote the number of its internal nodes, and let nE denote the number of its external nodes. Show that if every internal node in T has exactly 3 children, then nE = 2nI + 1.

2. Insert entries with keys, 2, 7, 3, 12, 5, 20, 14, 6, 11, 8, 15, 17, 1, 19, 23, 14 (in this order), into an empty:

(a) heap.
(b) binary search tree.
(c) AVL tree.
(d) (2, 4) tree.

3. Although merge sort runs in θ(n lg n) worst-case time and insertion sort runs in θ(n2) worst case time, the constant factors in insertion sort make it faster for small n. Thus, it makes sense to use insertion sort within merge sort when sub problems become sufficiently small.

Consider a modification to merge sort in which n/k sub lists of length k are sorted using insertion sort and then merged using the standard merging mechanism, where k is a value to be determined.

i) Show that the n/k sub lists, each of length k, can be sorted by insertion sort in θ(nk) worst-case time.

ii) Show that the sub lists can be merged in θ(n lg(n/k)) worst-case time.

iii) Given that the modified algorithm runs in θ(nk + n lg(n/k)) worst-case time, what is the largest asymptotic (θ-notation) value of k as a function of n for which the modified algorithm has the same asymptotic running time as standard merge sort.

4. Consider the recurrence T(n) = 3T(⌊n/2⌋) + n.

i) Use the master method to give tight asymptotic bound for this recurrence (if the master method cannot be used, explain why).
ii) Use a recursion tree to determine a good asymptotic upper bound on this recurrence.
iii) Use the substitution method to verify your answer.

5. Show all the steps for performing any of the following algorithms for matching the pattern ‘rithm' in the text ‘advancedalgorithmanalysis'.
(a) brute-force
(b) Boyer-Moore
(c) Knuth-Morris-Pratt

Verified Expert

The report consists of the solution to various questions from advanced algorithms.There is a total of five questions, which are answered in this report.Questions are based on the concepts of trees, graphs, time complexity, and space complexity.It also contains a numerical solved using the concept of recurrence relation and masters theorem.Pattern matching algorithms are also discussed with the help of the given example.

Reference no: EM132314822

Questions Cloud

Which code snipped correctly imports the java arraylist : Of the sorting algorithms we've learned election sort, insertion sort, and merge sort is merge sort the fastest in every case? Why?
Write about any one of the weekly articles : BUSN20017 - Effective Business Communications - how to identify and interpret the different parts of this written academic communication genre
Prepare the journal entries and t-accounts : Prepare the Journal Entries (including the closing entry), T-accounts, and all four Financial Statements (in good form) - Prepare the Journal Entries
How contemporary issues affecting sustainable tourism : You are required to prepare an extended literature review addressing how contemporary issues are affecting the nature of sustainable tourism development
Determine a good asymptotic upper bound : CP5602 - Advanced Algorithm Analysis - James Cook University - This assignment is designed to evaluate/improve your critical thinking and problem solving skills
Design a library system for Kent Institute : You are required to design a library system for Kent Institute. Decide the appropriate variables, keys and ranges to be used in the system. Justify
Write a case study on your chosen population group : Pick ONE population group within a geographical area - Write a case study on your chosen population group. Start researching the health issues
Find measures of central tendency and variation : Describe at least one example of two variables (from your workplace experiences) that are strongly correlated. How does this affect how you interpret
Develop and incorporate a neural network : 300056 - Robotics - Western Sydney University - Neural networks for robot control - implement a given computed-torque controller (CTC) in Simulink for robot

Reviews

inf2314822

8/12/2019 3:11:14 AM

Excellent job is done. Every code and algorithm functions are very well explained. High level of perfection can be seen in the work. The writer has good subject knowledge provided a proper explanation for each step. I am impressed with the work.

inf2314822

8/12/2019 3:08:58 AM

Properly ensure before starting that you have understood the assignment requirement well. Coding part needs to be done as per the steps required to be included in it. Show all the performed algorithm in the pattern in your report.

Write a Review

Data Structure & Algorithms Questions & Answers

  Find the solution to the recurrence in big-oh notation

Find the solution to the recurrence in big-Oh notation and prove it using the substitution method.

  Redraw the chart to improve the design

Critique the following structure chart that depicts a guest making a hotel reservation. Describe the chart in terms of fan-in, fan-out, coupling, and cohesion. Redraw the chart to improve the design.

  Describe greedy algorithm to make change consisting of dimes

Describe a greedy algorithm to make change consisting of quarters, dimes, nickels, and pennies. Prove that your algorithm yields an optimal solution.

  What is the running time of your procedure

In addition, what is the running time of your procedure? Does it depend on p? Your simulated system may not have a perfectly fair coin where the probability of head is exactly 1/2.

  What steps should you take when designing an adt

What steps should you take when designing an ADT? The following function computes the sum of the first n ≥ 1 integers. Show how this function satisfies the properties of a recursive function.

  Describe a fair coin algorithm to returns either 0 or 1

Describe a FAIRCOIN algorithm that returns either 0 or 1 with equal probability, using ONEINTHREE as your only source of randomness.

  Algorithm-decide whether language recognized by dfa is empty

Give an algorithm to decide whether the language recognized by a DFA is empty. Given two DFAs M1 and M2, give an algorithm to decide whether L(M1)subset or equal to L(M2).

  Read a file to add some records into the database

Initially the program should read a file to add some records into the database (You can create your own data file for initial input, or you can just hard code the data in your main program)

  Declare a global array solution

Declare a global array Solution

  Discuss some of the emerging trends in information

Discuss some of the emerging trends in information(e.g. computer hardware, software and data analysis

  Determining exactly which one of wine bottles was poisoned

Design a scheme for determining exactly which one of the wine bottles was poisoned in just one month's time while expending O(logn) taste testers.

  Create algorithm which generates access control matrix

Create an algorithm which generates the access control matrix A for any given history matrix H of the Chinese Wall model.

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