Wednesday, 13 August 2014

No Suitable Title Found..

Many times I have availed the Cab facility of my office whenever I got late for project work. But yesterday I got a new idea from some guys traveling with me in the same cab. In my office when I am availing cab service, its cost is going to be added on your project cost.

Monday, 10 February 2014

Introduction to Quantum Cryptography

Imagine you want to send some message to your friend and you don't want others to peek on your message. So you lock your message in a box using a key and send the box to your friend and your friend also have a key to unlock the box so he can easily unlock  the box and read the message. In general this is the technique used by any cryptographic algorithm. Locking up the message in  the box is called Encryption and Unlocking is called Decryption. Before message being sent to the receiver the data is encrypted using an encryption algorithm and a secret key. On the receiver side the encrypted data is decrypted using the reverse encryption algorithm. Classical cryptographic algorithms mostly rely on mathematical approaches to secure key transmission. The security  they offer is based upon unproven assumptions and depends on the technology available to an eavesdropper. But rapidly growing parallel technology and Quantum technology may be a threat to these classical cryptography in near future. One of the solutions of these threats is Quantum Cryptography. Now what is Quantum Cryptography? Quantum cryptography is a complex topic because it brings in to play something most people find hard to understand -- quantum mechanics. Now lets focus on some basic quantum physics that we must know to understand this article.

Sunday, 9 February 2014

Searching an element in a row and column wise sorted matrix

First let me state the problem we will discuss in this post:  You are given a 2-D array of  nXn size with all the elements sorted in descending order row and column wise. You need to find a particular element in that array.
There may be lots of ways to solve this problem. I will discuss three ways to solve this problem using a
(i)linear search,
(ii)binary search,
(iii) binary search graph [ I know its bit confusing. Don't  go on the name ]

Tuesday, 3 September 2013

Use Indent to indent your C-code

I myself not very much expert in writing indented code and code without indentation looks just horrible. Of course you will not have same feelings if you are using an IDE with auto indentation facility and of course if you know how to write indented code. For this purpose I found Indent command very useful in linux. One thing you should remember that this command is only for C code.
Actually not me, one of my friend Arjun Pakrashi informed me about this command.

Iterative Quick sort

I am not going to state basic Quick sort algorithm or its implementation. We all know about these stuffs. Today I am going to focus on Iterative Quick sort implementation in C. We know that Quick sort is recursive in nature. So we need a stack data structure. For that purpose we may use recursive function or use an external stack data structure to simulate recursive functions.  Throughout the post I am going to use the leftmost element as the pivot element and we are only concerned about array implementation. 

Sunday, 14 July 2013

Simple Power Set Generator

Currently I was trying to code some algorithm that one of my friend told me to do. In that algorithm I needed the code of a power-set generator. I first tried to code in my own way but it proved to be not so much simple. Then I found another simple logic to generate power-set. Logic is simple if you want the power-set of a set with n number of elements then just generate all the combination of n boolean variables.

Friday, 5 July 2013

All expired things are not log files.

Distinction between expired unnecessary things and log files is very much vague to me.  May be for this confusion I somehow decided to keep my old expired admit card for December NET exam,2012.  One thing I should tell that I couldn't sit for this exam as my Semester exam and NET exam collided. Whatever I got another chance for the exam in June,2013 as the exam holds twice a year. Just before the exam when the exam centers were published then I found that my center is "South calcutta girl's College". Then I searched the college in Google Map and the route to it. Till  then I had no problem. But on the day of exam before going to the centre I somehow decided to match the center with the printed copy of my Admit card. Then I  found that my center is not the above specified college but another one. I didn't have enough time to search the college and go there. Luckily one of my friend Subhajit Ganguly told me that he knows the college and it was near. Then I found that the admit card I was matching for my center was of the december,12 and according to that expired admit card my exam center was South Calcutta girl's College.  However I was lucky enough that the college was not far.