Marchal Algorithm Implementation