parbegin
begin S1 parbegin V(a) V(b) parend end
begin P(a) S2 parbegin V(c) V(e) parend end
begin P(b) S3 V(d) end
begin P(f) P(c) S4 end
begin P(g) P(d) P(e) S5 end
begin S6 parbegin V(f) V(g) parend end
parend
Here, the statement between parbegin and parend can execute in any order. But the precedence graph shows the order in which the statements should be executed. This strict ordering is achieved using the semaphores.
Initially all the semaphores are $0.$
For $S_1$ there is no need of semaphore because it is the first one to execute.
Next $S_2$ can execute only when $S_1$ finishes. For this we have a semaphore $a$ which on signal executed by $S_1$, gets value $1.$ Now $S_2$ which is doing a wait on $a$ can continue execution making $a=0$;
Likewise this is followed for all other statements.