Write a program that checks that a given CNF formula is of type T. Write a program that computes the average fraction of satisfied clauses among all assignments. A random assignment will achieve about that quality.