- #1
CuppoJava
- 24
- 0
Homework Statement
There are N signals that must be all ANDed together using two-input AND gates, and produce a result as fast as possible.
The N signals arrive at different times (T1 to TN)
An AND gate first waits for both input signals to arrive, and then takes 1 second to output the resultant signal.
Prove that, no matter whatever scheme is used, the shortest calculation time satisfies :
Total time >= log2( sum( 2^Ti) )
And that the optimal scheme guarantees:
Total time <= log2( sum(2^Ti) ) + 1
The Attempt at a Solution
Following a derivation similar to the derivation for the Huffman code, I have proven that the optimal scheme is to always combine the two earliest signals, at anyone point in time.
But I can't prove that this scheme satisfies the specified bound.
Thanks for your help
-Patrick