I need to work on a data privacy project and so am spending some time to review some notes I wrote couple years ago. I guess it would be a great exercise to reorganize them into a post series. And this will be my first post of this series. 🙂 Introduction to data privacy From…

# Category: Study notes

## Public key cryptography and RSA encryption algorithm

Let say if Alice would like to send a secret message to Bob, she may want to first encrypt the message before sending it. Modern cryptographic techniques all use some secret keys to encrypt and decrypt a message. For example, we may generate a random sequence with a predefined seed (the key) and take the…

## Goagent experience

I am in Shanghai a couple days and it is quite inconvenient with many websites blocked. I heard about “breaking” the wall but I didn’t realize it is quite fast and easy. All one needs is a software called goagent. It takes advantage of the google app engine. Here, I will assume that ones already…

## M/M/1 Simulation with Matlab

A simple simulation of M/M/1 queue with Matlab. The distribution of the number of “packets” in the system is computed and compared with the theoretical result. delta=0.1; % simulation step in sec lambda=0.1; % arrival rate in packets per second mu=0.2; % departure rate in packets per second rho=lambda/mu; M=50*3600/delta; % number of simulation step…

## Simulating Poisson process in Matlab

Below is a simple Matlab code to simulate a Poisson process. The interarrival times were computed and recorded in int_times. The times are then grouped into bins of 10 seconds in width and the counts are stored in count. lambda=1/60; % arrival rate per second (1 minute per packet) T=10*3600; % simulation time in second…

## Notes on Bloom Filter

Here are some notes after listening to a coursera lecture of Algorithm 1 by Professor Roughgarden at Stanford. The goal of a Bloom filter is to provide a space efficient hash for some data entries. The insertion and validation of an entry are very efficient. But a trade-off is that deletion is not possible and…

## Some Results for Hermitian Matrix

Lemma 1: All eigenvalues of a Hermitian matrix are real. Proof: Let be Hermitian and and be an eigenvalue and the corresponding eigenvector of . We have . Thus we have as is real in general. Lemma 2: Two eigenvectors of a Hermitian matrix are orthogonal to each other if their eigenvalues are different. Proof:…

## Schur Complement and Positive Definite Matrix

For a matrix , we call the Schur complement of in . Note that naturally appear in block matrix inversion. Note that when is symmetric and is positive definite, is positive definite if and only if is also positive definite. The proof is rather straightforward. Consider the function . Let’s try to minimize w.r.t. ,…

## Block Matrix Inversion

Here are some formula for matrix inversion. Lemma 1: For a block matrix , , where is basically the Schur’s complement of block . Proof: Let , gives us From the four equations, we have And similarly from , we have Together, they show the first inequality. Also note that and thus . Substituting into…

## Existence of Eigenvector in Linear Operator in Complex Vector Space

Here is some quick note for the existence of eigenvector for linear operator in complex vector space of dimension . Consider any non-zero vector in the space, we have the vectors to be linearly dependent. Thus, there exists such that . If is zero, we will pick the largest , , such that . In…