If you want to make money online : Register now

Discuss some real world problems, to which the techniques given below are applicable
(i) Divide & Conquer
(ii) Dynamic Programming
(iii) Greedy Approach



Dynamic programming used to avoid repetitive work. That can be achieve by remembering partial results.

Real World Problem : Min-Num-Coins

(Gives the minimum number of coins for Given Amount)

In Automated shop, someone purchased goods of Rs. 389, After billing Machine start showing few combination of change to achieve the Amount 389. Customer will select a combination and give the money. Similar If customer paid 500 to pay 389 then Shopkeeper will also calculate the change with minimum coins.

Aircraft stand assignment to minimize walking

Gate scheduling is concerned with assigning flights to terminal or ramp positions, called gates. It is a key activity in airport operations. With the increase of civil air-traffic and the corresponding growth of airports in the past decades, the complexity of the task has increased significantly. At large international airports, several hundreds of flights must be handled per day.

Discuss some real world problems, to which the techniques given below are applicable
(i) Divide & Conquer
(ii) Dynamic Programming
(iii) Greedy Approach


I am going to explain using real world systems around us

Government and Company: 

In real world, Government follows the divide and conquer approach to get all problem listed and resolve. Using State Leaders, District Leaders, Block Leader, Village Leader etc. 

Similar for the company, suppose someone purchased a Product from Patanjali, and He received an outdated product from store. For this problem He can't complain directly to CEO of Patanjali. 
CEO > Managers of different fields > Territorial Manager > Area Manager > Local Distributor > Then Local Shop

By this chain they can easily find the problem and solved in mannered way. 

Simple word, We can solve a big problem in small pieces and solve it, after solving each merge them together. 

So basically, divide any big problem into smaller problems (to make our life easy), solve individual problems and combine the solution of small problems to get the solution to big problem. Note that sometimes, there is no need for combining solutions of small problems.

OOAD

Object-oriented analysis and design (OOAD) is a popular technical approach for analyzing, designing an application, system, or business by applying the object-oriented paradigm and visual modeling throughout the development life cycles to foster better stakeholder communication and product quality.

Structured Analysis vs. Object Oriented Analysis

The Structured Analysis/Structured Design (SASD) approach is the traditional approach of software development based upon the waterfall model. The phases of development of a system using SASD are:
  • Feasibility Study
  • Requirement Analysis and Specification
  • System Design
  • Implementation
  • Post-implementation Review
Now, we will look at the relative advantages and disadvantages of structured analysis approach and object-oriented analysis approach.

Advantages/Disadvantages of Object Oriented Analysis

AdvantagesDisadvantages
Focuses on data rather than the procedures as in Structured Analysis.Functionality is restricted within objects. This may pose a problem for systems which are intrinsically procedural or computational in nature.
The principles of encapsulation and data hiding help the developer to develop systems that cannot be tampered by other parts of the system.It cannot identify which objects would generate an optimal system design.
The principles of encapsulation and data hiding help the developer to develop systems that cannot be tampered by other parts of the system.The object-oriented models do not easily show the communications between the objects in the system.
It allows effective management of software complexity by the virtue of modularity.All the interfaces between the objects cannot be represented in a single diagram.
It can be upgraded from small to large systems at a greater ease than in systems following structured analysis.

Advantages/Disadvantages of Structured Analysis

AdvantagesDisadvantages
As it follows a top-down approach in contrast to bottom-up approach of object-oriented analysis, it can be more easily comprehended than OOA.In traditional structured analysis models, one phase should be completed before the next phase. This poses a problem in design, particularly if errors crop up or requirements change.
It is based upon functionality. The overall purpose is identified and then functional decomposition is done for developing the software. The emphasis not only gives a better understanding of the system but also generates more complete systems.The initial cost of constructing the system is high, since the whole system needs to be designed at once leaving very little option to add functionality later.
The specifications in it are written in simple English language, and hence can be more easily analyzed by non-technical personnel.It does not support reusability of code. So, the time and cost of development is inherently high.
Read more: http://www.tutorialspoint.com/object_oriented_analysis_design/ooad_object_oriented_analysis.htm

2016 - 2017 Assignment Question

Class diagram

In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects.

  • Classes


Classes represent an abstraction of entities with common characteristics. Associations represent the relationships between classes.

  • Active Classes

Active classes initiate and control the flow of activity, while passive classes store data and serve other classes. Illustrate active classes with a thicker border.

  • Visibility

Use visibility markers to signify who can access the information contained within a class. Private visibility, denoted with a - sign, hides information from anything outside the class partition. Public visibility, denoted with a + sign, allows all other classes to view the marked information. Protected visibility, denoted with a # sign, allows child classes to access information they inherited from a parent class.

  • Associations

Associations represent static relationships between classes. Place association names above, on, or below the association line. Use a filled arrow to indicate the direction of the relationship.

  • Multiplicity (Cardinality)

Place multiplicity notations near the ends of an association. 

  • Constraint

Place constraints inside curly braces {}.

  • Composition and Aggregation

Composition is a special type of aggregation that denotes a strong ownership between Class A, the whole, and Class B, its part. Illustrate composition with a filled diamond.

  • Generalization

Generalization is another name for inheritance or an "is a" relationship. 

Image source https://www.lucidchart.com/pages/class-diagram-for-library-management-system-UML




Download Reference Guide

Cleanroom software development (Mills, Dyer et al., 1987; Cobb and Mills, 1990; Linger, 1994; Prowell, Trammell et al., 1999) is a software development philosophy that is based on avoiding software defects by using formal methods of development and a rigorous inspection process. The name ‘Cleanroom’ was derived by analogy with semiconductor fabrication units. In these units (cleanrooms) defects are avoided by manufacturing in an ultra-clean atmosphere. The objective of this approach to software development is zero-defect software.
The Cleanroom approach to software development is based on five key strategies:
  • Formal specification The software to be developed is formally specified. A state-transition model which shows system responses to stimuli is used to express the specification.
  • Incremental development The software is partitioned into increments which are developed and validated separately using the Cleanroom process. These increments are specified, with customer input, at an early stage in the process.
  • Structured programming Only a limited number of control and data abstraction constructs are used. The program development process is a process of stepwise refinement of the specification. A limited number of constructs are used and the aim is to apply correctness-preserving transformations to the specification to create the program code.
  • Static verification The developed software is statically verified using rigorous software inspections. There is no unit or module testing process for code components.
  • Statistical testing of the system The integrated software increment is tested statistically (see Chapter XX), to determine its reliability. These statistical tests are based on an operational profile which is developed in parallel with the system specification.
A model of the Cleanroom process, adapted from the description given by Linger (Linger, 1994), is shown below. This shows how these essential strategies are integrated.
Figure 1: The Cleanroom process
Cleanroom teams discusses the team organisation for the Cleanroom process.
Rigorous inspection explains the inspection approach used.
Cleanroom experience discusses the experiences with the Cleanroom approach and its effectiveness.
References
Cobb, R. H. and Mills, H. D. (1990). Engineering Software under Statistical Quality Control.IEEE Software,7(6), 44-54.
Linger, R. C. (1994). Cleanroom Process Model. IEEE Software,11(2), 50-8.
Mills, H. D., Dyer, M. and Linger, R. (1987). Cleanroom Software Engineering. IEEE Software,4(5), 19-25.
Prowell, S. J., Trammell, C. J., Linger, R. C. and Poore, J. H. (1999). Cleanroom Software Engineering: Technology and Process. Reading, Mass.: Addison-Wesley.

Independent sets are represented in sets, in which
  • there should not be any edges adjacent to each other. There should not be any common vertex between any two edges.
  • there should not be any vertices adjacent to each other. There should not be any common edge between any two vertices.

Independent Line Set

Let ‘G’ = (V, E) be a graph. A subset L of E is called an independent line set of ‘G’ if two edges in L are adjacent. Such a set is called an independent line set.

Example

Independent Line Set
Let us consider the following subsets −
L1 = {a,b}
L2 = {a,b} {c,e}
L3 = {a,d} {b,c}
In this example, the subsets L2 and L3 are clearly not the adjacent edges in the given graph. They are independent line sets. However L1 is not an independent line set, as for making an independent line set, there should be at least two edges.

Maximal Independent Line Set

An independent line set is said to be the maximal independent line set of a graph ‘G’ if no other edge of ‘G’ can be added to ‘L’.

Example

Maximal Independent Line Set
Let us consider the following subsets −
L1 = {a, b}
L2 = {{b, e}, {c, f}}
L3 = {{a, e}, {b, c}, {d, f}}
L4 = {{a, b}, {c, f}}
L2 and L3 are maximal independent line sets/maximal matching. As for only these two subsets, there is no chance of adding any other edge which is not an adjacent. Hence these two subsets are considered as the maximal independent line sets.

Maximum Independent Line Set

A maximum independent line set of ‘G’ with maximum number of edges is called a maximum independent line set of ‘G’.
Number of edges in a maximum independent line set of G (β1)
= Line independent number of G
= Matching number of G

Example

Maximum Independent Line Set
Let us consider the following subsets −
L1 = {a, b}
L2 = {{b, e}, {c, f}}
L3 = {{a, e}, {b, c}, {d, f}}
L4 = {{a, b}, {c, f}}
L3 is the maximum independent line set of G with maximum edges which are not the adjacent edges in graph and is denoted by β1 = 3.
Note − For any graph G with no isolated vertex,
α1 + β1 = number of vertices in a graph = |V|

Example

Line covering number of Kn/Cn/wn,
Maximum Independent Line Set Example
Line independent number (Matching number) = β1= ⌊n2⌋ α1 + β1 = n

Independent Vertex Set

Let ‘G’ = (V, E) be a graph. A subset of ‘V’ is called an independent set of ‘G’ if no two vertices in ‘S’ are adjacent.

Example

Independent Vertex Set Example
Consider the following subsets from the above graphs −
S1 = {e}
S2 = {e, f}
S3 = {a, g, c}
S4 = {e, d}
Clearly S1 is not an independent vertex set, because for getting an independent vertex set, there should be at least two vertices in the from a graph. But here it is not that case. The subsets S2, S3, and S4 are the independent vertex sets because there is no vertex that is adjacent to any one vertex from the subsets.

Maximal Independent Vertex Set

Let ‘G’ be a graph, then an independent vertex set of ‘G’ is said to be maximal if no other vertex of ‘G’ can be added to ‘S’.

Example

Maximal Independent Vertex Set Example
Consider the following subsets from the above graphs.
S1 = {e}
S2 = {e, f}
S3 = {a, g, c}
S4 = {e, d}
S2 and S3 are maximal independent vertex sets of ‘G’. In S1 and S4, we can add other vertices; but in S2 and S3, we cannot add any other vertex

Maximum Independent Vertex Set

A maximal independent vertex set of ‘G’ with maximum number of vertices is called as the maximum independent vertex set.

Example

Maximum Independent Vertex Set Example
Consider the following subsets from the above graph −
S1 = {e}
S2 = {e, f}
S3 = {a, g, c}
S4 = {e, d}
Only S3 is the maximum independent vertex set, as it covers the highest number of vertices. The number of vertices in a maximum independent vertex set of ‘G’ is called the independent vertex number of G (β2).

Example

For the complete graph Kn,
Vertex covering number = α2 = n−1
Vertex independent number = β2 = 1
You have α2 + β2 = n
In a complete graph, each vertex is adjacent to its remaining (n − 1) vertices. Therefore, a maximum independent set of Kn contains only one vertex.
Therefore, β2=1
and α2=|v| − β2 = n-1
Note − For any graph ‘G’ = (V, E)
  • α2 + β2 = |v|
  • If ‘S’ is an independent vertex set of ‘G’, then (V – S) is a vertex cover of G.
You can find more on tutorialspoint.com