Posts

43)Sheikh Hasina the right choice as main guest to the Republic Day but trust the PMO to miss the obvious

India Republic Day -- From your record 10 Chief Guests for the Republic Day Ornement in 2018 to none in 2021 is as considerably a reflection on Prime Minister Narendra Modis out of the box approach to foreign policy. From your record 10 Chief Guests for the Republic Day Ornement in 2018 to none in 2021 is as considerably a reflection on Prime Minister Narendra Modis out of the box approach to foreign policy as his blind spots whilst zeroing in on an extraordinary foreign dignitary. Sheikh Hasina Prime Minister of Bangladesh would have been the perfect Republic Day Chief Guest this current year for umpteen reasons nevertheless it obviously didnt occur to Modi to single her out there for the honour. I shiver to even speculate if the visionary and statesman similar to Modi is blinded through her religion or sexual category or both to pass your girlfriend up? Instead of inviting United kingdom PM Boris Johnson who have ultimately chickened out Hasina should have been Modis auto choic

Table of common time complexities

The following table summarizes some classes of commonly encountered time complexities. In the table, poly( x ) =  x O (1), i.e., polynomial in x . Name Complexity class Running time ( T ( n )) Examples of running times Example algorithms constant time O (1) 10 Finding the median value in a sorted array of numbers Calculating (−1) n inverse Ackermann time O ( α ( n )) Amortized time per operation using a disjoint set iterated logarithmic time O (log *   n ) Distributed coloring of cycles log-logarithmic O (log log n ) Amortized time per operation using a bounded priority queue logarithmic time DLOGTIME O (log  n ) log  n , log( n 2) Binary search polylogarithmic time poly(log  n ) (log  n )2 fractional power O ( n c) where 0 < c < 1 n 1/2, n 2/3 Searching in a kd-tree linear time O ( n ) n , 2n + 5 Finding the smallest or largest item in an unsorted array, Kadane's algorithm, linear search "n log-star n" ti

Constant time

An algorithm is said to be constant time (also written as O(1) time) if the value of T ( n ) is bounded by a value that does not depend on the size of the input. For example, accessing any single element in an array takes constant time as only one operation has to be performed to locate it. In a similar manner, finding the minimal value in an array sorted in ascending order; it is the first element. However, finding the minimal value in an unordered array is not a constant time operation as scanning over each element in the array is needed in order to determine the minimal value. Hence it is a linear time operation, taking O(n) time. If the number of elements is known in advance and does not change, however, such an algorithm can still be said to run in constant time. Despite the name "constant time", the running time does not have to be independent of the problem size, but an upper bound for the running time has to be bounded independently of the problem size. For example,

Logarithmic time

Image
An algorithm is said to take logarithmic time when T ( n ) = O(log n ) . Since log a n and log b n are related by a constant multiplier, and such a multiplier is irrelevant to big-O classification, the standard usage for logarithmic-time algorithms is O(log n ) regardless of the base of the logarithm appearing in the expression of T . Algorithms taking logarithmic time are commonly found in operations on binary trees or when using binary search. An O(log n) algorithm is considered highly efficient, as the ratio of the number of operations to the size of the input decreases and tends to zero when n increases. An algorithm that must access all elements of its input cannot take logarithmic time, as the time taken for reading an input of size n is of the order of n . An example of logarithmic time is given by dictionary search. Consider a dictionary D which contains n entries, sorted by alphabetical order. We suppose that, for 1 ≤ k ≤ n , one may access the k th entry of the dic

Polylogarithmic time

An algorithm is said to run in polylogarithmic time if its time T ( n ) is O ((log n ) k ) for some constant k . Another way to write this is O (log k n ) . For example, matrix chain ordering can be solved in polylogarithmic time on a parallel random-access machine, and a graph can be determined to be planar in a fully dynamic way in O(log3 n) time per insert/delete operation.

Sub-linear time

An algorithm is said to run in sub-linear time (often spelled sublinear time ) if T ( n ) = o( n ). In particular this includes algorithms with the time complexities defined above. Typical algorithms that are exact and yet run in sub-linear time use parallel processing (as the NC 1 matrix determinant calculation does), or alternatively have guaranteed assumptions on the input structure (as the logarithmic time binary search and many tree maintenance algorithms do). However, formal languages such as the set of all strings that have a 1-bit in the position indicated by the first log(n) bits of the string may depend on every bit of the input and yet be computable in sub-linear time. The specific term sublinear time algorithm is usually reserved to algorithms that are unlike the above in that they are run over classical serial machine models and are not allowed prior assumptions on the input. They are however allowed to be randomized, and indeed must be randomized for all but the most t

Linear time

An algorithm is said to take linear time , or O ( n ) time, if its time complexity is O ( n ) . Informally, this means that the running time increases at most linearly with the size of the input. More precisely, this means that there is a constant c such that the running time is at most cn for every input of size n . For example, a procedure that adds up all elements of a list requires time proportional to the length of the list, if the adding time is constant, or, at least, bounded by a constant. Linear time is the best possible time complexity in situations where the algorithm has to sequentially read its entire input. Therefore, much research has been invested into discovering algorithms exhibiting linear time or, at least, nearly linear time. This research includes both software and hardware methods. There are several hardware technologies which exploit parallelism to provide this. An example is content-addressable memory. This concept of linear time is used in string matching a