TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reversible Computing

149 pointsby ve55about 4 years ago

20 comments

fmihailaabout 4 years ago
For those who want to look into this in more depth, Conservative Logic by Fredkin and Toffoli [1] is a foundational paper exploring in detail how the principle of reversible computing impacts the underlying logic used for computation down to the logic gates. It is very readable.<p>[<i>Edit</i>: the video recommended by gbrown_ elsewhere in this thread (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26295043" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26295043</a>) refers to this paper and also shows how it is possible to move beyond the constraints introduced in it.]<p>[1] (PDF) <a href="https:&#x2F;&#x2F;www.cs.princeton.edu&#x2F;courses&#x2F;archive&#x2F;fall06&#x2F;cos576&#x2F;papers&#x2F;fredkin_toffoli82.pdf" rel="nofollow">https:&#x2F;&#x2F;www.cs.princeton.edu&#x2F;courses&#x2F;archive&#x2F;fall06&#x2F;cos576&#x2F;p...</a>
corysamaabout 4 years ago
Waaay back in uni I was taught that eventually computing will have to go reversible because of the mentioned “von Neumann–Landauer limit”. So, your program will run each instruction forward, then again as the stack rewinds (instead of stack pops). But, this 2X penalty will enable a &gt;2X clock rate increase due to lower thermals.<p>Rewinding code also has the side effect of automatic garbage collection. The challenge becomes copying out end results before rewinding without re-introducing thermal waste.<p>In the meantime chips are utilizing partial measures against it like sending excess bits to recycling pools. So, A|B results in 2 bits in, 1 bit out as a useful result and 1 bit shuttled off for recycling.<p>Backing this up, I recently learned that quantum computer programs must be reversible if they are to function.
评论 #26295994 未加载
评论 #26301064 未加载
longemen3000about 4 years ago
In Julia there is a package for a reversible computing DSL, with excelent examples <a href="https:&#x2F;&#x2F;giggleliu.github.io&#x2F;NiLang.jl&#x2F;dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;giggleliu.github.io&#x2F;NiLang.jl&#x2F;dev&#x2F;</a>
评论 #26299375 未加载
gaogaoabout 4 years ago
Humorous, unconventional example of reversible computing using actual swarms of crabs - <a href="https:&#x2F;&#x2F;www.wired.com&#x2F;2012&#x2F;04&#x2F;soldier-crabs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.wired.com&#x2F;2012&#x2F;04&#x2F;soldier-crabs&#x2F;</a>
jaggirsabout 4 years ago
Interesting fact: In a quantum algorithm you can not really delete information, which is why quantum algorithms are always defined as reversible computations (unitary matrices).<p>Also, here is a reversible programming language someone made (which has nothing to do with quantum):<p><a href="https:&#x2F;&#x2F;wiki.c2.com&#x2F;?ReversibleProgrammingLanguage" rel="nofollow">https:&#x2F;&#x2F;wiki.c2.com&#x2F;?ReversibleProgrammingLanguage</a>
评论 #26298159 未加载
gbrown_about 4 years ago
For anyone interested in the topic I highly recommend checking out Dr. Michael P. Frank&#x27;s work. This video is good one to start with <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=IQZ_bQbxSXk" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=IQZ_bQbxSXk</a>
评论 #26295844 未加载
评论 #26300650 未加载
adamnemecekabout 4 years ago
Closure under inverse is like the most important idea in math, physics and probability. Linear logic, constructive math, probability, quantum mechanics all have in common that they rely on closure under adjoint and norm which in turn give you closure under inverse.<p>I wrote something on the topic but it&#x27;s very incomplete <a href="https:&#x2F;&#x2F;github.com&#x2F;adamnemecek&#x2F;adjoint" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;adamnemecek&#x2F;adjoint</a>
dane-pgpabout 4 years ago
Following the link to the article about Landauer&#x27;s principle[0] and then to Koomey&#x27;s law[1] takes you to a set of facts that have stuck with me for years. Firstly:<p>&gt; As of 2011, computers have a computing [energy] efficiency of about 0.00001%.<p>which means that computers could theoretically be made 10 million times more energy efficient. Even more strikingly, though:<p>&gt; Assuming that the energy efficiency of computing will continue to double every 1.57 years, the Landauer bound will be reached in 2048.<p>The possibility of seeing a 10 million times increase in energy efficiency in my lifetime is hard to imagine, as indeed is the possibility that the practical limit is reached before 2048.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Landauer&#x27;s_principle" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Landauer&#x27;s_principle</a><p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Koomey&#x27;s_law" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Koomey&#x27;s_law</a>
评论 #26338293 未加载
GiggleLiuabout 4 years ago
It is not clever to build a completely reversible computer. No one wants to undo the computing to erase the disk after training a neural network for a month. Reversible computing is not always more energy efficient. The &quot;proof&quot; follows from the Bennett&#x27;s time space tradeoff: <a href="https:&#x2F;&#x2F;www.math.ucsd.edu&#x2F;~sbuss&#x2F;CourseWeb&#x2F;Math268_2013W&#x2F;LevineSherman_Tradeoff.pdf" rel="nofollow">https:&#x2F;&#x2F;www.math.ucsd.edu&#x2F;~sbuss&#x2F;CourseWeb&#x2F;Math268_2013W&#x2F;Lev...</a><p>As the coarse graining process goes, the ratio between computing time and garbadge space size increases exponentially. Erasing space is more energy efficient when E_compute&#x2F;E_erase &gt; N_uncompute&#x2F;N_erase, where E and N are energy and number of instructions.<p>BUT, it is very likely to have a reversible computing device like GPU that can do part of works. The key point is: most reversible computing devices CAN erase information, although with energy cost. We just need to switch between uncomputing and erasing at the right place. e.g NiLang is an eDSL that lives in function level, while most other reversible programming languages are standalone.
erk__about 4 years ago
A interesting subject under this is reversible programming languages, there is for example Janus [0], which given some input program can generate the inverse, it can also generate C++ code with both directions.<p>[0]: <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Janus_(time-reversible_computing_programming_language)" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Janus_(time-reversible_compu...</a>
m463about 4 years ago
Feynman was the first person I heard talk about this, pretty interesting topic.
评论 #26295082 未加载
评论 #26295706 未加载
MichaelBurgeabout 4 years ago
Isn&#x27;t every algorithm reversible if you save the inputs?<p>If you have some algorithm A that turns an input bitstring N into an output bitstring M in K steps going through states S(0) ... S(K), then:<p>1. None of the states can repeat or you have an infinite loop.<p>2. For some step 0 &lt; K0 &lt; K, (A, N, K0) uniquely determines both S(K0-1) and S(K0+1): Run A on input N for K0+1 steps and record { S(K0-1), S(K0), S(K0+1) }.<p>3. So all computations are reversible given (A, N, K).<p>Maybe physics wants something like &quot;local reversibility&quot;(a reverse-step must execute within fixed time), whereas CS works with &quot;mathematical reversibility&quot;(is it a computable one-to-one function?).<p>The construction above doesn&#x27;t execute within fixed time, but I don&#x27;t think that&#x27;s the correct fix: There are lots of dumb things I can do in constant-time.<p>So why does Physics not allow me to write off all my electricity expenses, as long as I keep the data on backup tapes in a closet in case I get audited for reversibility?
评论 #26380406 未加载
评论 #26297242 未加载
评论 #26297258 未加载
fallingknifeabout 4 years ago
Since x + y = z can&#x27;t be reversed without preserving input, this would have to use additional memory. What if you then have z + a = b? Can you now throw out x&#x2F;y, or does it have to be reversible all the way back to the beginning?
评论 #26295152 未加载
omazurovabout 4 years ago
For weekend&#x27;s entertainment: making Game of Life time reversible. Isotropically.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;OlegMazurov&#x2F;Janus" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;OlegMazurov&#x2F;Janus</a>
评论 #26338832 未加载
ggmabout 4 years ago
York Uni wrote a fully reversible demonstrator for cricket scoring. It might have been somebody&#x27;s phd in 1983-5 timeframe.<p>I think the phd was about both language primitives in either ADA or Modula-&lt;something&gt; and compiler&#x2F;runtime support. The demonstrator let you fix up mistakes in runs and scoring.<p>(Cricket has this thing called duckworth-lewis for working out who WOULD have won, formally, for a truncated game, in some arcane process, One of Duckworth or Lewis is a founder of Operations-Research)
ouidabout 4 years ago
In the real world, computers don&#x27;t start with blank tapes. Whether you can reversibly compress a noisy tape, then, is a question of the tape&#x27;s entropy. If you can&#x27;t create blank tape on which to work, you can&#x27;t do any computing, reversible or otherwise.
Darmodyabout 4 years ago
I submitted this a while ago. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19614766" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19614766</a>
gfodyabout 4 years ago
one of the benefits of expressing business logic in a high level declarative language like SQL is that the order isn&#x27;t specified and can be reversed depending on the execution context. a perfectly sargable and streamable view definition for example can end up on either side of a join in some execution plan with data streaming in either direction, and the same code can power filtering as well as generating.
评论 #26297210 未加载
miguelrochefortabout 4 years ago
How does that relate to P versus NP problem?
评论 #26297356 未加载
评论 #26298256 未加载
评论 #26297261 未加载
peter_d_shermanabout 4 years ago
I thought a lot about a reversible programming language, a long time ago...<p>The biggest problem with one is that there would be a huge overhead -- both in execution time and memory used for a truly &quot;reversible&quot; language.<p>I thought at the stack level back then -- basically one of the things that would need to be accomplished would be that a reversible program would have to store old states of the stack, should they be necessary to be reverted...<p>But now I&#x27;m thinking to myself...<p>What if the reversibility of a program was implemented at the function level?<p>In other words, ignore the stack (at least temporarily)... and look at each function (procedure&#x2F;method&#x2F;routine -- call it what you will, I&#x27;ll use the term &#x27;function&#x27; to apply to all of them) in terms of the memory that it changes, and only in terms of the memory it changes...<p>See, a virtual machine that emulates instructions would be great for this... you reprogram on the instruction level, such that:<p>Did this instruction change memory? Yes? OK, now record that change somewhere, like in a hash that ties this change to this invocation of the function (another point... each function would need a unique &quot;invocation ID&quot;... time consuming to say the least, but that&#x27;s a sub-discussion)...<p>So now we know (at the cost of tremendous speed! &lt;g&gt;) which functions changed which memory when!<p>And of course, if a function say copies a gigabyte worth of data, then not only is the system slow, but that one function invocation -- would waste an extra gigabyte of memory to keep track of that memory&#x27;s previous state!<p>But it could be done...<p>Maybe the solution (or one possible solution) would be to implement &quot;memory change tracking&quot; (for lack of a better term!) at the function level, and so, the program author, via compiler assistance, could determine what functions could be &quot;memory change tracked&quot; and which wouldn&#x27;t.<p>Or, you could implement a system where the memory change tracking kicks in at a certain point (say, when you&#x27;re debugging and know that a vicious bug is imminent, and you want to find out more about it -- so then you turn on the &quot;full reversibility&quot; aspect of your program!)<p>Or (even better!) -- don&#x27;t use the VM instruction tracking, add a feature to a compiler to generate additional instructions to do the tracking (much faster than using a VM)...<p>But, no matter which way, it will be slow, it will consume tons of CPU cycles, and it (depending on what your program does) will eat memory like no tomorrow!<p>Still... in a development environment, to find a particularly nasty and elusive bug... it might be worth it...
评论 #26339077 未加载