# Conditional Independence in Graph

I have a factor graph like following:

How can I check if Q1 and Q2 are independent given the value of g1? More specifically can someone explain following in easy way? It would be great if you can give me an example of all paths connecting Q1 and Q2. Do we consider arrows signs to determine a path?

(taken from David Barber's book on Bayesian Reasoning and Machine Learning)

To determine whether two variables are independent given a set of conditioned variables, consider all paths connecting the two variables. If all paths are blocked, the variables are conditionally independent. A path is blocked if one or more of the following conditions is satisfied:

One of the variables in the path is in the conditioning set. One of the variables or factors in the path has two incoming edges that are part of path (variable or factor) and neither the variable or factor nor any of its descendants are in the conditioning set.