Java algorithms. There are 4 questions overall. There are additional graphics and examples in the attached document Regular Expressions Draw an NFA for the regular expression ( ( A * | ( B C ) * D ) * ) using the construction described in Section 5.4. Distinguish the match transitions from the epsilon transitions in your drawing. Show, in the style of the figure on page 798 (by specifying the set of states after each step), a sequence of transitions that demonstrates that the NFA that you drew above recognizes the text string A A D B C D A D D. You do not need to redraw the NFA after each step Data Compression Draw the Huffman trie for the following string in a style similar to p. 832 of Algorithms, 4th edition; also, give the codewords for each of the 5 symbols { E, H, R, T, W }; and give the length (in bits) of the encoded message—count only the bits used to encode the message, not the trie. Give the LZW encoding for the following string using the compress() method of Algorithm 5.11 of Algorithms, 4th edition. Use 8-bit codewords and 7-bit chars. W E W E R E T H E R E W E W E R E H E R E
Get Free Quote!
406 Experts Online