Guest User

Untitled

a guest
Feb 11th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. def fibG(n):
  2.     G = Graph()
  3.     fib = set(fibonacci_sequence(2*n))
  4.     for i,j in combinations(range(1,n+1),2):
  5.         if i+j in fib:
  6.             G.add_edge(i,j)
  7.     return G
Advertisement
Add Comment
Please, Sign In to add comment