R-Assignment Solution
R-Assignment Solution
Key information
Weighting: 25%
Reference style: Harvard
Learning Outcomes
This assessment assesses the following Unit Learning Outcomes (ULO) and related Graduate Learning
Outcomes (GLO):
ULO3 - assessed through student ability to apply GLO1 - Discipline knowledge and capabilities
game theory, and linear programming skills and GLO4 - Critical thinking
Purpose
Assignment 4 assesses your abilities to build linear programming models and solving them. You will
demonstrate your skills in using linear programming to model real life case studies. You will consider cases
with two variables and solve them using the graphical method. For problems with more than two variables,
you will solve the linear programming models that you built using linear programming solvers in
appropriate software, such as R. You will consider game theory - two players game - to build appropriate
models that describe different game scenarios. You will demonstrate your knowledge in investigating the
existence of equilibrium (stable solution). You will use mixed models to find appropriate solutions and solve
the models you constructed with appropriate software such as R.
Instructions
The work is individual. Solutions and answers to the assignment must be explained carefully in a concise
manner and presented carefully. Use of books, articles and/or online resources related to SIT718 Real
World Analytics is allowed. Students are expected to refer to the suitable literature where appropriate.
Students can attempt all tasks below and provide an individual written report in appropriate word
processor.
The detailed problem description and data set will be released to students on Monday 20th January 2020.
© Deakin University 1
Submission details
1. A pdf file (created in any word processor), containing the solutions of the questions, labelled
with your name;
2. Two codes combined in one with your R file, labelled with yourname.R, with lp models for
questions 2 and 3.
• No more than 8 A4 sides, including Figures, Tables, Appendices and References. The report should be
typed. Use minimal font 11pt and 2.5cm side margins. If the page limit is exceeded only the first 8 pages
will be marked.
• Assignment (a report in pdf format, software code and/or data) must be submitted via the assignment
dropbox in the unit site (accessed the Program page).
• No e-mail or hardcopy submissions are accepted.
Extension requests
Requests for extensions should be made to Unit/Campus Chairs well in advance of the assessment due date. If
you wish to seek an extension for an assignment, you will need to apply by email directly to to Dr Thanh Nguyen
([email protected] ), as soon as you become aware that you will have difficulty in meeting the
scheduled deadline, but at least 3 days before the due date. When you make your request, you must include
appropriate documentation (medical certificate, death notice) and a copy of your draft assignment.
Compassionate e.g. death of close family member, significant family and relationship problems.
Hardship/Trauma e.g. sudden loss or gain of employment, severe disruption to domestic arrangements,
victim of crime. Note: Misreading the timetable, exam anxiety or returning home will not be accepted as
grounds for consideration.
Special consideration
You may be eligible for special consideration if circumstances beyond your control prevent you from
undertaking or completing an assessment task at the scheduled time.
See the following link for advice on the application process:
http://www.deakin.edu.au/students/studying/assessment-and-results/special-consideration
Assessment feedback
Students will receive written feedback to aid reflection and analysis of problem strategies and solutions for
consideration in the upcoming problem-solving task.
Referencing
You must correctly use the Harvard method in this assessment. See the Deakin referencing guide.
Academic integrity, plagiarism and collusion
Plagiarism and collusion constitute extremely serious breaches of academic integrity. They are forms of
cheating, and severe penalties are associated with them, including cancellation of marks for a specific
assignment, for a specific unit or even exclusion from the course. If you are ever in doubt about how to
properly use and cite a source of information refer to the referencing site above.
Plagiarism occurs when a student passes off as the student's own work, or copies without acknowledgment as
to its authorship, the work of any other person or resubmits their own work from a previous assessment task.
Collusion occurs when a student obtains the agreement of another person for a fraudulent purpose, with the
intent of obtaining an advantage in submitting an assignment or other work.
Work submitted may be reproduced and/or communicated by the university for the purpose of assuring
academic integrity of submissions:
https://www.deakin.edu.au/students/study-support/referencing/academic-integri ty
1. "name-report.pdf"A report, in pdf format (created in any word processor), covering all of the
items in above (where "name" is replaced with your name -you can use your surname or first
name). With plots and tables, it should be up to 8 pages.
2. "name-code.R"The R code file (that you have written to produce your results) named(where
"name" is replaced with your name - you can use your surname or first name).
Your assignment will not be assessed if we cannot reproduce your results with your R code.1. A cheese factory is making a new
cheese from mixing two products A and B, each made of three different types of milk - sheep, cow and goat milk. The compositions of A
and B
and prices ($/kg) are given as follows,
The recipes for the production of the new cheese require that there must be at least 45 litres Cow milk and at least 50 litres of Goat milk
per 1000 kg of the cheese respectively but no more than 60 litres of Sheep milk per 1000 kg of cheese.
The factory needs to produce at least 60 kg of cheese per week.
a) Explain why a linear programming model would be suitable for this case study.
[5 marks]
b) Formulate a Linear Programming (LP) model for the factory that minimises the total cost of producing the cheese while satisfying
all constraints.
[10 marks]
c) Use the graphical method to find the optimal solution. Show the feasible region and the optimal solution on the graph. Annotate all
lines on your graph. What is the minimal cost for the product?
[10 marks]
Note: you can use graphical solvers available online but make sure that your graph is clear, all variables involved are clearly
represented and annotated, and each line is clearly marked and related to the corresponding equation.
d) Is there a range for the cost ($) of A that can be changed without affecting the optimum solution obtained above?
[5 marks]
Hint:
This question does not require unit conversion.
© Deakin University 4
2. A factory makes three products called Spring, Autumn, and Winter, from three materials
containing Cotton, Wool and Silk. The following table provides details on the sales price,
production cost and purchase cost per ton of products and materials respectively.
The maximal demand (in tons) for each product, the minimum cotton and wool propor-
a) Formulate an LP model for the factory that maximises the profit, while satisfying the
b) Solve the model using R/R Studio. Find the optimal profit and optimal values of the
decision variables.
[10 Marks]
Hints:
1. Let %ij > 0 be a decision variable that denotes the number of tons of products
j for j E {1 = Spring, 2 = Autumn, 3 = Winter} to be produced from Materials
i E {C=Cotton, W=
I
W
o
l,
CQ
i'Sl T l
oo
calculated as:
e.g., the proportion of Cotton in product Spring is given by: ---------------—--------.
XC 1 + Xw 1 + Xs 1
© Deakin University 5
3. Two mining companies, Company 1 and Company 2, bid for the right to drill a field. The possible
bids are $ 10 Million, $ 20 Million, $ 30 Million, $ 40 Million and $ 50 Million. The winner is the
company with the higher bid.
In case of a tie (equal bids) Company 1 is the winner and will get the field.
For Company 1 getting the field for more than $ 40 Million is as bad as not getting it (assume
loss), except in case of a tie (assume win).
(a) State reasons why/how this game can be described as a two-players-zero-sum game
[5 Marks]
(b) Considering all possible combinations of bids, formulate the payoff matrix for the game.
[5 Marks]
(c) Explain what is a saddle point. Verify: does the game have a saddle point?
[5 Marks]
(d) Construct a linear programming model for Company 1 in this game.
[5 Marks]
(e) Produce an appropriate code to solve the linear programming model in part (d).
[5 Marks]
(f) Solve the game for Company 1 using the linear programming model you constructed in part
(e). Interpret your solution.
[5 Marks]4. Consider two companies, Company 1 and Company 2, producing the same model of
cellphones. The demand for the cellphones produced by Company 1 is Q1, and the demand for the
cellphones produced by Company 2 is Q2. The demands are described by the following functions:
[Hint: the profit = the demand for the cellphones x the profit of one cellphone after sale.]
[10 Marks]
(b) Find the Nash equilibrium of this game. What are the profits at this equilibrium? Explain your
reason clearly.
[5 Marks]
(C) If the cost C = 30, would the Nash equilibrium from part (b) change? Give clear reasons.
[5 (1)
(2)
Marks]