We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,633 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Ordered/ Unordered Dictionaries

Please, I'd like to know the difference and the special uses for each one.
If I want to use it for text file compression whose algorithm is as follows, which one is more efficient?

Encoding Algorithm
1. Initialize the dictionary to contain all blocks of length one (D={a,b}).
2. Search for the longest block W which has already appeared in the dictionary.
3. Encode W by its index (location) in the dictionary.
4. Add W followed by the first symbol of the next block to the dictionary.
5. If not done, go to (2).

Thanks, any help is appreciated.

2
Contributors
2
Replies
4 Days
Discussion Span
6 Months Ago
Last Updated
3
Views
sapure
Newbie Poster
21 posts since Feb 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

any help with what? where are you stuck?

stultuske
Industrious Poster
4,369 posts since Jan 2007
Reputation Points: 1,318
Solved Threads: 610
Skill Endorsements: 23

I want to know ...

1) The difference between ordered & unordered dictionaries.
2) & Which type is more efficient for the previous algorithm.

Thanks.

sapure
Newbie Poster
21 posts since Feb 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0556 seconds using 2.6MB