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...

Anti-ageing, BoTox and Food Supplements

Ageing draws vigor and glow of the skin leaving wrinkles, marks, pigmentation, etc. These are like nightmares for a beautiful flawless skin. It's a natural process that growing age affects not only skin, but any part of the body, any tissue, organ etc. Sciences have achieved a lot yet, now it's also trying to revitalize the organisms, organs and skin, as well. Our skin is considered to be the most sensitive organ of our body; it reflects biological age exceptionally fast. For many years, various cosmetic labs and researches are trying to invent a miracle product to combat anti-ageing, to rejuvenate the skin layer. Skin is the mirror of our beauty, life-style. Now the concept of natural food supplements, touched the people's heart. It is the only skin rejuvenating invention with higher acceptability and no any consequence.       The process of revitalization is rejuvenation, through which anything can get its youth back. Though scientist could not reach a p...