Edward's formula for the stock market predicts correctly that the price of HMMT is directly proportional to a secret quantity $ x$ and inversely proportional to $ y$, the number of hours he slept the night before. If the price of HMMT is $ \$12$ when $ x\equal{}8$ and $ y\equal{}4$, how many dollars does it cost when $ x\equal{}4$ and $ y\equal{}8$?
1. Let the price of HMMT be denoted by \( h \). According to the problem, \( h \) is directly proportional to \( x \) and inversely proportional to \( y \). This relationship can be expressed as:
   \[
   h = k \frac{x}{y}
   \]
   where \( k \) is a constant of proportionality.

2. We are given that when \( x = 8 \) and \( y = 4 \), the price \( h \) is $12. Substituting these values into the equation, we get:
   \[
   12 = k \frac{8}{4}
   \]
   Simplifying the right-hand side, we have:
   \[
   12 = k \cdot 2
   \]
   Solving for \( k \), we find:
   \[
   k = \frac{12}{2} = 6
   \]

3. Now, we need to find the price \( h \) when \( x = 4 \) and \( y = 8 \). Using the same formula \( h = k \frac{x}{y} \) and substituting \( k = 6 \), \( x = 4 \), and \( y = 8 \), we get:
   \[
   h = 6 \frac{4}{8}
   \]
   Simplifying the fraction, we have:
   \[
   h = 6 \cdot \frac{1}{2} = 3
   \]

The final answer is \( \boxed{3} \).