def minimize
      # create Buffers for inputs and outputs
      start_buffer    = FFI::Buffer.alloc_inout(:pointer, @n)
      expected_buffer = FFI::Buffer.alloc_inout(:pointer, @n)
      end_buffer      = FFI::Buffer.alloc_inout(:pointer, @n)