#OK to post homework #Joseph Koutsoutis, 04-28-2024, Assignment 27 read `C27.txt`: #1 done #2 MetaZKP3 := proc(n,E,C,K) local i,ra: ra := rand(1..2): for i from 1 to K do: if not ZKP3(n,E,C,ra()) then return(false): fi: od: true: end: #TestChangeColor(n,K,T) creates T graphs of size n using RGC3 and #changes the color of C[1] before seeing if MetaZKP3(n,E,C,20) still returns true. #This outputs (# times MetaZKP3 returned false) / (T). TestChangeColoring := proc(n,K,T) local c,n1,E,C,i,ra,k: ra := rand(1..3): c := 0: for i from 1 to T do: n1,E,C := RGC3(n): k := ra(): while k = C[1] do k := ra(): od: C[1] := k: if not MetaZKP3(n1,E,C,K) then c++: fi: od: c/T: end: #TestChangeColoring(20,20,10) outputted 1, so this means that MetaZKP3 detected #the improper colorings. #3 I didn't attempt this challenge.