$$f = (r \land \lnot p) \lor (r \land \lnot p) \lor (s \land \lnot r) \lor (\lnot s \land r)\lor (r \land q),$$ \begin{cofactors} $f_{p}$ \= $= \lnot r \lor(s \land \lnot r) \lor (\lnot s \land r) \lor (r \land q)$ \\ \>$f_{pq}$ \= $= \true$\\ \>$f_{p\lnot q}$ \= $= r \lor (s \land \lnot r) \lor (\lnot s \land r)$\\ \>\>$f_{p\lnot qr}$ \= $= \true$\\ \>\>$f_{p\lnot q\lnot r}$ \= $= s$\\ \>\>\>$f_{p\lnot q\lnot rs}$ \= $= \true$\\ \>\>\>$f_{p\lnot q\lnot r\lnot s}$ \= $= \false$\\ $f_{\lnot p}$ \= $= r \lor(s \land \lnot r) \lor (\lnot s \land r) \lor (r \land q)$ \\ \>$f_{\lnot pq}$ \= $= r \lor(s \land \lnot r) \lor (\lnot s \land r)$ \\ \>$f_{\lnot p\lnot q}$ \= $= r \lor(s \land \lnot r) \lor (\lnot s \land r)$ \\ \>\>$\Rightarrow q$ does not have an influence on the formula. These cofactors can be skipped.\\ \>$f_{\lnot pr}$ \= $= \true$ \\ \>$f_{\lnot p\lnot r}$ \= $= s = f_{p\lnot q\lnot r}$ \\ \end{cofactors} The final ROBDD:\\ \begin{center} \begin{bdd}[4em] \node[func node] (f) {$f$}; \node[cofactor] (p1) [below of=f] {$q$}; \node[cofactor] (q1) [below left of=p1] {$q$}; \node[cofactor] (r1) [below right of=p1] {$r$}; \node[cofactor] (r2) [below right of=q1,yshift=-0.8em,xshift=-1.5em] {$r$}; \node[phantom] (q1L) [below left of=q1] {}; \node[phantom] (r1L) [below left of=r1] {}; \node[cofactor] (s1) [below left of=r2] {$s$}; \node[phantom] (r2L) [below left of=r2] {}; \node[phantom] (r2R) [below right of=r2] {}; \node[phantom] (s2L) [below left of=s1] {}; \node[phantom] (s2R) [below right of=s1] {}; \funcEdge{f}{p1} \thenEdge{p1}{q1} \elseEdge{p1}{r1} \thenEdge{q1}{q1L} \negatedEdge{q1}{r2} \thenEdge{r2}{s1} \negatedEdge{r2}{r2R} \thenEdge{r1}{r1L} \elseEdge[bend left]{r1}{s1} \thenEdge{s1}{s2L} \negatedEdge{s1}{s2R} \end{bdd} \end{center}