Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 35

Islington College

Logic And Problem Solving


MA4001NA
Groupwork 1

Submitted By: Submitted To:


Dibya Shrestha (17031100) Ashok Dhungana
Isha K.C (17031122) Module Leader
Priya Mushyan (17031115) Logic And Problem Solving
L1C8
Date: 22 May, 2018
Word Count:- 2955 Semester:Spring
Acknowledgement

We might want to offer our earnest thanks to all our module educators for their
nonstop guidance and support amid this gathering work. We might likewise want to
thank everybody who made it feasible for us to finish this gathering work. Our most
profound thankfulness to the module educators Mr. Prakash Adhikari and Mr. Ashok
Dhungana who helped us to co-ordinate venture with their animating
recommendations and support.

Besides, we would all value our consistent endeavors and association while doing
this gathering work. We did this extend for marks as well as to acquire learning and
data in regards to all the related points of this gathering work, so we might
particularly want to thank our module instructors for allowing us to do this gathering
work. We would likewise need to welcome the direction given by our senior siblings
and sisters for giving us a few thoughts regarding how to take care of the issue in
snappier and less demanding ways. This undertaking would not have been
conceivable without the constant cooperation and communication among us
colleagues.

We might truly want to express our most profound thankfulness and appreciation to
our module educators for giving us this venture to extemporize ourselves both with
learning and abilities. Finally, we might want to thank everybody who guided us all
through this gathering work straightforwardly and in a roundabout way
MA4001NA LOGIC AND PROBLEM SOLVING

Contents

1) Question No.1........................................................................................................1
Question No.2.............................................................................................................10
Part A......................................................................................................................10
Memorandum..........................................................................................................22
Part B......................................................................................................................23
2) Question No.3......................................................................................................27
Log Of Meetings.........................................................................................................31
MA4001NA LOGIC AND PROBLEM SOLVING

TABLE OF TABLE

Table 1:Tax Table.........................................................................................................2

TABLE OF FIGURES

Figure 1: Formula showing the process.......................................................................2


Figure 2: Procedure showing the tax rate, amount of tax and amount left after tax for
salary 30500.................................................................................................................3
Figure 3: Procedure showing the tax rate, amount of tax and amount left after tax for
salary 128000...............................................................................................................4
Figure 4: Procedure showing the tax rate, amount of tax and amount left after tax for
salary 262000...............................................................................................................5
Figure 5: Procedure showing the tax rate, amount of tax and amount left after tax for
salary 19000.................................................................................................................6
Figure 6: Procedure showing the tax rate, amount of tax and amount left after tax for
salary 53330.................................................................................................................7
Figure 7: Displaying of an alert box after entering an invalid input..............................8
Figure 8: The process stop after pressing the NO button............................................8
Figure 9: Continuation of the process after pressing the YES button..........................9
Figure 10:Formula to solve the problem using Excel Solver......................................17
Figure 11:Solving the problem using Excel................................................................18
Figure 12:Limit Report of the problem using Excel....................................................18
Figure 13:Sensitivity Report of the problem using Excel............................................19
Figure 14:Answer report of the problem using Excel.................................................20
Figure 15:Graph to solve maximization......................................................................25
Figure 16: Graph to find out breakeven points...........................................................29
MA4001NA LOGIC AND PROBLEM SOLVING

1) Question No.1
Write a procedure, tax, to calculate (to the nearest pound) the tax a person owes,

depending on his/her income.

Calculate the tax using this table:

Income Tax Rates


Tax Rate Taxable Income
Basic Rate 20% £0 to £31,700
Higher Rate 40% £31,701 to £150,000
Additional Rate 45% Over £150,000

The procedure should show

i) The salary,

ii) The tax rate,

iii) The amount of tax

iv) The amount left after tax and

v) Be able to deal with any input, valid or not.

Your tests of your procedure should include the following values, which should be

included in your final presentation.

tax (30500),

tax (128000),

tax (262000),

tax (19000),

tax (53330),

tax (-16700),

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Income Tax Brackets Tax Slab Tax Tax Amount Taxable Amount Left
Rate
0 31700 =B9-A9 20% =if(C9>B6,B6*D9,C9*D9) =if(C9>B6,0,B6-C9)

31701 150000 =B10-A10 40% =if(C10>F9,F9*D10,C10*D10) =if(C10>F9,0,F9-C10)

150000 Above =B11-A11 45% =F10*D11

Total Tax =SUM(E9:E11)

Amount left after tax =B6-E14

Table 1:Tax Table

Formula showing the whole process

Figure 1: Formula showing the process

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

1) For salary 30500

Salary=30500

Tax Rate=20%

Amount of Tax=6100

Amount left after tax=24400

Figure 2: Procedure showing the tax rate, amount of tax and amount left after tax for salary
30500

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

2) For salary 128000

Salary=128000

Tax Rate=40%

Amount of Tax=44860

Amount left after tax=83140

Figure 3: Procedure showing the tax rate, amount of tax and amount left after tax for salary
128000

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

3) For salary 262000

Salary=262000

Tax Rate=45%

Amount of Tax=104060.5

Amount left after tax=157939.95

Figure 4: Procedure showing the tax rate, amount of tax and amount left after tax for
salary 262000

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

4) For salary 19000

Salary=19000

Tax Rate=20%

Amount of Tax=3800

Amount left after tax=15200

Figure 5: Procedure showing the tax rate, amount of tax and amount left after tax for
salary 19000

5) For salary 53330


Salary=53300
Tax Rate=40%
Amount of Tax=14992
Amount left after tax=38338

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Figure 6: Procedure showing the tax rate, amount of tax and amount left after tax for salary
53330

6) For salary -16700


Since the salary is less than 0, an alert box pops up with a message “Please
enter decimal values!! Continue?” If we press the button “NO”, the process will
not be conducted. Meanwhile, if we press the button “YES”, the process will
continue and the problem will be solved even if the input value is invalid.

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Figure 7: Displaying of an alert box after entering an invalid input

Figure 8: The process stop after pressing the NO button

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Figure 9: Continuation of the process after pressing the YES button

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Question No.2

Part A
Martin and Son’s company wants to manufacture a mixture containing three contents
X, Y and Z. The cost of X, Y and Z are $5, $4 and $3 respectively. The company
prepares the mixture to meet out the demand of the costumers in the following

manner.

(i) The quantity of X cannot be more than 200 kgs in the mixtures.

(ii) The quantity of Y used should be at least 300 kgs.

(iii) The content of Z cannot be more than 400 kgs.

Find the optimal combination of the three contents for a mixture of 1000 kgs, so that

the total cost is minimum.

Questions

You should answer the following questions and incorporate your answers into a

word-processed report to form part of your final pdf. The sections of your report

should correspond to the individual questions following.

a) Formulate the problem as a linear programming model, clearly defining the

variables, the objective function and the constraints.

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Solution,

Martin and Son’s Company

Contents X Y Z
Cost $5 $4 $3 Minimum
Requirements Not more than At least 300kg Not more Total=1000
200kg than 400 kg
kg

For decision variables

Let p, q and r be the quantity of the three contents X, Y and Z respectively


which in total weighs 1000kg as a mixture for the minimum cost.

For objective function

Cost = 5p + 4q + 3r
Let M = 5p + 4q + 3r
Minimize M = 5p+4q+3r

Constraints

p <= 200 (Content X constraint)


q >= 300 (Content Y constraint)
r <= 400 (Content Z constraint)
p+ q+ r = 1000 (Total mixture constraints)
p, q, r >= 0 (Non-negative constraint)

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

b) Solve the problem using Simplex method.

Solution,
Let S1 and S3 be the slack variable whereas S2 be the surplus variable and A1 and
A2 be the artificial variable.
p + S1 = 200
q - S2 + A1 = 300
r + S3 = 400
p + q + r + A2 = 1000

Standard equation for Simplex Table:

1.M - 5.p - 4.q - 3.r + 0.S1 + 0.S2 + 0.S3 - 10.A1 - 10.A2 = 0


0.M + 1.p + 0.q + 0.r + 1.S1 + 0.S2 + 0.S3 + 0.A1 + 0.A2 = 200
0.M + 0.p + 1.q + 0.r + 0.S1 - 1.S2 + 0.S3 + 1.A1 + 0.A2 = 300
0.M + 0.p + 0.q + 1.r + 0.S1 + 0.S2 + 1.S3 + 0.A1 + 0.A2 = 400
0.M + 1.p + 1.q + 1.r + 0.S1 + 0.S2 + 0.S3 + 0.A1 + 1.A2 = 1000

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

A. Simplex table I:

M p q r S1 S2 S3 A1 A2 Constant
R0 1 -5 -4 -3 0 0 0 -10 -10 0
R1 0 1 0 0 1 0 0 0 0 200
R2 0 0 1 0 0 -1 0 1 0 300
R3 0 0 0 1 0 0 1 0 0 400
R4 0 1 1 1 0 0 0 0 1 1000
Updating the R0,
New R0 = old R0 + (R2+R4)
1 = 1 + 10(0+0)
5 = -5 + 10(0+1)
16 = -4 + 10(1+1)
7 = -3 + 10(0+1)
0 = 0 + 10(0+0)
-10 = 0 + 10(-1+0)
0 = 0 + 10(0+0)
0 = -10 + 10(1+0)
0 = -10 +10(0+1)
13,000 = 0 +10(300+1000)

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

B. Simplex table II:

M p q r S1 S2 S3 A1 A2 Constant Ratio
R0 1 5 16 7 0 -10 0 0 0 13000 ---
R1 0 1 0 0 1 0 0 0 0 200 ∞
R2 0 0 1 0 0 -1 0 1 0 300 300
R3 0 0 0 1 0 0 1 0 0 400 ∞
R4 0 1 1 1 0 0 0 0 1 1000 1000

Key column = q , Key row = R2, Key element = 1

Updating R0,
New R0 = old R0 - 16(R2)
1 = 1 – 16*0
5 = 5 – 16*0
0 = 16 – 16*1
7 = 7 – 16*0
0 = 0 – 16*0
6 = -10 -16*(-1)
0 = 0 -16*0
-16 = 0 - 16*1
0 = 0 – 16*0
8200 = 13000 – 16*300

Updating R4,
New R4 = old R4 – R2
0=0–0
1=1–0
0=1–1
1=1–0
0=0–0
1 = 0 – (-1)
0=0–0
-1 = 0 – 1
1=1–0
700 = 1000 – 300

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

C. Simplex table III:

M p q r S1 S2 S3 A1 A2 Constant Ratio
R0 1 5 0 7 0 6 0 -16 0 8200 ---
R1 0 1 0 0 1 0 0 0 0 200 ∞
R2 0 0 1 0 0 -1 0 1 0 300 ∞
R3 0 0 0 1 0 0 1 0 0 400 400
R4 0 1 0 1 0 1 0 -1 1 700 700

Key column = r, Key row = R3, Key element = 1


Updating R0,
New R0 = old R0 – 7(R3)
1 = 1 – 7*0
5 = 5 – 7*0
0 = 0 – 7*0
0 = 7 – 7*1
0 = 0 – 7*0
6 = 6 – 7*0
-7 = 0 – 7*1
-16 = (-16) – 7*0
0 = 0 – 7*0
5400 = 8200 – 7*400

Updating R4,
New R4 = old R4 – R3
0=0–0
1=1–0
0=0–0
0=1–1
0=0–0
1=1–0
-1 = 0 – 1
-1 = (-1) – 0
1=1–0
300 = 700 – 300

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

D. Simplex table IV

M p q r S1 S2 S3 A1 A2 Constant Ratio
R0 1 5 0 0 0 6 -7 -16 0 5400 ------
R1 0 1 0 0 1 0 0 0 0 200 ∞
R2 0 0 1 0 0 -1 0 1 0 300 -300
R3 0 0 0 1 0 0 1 0 0 400 ∞
R4 0 1 0 0 0 1 -1 -1 1 300 300

Key Row = S2, Key Row = R4, Key element = 1

Updating R0,
New R0 = old R0 – 6*R4
1 = 1 – 6*0
-1 = 5 – 6*1
0 = 0 – 6*0
0 = 0 – 6*0
0 = 0 – 6*0
0 = 6 – 6*1
-1 = (-7) – 6*(-1)
-10 = (-16) – 6*(-1)
-6 = 0 – 6*1
3600 = 5400 – 6*300

Updating R2,
New R2 = old R2 + R4
0=0+0
1=0+1
1=1+0
0=0+0
0=0+0
0 = (-1) + 1
-1 = 0 + (-1)
0 = 1 + (-1)
1=0+1
600 = 300 + 300

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

A. Simplex table V
M p q r S1 S2 S3 A1 A2 Constant
R0 1 -1 0 0 0 0 -1 -10 -6 3600
R1 0 1 0 0 1 0 0 0 0 200
R2 0 1 1 0 0 0 -1 0 1 600
R3 0 0 0 1 0 0 1 0 0 400
R4 0 1 0 0 0 1 -1 -1 1 300

Since all the values in R0 <= 0, we have reached our optimal solution. So, Minimum
value (M)= 3600
p = 0,
q = 600,
r = 400

c) Solve the problem using the Excel Solver and interpret the results.

Figure 10:Formula to solve the problem using Excel Solver

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Figure 11:Solving the problem using Excel

Figure 12:Limit Report of the problem using Excel

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Figure 13:Sensitivity Report of the problem using Excel

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Figure 14:Answer report of the problem using Excel

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

d) For the final part of your report, in your capacity as an Adviser, you should present

a memorandum to the Martin and Son’s company. Describe your main conclusions

in simple, non-technical English; i.e. do not use technical terms like variable,

objective function or dual price. Don’t worry about repeating some or all of the

points that you have already made in answer to earlier questions. The aim is to

communicate your conclusions clearly to someone who is knowledgeable about

the combination of contents used in the mixture, but who knows nothing about the

subject of linear programming. You may use tables and charts if you wish.

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Memorandum

TO: Martin and Son’s Company

CC: Mr. Ashok Dhungana

FROM: Islington Students’ Group

DATE: 22nd May, 2018

SUBJECT: To prepare the mixture of three contents and meet out the demands
of the customers.

The technique your organization has been utilizing to meet the requests of the client
from the three unique substance isn't as powerful as it is accepted to be. We have
done huge research and found the more productive strategy to blend the three
substance that you need to meet the requests of your clients. We additionally trust
the technique to be more future confirmation and versatile.

We trust that utilizing the blend of the item in the proportions of 0 kg for the main
item, 600 kgs for the second item and 400 kgs for the third item would be the best for
the most extreme measure of benefits and the meet the requests without hurting the
creation excessively. This will likewise diminish your expenses to the 3600 which is
the base sum workable for the accessible line of substance.

We trust that the technique for blend can have a lot of effect on the measure of
benefit and the meet every one of your requests; and this data will unquestionably be
useful to your organization.

Advisors,

Dibya Shrestha

Priya Mushyan

Isha K.C

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Part B
Solve the following linear programming problem graphically:

Maximize: Z = 0.3x + 0.4y

Subjected to,

2x + y ≤ 90

x + 2y ≤ 80

x + y ≤ 50

x, y ≥ 0

Solution,

Maximize Z=0.3 x+ 0.4 y

Equation 1) 2x+y<=90

Equation 2) x+2y <=80

Equation 3) x+y <=50

X , y>0

Changing equation 1) into standard form:

2x+y=90

or, y=90–2x

X 25 30 25

y 40 30 20

x+2y=80

or, x=80–2y

X 20 80 40

y 30 0 20

x+y=50
DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

or, y=50-x

X 30 20 40

y 20 30 10

The graph paper is shown below:

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Figure 15:Graph to solve maximization

To find the maximum value for the given equation, we have to follow the following
table:
DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Max, Z=0.3x+0.4y

points x y 0.3x+0.4y=Z

(0,0) 0 0 0

(50,0) 50 0 15

(40,10) 40 10 16

(20,30) 20 30 18

(0,40) 0 40 16

Therefore, the Z value is maximum for the corner point “D”

Z(optimum)=18 at D(20,30)

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

2) Question No.3
If the total costs of a manufacturing company is C(x) = 390+24x, and the total
revenue is

R(x) = 640x – 42x².

Questions

You should answer the following questions and incorporate your answers into a
word-

processed report. The sections of your report should correspond to the individual
questions

below.

a) Find the breakeven point(s).

i.Solution,

Given, Cost price………C(x)=390+24x

Revenue price.....R(x)=640x-42x²

To find breakeven points,

C(x)=R(x)

or, 390+24x=640x-42x²

or, 42x²-616x+390=0

or, 21x²-308x+195=0

Comparing it with a²+2b+c

a=21 b=-308 c=195

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Using formula,

x={-b+-(b²-4ac)½}/2a

x={-b+(b²-4ac) ½}/2a x={-b-(b²-4ac) ½}/2a

={-(-308) +(-308) ²- 4*21*195}/(2*21) ={-(-308) -(-308) ²-


4*21*195}/(2*21)

=14.004 =0.663

a) The break even points are 14.004 and 0.663

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

b) By plotting the revenue and cost functions, obtain the

break-even output levels and corresponding price (use graph paper).

Figure 16: Graph to find out breakeven points

c) Generate the profit function for the company and find,

i. The level production that maximizes the profit.

Substituting the value of x in equation 1 Substituting the value of x in equation


2

C(14.004) = 390+24*14.004 C(0.663) = 390+24*0.663

= 726.096 = 405.912
DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

The level of production that maximizes the profit:

Solution,

Compare the equations of profit (-42)x²+616y-390 with ax²+bx+c

Then,

a = (-42), b=616, c=(-390)

The level of production that maximizes the profit (x) = - b/2a

Or, x = -616/2*(-42)

Or, x = -616/-(84)

Or, x = 7.333 i.e. 7

Therefore, 7 units are required to produce the level of production that maximizes the
profit.

ii. The maximum profit

Maximum profit(y) = c-b² / 4a

Or, y = (-390) – 616² / 4* (-42)

Or, y= (-390) – 379456 / (-168)

Or, y = 1868.667

Therefore, the maximum profit is 1868.667

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C
MA4001NA LOGIC AND PROBLEM SOLVING

Log Of Meetings

DIBYA SHRESTHA
PRIYA MUSHYAN
ISHA K.C

You might also like