Could someone help me write this code in R?   Linear Programming Problems  Question 1:  Bill Ding, a successful house flipper, buys houses, invests money to fix them up, then sells them. The following houses have just come onto the market:  House Name Buy Invest Sell Days to Complete Simple Man $140,000 $50,000 $220,000 19 The Breeze $135,000 $100,000 $250,000 16 Free Bird $90,000 $75,000 $190,000 21 Three Steps $195,000 $40,000 $275,000 15 That Smell $145,000 $60,000 $225,000 18  Bill has $500,000 to buy+invest and 45 days. Since it is only him, he can only work on one house at a  time. Bill wants you to find which houses will maximize his profit (hint: 1. profit is not one of the columns,2. you will need to restate the table, and 3. use all.bin=TRUE because you can't buy the same house more than once).

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Could someone help me write this code in R?

 

Linear Programming Problems 

Question 1: 

Bill Ding, a successful house flipper, buys houses, invests money to fix them up, then sells them. The following houses have just come onto the market: 

House Name Buy Invest Sell Days to Complete Simple Man $140,000 $50,000 $220,000 19 The Breeze $135,000 $100,000 $250,000 16 Free Bird $90,000 $75,000 $190,000 21 Three Steps $195,000 $40,000 $275,000 15 That Smell $145,000 $60,000 $225,000 18 

Bill has $500,000 to buy+invest and 45 days. Since it is only him, he can only work on one house at a  time. Bill wants you to find which houses will maximize his profit (hint: 1. profit is not one of the columns,2. you will need to restate the table, and 3. use all.bin=TRUE because you can't buy the same house more than once). 

Question 2: 

Sal Manilla, a successful restauranteur, is planning a St. Patricks Day sale. He has the following food  sales options which can bring in a certain number of new customers (added traffic): 

Food Item Cost Sales Price Added Traffic Cake $1.50 $4.99 30 Hot Chocolate $0.30 $2.50 100 Meatloaf $4.25 $14.99 40 Ice Cube $0.10 $0.50 60 Salt-N-Pepa $0.20 $0.75 30 

Sal has 250 of each food item available to sell. Also, his restaurant can only accommodate 180  additional customers (added traffic). Sal wants you to find how much of each food item will maximize his profit (sales price - cost).

Question 1:
Bill Ding, a successful house flipper, buys houses, invests money to fix them up, then sells them. The
following houses have just come onto the market:
House Name
Simple Man
The Breeze
Free Bird
Three Steps
That Smell
Buy
$140,000
$135,000
Food Item
Cake
Hot Chocolate
$90,000
$195,000
$145,000
Meatloaf
Ice Cube
Salt-N-Pepa
Invest
$50,000
$100,000
$75,000
$40,000
$60,000
Sell Days to Complete
Cost
$1.50
$0.30
$4.25
$0.10
$0.20
$220,000
$250,000
$190,000
Bill has $500,000 to buy+invest and 45 days. Since it is only him, he can only work on one house at a
time. Bill wants you to find which houses will maximize his profit (hint: 1. profit is not one of the
columns, 2. you will need to restate the table, and 3. use all.bin=TRUE because you can't buy the same
house more than once).
Question 2:
Sal Manilla, a successful restauranteer, is planning a St. Patricks Day sale. He has the following food
sales options which can bring in a certain number of new customers (added traffic):
$275,000
$225,000
Sales Price Added Traffic
$4.99
$2.50
$14.99
$0.50
$0.75
30
19
16
21
15
18
100
40
60
30
Sal has 250 of each food item available to sell. Also, his restaurant can only accommodate 180
additional customers (added traffic). Sal wants you to find how much of each food item will maximize
his profit (sales price - cost).
Transcribed Image Text:Question 1: Bill Ding, a successful house flipper, buys houses, invests money to fix them up, then sells them. The following houses have just come onto the market: House Name Simple Man The Breeze Free Bird Three Steps That Smell Buy $140,000 $135,000 Food Item Cake Hot Chocolate $90,000 $195,000 $145,000 Meatloaf Ice Cube Salt-N-Pepa Invest $50,000 $100,000 $75,000 $40,000 $60,000 Sell Days to Complete Cost $1.50 $0.30 $4.25 $0.10 $0.20 $220,000 $250,000 $190,000 Bill has $500,000 to buy+invest and 45 days. Since it is only him, he can only work on one house at a time. Bill wants you to find which houses will maximize his profit (hint: 1. profit is not one of the columns, 2. you will need to restate the table, and 3. use all.bin=TRUE because you can't buy the same house more than once). Question 2: Sal Manilla, a successful restauranteer, is planning a St. Patricks Day sale. He has the following food sales options which can bring in a certain number of new customers (added traffic): $275,000 $225,000 Sales Price Added Traffic $4.99 $2.50 $14.99 $0.50 $0.75 30 19 16 21 15 18 100 40 60 30 Sal has 250 of each food item available to sell. Also, his restaurant can only accommodate 180 additional customers (added traffic). Sal wants you to find how much of each food item will maximize his profit (sales price - cost).
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education