solving the bn
* Solve the BN with lib_pgm