[plt-scheme] Effect of caching using hash-tables vs vectors

From: jos koot (jos.koot at telefonica.net)
Date: Sun Mar 18 08:16:51 EDT 2007

Hi Eli,
I am interested in how you solved the problem using a vector while not knowing beforehand the maximum number that will be generated while cycling.
Jos koot

(((((lambda(x)((((((((x x)x)x)x)x)x)x)x))
    (lambda(x)(lambda(y)(x(x y)))))
  (lambda()(printf "Greetings, Jos~n"))))
  ----- Original Message ----- 
  From: Eli Barzilay 
  To: Daniel Yoo 
  Cc: plt-scheme at list.cs.brown.edu 
  Sent: Saturday, March 17, 2007 9:34 PM
  Subject: Re: [plt-scheme] Effect of caching using hash-tables vs vectors

  On Mar 17, Daniel Yoo wrote:
  > Just for fun, I did a solution for the 3n+1 problem from Programming 
  > Challenges:
  >      http://acm.uva.es/p/v1/100.html
  > [...]

  Unrelated to your post -- but I played with this a while ago.  I
  eventually realized that there are certain bit patterns that need to
  be checked in a specific way, and ended up writing Scheme code that
  would generate C code for each of these tests, then run it.  I managed
  to prove that the thing converges up to something in the neighborhood
  of numbers that are known to converge.  (I think it was something
  around 1e20.)  I can send you the file if you're interested -- but it
  will take some time to decipher what it's doing.
            ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://www.barzilay.org/                 Maze is Life!
    For list-related administrative tasks:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070318/12df93b4/attachment.html>

Posted on the users mailing list.