You are on page 1of 5

BÀI TẬP VỀ MÔ HÌNH HOÁ

Hãy lập mô hình cho bài toán sau và dùng phần mềm (any) để tìm nghiệm tối ưu của bài toán.

Bài 1. Một cơ sở sản xuất có thể làm được hai loại hàng I và II từ nguyên liệu A và B. Trữ lượng
các nguyên liệu A và B hàng ngày có được theo thứ tự là 12 và 18 đơn vị. Để sản xuất một đơn
vị hàng I cần 2 đơn vị nguyên liệu loại A và 3 đơn vị nguyên liệu loại B; sản xuất một đơn vị
hàng II cần 3 đơn vị nguyên liệu loại A và 4 đơn vị nguyên liệu loại B. Giá bán một đơn vị
hàng I và hàng II tương ứng là 7 và 5 đơn vị tiền tệ. Qua tiếp thị được biết, trong một ngày nhu
cầu tiêu thụ hàng II không quá 3 đơn vị; nhu cầu hàng I hơn hàng II không quá 1 đơn vị. Vấn
đề đặt ra là cần sản xuất mỗi ngày bao nhiêu đơn vị hàng hóa mỗi loại để doanh thu là lớn nhất.
Hãy thiết lập mô hình quy hoạch tuyến tính cho bài toán, và tìm một phương án sản xuất tối
ưu.

Bài 2. Giả sử một người có 100 triệu VND và muốn đầu tư theo hình thức sau:
- Gửi tiết kiệm không kì hạn với với lãi suất 7%/1 năm
- Gửi tiết kiệm có kì hạn với lãi suất 8%/1 năm
- Mua một loại trái phiếu với lãi suất 10%/1 năm.
- Mua một loại cổ phiếu với lãi suất 11%/1 năm.
Thời gian đáo hạn các khoản đầu tư là như nhau. Để giảm rủi ro, người này được tư vấn đầu tư
như sau:

- Mua trái phiếu và tiết kiệm có kì hạn ít nhất 70% vốn.


- Số tiền mua trái phiếu không vượt quá tổng các loại hình còn lại.
- Số tiền mua cổ phiếu không vượt quá 50% vốn.
- Đầu tư toàn bộ số tiến.
Mục tiêu là quyết định xem nên đầu tư vào mỗi loại hình bao nhiêu tiền sao cho có thể đạt được
lợi tức tối đa sau một năm. Hãy mô hình hoá bài toán này thành bài toán quy hoạch tuyến tính.
Giải bài toán để tìm một kế hoạch đầu tư tối ưu?

Bài 3. Để chế tạo một loại hợp chất, người ta cần sử dụng 3 loại đơn chất A, B, C. Có 3 loại
quặng có khả năng cung cấp các loại đơn chất này, kí hiệu là Q1, Q2, Q3. Bảng sau đây cho
biết hàm lượng các đơn chất có trong một đơn vị quặng mỗi loại:

Loại quặng Q1 Q2 Q3
Đơn chất
A 2 4
B 1 2 6
C 5 3
Để chất tạo một đơn vị hợp chất, người ta sử dụng ít nhất 4,5 đơn vị hợp chất A, 3 đơn vị hợp
chất B và 4 đơn vị hợp chất C. Chi phí khai thác mỗi đơn vị quặng mỗi loại lần lượt là 3$, 6$
và 5$. Xác định lượng quặng mỗi loại cần khai thác để có thể thực hiện chế tạo loại hợp chất

1
cần thiết sao cho chi phí là ít nhất. Hãy lập mô hình bài toán quy hoạch tuyến tính cho bài toán
này (không cần giải ra nghiệm tối ưu).

Bài 4. A mining company produces 100 tons of red ore and 80 tons of black ore each week.
These can be treated in different ways to produce three different alloys, Soft, Hard or Strong.
To produce 1 ton of Soft alloy requires 5 tons of red ore and 3 tons of black. For the Hard alloy
the requirements are 3 tons of red and 5 tons of black, whilst for the Strong alloy they are 5
tons of red and 5 tons of black. The profit per ton from selling the alloys (after allowing for
production
Hanoi but not
National mining costs,
University which are regarded as fixed) are $250, $300 and $400 for Soft,
of Education
Hard and Strong respectively. Formulate
Department of Mathematics and Informatics an appropriate LP to maximize the profit. Does this
LP problem have an optimal solution? Why?

Bài 5. A paperFinal Exam


recycling for Class
machine K65 K:
can produce Linear
toilet paper, Programming
writing pads, and paper towels,
90 minutes – No document – Calculator allowed
which sell for 18, 29 and 25 cents and consume 0.5, 0.22 and 0.75 kilograms of newspaper and
0.2, 0.4,1 (1
Exercise and 0.22 minutes.
points). Eachstatement
The following day 10 hours
is rightand 1500 (no
or wrong kilograms of newspaper
justification needed): are available,
1. atThe
and linear
least program
1000 max{c
rolls of
T
Ax = b,200
toiletx |paper, x ≥ 0} (the matrix
writing pads Aand
is full
400row rank)
rolls of can have
paper an infinite
towels are
number
required. of basic solutions
Formulate ( A ∈! LP, bto∈!
an appropriate
m×n m
, c ∈! the
maximize
n
). revenue. Does this LP problem have
One has
an2.optimal solution? | Ax = b, x ≥ 0} = max{bT y | AT y ≤ c, y ≥ 0} given that both linear programs are
min{cT xWhy?
feasible ( A ∈! , b ∈! m , c ∈! n ).
m×n

Bài 6. A
Exercise manager
2 (2 points): of an oil refinery
A manager of an oilhas 6 million
refinery has 6barrels
million of crudeofoil
barrels A and
crude oil A3 and
million barrels
3 million of
barrels
ofcrude
crudeoil
oilBB allocated for production
allocated for productionduringduringthethecoming
coming month.
month. These
These resources
resources can becanused
be used to
to make
make either gasoline, which sells for 40$ per barrel, or home heating oil, which sells for
either gasoline, which sells for 40$ per barrel, or home heating oil, which sells for 35$ per barrel. There are 35$
per barrel.
three There
production are three
processes production
with the followingprocesses with the following characteristics:
characteristics:

Process 1 Process 2 Process 3


Input crude A 3 3 5
Input crude B 5 2 3
Output gasoline 4 2 3
Output heating oil 3 2 4
Cost 51$ 32$ 41$
All quantities are in barrels. For example, with the first process, 3 barrels of crude A and 5 barrels of crude
BAll
are quantities
used to produce
are in4 barrels.
barrels ofFor
gasoline and 3 with
example, barrels of first
the heating oil at a3cost
process, of 51$.
barrels ofFormulate
crude A aand
linear
5
programming problem that would help the manager maximize net revenue over the next month.
barrels of crude B are used to produce 4 barrels of gasoline and 3 barrels of heating oil at a cost
of 51$. Formulate a linear programming problem that would help the manager maximize net
Exercise 3 (3 points). Solve the linear program by simplex method
revenue over the next month.
minimize − x1 − 6x2 − 4x3 − 3x4
Bài 7. A truck company has subject to 3x
allocated + 6x2 + 6x
$800,000
1 for3 +the ≤6
3x4 purchase of new vehicles and is
considering three types. Vehicle A has a 2x 10-ton
1
+ 6xpayload
2
+ 4x3 capacity≤ 5 and is expected to average 45
mph; it costs $26,000. Vehicle B has a −20-ton x1 + 4xpayload
2
+ 4x3 +capacity
2x4 ≤ 5 and is expected to average 40
mph; it costs $36,000. Vehicle C is a modified x j ≥form
0, j =of1,2,3,4.
B and carries sleeping quarters for one
What is the
driver. dualmodification
This program of thisreduces
problem?the capacity to an 18-ton payload and raises the cost to
Exercise
$42,000, 4 (4but
points). Solve thespeed
its operating assignment
is stillproblem
expected (in the minimization
to average form) with the table of costs:
40 mph.
Worker Jobs
Vehicle A requires a crew of one driver and, if driven on three shifts per day, could be operated
for an average of 18 hr per day. Vehicles B1 and C2 must3have crews
4 of two drivers each to meet
1 90 75 75 80

2 35 85 55 65
2
3 125 95 90 105

4 45 110 95 80
local legal requirements. Vehicle B could be driven an average of 18 hr per day with three
shifts, and vehicle C could average 21 hr per day with three shifts. The company has 150 drivers
available each day to make up crews and will not be able to hire additional trained crews in the
near future. The local labor union prohibits any driver from working more than one shift per
day. Also, maintenance facilities are such that the total number of vehicles must not exceed 30.
Formulate a mathematical model to help determine the number of each type of vehicle the
company should purchase to maximize its shipping capacity in ton-miles per day.
Bài 8. A small airline, Ivy Air, flies between three cities: Ithaca, Newark, and Boston. They
offer several flights but, for this problem, let us focus on the Friday afternoon flight that departs
from Ithaca, stops in Newark, and continues to Boston. There are three types of passengers:
(a) Those traveling from Ithaca to Newark.
(b) Those traveling from Newark to Boston.
(c) Those traveling from Ithaca to Boston.
The aircraft is a small commuter plane that seats 30 passengers. The airline offers three fare
classes:
(a) Y class: full coach.
(b) B class: nonrefundable.
(c) M class: nonrefundable, 3-week advanced purchase.

Ticket prices, which are largely determined by external influences (i.e., competitors), have been
set and advertised as follows:

Based on past experience, demand forecasters at Ivy Air have determined the following upper
bounds on the number of potential customers in each of the 9 possible origin-destination/fare-
class combinations:

The goal is to decide how many tickets from each of the 9 origin/destination/fareclass
combinations to sell. The constraints are that the plane cannot be overbooked on either of the
two legs of the flight and that the number of tickets made available cannot exceed the forecasted
maximum demand. The objective is to maximize the revenue. Formulate this problem as a
linear programming problem.

3
Bài 9. Consider the problem of locating a new machine to an existing layout consisting of four
machines. These machines are located at the following (x, y) coordinates: (3, 0), (0, −3), (−2,
1), and (1, 4). Let the coordinates of the new machine be (x1, x2). Formulate the problem of
finding an optimal location as a linear program if the sum of the distances from the new
machine to the existing four machines is minimized. Use street distance; for example, the
distance from (x1, x2) to the first machine at (3, 0) is |x1 − 3| + |x2|. This means that the distance
is not defined by the length of a line between two points, rather it is the sum of the lengths of
the horizontal and vertical components of such a line.

Bài 10. A company is opening a new franchise and wants to try minimizing their quarterly cost
using linear programming. Each of their workers gets paid $500 per quarter and works 3
contiguous quarters per year. Additionally, each worker can only make 50 pairs of shoes per
quarter. The demand (in pairs of shoes) is 600 for quarter 1, 300 for quarter 2, 800 for quarter
3, and 100 for quarter 4. Pairs of shoes may be put in inventory, but this costs $50 per quarter
per pair of shoes, and inventory must be empty at the end of quarter 4.

Bài 11. Suppose that there are m sources that generate waste and n disposal sites. The amount
of waste generated at source i is ai and the capacity of site j is bj. It is desired to select
appropriate transfer facilities from among K candidate facilities. Potential transfer facility k
has fixed cost fk, capacity q and unit processing cost α per ton of waste. Let cik and c"!" be the
unit shipping costs from source i to transfer station k and from transfer station k to disposal site
j respectively. The problem is to choose the transfer facilities and the shipping pattern that
minimize the total capital and operating costs of the transfer stations plus the transportation
costs.

Bài 12. (The transportation problem). Quantities a1, a2, . . . , am, respectively, of a certain
product are to be shipped from each of m locations and received in amounts b1, b2 , . . . , bn ,
respectively, at each of n destinations. Associated with the shipping of a unit of product from
origin i to destination j is a shipping cost cij . It is desired to determine the amounts xij to be
shipped between each origin–destination pair i = 1,2, ..., m; j = 1,2, ..., n; so as to satisfy the
shipping requirements and minimize the total cost of transportation.

Bài 13. (The maximal flow problem). Consider a capacitated network in which two special
nodes, called the source and the sink, are distinguished. Say they are nodes 1 and m,
respectively. All other nodes must satisfy the strict conservation requirement; that is, the net
flow into these nodes must be zero. However, the source may have a net outflow and the sink
a net inflow. The outflow f of the source will equal the inflow of the sink as a consequence of
the conservation at all other nodes. A set of arc flows satisfying these conditions is said to be
a flow in the network of value f . The maximal flow problem is that of determining the maximal
flow that can be established in such a network.

4
Bài 14. (A warehousing problem). Consider the problem of operating a ware-house, by buying
and selling the stock of a certain commodity, in order to maximize profit over a certain length
of time. The warehouse has a fixed capacity C, and there is a cost r per unit for holding stock
for one period. The price, pi, of the commodity is known to fluctuate over a number of time
periods-say months, indexed by i. In any period the same price holds for both purchase or sale.
Let ui denote the amount bought during period i, and let si denote the amount sold during period
i. The warehouse is originally empty and is required to be empty at the end of the last period.

Bài 15. (Linear Classifier and Support Vector Machine). Suppose several d-dimensional data
points are classified into two distinct classes. For example, two-dimensional data points may
be grade averages in science and humanities for different students. We also know the academic
major of each student, as being in science or humanities, which serves as the classification. In
d
general we have vectors ai ∈ R for i = 1,2, ..., n1 and vectors bj ∈ Rd for j = 1,2, ..., n2. We
wish to find a hyperplane that separates the ai’s from the bj’s. Mathematically we wish to find
d
y ∈ R and a number β such that

aTiy + β ³1 for all i


bTj y + β £ −1 for all j,

where {x : xTy + β = 0} is the desired hyperplane, and the separation is defined by the +1 and
–l.

Bài 16. (Combinatorial Auction). Suppose there are m mutually exclusive potential states and
only one of them will be true at maturity. For example, the states may correspond to the winning
horse in a race of m horses, or the value of a stock index, falling within m intervals. An auction
organizer who establishes a parimutuel auction is prepared to issue contracts specifying subsets
of the m possibilities that pay $1 if the final state is one of those designated by the contract,
and zero otherwise. There are n participants who may place orders with the organizer for the
purchase of such contracts. An order by the jth participant consists of an m-vector aj = (a1j, a2j,
..., amj)T where each component is either 0 or 1, a one indicating a desire to be paid if the
corresponding state occurs.

Accompanying the order is a number πj which is the price limit the participant is willing to pay
for one unit of the order. Finally, the participant also declares the maximum number qj of units
he or she is willing to accept under these terms. The auction organizer, after receiving these
various orders, must decide how many contracts to fill.

You might also like