Brian Q’ Rourke, owner of The Horse & Hound Pub in Dublin, is preparing for St. Patricks Day, amd he must determine how much cider to stock. Brian sells three brands of cider on tap – Murphy’s Blackton, and red Rye. The cost per gallon (to the pub owner) of each brand is as follows:

Brand Cost/Unit
Murphy’s $1.50
Blackton 0.90
Red Rye 0.50

The pub budjet of $2,000 cider for St. Patricks Day. Brian sells Murphy’s at a rate $3.00 per gallon, Blackton at $2.50 per gallon and Red Rye at $1.75 per gallon. Based on previous St. Patrick’s Day celebrations, Brian has determined the maximum customer demand to be 400 gallons of Murphy’s, 500 gallons of Blackton, and 300 gallons of Red Rye. The pub has the capacity to stock 1,000 gallons of each brand of cider; Brian wants to stock completely. Brian wants to determine the number of gallons of each brands of cider to order in order to maximize profit.
a. Formulate a linear programming model for this problem.
b. Solve the model by using the computer.

a. To formulate a linear programming model for this problem, let's define the decision variables:

Let x1 be the number of gallons of Murphy's cider to order.
Let x2 be the number of gallons of Blackton cider to order.
Let x3 be the number of gallons of Red Rye cider to order.

Based on the given information, we can write the objective function to maximize profit:

Maximize: 3x1 + 2.5x2 + 1.75x3

Now, let's define the constraints:

1) Cost constraint: The budget for cider is $2,000.
1.5x1 + 0.9x2 + 0.5x3 ≤ 2000

2) Demand constraint: The maximum customer demand for each brand.
x1 ≤ 400
x2 ≤ 500
x3 ≤ 300

3) Stock constraint: The pub has the capacity to stock 1,000 gallons of each brand.
x1 ≤ 1000
x2 ≤ 1000
x3 ≤ 1000

4) Non-negativity constraint: The number of gallons ordered cannot be negative.
x1 ≥ 0
x2 ≥ 0
x3 ≥ 0

Now, we have formulated the linear programming model for this problem.

b. To solve the model using a computer, you can use any software or programming language that supports linear programming. There are several options available, such as Microsoft Excel with Solver add-in, Python with libraries like PuLP or SciPy, or specialized optimization software like Gurobi or CPLEX.

Here is an example of how you can solve this linear programming model using Python with the PuLP library:

```python
from pulp import *

# Create a linear programming problem
prob = LpProblem("CiderStockingProblem", LpMaximize)

# Define the decision variables
x1 = LpVariable("Murphy's", 0, 1000, LpInteger)
x2 = LpVariable("Blackton", 0, 1000, LpInteger)
x3 = LpVariable("Red Rye", 0, 1000, LpInteger)

# Define the objective function
prob += 3 * x1 + 2.5 * x2 + 1.75 * x3

# Define the constraints
prob += 1.5 * x1 + 0.9 * x2 + 0.5 * x3 <= 2000, "CostConstraint"
prob += x1 <= 400, "Murphy'sDemandConstraint"
prob += x2 <= 500, "BlacktonDemandConstraint"
prob += x3 <= 300, "RedRyeDemandConstraint"

# Solve the problem
prob.solve()

# Print the optimal solution
print("Optimal Solution:")
for variable in prob.variables():
print(variable.name, "=", variable.varValue)

# Print the optimal objective value (maximum profit)
print("Maximum Profit = $", value(prob.objective))
```

By running this code, you will get the optimal solution, which tells you how many gallons of each brand of cider to order in order to maximize profit.