def random_color
  colors = ["red", "blue", "green",
    "darkred", "darkblue", "darkgreen", 
    "pink", "lightblue", "cyan", "lightgreen", 
    "orange", "darkorange", "yellow", "lightyellow",
    "purple", "magenta", "violet", 
    "brown", "tan", "white", "gray", "darkgray", "black"]
  color = colors[rand(colors.size)]
  return color
end

def make_graph(nodes)
  graph = Array.new(nodes.length)
  for i in 0..nodes.length-1 do
    row = Array.new(nodes.length,false)
    nodes[i].each {|j| row[j] = true}
    graph[i] = row
  end
  return graph
end

def dag1()
  make_graph([ [2,3,4],
	       [3,5],
	       [6,7,8],
	       [7],
	       [8],
	       [10],
	       [],
	       [9,10],
	       [],
	       [],
	       []])
end
