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
write an algorithm given each students name and grade points for six courses.find his grade point average and group students into the gpa groups 3.5

1. Start 2. Get h 3. If h T=288.15+(h*-0.0065) 4. else if h T=216.65 5. else if h T=216.65+(h*0.001) 6. else if h T=228.65+(h*0.0028) 7. else if h T=270.65 8.

whate is meant by the term heuristic

Write the algorithm for Binary search. Also apply this algorithm on the following data. 22, 44, 11, 88, 33, 55, 77, 66

Simulation is the process of making an abstract model of a real world situation in order to be aware of the effect of modifications and alterations and the effect of introducing nu

AVL trees and the nodes it contains must meet strict balance requirements to maintain O(log n) search time. These balance restrictions are kept maintained via various rotation func

Normally a potential y satisfies y r = 0 and 0 ³ y w - c vw -y v . Given an integer K³0, define a K-potential to be an array y that satisfies yr = 0 and K ³ y w - c vw -y v

how to define the size of array

Illustrates the program for Binary Search. Program: Binary Search /*Header Files*/ #include #include /*Functions*/ void binary_search(int array[ ], int value,

Q. Write down an algorithm to insert a node in the beginning of the linked list.                         Ans: /* structure containing a link part and link part