\setcounter{AlgoLine}{0}
\DontPrintSemicolon
	\KwIn{A problem with $n$ variables $x_1, \dots, x_n$, policy $\alpha$ for managing sub-problems, relaxation method $\beta$, branching method $\gamma$}
	\KwResult{An optimal solution $x^*$ of maximal value value $f^*$}
	$f^* \leftarrow -\infty $\tcp*[r]{Value of best solution found}
	$F \leftarrow \varnothing$ \tcp*[r]{Set of fixed variables}
	$L \leftarrow \{ x_1, \dots, x_n \}$ \tcp*[r]{Set of free variables}
	$Q \leftarrow \{ (F, L) \}$ \tcp*[r]{Set of sub-problems to solve}
	\While{$Q \neq \varnothing$}
	{Remove a problem $P = (F, L)$ from $Q$ according to policy $\alpha$\\
		\If{$P$ can potentially have feasible solutions with values already fixed in $F$}
		{Compute a solution $x$ to a relaxation of $P$ with method $\beta$, modifying only variables $x_k \in L$\\
			\uIf(Store the improved solution){$x$ is feasible for the initial problem and $f^* < f(x)$}
			{$x^* \leftarrow x$\\
				$f^* \leftarrow f(x)$
			}
			\uElseIf( Expand the branch){$f(x) >  f^*$} 
			{Choose $x_k \in L$ according to policy $\gamma$\\
				\ForAll{possible value $v$ of $x_k$}
				{\lnl{ligne:separation}$Q \leftarrow Q \cup \{ (F \cup \{x_k = v\}, L \setminus \{ x_k \}) \}$ }
			}
			\Else(No solution better than $x^*$ can be obtained)
			{Prune the branch} 
		}
	}

