Fichye:Collatz-graph-20-iterations.svg

Le contenu de la page n’est pas pris en charge dans d’autres langues.
Depi Wikipedya, ansiklopedi lib

Fichye orijinal(Fichye SVG, rezolisyon de 1 440 × 1 406 piksèl, gwosè fichye : 520 kio)

Fichye sa a sòti nan Wikimedia Commons e ka sèvi nan lòt pwojè. Desktripsyon ki sou paj li file description page ekri anba a.

Rezime

Deskripsyon
English: This is a graph, generated in bottom-up fashion, of the orbits of all numbers under the Collatz map with an orbit length of 20 or less.

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

 # This python script generates a graph that shows 20 levels of the Collatz Conjecture.
 
 level = [1] # The root of the tree contains only "1"
 results = {} # This will hold the relationships for the graph
 
 # Loop 20 times
 for c in range(20):
     newlevel = set() # This will be the set of numbers in the level above us
     for x in level: # We now loop through each number in our current level
 
         # There will only sometimes be an odd multiple of 3 (plus one) above us
         # When (x-1) mod 3 is 0, x is an even number half the time
         # So we check against (x-4) mod 6 because we don't want to find evens
         odd = (x-1)/3 if not (x-4)%6 else 0
         if odd > 1: # We don't want 1 (the root) or 0 (no odd found)
             newlevel.add(odd) # Put this into the next level
             results[odd] = x # Add a relationship to the graph
 
         newlevel.add(x*2); # There will always be an even number above us
         results[x*2] = x # Add a relationship to the graph
 
     # Finally, advance to the next level
     level = newlevel
 
 # Technically, 1 is odd so 1*3+1 = 4. If included though, this tends to make 2 and 1 overlap on the graph, which is ugly.
 # Uncomment to include this relationship:
 # results[1] = 4;
 
 # Now we write the graph out to a file in dot format so that graphviz can read it
 f = open('collatz.dot', 'w')
 # For aesthetic reasons we set 8 as the centre node instead of 1
 f.write('digraph G {\n    size="16,16";\n    root=8;\n    splines=true;\n')
 for x in results:
     f.write("    %d -> %d;\n" % (x, results[x]))
 f.write('}\n')
 f.close()
 print "Generated %d nodes" % len(results)
Dat 7 mas 2010 (date de téléversement originale)
Sous Transféré de en.wikipedia à Commons par Derlay utilisant CommonsHelper.
Kreyatè TerrorBite sur Wikipedya anglais

Kondisyon itlizasyon

Public domain Cette œuvre a été placée dans le domaine public par son auteur, TerrorBite sur Wikipedya anglais. Ceci s’applique dans le monde entier.
Dans certains pays, ceci peut ne pas être possible ; dans ce cas :
TerrorBite accorde à toute personne le droit d’utiliser cette œuvre dans n’importe quel but, sans aucune condition, sauf celles requises par la loi.

Journal des téléversements d’origine

La page de description originale était ici. Tous les noms d'utilisateur qui suivent se rapportent à en.wikipedia.
  • 2010-03-07 16:29 TerrorBite 1440×1406× (532396 bytes) This is a graph, generated in bottom-up fashion, of the orbits of all numbers under the Collatz map with an orbit length of 20 or less. Created with [[Graphviz]], with the help of this [[Python (programming language)|Python]] program: # This python sc

Légendes

Ajoutez en une ligne la description de ce que représente ce fichier

Éléments décrits dans ce fichier

dépeint français

type MIME français

image/svg+xml

e228f25d455662fa61e6e4f16b60ef24be090161

méthode de détermination français : SHA-1 français

532 396 octet

hauteur français

1 406 pixel

largeur français

1 440 pixel

Istorik fichye a

Klike sou yon dat/yon lè pou wè fichye a jan li te ye nan moman sa a.

Dat ak lèMinyatiGrandè yoItilizatèKomantè
Kounye a25 me 2010 à 10:00Minyati pou vèsyon 25 me 2010 à 10:001 440 × 1 406 (520 kio)Derlay{{Information |Description={{en|This is a graph, generated in bottom-up fashion, of the orbits of all numbers under the Collatz map with an orbit length of 20 or less. Created with en:Graphviz, with the help of this [[:en:Python (programming langua

paj sa a itilize fichye sa a:

Itilizasyon global fichye a

Wiki sa a yo sèvi ak fichye sa a: