You are on page 1of 13

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

Assignment Set-1

Name Registration No. Learning Center

: Amit Sadhu : :

Learning Center Code : Course Subject Semester Module No. Date of submission Marks awarded : MCA : MC0079 Computer based Optimization Methods : IV Semester : : :

Directorate of Distance Education Sikkim Manipal University 1st Floor, Syndicate House Manipal 576104

____________________ Signature of Coordinator

____________________ ____________________ Signature of Center Signature of Evaluator

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

Comments by the Subject Evaluator: ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________

Suggestions for improvement: ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

1. Describe the structure of Mathematical Model in your own words.


Answer 1: A mathematical model is a mathematical relationship or set of relationships, usually expressed as equations, that claim to describe a real-world phenomenon reasonably well. A mathematical model is a description of a certain reality or process using mathematical concept and language. Thus, a mathematical model is an imitation of a real-world problem; a real-world problem translated into a set of mathematical functions. Different types of mathematical models are developed to handle different classes of real-world problems. Some models may be very simple (linear or quadratic models) while some may be complex differential equations. An example of a quadratic model is the profit from sales. An industry producing tiles may have the profit function P(x) = x^2 + 39x - 450, where x = number of boxes of tiles sold. Another example of a quadratic model can be the number of tickets sold for an air show after the show is launched. The model Tickets sold, f(x) = -0.4x^2 + 16x + 18, where x is the number of days after the show is launched can be used to determine when we may expect maximum tickets to be sold and when the sale may dwindle and stop altogether. Another example: Demand for electric power cannot be predicted exactly as a function of the outside temperature, but a pretty good estimate can be found using a quadratic function. That is because, in addition to regular demand levels that don't depend on weather, demand rises further and further as the temperature starts to decrease below a certain point, to account for heating, and again rises further and further as the temperature starts to increase above a certain point, to account for air-conditioning. This U-shaped relationship is well approximated by a quadratic curve. Historical records of temperature and power consumption can be used to find the best-fitting quadratic curve by quadratic regression.

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

2. Explain Erlang family of distributions of service times.


Answer 2: The queuing processes discussed till now are mathematically simple. Assuming that the service time follows negative exponential distribution, you are also taking the standard deviation equal to its mean. There would be situations, where the mean and the standard deviation substantially differ, the models have to be made more general by using a distribution system, which coincide closely to the practical problems, but yet retains the simplicity of the properties of negative exponential distribution. A.K. Erlang first studied such a distribution system. Consider the distribution of a service time involving a fixed number of phase k, each phase having a negative exponential distribution. If there are k phases, and the average time taken by a customer through each phase is units, the service time distribution f(t) is given by

( )
The mean of this distribution is If For ,

) (

and standard deviation is

()
,

which is the negative exponential distribution; same as the models considered earlier. and so on. .

()

The mode is located at

If k = the variance is zero and this corresponds to a case where the service time is constant and has value . The figure below shows the way the density functions vary as k increases.

Figure Density functions vary as k increases The measures of efficiency should take into account the number of customers getting service, number having entered during any one or more of the phases, and the number yet to join. For arrivals following Poisson distribution, with mean l and service time following the k Erlang distribution with mean,
th

the formulae applicable are given below.

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

Average queue length

( )

Average number of units in the system

( )

Average waiting time

( )

Average time spent in the system

( )

For constant service time, equating k to

( )

( )

( )

( )

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

3. Explain the algorithm for solving a linear programming problem by graphical method.
Answer: 3 Linear programming (LP) is a mathematical method for determining a way to achieve the best outcome (such as maximum profit or lowest cost) in a given mathematical model for some list of requirements represented as linear equations. More formally, linear programming is a technique for the optimization of a linear objective function, subject to linear equality and linear inequality constraints. Given a polytope and a real-valued affine function defined on this polytope, a linear programming method will find a point on the polytope where this function has the smallest (or largest) value if such point exists, by searching through the polytope vertices. An Algorithm for solving a linear programming problem by Graphical Method: (This algorithm can be applied only for problems with two variables). Step I: Formulate the linear programming problem with two variables (if the given problem has more than two variables, then we cannot solve it by graphical method). Step II: Consider a given inequality. Suppose it is in the form a1x1 + a2x2 <= b (or a1x1 + a2x2 >= b). Then consider the relation a1x1+ a2x2= b. Find two distinct points (k, l), (c, d) that lie on the straight line a1x1+ a2x2= b. This can be found easily: If x1= 0, then x2 = b / a2. If x2=0, then x1 = b / a1. Therefore (k, l) = (0, b / a2) and (c, d) = (b / a1, 0) are two points on the straight line a1x1+a2x2= b. Step III: Represent these two points (k, l), (c, d) on the graph which denotes XY-axis plane. Join these two points and extend this line to get the straight line which represents a1x1+ a2x2= b. Step IV: a1x1 + a2x2= b divides the whole plane into two half planes, which are a1x1+ a2x2 <= b (one side) and a1x1+ a2x2 >= b (another side). Find the half plane that is related to the given inequality. Step V: Do step-II to step-IV for all the inequalities given in the problem. The intersection of the half-planes related to all the inequalities and x1 >= 0, x2 >= 0 , is called the feasible region (or feasible solution space). Now find this feasible region. Step VI: The feasible region is a multisided figure with corner points A, B, C, (say). Find the co-ordinates for all these corner points. These corner points are called as extreme points.

Amit Sadhu

511234788

Master of Computer Applications


Step VII:

Sikkim Manipal University


Directorate of Distance Education

Find the values of the objective function at all these corner/extreme points. Step VIII: If the problem is a maximization (minimization) problem, then the maximum (minimum) value of z among the values of z at the corner/extreme points of the feasible region is the optimal value of z. If the optimal value exists at the corner/extreme point, say A (u, v), then we say that the solution x1= u and x2= v is an optimal feasible solution. Step IX: Write the conclusion (that include the optimum value of z, and the co-ordinates of the corner point at which the optimum value of z exists).

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

4. Determine optimal solution to the problem given below. Obtain the initial solution by VAM. Write down the differences between PERT and CPM.
Ware houses A B C D Requirement Answer 4: The initial solution obtained by VAM Ware houses A B C D Requirement Stores III 3 (17) 5 4 4 17 /0 Availability 34 /28/11/0 15 /0 12 /0 19 /0 80 I 5 3 6 4 21 II 1 3 4 1 25 Stores III 3 5 4 4 17 IV 3 4 3 2 17 Availability 34 15 12 19 80

I 5 (6) 3 (15) 6 4 21 /6/0

II 1 (6) 3 4 1 (19) 25 /6/0

IV 3 (5) 4 3 (12) 2 17 /5/0

The solution to above problem is Z = (5x6) + (1x6) + (3x17) + (3x5) + (3x15) + (3x12) + (-1x19) Z = 30 + 6 + 51 + 15 + 45 + 36 19 Z = 164 Optimal solution test: The initial solution obtained by VAM is optimal, as it pass the optimality test (m+n-1) < = no of cells occupied. Therefore, 4 + 4 - 1 <= 7 so, 7=7

Differences between PERT and CPM CPM was developed by Du Pont and the emphasis was on the trade-off between the cost of the project and its overall completion time (e.g. for certain activities it may be possible to decrease their completion times by spending more money how does this affect the overall completion time of the project?) Definition: In CPM activities are shown as a network of precedence relationships using activity-on-node network construction Single estimate of activity time Deterministic activity times USED IN: Production management - for the jobs of repetitive in nature where the activity time estimates can be predicted with considerable certainty due to the existence of past experience. PERT was developed by the US Navy for the planning and control of the Polaris missile program and the emphasis was on completing the program in the shortest possible time. In addition PERT had the ability to cope with uncertain activity completion times (e.g. for a particular activity the most likely completion time is 4 weeks but it could be anywhere between 3 weeks and 8 weeks). Basic difference between PERT and CPM:

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

Though there are no essential differences between PERT and CPM as both of them share in common the determination of a critical path and are based on the network representation of activities and their scheduling that determines the most critical activities to be controlled so as to meet the completion date of the project. PERT: 1. Since PERT was developed in connection with an R and D work, therefore it had to cope with the uncertainties which are associated with R and D activities. In PERT, total project duration is regarded as a random variable and therefore associated probabilities are calculated so as to characterize it. It is an event-oriented network because in the analysis of network emphasis is given an important stages of completion of task rather than the activities required to be performed to reach to a particular event or task. PERT is normally used for projects involving activities of non-repetitive nature in which time estimates are uncertain. It helps in pinpointing critical areas in a project so that necessary adjustment can be made to meet the scheduled completion date of the project.

2. 3. 4.

CPM: 1. 2. 3. Since CPM was developed in connection with a construction project which consisted of routine tasks whose resources requirement and duration was known with certainty, therefore it is basically deterministic. CPM is suitable for establishing a trade-off for optimum balancing between schedule time and cost of the project. CPM is used for projects involving activities of repetitive nature.

Project scheduling by PERT-CPM: It consists of three basic phases: planning, scheduling and controlling. 1. 2. 3. Project Planning. Scheduling. Project Control.

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

5. Explain the use of finite queuing tables.


Answer 5: Finite Queuing Models: The models discussed so far relate to situations involving infinite population of customers i.e. the queue can increase indefinitely. There will be cases, where the possible number of arrivals is limited and is relatively small. In a production shop, if the machines are considered as customers requiring service from repair crews or operators, the population is restricted to the total number of machines in the shop. In a hospital ward, the probability of the doctors or nurses being called for service is governed by the number of beds in the ward. Similarly, in an aircraft the number of seats is finite and the number of stewardesses provided by the airlines will be based on the consideration of the maximum number of passengers who can demand service. As in the case of a queuing system with infinite population, the efficiency of the system can be improved in terms of reducing the average length of queues, average waiting time and time spent by the customer in the system by increasing the number of service channels. However, such increases mean additional cost and will have to be balanced with the benefits likely to accrue. If the queuing system in a machine shop is under study, the cost of providing additional maintenance crews or operators can be compared with the value of additional production possible due to reduced downtime of the machines. In cases where it is not possible to quantify the benefits, the management will have to base its decisions on the desired standards for customer service. The queue discipline in a finite queuing process can be: i) ii) iii) First come-first served Priority e.g.: Machines of high cost may be given priority for maintenance while others may be kept waiting even if they had broken down before. Random e.g.: in a machine shop if a single operator is attending to several machines and several machines call for his attention at a time, he may attend first to the one nearest to him.

The analysis of Finite Queuing Models is more complex than those with infinite population although the approach is similar. L.G. Peck and R. N. Hazelwood have provided solutions to such problems in their book Finite Queuing Tables (John Wiley & Sons Inc 1958) Notations: Notations used are different and are given below: N = Population (machines, customers etc.) M = Service channels (repairmen, telephone lines etc.) T = Average service time (repair time, length of conversation on a telephone etc.) W = Average waiting time U = Average running time (of machines) or mean time between calls for service per unit H = Average number of units being serviced L = Average number of units waiting for service J = Average number of units in operation F = Efficiency Factor X = Service Factor D = Probability that if a unit calls for service, it will have to wait. Let us consider a machine shop with N machines. The inter breakdown time of these machines follows a negative exponential distribution with mean U. The number of breakdowns follows Poisson distribution with mean

It is assumed that machines are kept running (or in operation) except when they are under repairs or waiting for repair crew to attend. If M repair crews are available, the time taken by any crew follows a negative exponential distribution with mean T. Naturally, a machine which has broken down will have to wait for repairs if all the repair crews are busy.

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

Measures of System Efficiency: Efficiency of the Repair System for a given set of machines, the efficiency of the repair system may be judged by the extent to which machines have to wait for repairs. If W is the average time for which a machine has to wait, the efficiency factor F is defined as

At any point of time, a machine will either be running or under repair or waiting for repairs. Therefore, the total number of machines . , and correspond to the probability that a machine is being repaired, running or waiting for repairs respectively.

In the finite queuing tables, service factor X is defined as The formulae for other properties of the system are given below:

, X is an indicator of the utilization of repair crew.

Use of Finite Queuing Tables: The tables give the values of F and D for different values of N, M and X. They are arranged in the ascending order of the values of the population. For each N, the value of X increases from .001 to .950. For a given service factor X, several values of M can be found. For each value of X and M, values of D and F are tabulated. The steps in the use of Finite Queuing Tables may be summarized as follows: (i) Find mean service time T and mean running time U. (ii) Compute the service factor (iii) Select the table corresponding to the population N. (iv) For the given population, locate the service factor value. (v) Read off from tables, values of D and F for the number of service crews M. If necessary, these values may be interpolated between relevant values of X. (vi) Calculate the other measures L, W, H, and J from the formulae given. The overall efficiency F of the system will increase with the number of service channels (M) provided. As mentioned earlier, addition of service crews involves cost, which should be justified by the increase in the efficiency of the system i.e. additional running time of machines possible. However, it will be seen from the tables that as M increase the rate of increase in efficiency decreases. The practical significance is that beyond a certain value of M, it is not worthwhile increasing M as there would be no appreciable increase in the efficiency of the system. Example: In a chemical plant there are five hoppers of the same size which give food to material to grinding mills. Due to changes in the requisite of material, there are variations in the time taken for emptying the hoppers. On the basis of past experience this time was found to follow negative exponential distribution with an average of 10 hours between getting emptied. Whenever a hopper gets empty it has to be filled by a pay loader. Although the capacity of the hoppers is the same, the time taken to fill the hoppers varies due to different locations from which the material is to be loaded. The time for filling the hopper also was found to follow negative exponential distribution with an average of 2.5 hours. The company hires the

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

pay loaders at a cost of Rs. 100 per hour irrespective of whether it is operated or not. If the mill has to be stopped due to its hopper getting empty it costs Rs.1000 per hour in terms of loss of profits. Determine the number of pay loaders which the company should engage to minimize overall cost. Solution: Since T = 2.5 and U = 10

For N = 5, X = 0.200 we have the following values from the tables: M D F 3 0.028 0.998 2 0.194 0.976 1 0.689 0.801 We now prepare a table as below: 1. Number of Pay Loaders 2. Overall efficiency of the system (f) 3. N(1-X) 4. Average number of mills running per hour J = NF(1-X) 5. Expected profit @ 1000 per hour 6. Load cost @ Rs. 100 per hour per day loader 7. Expected net profit per hour (5-6)

3 0.998 4.00 3.992 3.992 300 3692

2 0.976 4.00 3.904 3.904 200 3704

1 0.801 4.00 3.204 3.204 100 3104

As increasing the number of pay loaders beyond two reduces profits, the company should engage only two pay loaders.

Amit Sadhu

511234788

Master of Computer Applications

Sikkim Manipal University


Directorate of Distance Education

6. Customers arrive at a small post office at the rate of 30 per hour. Service by the clerk on duty takes an average of 1 minute per customer a. Calculate the mean customer time. i. Spent waiting in line. ii. Spent receiving or waiting for service. b. Find the mean number of persons. i. In line. ii. Receiving or waiting for service.
Answer 6: Mean arrival rate = 30 customers per hour = 1/2 customer per minute Mean service rate = 1 per minute Traffic intensity a) Mean customer time i. Mean customer time spent waiting in line per minute

( )
ii.

minute

Mean customer time receiving or waiting for service

( )
b)

minutes

Mean number of persons i. Mean number of person in line

( )
ii.

customer

Mean number of persons receiving or waiting for service

( )

cusomter

Amit Sadhu

511234788

You might also like