Little endian vs. big endian

This is about how the bytes of a data type are arranged in memory. An int variable for example occupies 4 bytes in memory. In case of little endian, the least significant byte of the integer value will be first in … Continue reading

Just another counting problem

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 … Continue reading

SVD – a simple proof

Every real matrix can be decomposed as: where is a orthogonal matrix, is a matrix, having non-zero elements only on the diagonal, and   is a orthogonal matrix. We know from the previous post that a symmetric matrix is digonalisable, and … Continue reading

Posted in Math | 1 Comment

Real symmetric matrices are diagonalizable

This article involves advanced linear algebra knowledge but it definitely worth understanding it. The previous post contains a proof that a real symmetric matrix has real eigenvalues. Additionally the real symmetric matrices are diagonalizable by an orthogonal matrix. This means:  symmetric,   … Continue reading

Posted in Linear Algebra, Math | 3 Comments

Real symmetric matrices have real eigenvalues

A real matrix is symmetric if . I will show in this post that a real symmetric matrix have real eigenvalues. I will need a dot product for the prof and I’ll use the basic dot product for two vectors … Continue reading

Posted in Linear Algebra, Math | 3 Comments

Given an array of integers and an integer S, find if there are two numbers X and Y in the array such that X + Y = S. The problem was received by a friend during a phone interview with Google. A … Continue reading

Posted in Algorithms | 1 Comment

Celular automata – generating chaos with simple rules

Consider a matrix having lines and columns. The contents of the matrix is filled with 0 or 1 based on the following rules: 1. First line is full of zeros except the central element (position for 0 based index as in C++, … Continue reading

Posted in Math | 1 Comment