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
Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

A spanning tree of any graph is only a subgraph that keeps all the vertices and is a tree (having no cycle). A graph might have many spanning trees. Figure: A Graph

how we can convert a graph into tree

For AVL trees the deletion algorithm is a little more complicated as there are various extra steps involved in the deletion of node. If the node is not a leaf node, then it contain

Determine about the unreachable code assertion An unreachable code assertion is an assertion that is placed at a point in a program that shouldn't be executed under any circum

Limitation of Binary Search: - (i)  The complexity of Binary search is O (log2 n). The complexity is similar irrespective of the position of the element, even if it is not pres

Breadth-first search starts at a given vertex h, which is at level 0. In the first stage, we go to all the vertices that are at the distance of one edge away. When we go there, we

what is frequency count with examble

Construct G for α, n, and W given as command line parameters. Throw away edges that have an asymmetric relation between nodes. That is, if A is connected to B, but B is not connect