Skip to main content

Algorithm: time and space complexity



The trio of asymptotic complexity (O, Ω, θ):

1- The Big Oh “O”
f (n)=O(g(n))  reads as f on n is big oh of g of n
Eg- 5n+5=O (n) means 5n+5≤6n for all n≥5
O (1) that means a constant
O (n): linear
O (n2): quadratic
O (n3): cubic
O (2n): exponential

2- Omega “Ω”
f (n)= Ω(g(n)) reads as f of n is omega of g of n
         Eg- 4n+2= Ω means 4n+2≥4n for n≥1
In the case of Oh g(n) is an upper bound on the value of f(n) for all n, n ≥no  while statement f(n)= Ω (g(n)) states that g(n) only a lower bound on f(n)

3- Theta "θ"
f (n)= θ (g(n)) reads f of n is theta of g of n
Here f (n) = θ (g (n))
           G (n) is both upper and lower bound on f (n.)

Comments

Popular posts from this blog

Nursery and Kindergarten Admissions in Delhi/NCR Schools: What’s the age?

It is the most intricate issue of the current time in India. What should be the exact age of kids at the time of nursery admissions ? Lot of different perspectives and ideas are there, but in my opinion, the ideal age for kindergarten should be 5-6 years. I think we first let them enjoy their childhood, let them develop in all directions. Give them some more years or going play group is sufficient. But the opinions vary here, and everyone has her view on this matter. Some parents don’t want to send them at an early age, but they have no choice. These days mostly schools are taking 3+ kids for nursery and 4+ kids for KG . There are also some schools that prefer to take 4+ kids for nursery or they start from KG classes. The education system is growing more complicated as they don’t focus on the abilities of child and parents. Strict criteria and some guidelines are put, and that’s all. The most painful thing is the distances between schools and homes, how our little buds ca...

Generation of Random amino acid protein sequences using Python/Bio-python

This program is about how to generate protein sequences (random sequences of 100amino acid) and these sequences should be stored in a database type file. The sequence analysis gave the bioscience researches a new direction. This project works for generating new sequences of proteins. These sequences might already exist in nature and having similarity with any organism. Through this software new random sequences may be generated and saved to a file on user’s machine. Saving to file helps to compare different sequences as well as the complete information may be placed at the same place. The Protein generation part is a simple program which takes in user input for number of random Protein Sequences to generate and filename/file-path. Based on these user inputs random Protein sequences are generate of 100 amino acid residues of type IUPACProtein. The sequences thus generated are saved to a file in the current directory by the name username.fasta in Fasta format. This program is in Python L...

Eczema flare-ups-- Still a big question

What Causes Eczema? Generally eczema develops after frequent exposure to a mild irritant like a detergent or a concise exposure to a burly irritant such as acid etc. On the other side, allergic contact eczema builds up when an allergen comes in the contact with skin, like poison ivy and nickel. The exact reason behind its growth is still standing like a big question. Researchers believe that atopic eczema might be a result of blending various factors; these factors include heredity of certain genes, an overactive immune system, or "gaps in the skin". These gaps let the skin lose water too fast and also allow germs to enter the body. Generally Eczema bursts in cold and dry weather. Seborrheic is the other form of eczema that seems to develop when a number of factors interact which may include the person's genes; climate,fungus that live on human skin, stress, and general health. Present forms of Eczema: Atopic Eczema is a chronic skin condition that causes itchy, d...