Linear programming in complex numbers

7 views (last 30 days)
Jung Hyun
Jung Hyun on 20 Sep 2016
Commented: Alan Weiss on 21 Sep 2016
I wanted to solve a linear programming to find the minimum of a problem such as "minimize x such as f = Min {cx; Ax = b, x >= 0 }". When A, b, and c are the matrices or vectors whose elements are complex numbers, linprog function does not work.
Is there any way to solve a linear programming problems when all values are complex numbers?

Answers (1)

Alan Weiss
Alan Weiss on 20 Sep 2016
Generally, complex numbers are not well-ordered, meaning it is unclear what it means to say z1 > z2 when z1 and z2 are complex. So how can you minimize anything with complex numbers, and how can you set bounds or linear constraints?
If you can somehow make sense of things using real and imaginary parts of the problem, then reformulate it in purely real terms and go from there.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  2 Comments
Jung Hyun
Jung Hyun on 20 Sep 2016
Thank you for your answer.
I think that Matlab support arithmetic computation for complex numbers.
If so, we can clearly say that we know the order of complex numbers.
For example, given two numbers, A and B, A=-0.000127121425716718 + 0.000398213436031543i and B= -0.000795608754293944 + 0.000874758283111665i, Matlab returns "1" for A>B and "0" for A<B.
It also returns "6.6849e-04 - 4.7654e-04i" for A-B and return "1" for 6.6849e-04 - 4.7654e-04i > 0.
I think that Matlab can compute the complex numbers and order them.
Alan Weiss
Alan Weiss on 21 Sep 2016
I am sorry, but you cannot compare complex numbers. If you read the doc for the MATLAB comparator, you see the following statement: A > B returns a logical array with elements set to logical 1 (true) where A is greater than B; otherwise, the element is logical 0 (false). The test compares only the real part of numeric arrays.
Once again, The test compares only the real part of numeric arrays.
To belabor the point, which is bigger, 1+i or -1+200i? The answer is clear: neither is bigger, they are not comparable. One has a bigger real part, one has a bigger imaginary part, one has a bigger magnitude, but the complex numbers are not ordered.
If you want to formulate a linear programming problem, you must do so using only real quantities.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!