23.11.2014 Views

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

567<br />

12.5<br />

Text Similarity Test<strong>in</strong>g .................<br />

568<br />

12.5.1<br />

The Longest Common Subsequence Problem ....<br />

568<br />

12.5.2<br />

Dynamic Programm<strong>in</strong>g ................<br />

569<br />

12.5.3<br />

Apply<strong>in</strong>g Dynamic Programm<strong>in</strong>g to the LCS Problem<br />

569<br />

12.6<br />

12.6 Exercises .........................<br />

573<br />

java.datastructures.net<br />

12.1 Str<strong>in</strong>g Operations<br />

Document process<strong>in</strong>g is rapidly becom<strong>in</strong>g one of the dom<strong>in</strong>ant functions of<br />

computers. Computers are used to edit documents, to search documents, to transport<br />

documents over the Internet, <strong>and</strong> to display documents on pr<strong>in</strong>ters <strong>and</strong> computer<br />

screens. For example, the Internet document formats HTML <strong>and</strong> XML are primarily<br />

text formats, with added tags for multimedia content. Mak<strong>in</strong>g sense of the many<br />

terabytes of <strong>in</strong>formation on the Internet requires a considerable amount of text<br />

process<strong>in</strong>g.<br />

In addition to hav<strong>in</strong>g <strong>in</strong>terest<strong>in</strong>g applications, text process<strong>in</strong>g algorithms also<br />

highlight some important algorithmic design patterns. In particular, the pattern<br />

match<strong>in</strong>g problem gives rise to the brute-force method, which is often <strong>in</strong>efficient but<br />

has wide applicability. For text compression, we can apply the greedy method, which<br />

743

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!