Looking at an adjacency-matrix representation of undirected graphs, there can be at most |V|2 edges. Because the graph is undirected, there are half as many unique edges. Because there can't be any self-loops, there are |V| less edges for a total of |V|2/2 - |V| edges, which is O(n2).
Two verticies in GD form an edge if the associated edges in G share a vertex:
b) Describe the program input that would assign all possible combinations of logical values to the circuit's inputs.(!C && X && Y) || (C && !X && Y) || (C && X && !Y) || (C && X && Y)
c) Describe the program outputs that should result from the inputs given in b.
The program input is
The output should bein0 not0 in1 and0 in2 and0 not0 and0 in0 and1 in1 not1 in2 and1 not1 and1 in0 and2 in1 and2 in2 not2 not2 and2 in0 and3 in1 and3 in2 not3 and0 or0 and1 or0 and2 or0 and3 or0 or0 out0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
3 0 3 0 3 0 3 1 3 0 3 1 3 1 3 1
A cycle of length two is a cycle between two vertices, which has a pair of edges between two vertices. The only way to get two edges between the same two vertices is if they're directed edges pointed in opposite directions:
This page last modified on 8 April 2006.