Author: Stan Eisenstat
Subject: Re: [Cs323] 9*SIZE when input is one letter
Date: Thursday, 05 Nov 2020, 07:19:31
> Message Posted By: Unknown > > Am I correct in the following calculation: when only sending one letter, > the table only needs 256 entries, so it only needs 8 bits to send the > code. ... That depends on whether you have assigned any special codes (e.g., to signal a change in NBITS or pruning). ===== > ... Then the memory limit for this case is 9*256 = 2304? However, > /Tests/maxStack says I already use more than 4000 bytes, and maxHeap says > I am using 2048 bytes. Am I calculating something incorrectly? Seems like > maxHeap on the solution script also uses more than 4000 bytes. Tests/maxStack is neither accurate nor deterministic, and the test scripts include a fudge factor to account for these defects. Hwk4/encode uses special codes and thus sends 9 bits for the first code. --Stan-PREV INDEX NEXT