Many decision problems can be modeled as constraint satisfaction problems (CSPs). In this talk, I will discuss a class of CSPs whose computational complexity can be classified using algebraic and Ramsey theoretic techniques, giving examples with graphs and permutations.