Write an algorithm and draw a flow chart diagram to produce


Q1- Odd natural numbers form a sequence 1, 3, 5, 7, 9, 11, ...

Find the rule to find the nth term in the sequence of odd natural numbers.

Write an algorithm and draw a flow chart diagram to produce the sum and average of first n odd natural numbers. For example, the sum of first 5 odd natural numbers, 1+3+5+7+9 = 25, so their average is 25/5 = 5.

Q2- An inventor has an innovative product idea. He can either take a lump sum payment for the patent from an established manufacturer, or he can attempt to produce it with his own start-up company.  If he attempts his own start-up, the amount he will receive depends on the market response to his product, which could be poor, medium or excellent.  What should he do?

Probabilities and pay-outs are as follow:

-Start-up payouts

Poor=$300,000

Medium =$1,000,000

Excellent=$3,400,000

-Manufacturer payout

Flat rate =$850,000

-Probabilities

P(Poor) = 0.4

P(Medium) = 0.55

P(Excellent) = 0.05

Q3- Variables A, B, C & D are the first 4non-zero digits of your student ID. ID number: 15917711

A

B

C

D

 

 

 

 

The constraints of a linear programming problem are given as:

y ≥ -((A+10)/(B+2))x + (A+10)

y ≥ -((C+3)/(D+4))x+ (C+3)

y ≤ ((C+3)/(D+4))x + (A+10)

x ≤ A + B + C + D

x ≥ 0

y ≥ 0,

and the objective function is:

f(x, y) = -0.2x + 4y

a. Substitute variables A, B, C & D into the constraints, plot the constraints and indicate (shade) the feasibility region. You may use the grid overleaf or attach your own plot.                                                          

b. Write all the corner points of the feasibility region found in (a).

c. Evaluate the objective function for all these corner points. Find the point that maximizes the objective function and the point that minimizes the objective function.                                      

Q4- A developer has a 1 hectare section on which to build houses. They have 10,000 man-months of labour available. Their preferred luxury units need 550m2 per unit and 30 man-months of labour, yielding $1,100,000 profit per unit.

New planning rules require them to build at least 10% of their houses as affordable units, which make less profit per unit at $300,000, but take less land at 50m2 and less labour at 10 man-months per unit.

The developer wants to maximize their profit, given the constraints.

a. Complete the following table.              

 

Luxury

Affordable

Maximum Available

Land Required (m2)

 

 

 

Labour Required (man-months)

 

 

 

b. Suppose x is the number of luxury units and y is the number of affordable units. Write all the constraints on the development in the form of inequalities in terms of x and y.

c. Plot the inequalities on the following template, by choosing an appropriate scale. Label the corner points and indicate the feasible region.

d. Write an objective function in terms of the variables x and y for this problem.

e. Evaluate the objective function in (g) with each corner point from (c) and determine the x and y values that give the maximum profit. Assume that whatever the numbers of luxury and affordable unit that are produced, all will sell.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Write an algorithm and draw a flow chart diagram to produce
Reference No:- TGS01412722

Expected delivery within 24 Hours