Induction proof and recursion

Assignment Help Mathematics
Reference no: EM131167206

Exercise 1 Induction Proof and Recursion

1. Let N = {0, 1, 2, . .} be the set of natural numbers. Access to data structures is often governed by the recurrence

T(n) = a,     if n = 1

           c + T(n/2),  if n>1

Prove by induction that T (n)  ∈ O (log n). Do not attempt to use the Master Theorem for this proof.

2. Remind how merge-sort works. Show that recursive merge-sort is Θ(n log n) by the master theorem.

Exercise 2 Algorithm design

Describe a Θ(n log n)-time algorithm that, given a set S of n integers and another integer x, determines whether or not there exist two elements in S whose sum is exactly x.

Exercise 3 Binary heaps

1. Assume you have an array-based binary heap a with the contents:
1, 4, 7, 8, 9, 10, 14, 12, 15, 13, 17, 12

Show the contents of a after each of the following two operations. Show your working for each operation including the content of the list at its intermediate stages.

You can assume a is large enough to contain all the values inserted.

- Insert 5 into a,
- Delete the least element from a,

2. Is it right or wrong that in a heap of depth d, there must be at least 2d elements. (Assume the depth of the first element (or root) is zero). If it is right, provide your prove. If it is wrong, explain why you think so.

3. Prove that the binary tree represented by the binary heap of n elements has height k = [log n] .

Reference no: EM131167206

Questions Cloud

Explain each step of the machine cycle : Explain (in detail) each step of the machine cycle. Show the contents of each of the registers and each of the memory cells after the execution of the code.
Maximize the efficiency of external storage : How are B-trees used to maximize the efficiency of External Storage? Discussion of efficiencies should include "Big O" notation, such as O(1), O(log N), O(N), O(N^2), answer must be at least 10 sentences.
How low should lowland let its tv inventory drop : The weekly demand for TVs at Lowland Appliance is normally distributed with mean 400 and standard deviation 100. - How low should Lowland let its TV inventory drop before it places an order for more TVs?
How would you like to work on this assignment for me : How would you like to work on this assignment for me? Select a NOSQL database (MongoDB, Cassandra, DynamoDB, BigTable, etc...) and write a paper describing its security features. In particular, you should discuss:
Induction proof and recursion : Describe a Θ(n log n)-time algorithm that, given a set S of n integers and another integer x, determines whether or not there exist two elements in S whose sum is exactly x.
Find a route with the least total airfare : Find a route with the least total airfare that visits each of the cities in this graph, where the weight on an edge is the least price available for a flight between the two cities.
What standard deviation minimize annual cost : What standard deviation minimizes the annual cost of producing elevator rails?- one elevator rail in 1000 will be at least how many inches in diameter?
Rap about classes that rivals the javadev group : The JavaDev group made the "Java Life" rap video on coding in Java. You can watch themhere. Your challenge is to write a rap about classes that rivals the JavaDev group. Write just a few sentences
How many people will choose to sell cat berets : Suppose there are many sellers with the same costs as Foster. If there are 24 people on Etsy willing to buy 1 cat beret each for $34, how many people will choose to sell cat berets

Reviews

Write a Review

Mathematics Questions & Answers

  Questions on ferris wheel

Prepare a Flexible Budget Gator Divers is a company that provides diving services such as underwater ship repairs to clients in the Tampa Bay area.

  Logistic map

This assignment has two question related to maths. Questions are related to bifurcation cascade and logistic map.

  Finding the probability of cards

This assignment has questions related to probabiltiy.

  Systems of ode

Find all the xed points, and study their stability and Draw the phase portrait of the system, as well as the graphs of the solutions in all relevant cases.

  Derive the boolean expression

Derive the Boolean Expression and construct the switching circuit for the truth table stated

  System of equations

Evaluate which equations are under-identified, just-identified, and over-identified.

  Linear programming problem

Linear programming problem consisting of only two constraints with one objective function.

  Find the natural domain

Find the natural domain of the given functions.

  Introduction to numerical methods

Compute the coecients of the polynomials using the term recurrence relation.

  Chart of the topological manifold

De?nition of smoothness of functions on a smooth manifold is chart independent and hence geometric.

  Mathematics in computing

Questions related on mathematics in computing.

  Complex problems

Complex problems

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