Results 1 to 11 of 11

Thread: Collatz Conjecture / Collatz Tree

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    Collatz Conjecture / Collatz Tree

    I have made a WPF application that constructs a Collatz Tree for the collatz conjecture problem. The collatz conjecture is that any number will eventually reach and terminate at 1 by following these steps:
    If the number is even, divide the number by 2.
    If the number is odd, multiply the number by 3 and add 1.
    Repeat until number has reached 1.

    Here is an example starting with 3:
    3
    10 (3x3+1)
    5 (10/2)
    16 (5x3+1)
    8 (16/2)
    4 (8/2)
    2 (4/2)
    1 (2/1)

    The sequence starting with any number eventually reaches a 2^n number which is where it then begins to terminate.


    My program (optionally) starts with 1 and shows the paths to reach 1.
    Here is a screenshot:



    The red numbers are numbers that satisfy the following: (n - 1) mod 3 = 2. All numbers under a red number will not branch out both directions; each of the red nodes can only have 1 child.
    Last edited by Arrow_Raider; Feb 14th, 2009 at 09:22 PM.
    My monkey wearing the fedora points and laughs at you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width