Introduction to Linear Programming

Source: Internet
Author: User

It seems that this blog hasn't moved much recently. It cannot be so degraded...

That is to say, I want to write it for a moment. Don't blame me for it...

First, let's clarify the definition of linear planning, that is, all the constraints and the number of unknown numbers in the target function are 1, therefore, a constraint in Linear Planning indicates that the n-dimensional space is "flat" (You may wish to give it a try.

Next, the feasible region of linear planning seems to be "convex" in n-dimensional space (because the constrained function is "flat"). We call this thing simple form.

The Algorithm for Solving Linear Programming generally uses the single-form method or the internal-point method. I have written an article about the implementation of the Single-form method. In short, the actual application is still very fast.

It seems that there is something called the rectification theorem, that is, as long as the network stream's capacity change is an integer, there must be an optimal solution so that the capacity of all sides is an integer. therefore, the network stream can be converted to linear programming through palapala.

But we usually see not many questions about bare linear planning. We can't use a single method to run network streams. What is the purpose of this?

Indeed, we usually do not use the single-form or internal-point method to solve the problem,.Many graph theory models can be characterized by linear programming. Many special linear programming models can also be transformed into graph theory models.Linear Programming can serve as a bridge between actual problems and graph theory models, which is of great help to our analysis.

Let's take a look at an example. This question is about YY at WC. Although it is very simple, you can still think about it.

[Description]

Give you a matrix A of N * n, and define the right value of a column B with a length of N as SIGMA (A [I, B [I]). you need to find the maximum order of weights.

Because the nested array exists in the target function, let's put "arrange" in another way: place n cars on the N * n board so that they cannot attack each other.

The definition of X [I, j] indicates that there is no car in the I-th grid of line I (1 indicates putting, 0 indicates not putting). The original problem can be described as follows:

Max sigma (A [I, j] * X [I, j])

S. T. sigma (X [I, j]) = <= j <= N, for all I

SIGMA (X [I, j]) = <= I <= N, for all J

Here is a constant 1. To eliminate this, we replace it with another form:

Max sigma (A [I, j] * X [I, j])

S. T. sigma (X [I, j])-f [I] = 0 1 <= j <= N, for all I

SIGMA (X [I, j])-G [J] = 0 1 <= I <= N for all J

F [I] <= 1, G [I] <= 1

The values of F [I] And j are 0 or 1.

This is a billing flow model. We create a vertex for each column in each row, and connect a traffic to each row from the Source Vertex to an edge with a fee of 0, the cost of connecting a line from each column to a settlement point is 1 and the cost is 0. The cost of connecting a line from row I to column I is 1. The cost is a [I, j], you can run the maximum fee of the stream on one side.

You may ask: Which linear plan can be used to describe the original question? What if X [I, j] takes decimal places?

Because the linear plan is equivalent to the cost flow, we only need to prove that the cost flow is correct, and we have a powerful rectification theorem, therefore, the original problem is equivalent to this linear programming.

Besides, what does it do even if it doesn't prove it? You don't actually write a linear plan, do you? Most of the time, we can assume that the optimal solution for linear planning is an integer. It is just an analysis of the round, and it does not prove to be deducted =

The dual nature of linear planning should be discussed here. However, this is troublesome and cannot be counted as an entry-level item. In view of the purpose of this article, we will not write it. if you are interested, try again.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.