210 likes | 345 Views
Physical Limits of Computing Dr. Mike Frank CIS 6930, Sec. #3753X Spring 2002. Lecture #28 Reversible Computing Theory II: Emulating Irreversible Machines Fri., Mar. 22. Administrivia & Overview. Don’t forget to keep up with homework! We are 9 out of 14 weeks into the course.
E N D
Physical Limits of ComputingDr. Mike Frank CIS 6930, Sec. #3753XSpring 2002 Lecture #28Reversible Computing Theory II:Emulating Irreversible MachinesFri., Mar. 22
Administrivia & Overview • Don’t forget to keep up with homework! • We are 9 out of 14 weeks into the course. • You should have earned ~64 points by now. • Course outline: • Part I&II, Background, Fundamental Limits - done • Part III, Future of Semiconductor Technology - done • Part IV, Potential Future Computing Technologies - done • Part V, Classical Reversible Computing • Limits of adiabatics: Friction,Leakage,Power supplies. - last Mon. • RevComp theory I: Reversible Logic Models - last Wed. • RevComp theory II: Emulating Irreversible Machines - TODAYRevComp theory II: Bounds on Space-Time Overheads • Physics-based models of computing - Mon. 3/25 • Reversible scaling advantages, low-leakage limit. - Wed. 3/27 • (plus ~5 more lectures…) • Part VI, Quantum Computing • Part VII, Cosmological Limits, Wrap-Up
Reversible Computing Theory II:Emulating Irreversible Machines
Motivation for this study • We want to know how to carry out any arbitrary computation in a way that is reversible to an arbitrarily high degree. • Up to limits set by leakage, power supply, etc. • We want to do this as efficiently as possible: • Using as few “device ticks” as possible (spacetime) • Minimizes HW cost, & leakage losses • Using as few adiabatic transitions as possible (ops) • Minimizes frictional losses • But, a desired computation may be originally spec’d in terms of irreversible primitives.
General-Case vs. Special-Case • We’d like to know two kinds of things: • For arbitrary general-purpose computations, • How to automatically emulate them in a fairly efficient reversible way, • w/o needing new intelligent/creative design work in each case? • Topic of today’s lecture • For various specific computations of interest, • What are the most efficient reversible algorithms? • Or at least, the most efficient that we can find? • Note: These may not look anything like the most efficient irreversible algorithms! • More on this later
The Landauer embedding • The obvious embedding of irreversible ops into “expanding” reversible ones leads to a linear increase in space through time. (Landauer ‘61) • Or, increase in width of an input-consuming circuit “Expanding”operations(e.g., AND) Desiredoutput “Garbage”bits input Circuit depth, or time
Lecerf Reversal • Lecerf (‘63) was interested in the group-theory question of whether an iterated permutation of items would eventually return to initial item. • Proved undecidable by reducing Turing’s halting problem to this question, w. a reversible TM. • Reversible TM reverses direction instead of halting. • Returns to initial state iff irreversible TM would halt. • Only problem:No useful output data! Desiredoutput f f 1 Garbage Copy ofInput Input
The Bennett Trick • Bennett (‘73) pointed out that you could simply fan-out (reversibly copy) the desired output before reversing. • Note O(T)storage is still temporarily needed! Desired output f f 1 Copy ofInput Input Garbage
Improving Spacetime Efficiency • Bennett ‘73 transforms a computation taking spacetime S·T to one taking (S·T2) in the worst case. • Can we do better? • Bennett ‘89: Described a technique that takes spacetime • Actually, can generalize slightly and arrange for exponent on T to be 1+, where 0 (very slowly) • Lange, McKenzie, Tapp ‘97: Space (S) is possible, if you use time (exp((S))) • Not any more spacetime-efficient than Bennett.
Reversible “Climbing Game” • Suppose a guy armed w. hammer, N spikes, & rope is trying to climb acliff, w. the following rules. • How high can he climb? • Rules: • Standing on ground or spike, caninsert & remove spike 1 meter higher. • Can raise & lower himself betweenspikes & ground using his rope. • Can’t insert or remove a spike whiledangling from a higher spike! • Not enough leverage/stability?
Analogy w. Emulation Problem • Height on cliff = How much progress havewe made through the irreversiblecomputation? • Number of spikes = Memory of rev. mach. • Spike at height H = Using memory torecord state of irreversible machineafter H steps. • Adding/removing spike @H+1if spike is @H = Computing/uncomputing state H+1 from H.
1. Insert spike @ 1. 2. Insert spike @ 2. 3. Remove spike @ 1. 4. Insert spike @ 3. 5. Insert spike @ 4. 6. Remove spike @ 3. 7. Insert spike @ 1. 8. Remove spike @ 2. 9. Remove spike @ 1. 10. Can use remaining 3 spikes to climb up another 4 if desired! Let’s Climb! 0. Standing on ground.
How high can we climb? • Using only N spikes, and the strategy illustrated, we can climb to height 2N1 (wow!) • Li & Vitanyi: (Theorem) This is the optimal strategy for this game. • Open question: • Are there more efficient emulation techniques that are not based on this game model?
Triangle representation k = 2n = 3 k = 3n = 2
Analysis of Bennett Algorithm • n = # of recursive levels of algorithm • k = # of lower-level iterations to go forward 1 higher-level step • Tr = # of reversible lowest-level steps executed = 2(2k1)n • Ti = # of irreversible steps emulated = kn • So, n = logkTi, and so Tr = 2(2k1)log Ti/log k = 2elog(2k1)log(Ti)/log k = 2Tilog(2k 1)/log k (n+1 spikes)
Linear-Space Emulation (Lange, McKenzie, Tapp ‘97) Unfortunately, the tree may have 2S nodes!
Can we do better? • Bennett ‘73 takes order-T time, LMT ‘97 takes order-S space. • Can some technique achieve both, simultaneously? • Theorem: (Frank & Ammer ‘97) The problem of iterating a black-box function cannot be done in time T & space S on a reversible machine. • Proof really covers all possible algorithms! • Also provides loose lower bounds on extra space required by a time-T simulation. • Results may also apply to the problem of iterating a cryptographic one-way function.
One-Way Functions • …are invertible functions f such that f is easy to compute (e.g., takes polynomial time) but f 1 is hard to compute (e.g., exponential). • Example: • Consider: f(p,q) = pq with p,q prime. • Multiplication is easy. • Factoring is hard (except with quantum computers). • The “one-way-ness” of this function is essential to the security of the RSA public-key cryptosystem. • No function has been proven to be one-way. • Certain kinds of one-way functions are known to exist if P NP.
Elements of Frank-Ammer Proof • Consider a chain of bit-strings (size S each) that is incompressible by a certain compressor. • Easily proven to exist. (See next slide.) • Machine’s job is to follow this chain from one node to the next by using a black-box function. • The compressor can run a reversible machine backwards, to reconstruct earlier nodes in the chain from later machine configurations. • If the reversible machine only uses order-S space in its configurations, then the chain is compressible! • Contradicts choice of incompressible chain; QED.
Existence of Incompressibles • A decompressor or description systems:{0,1}* maps any bit-string descriptiond to the described string x. • Notation f:D means a unary operator on D, f:DD • x is compressible is s iff d: s(d)=x, |d|<|x| • Notation |b| means the length of bit-string b in bits. • Theorem:Every decompressor has an incompressible string for any given length . • Proof: There are 2 -bit strings, but only shorter descriptions.