Skip to main content

Quantum Computing – The Next Tech Revolution

Quantum Computing – The Next Tech Revolution Technology has evolved rapidly over the last few decades—from bulky mainframe computers to powerful smartphones in our pockets. Yet, despite these advances, traditional computers are approaching their physical limits. This is where quantum computing enters the scene, promising to revolutionize the way we process information and solve complex problems. What Is Quantum Computing? Quantum computing is a new paradigm of computing that uses the principles of quantum mechanics, a branch of physics that explains how matter and energy behave at the smallest scales. Unlike classical computers, which use bits that represent either 0 or 1, quantum computers use qubits. Qubits can exist in multiple states simultaneously, thanks to a property called superposition. Additionally, qubits can be interconnected through entanglement, allowing them to share information instantaneously. These unique properties give quantum computers immense computational power....

Big O Notation

BIG O NOTATION
In today’s era of massive advancement in computer technology, we are hardly concerned about the efficiency of algorithms. Rather, we are more interested in knowing the generic order of the magnitude of the algorithm. If we have two different algorithms to solve the same problem where one algorithm executes in 10 iterations and the other in 20 iterations, the difference between the two algorithms is not much. However, if the first algorithm executes in 10 iterations and the other in 1000 iterations, then it is a matter of concern.
We have seen that the number of statements executed in the program for n elements of the data is a function of the number of elements, expressed as f(n). Even if the expression derived for a 
function is complex, a dominant factor in the expression is sufficient to determine the order of the magnitude of the result and, hence, the efficiency of the algorithm. This factor is the Big O, and is expressed as O(n).
The Big O notation, where O stands for ‘order of’, is concerned with what happens for very large values of n. For example, if a sorting algorithm performs n2 operations to sort just n elements, then that algorithm would be described as an O(n2) algorithm.
When expressing complexity using the Big O notation, constant multipliers are ignored. So, an O(4n) algorithm is equivalent to O(n), which is how it should be written.
If f(n) and g(n) are the functions defined on a positive integer number n, then
f(n) = O(g(n))
That is, f of n is Big–O of g of n if and only if positive constants c and n exist, such that f(n)£cg(n). It means that for large amounts of data, f(n) will grow no more than a constant factor than g(n). Hence, g provides an upper bound. Note that here c is a constant which depends on the 
following factors:
* the programming language used,
* the quality of the compiler or interpreter,
* the CPU speed,
* the size of the main memory and the access time to it,
* the knowledge of the programmer, and
* the algorithm itself, which may require simple but also time-consuming machine instructions.
We have seen that the Big O notation provides a strict upper bound for f(n). This means that the function f(n) can do better but not worse than the specified value. Big O notation is simply written as f(n) ∈ O(g(n)) or as f(n) = O(g(n)).
Here, n is the problem size and O(g(n)) = {h(n): ∃ positive constants c, n0 such that 0 ≤ h(n) ≤ cg(n), ∀ n ≥ n0}. Hence, we can say that O(g(n)) comprises a set of all the functions h(n)that are less than or equal to cg(n) for all values of n ≥ n0.
If f(n) ≤ cg(n), c > 0, ∀ n ≥ n0
, then f(n) = O(g(n)) and g(n) is an asymptotically tight upper 
bound for f(n).
Examples of functions in O(n3) include: n2.9, n3, n3+ n, 540n3 + 10.
Examples of functions not in O(n3) include: n3.2, n2, n2+ n, 540n + 10, 2n
To summarize, 
• Best case O describes an upper bound for all combinations of input. It is possibly lower than the worst case. For example, when sorting an array the best case is when the array is already correctly sorted.
• Worst case O describes a lower bound for worst case input combinations. It is possibly greater than the best case. For example, when sorting an array the worst case is when the array is sorted in reverse order.
• If we simply write O, it means same as worst case O.Now let us look at some examples of g(n) and f(n).Below table shows the relationship between g(n) and f(n). 
Table: Examples of f(n) and g(n)
Note that the constant values will be ignored because the main purpose of the Big O notation is to analyse the algorithm in a general fashion, so the anomalies that appear for small input sizes are simply ignored.

Categories of Algorithms
According to the Big O notation, we have five different categories of algorithms:
* Constant time algorithm: running time complexity given as O(1)
* Linear time algorithm: running time complexity given as O(n)
* Logarithmic time algorithm: running time complexity given as O(log n)
* Polynomial time algorithm: running time complexity given as O(nk) where k > 1
* Exponential time algorithm: running time complexity given as O(2n)
Below shows the number of operations that would be performd for various values of n.
Table : Number of operations for different functions of n

Limitations of Big O Notation
There are certain limitations with the Big O notation of expressing the complexity of algorithms. These limitations are as follows:
* Many algorithms are simply too hard to analyse mathematically.
* There may not be sufficient information to calculate the behaviour of the algorithm in the average case.
* Big O analysis only tells us how the algorithm grows with the size of the problem, not how efficient it is, as it does not consider the programming effort.
* It ignores important constants. For example, if one algorithm takes O(n2) time to execute and the other takes O(100000n2) time to execute, then as per Big O, both algorithm have equal time 
complexity. In real-time systems, this may be a serious consideration.

Popular posts from this blog

Embracing the Future: Resource Recovery from Waste

As global populations swell and industrial activities intensify, the amount of waste we generate is skyrocketing. Landfills, once considered an adequate solution, are now recognized as unsustainable and environmentally damaging. Enter resource recovery from waste – a transformative approach that views waste not as a problem, but as a potential treasure trove of resources. This blog post delves into the concept, methods, and benefits of resource recovery, illuminating how this practice is reshaping waste management and sustainability. What is Resource Recovery? Resource recovery refers to the process of extracting useful materials or energy from waste. Instead of simply discarding waste, resource recovery emphasizes reusing, recycling, and repurposing materials to reduce the volume of waste sent to landfills and minimize environmental impact. Key Methods of Resource Recovery Recycling: This is perhaps the most well-known form of resource recovery. Recycling involves converting waste mat...

Abbreviations

No :1 Q. ECOSOC (UN) Ans. Economic and Social Commission No: 2 Q. ECM Ans. European Comman Market No : 3 Q. ECLA (UN) Ans. Economic Commission for Latin America No: 4 Q. ECE (UN) Ans. Economic Commission of Europe No: 5 Q. ECAFE (UN)  Ans. Economic Commission for Asia and the Far East No: 6 Q. CITU Ans. Centre of Indian Trade Union No: 7 Q. CIA Ans. Central Intelligence Agency No: 8 Q. CENTO Ans. Central Treaty Organization No: 9 Q. CBI Ans. Central Bureau of Investigation No: 10 Q. ASEAN Ans. Association of South - East Asian Nations No: 11 Q. AITUC Ans. All India Trade Union Congress No: 12 Q. AICC Ans. All India Congress Committee No: 13 Q. ADB Ans. Asian Development Bank No: 14 Q. EDC Ans. European Defence Community No: 15 Q. EEC Ans. European Economic Community No: 16 Q. FAO Ans. Food and Agriculture Organization No: 17 Q. FBI Ans. Federal Bureau of Investigation No: 18 Q. GATT Ans. General Agreement on Tariff and Trade No: 19 Q. GNLF Ans. Gorkha National Liberation Front No: ...

The Rise of Green Buildings: A Sustainable Future

In an era where climate change and environmental sustainability dominate global conversations, the concept of green buildings has emerged as a pivotal solution. These structures, designed with both ecological and human health in mind, represent a shift towards more sustainable urban development. But what exactly are green buildings, and why are they so important? What Are Green Buildings? Green buildings, also known as sustainable buildings, are structures that are environmentally responsible and resource-efficient throughout their life cycle—from planning and design to construction, operation, maintenance, renovation, and demolition. This holistic approach seeks to minimize the negative impact of buildings on the environment and human health by efficiently using energy, water, and other resources. Key Features of Green Buildings Energy Efficiency: Green buildings often incorporate advanced systems and technologies to reduce energy consumption. This can include high-efficiency HVAC sys...