Kuhn algorithm