## The big picture (Colorspaces VIII)

29/05/2018

A few posts ago, I said that while the colorspaces looked random, they really weren’t, and that there was underlying order. The structure cannot be easily seen just by looking at the numbers themselves, but at how the numbers are obtained.

The story begins sometimes in the 1950s, were transmitting color TV images started to be the next logical step. Someone (not sure who was first, but it may have been Valensi, in the 1930s) proposed that TV color should be encoded in a perceptually friendly way [1]. It was known for a while that the retina had four types of sensors, rods for brightness with no color information, and three other types corresponding to red, green, and blue, but also that in, and beyond the retina, information travels as brightness, yellow-blue and red-green differences [2,3].

## Rotating Arrays (part II)

16/02/2016

Last week we had a look at Kernighan’s algorithm to rotate an array $k$ position and concluded that it might not be optimal, as each element was moved twice. This week, we’ll have a look at another algorithm that moves some items more than once, but overall will do less than two exchanges per items.

## Rotating Arrays (Part I)

09/02/2016

To “rotate” an array $k$ position to the left (or to the right, doesn’t really matter) we could repeat $k$ times a shift of one, using only one temporary variable. This method doesn’t use much auxiliary memory but is inefficient: it will do $kn$ copies if we apply it to an array of size $n$. Surely we can do better.