#OK to post homework #Joseph Koutsoutis, 01-26-2025, Assignment 1 read `C1.txt`: Help := proc(): print("AM(G), Image(pi,G), ULgraphs(n)"): end: #2 # Exercise 1.1a # By the axioms for inner products, we find: # { = [{]** # = [ + |B>}]* # = [ + ]* # = * + * # = + # Exercise 1.1b # By the axioms for inner products, we have that: # * = # It follows that is a real number. # Exercise 1.2 # We first find: # + |B>} = (c1*)(a1 + b1) + ... + (cn*)(an + bn) # = (c1*)(a1) + ... + (cn*)(an) + (c1*)(b1) + ... + (cn*)(bn) # = + # so we have linearity. # We next check: # = (b1*)(a1) + ... + (bn*)(an) # = [(b1*)(a1) + ... + (bn*)(an)]** # = [(b1)(a1*) + ... + (bn)(an*)]* # = [(a1*)(b1) + ... + (an*)(bn)]* # = * # so interchanging bras and kets corresponds to complex conjugation. #3 AM := proc(G) local n,E,i,j,M,e: n,E := op(G): M := [seq([seq(0, j=1..n)], i=1..n)]: for e in E do: i,j := op(e): M[i][j] := 1: M[j][i] := 1: od: M: end: #4 Image := proc(pi, G) local i,j,n,E1,E2,e: n,E1 := op(G): E2 := {}: for e in E1 do: E2 := E2 union { {op(pi[[op(e)]])} }: od: [n,E2]: end: #5 ULgraphs := proc(n) local all_graphs,G,pi,pis,representatives,seen: all_graphs := Graphs(n): pis := permute([seq(1..n)]): representatives := {}: seen := {}: for G in all_graphs do: if not G in seen then: representatives := representatives union {G}: for pi in pis do: seen := seen union {Image(pi, G)}: od: fi: od: representatives: end: # I found that [seq(nops(ULgraphs(i)),i=1..6)] outputs [1, 2, 4, 11, 34, 156]. # This matches A000088 (https://oeis.org/A000088), which is the number of simple graphs on n unlabeled nodes.