markov chains and coin flips A coin that comes up heads with probability p is continually flipped until the pattern T T T H appears. Let X denote the number of flips, find EX. 

If I use Markov chains is there a simpler way to set up the states than using each state as a different combo? Or should I proceed in that way so that I have 16 states?
Define the state of the  Markov chain to be the sequence of the previous 4 coin tosses. The invariant distribution $\pi$ puts mass $p(1-p)^3$ on the state $TTTH$.
Therefore the expected number of tosses needed to reach $TTTH$ again, starting at $TTTH$ is ${1\over\pi(TTTH)}={1\over p(1-p)^3}.$ For this pattern, that is the same as starting from scratch, so this answers the question.
There is a trick to solve this type of problems without any algebra.

In general you have two cases. The one where the pattern overlaps and the one without overlaps:

Overlap means that a part of the series at the beginning is repeated exactly at the end of the pattern. Example: A pattern HTHHTHTH. In this case the pattern 'HTH' is repeated at the beginning and EXACTLY at the end of the pattern. Also, the single 'H' is an overlap.

The above pattern has expected time $\frac{1}{p^5q^3} + \frac{1}{p^2q} + \frac{1}{p}$. Which means that you find the expected value of a series of tosses not taking into account the overlaps. And add the overlaps.

In your case there is no overlap. So the answer is simply: $\frac{1}{pq^3}$ as was pointed out.

Look at section 3.6.4 of Introduction to Probability models by Seldon Ross to see a thorough explanation of this formula.