Given the following probabilistic model
where $u$ are users of a search engine, $c$ are categories where the queries that $u$ search ($q$) and webs sites that they visit ($w$) are classified.
My question is if the following has necessarily has to hold for $p(c\mid q)$ to be a probability:
$\displaystyle\sum_{i=1}^n\displaystyle\sum_{j=1}^m p(c_i\mid q_j) = 1.$