Consider the following premises. q or ~r. q_4 -> q. q_4 or w. w -> r. Can we infer ~q from them?
 From q or ~r we can infer r -> q. From w -> r, r -> q we can infer w -> q. Finally, from q_4 -> q, w -> q, q_4 or w we can infer q, which contradicts ~q. Therefore, the answer is no.