This is the Satisfiability Problem (SAT). See

Boolean satisfiability problem - Wikipedia, the free encyclopedia

It is known to be NP-complete, so there is no polynomial-time algorithm for its solution unless P=NP, which seems unlikely, but has not been proven impossible.