It should be noted I am a not a mathematician, these are going to be brute force approaches to the problems, and even then probably inefficient attempts.