Factor Graph And The Sum Product Algorithm