Numerical - algorithm, Data Structure & Algorithms

Q. What is the smallest value of n such that an algorithm whose running time is 100n2 runs faster than an algorithm whose running time is 2n on the same machine. 

 

Ans.

F (n) = 100 n2

G(n) = 2n

Value of n so that 100 n2 < 2n

The smallest value of n such that an algorithm whose running time is 100n2 runs faster than an algorithm whose running time is 2n on the same machine is 15.

 

 

Posted Date: 7/13/2012 2:30:43 AM | Location : United States







Related Discussions:- Numerical - algorithm, Assignment Help, Ask Question on Numerical - algorithm, Get Answer, Expert's Help, Numerical - algorithm Discussions

Write discussion on Numerical - algorithm
Your posts are moderated
Related Questions
Explain about the String Abstract data type operations Symbol ADT has no concatenation operations, but presuming we have a full-featured String ADT, symbols can be concatenated

Merge sort is a sorting algorithm which uses the basic idea of divide and conquers. This algorithm initially divides the array into two halves, sorts them separately and then merge

Determine the greatest common divisor (GCD) of two integers, m & n. The algorithm for GCD might be defined as follows: While m is greater than zero: If n is greater than m, s

Chaining In this method, instead of hashing function value as location we use it as an index into an array of pointers. Every pointer access a chain that holds the element havi

Define Binary Tree  A binary tree T is explained as a finite set of nodes that is either empty or having of root and two disjoint binary trees TL, and TR known as, respectively

Explain the Scan-Line Algorithm This image-space method for removing hidden surfaces is an extension of the scan-line algorithm for filling polygon interiors. Instead of fillin

Exact analysis of insertion sort: Let us assume the following pseudocode to analyse the exact runtime complexity of insertion sort. T j   is the time taken to execute the s

Explain Division Method Division Method: - In this method, key K to be mapped into single of the m states in the hash table is divided by m and the remainder of this division

Explain the halting problem Given a computer program and an input to it, verify whether the program will halt on that input or continue working indefinitely on it.

Graphs are data structures which consist of a set of vertices & a set of edges which connect the vertices. A graph where the edges are directed is called directed graph. Or else, i