Devil’s Staircase

The ‘Devils Staircase’ is a famous function in mathematics. It is a non-constant function that has 0 derivative almost everywhere. Further it is continuous but not absolutely continuous. Constructing the devils staircase is easy, and is done recursively. We start with the function f0:[0,1][0,1] where f0(x)=x. Now suppose we have defined fn we define fn+1 by letting it be 1/2 on the interval [1/3,2/3], then we take a copy of the full function fn and “squash” it into the box with vertices : (0,0),(1/3,0),(1/3,1/2),(0,1/2), then again we take a copy of fn and we “squash” it into the box with...