reset password
Author Message
yogesh
Posts: 24
Posted 18:14 Apr 23, 2011 |

 

 

text :abbaabbaababbaaaabaabba

 encode :0110242655730

Dictionary code
0 = a
1 = b
2 = ab
3 = bb
4 = ba
5 = aa
6 = abb
7 = baa
8 = aba
9 = abba
10 = aaa
11 = aab
12 = baab
13 = bba

compression ratio (ori/comp): 184.0/52.0 =3.53846154

i am  a wrong or right ?


 

cbort
Posts: 95
Posted 18:35 Apr 23, 2011 |

a compression ratio is the  (compressed size/ original size) you have it the other way around...

but the numbers you got are right

some of us included our answers in a different post, take a look

http://csns.calstatela.edu/forum/viewTopic.html?topicId=4199507

Last edited by cbort at 18:40 Apr 23, 2011.
yogesh
Posts: 24
Posted 18:39 Apr 23, 2011 |

Thank you

comp/ori

so <1 ?

cbort
Posts: 95
Posted 18:46 Apr 23, 2011 |

yes

cbort
Posts: 95
Posted 19:04 Apr 23, 2011 |

I think I was wrong. Sorry for making you change your answer...

I guess the original answer was correct