the core information stored by search engine is dictionarycalled an inverted index or inverted filestoring key-value pairs ( , )where is word and is collection of pages containing word the keys (wordsin this dictionary are called index terms and should be set of vocabulary entries and proper nouns as large as possible the elements in this dictionary are called occurrence lists and should cover as many web pages as possible we can efficiently implement an inverted index with data structure consisting of an array storing the occurrence lists of the terms (in no particular order compressed trie for the set of index termswhere each external node stores the index of the occurrence list of the associated term the reason for storing the occurrence lists outside the trie is to keep the size of the trie data structure sufficiently small to fit in internal memory insteadbecause of their large total sizethe occurrence lists have to be stored on disk with our data structurea query for single keyword is similar to word matching query (see section namelywe find the keyword in the trie and we return the associated occurrence list when multiple keywords are given and the desired output are the pages containing all the given keywordswe retrieve the occurrence list of each keyword using the trie and return their intersection to facilitate the intersection computationeach occurrence list should be implemented with sequence sorted by address or with dictionary (seefor examplethe generic merge computation discussed in section in addition to the basic task of returning list of pages containing given keywordssearch engines provide an important additional service by ranking the pages returned by relevance devising fast and accurate ranking algorithms for search engines is major challenge for computer researchers and electronic commerce companies text compression in this sectionwe consider an important text processing tasktext compression in this problemwe are given string defined over some alphabetsuch as the ascii or unicode character setsand we want to efficiently encode into small binary string (using only the characters and text compression is useful in any situation where we are communicating over low-bandwidth channelsuch as modem line or infrared connectionand we wish to minimize the time needed to