File:Collatz-graph-all-30-no27.svg

يمكن اعتبار المشكلة التي يثيرها هي مشكلة رياضية غير محلولة بعد وقد سميت باسم Lothar Collatz الذي اكتشفها عام 1937 م.


Summary

Directed graph showing the orbits of the numbers less than 30 (with the exception of 27 because it would make it too tall) under the Collatz map.

For a larger graph containing only odd numbers, see Image:Collatz-graph-300.svg.

Created with Graphviz, with the help of this Python program:

dotfile = file('collatz-graph.dot', 'w')

limit = 30

def f(n):
  if n % 2 == 0:
    return n / 2
  else:
    return 3*n + 1

explored = set([1,27]) # 27 has a long convergence, so skip it

dotfile.write('digraph {\n')

for n in range(2, limit):
  while n not in explored:
    dotfile.write(str(n) + ' -> ')
    explored.add(n)
    n = f(n)
  dotfile.write(str(n) + ';\n')

dotfile.write('}\n')


enSVG development

InfoField
 
The SVG code is valid.
 
This diagram was created with Graphviz.
Category:Valid SVG created with Graphviz code:Diagrams#Collatz-graph-all-30-no27.svg
 
Category:Translation possible - SVGThis diagram uses embedded text that can be easily translated using a text editor.

Source code

Graphviz mscgen code

dotfile = file('collatz-graph.dot', 'w')
 
 limit = 30
 
 def f(n):
   if n % 2 == 0:
     return n / 2
   else:
     return 3*n + 1
 
 explored = set([1,27]) # 27 has a long convergence, so skip it
 
 dotfile.write('digraph {\n')
 
 for n in range(2, limit):
   while n not in explored:
     dotfile.write(str(n) + ' -> ')
     explored.add(n)
     n = f(n)
   dotfile.write(str(n) + ';\n')
 
 dotfile.write('}\n')

Licensing

Public domain This work has been released into the public domain by its author, Keenan Pepper. This applies worldwide.
In some countries this may not be legally possible; if so:
Keenan Pepper grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
Category:Self-published work#Collatz-graph-all-30-no27.svgCategory:PD-self#Collatz-graph-all-30-no27.svg Category:Collatz conjecture Category:Media missing infobox template
Category:Collatz conjecture Category:Files with no machine-readable author Category:Files with no machine-readable source Category:Media missing infobox template Category:PD-self Category:Self-published work Category:Translation possible - SVG Category:Valid SVG created with Graphviz code:Diagrams