Identifying causal effect in non-graphical models using algebra