Author | Message |
---|---|
G190852562
Posts: 162
|
Posted 22:41 Dec 06, 2014 |
1. What are the respective value of a, b, d for a binary search of a sorted array _____ what would be solution ___ 1, 2, 1 and O(n) Can someone explain how to do this? 4. For given ) recurrence : T(n) = 0.5T(n/2) + n Case1 For this problem, the last option is the answer since a is the number of subproblems and a = 0.5 which is not valid. 5. For Given recurrence : T(n) = 2n(n/2) + nn Case1 I got this problem correct and selected the last option. However, I selected it because 2^n is a function which is not a valid a. There is no T(n/2), it is simply (n/2). All-in-all, it is just not in the format of a recurrence relation. 6. For given recurrence: T(n) = T(n/2) + 2^n O(2^n) Not sure of how to start on this one. This is not one of those recurrence relations with an f(n) that is non-polynomial, right? |