T or F If f thetag then algorithm f runs in time equal to g

T or F: If f = theta(g), then algorithm f runs in time equal to g. T or F: If f = theta(g), then algorithm f runs in time equal to g, in all cases. T or F: If f = theta(g), then algorithm f runs in time equal to g, regardless of input size.

Solution

1) If f = (g), then alogorithm f runs in time equal to g is TRUE because f =  (g) means f(n) = g(n) hence f runs in equal time that of g.

2) If f = (g), then algorithm f runs in time equal to g, in all cases is TRUE because f =  (g) means f(n) = g(n) means for all combination of f is like that ofvall combination of g hence,algorithm f runs in time equal to g, in all cases.

3) If f = (g), then algorithm f runs in time equal to g,regardless of input size is False because it depends upon the input if input is same then time will be same if input is different then time will also different.

 T or F: If f = theta(g), then algorithm f runs in time equal to g. T or F: If f = theta(g), then algorithm f runs in time equal to g, in all cases. T or F: If

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site