Discrete optimization algorithms in both C# and Python