jueves, 25 de abril de 2013

Adaptive Code

For this week's homework, we had to implement a compression algorithm that doesn't compress all the input at once, but to make the compression in parts. That's the adaptive part of the coding.

This is how I implement it: For each part of the input that was going to be processed, take the input letters and make a dictionary with each letter as key, and its frequency as value. Next, a new dictionary is created, but this time the value is going to be its probability of apearing in the spanish alphabet.  Also, for each part we had to see if the some letter hasn't appear before.

With this, we create a graph where each node is added by "asking": is it greater than the actual node? (go to right); is it lower than the actual node? (go to left).

This is what I did:
Clase principal:

El resultado se cicla :(

3 comentarios:

  1. No queda muy clara la idea de la adaptación. 3+2 pts.

  2. No, al revés. 2+3. Tres por reporte, dos por código.

  3. NP en tarea de códigos bloque.