## Building a domain model by pattern recognition to solve similar problems still faster

We have * already solved a problem* on profit and loss in only a few steps. As a recap, we reproduce it here partly.

### Previous Problem - first problem version

A man sells two wrist watches one at a profit of 30% and another at a loss of 30%, but each at a same selling price of Rs.400. The net profit or loss is,

- 6%
- 0%
- 9%
- 1%

We have started with the conventional solution and then went on to the efficient solution. Briefly the conventional solution was as follows. We are skipping the basic concepts here. If you want, you may refer to our * earlier related discourse*.

### Conventional solution

Let Cost prices of the two watches be CP1 and CP2 and the common selling price SP.

So total cost price TCP = CP1 + CP2, and

Total sale price is TSP = 2SP = Rs.800.

For the **first watch sale** at a profit of 30%,

\begin{align} SP & = CP1 + .3\times{CP1} \\ & = 1.3\times{CP1} \end{align}

So, $CP1 = \displaystyle\frac{Rs.400}{1.3}$.

For the** second watch sale **at a loss of 30%,

\begin{align} SP & = CP2 - .3\times{CP2} \\ & = 0.7\times{CP2} \end{align}

So, $CP2 = \displaystyle\frac{Rs.400}{0.7}$.

#### Finding the loss or gain at the last stage

So, **Total cost of the two watches** is,

\begin{align} TCP & = \displaystyle\frac{Rs.400}{1.3} + \displaystyle\frac{Rs.400}{0.7} \\ & = \displaystyle\frac{Rs.800}{0.91} \end{align}

whereas **total sale price was** $TSP = Rs.400 + Rs.400 = Rs.800$. This is less than the total cost price. Thus there has been a **net loss in the whole transaction,**

\begin{align} Loss &= \displaystyle\frac{Rs.800}{0.91} - Rs.800 \\ & = Rs.800\times{\displaystyle\frac{.09}{0.91}} \\ & =\frac{Rs.800\times{.09}}{0.91} \end{align}

This loss is on the total cost of $\displaystyle\frac{Rs.800}{0.91}$,

The **percentage loss is**,

$\frac{\displaystyle\frac{Rs.800\times{.09}}{0.91}}{\displaystyle\frac{Rs.800}{0.91}}= .09=9{\%}$.

Answer: c: 9%.

We will recount the * solution in a few steps briefly*. We are

*skipping the abstraction concept*here. If you feel the need, you may refer to it

**But we are repeating the rich concept as we will use its level of usefulness for comparison with a still higher rich concept level later.**

*here*.### Solution in a few steps

#### Rich concepts

In any topic area, problems can be solved using the very basic concepts. When you are well conversant with the basic concepts you can form what we call * Rich concepts *from the basic concepts itself and use the rich concepts sometimes to

**solve problems in the specific area in a few steps only.**

**Rich concepts in Profit and Loss**

If CP = Cost price and $x{\%}$ = Profit, in terms of Sale price SP,

$CP = \displaystyle\frac{SP}{1 + 0.01\times{x}}$.

Similarly, if $x{\%}$ = Loss, in terms of Sale price SP,

$CP = \displaystyle\frac{SP}{1 - 0.01\times{x}}$.

These relationships are simple and can be highly effective in right circumstances.

### Efficient solution

We have prices CP1 and CP2 and sale price SP not considering their numerical values at all. The total cost is,

\begin{align} CP1 + CP2 & = SP\left(\displaystyle\frac{1}{1.3} + \displaystyle\frac{1}{0.7}\right) \\ & = 2SP\times{\displaystyle\frac{1}{0.91}} \end{align}

This total cost is larger than total sale price of 2SP.

The loss is,

$2SP\left(\displaystyle\frac{1}{0.91} - 1\right)=2SP\left(\displaystyle\frac{.09}{.91}\right)$.

Or, $Loss = \displaystyle\frac{2SP}{0.91}\times{.09}=9{\%}$ of total cost price.

Up to this is a recap. Now we will take up a different but similar problem.

### Second similar problem version

A man sells two wrist watches one at a profit of 30% and another at a loss of 30%, but each at a same selling price of Rs.300. The net profit or loss is,

- 6%
- 0%
- 9%
- 1%

If you compare carefully this second version with the first version of the problem, you will find one change - The selling price is changed from Rs.400 to Rs.300.

Let us repeat the last expression of our previous solution in a few steps.

$Loss = \displaystyle\frac{2SP}{0.91}\times{.09}=9{\%}$ of **total cost price**.

The solution is stated as $9{\%}$ of **total cost price. **The desired information is the** loss percentage, **that is, $9{\%}$**. **Notice that this will be the answer * whatever be the value of total cost price that is derived from SP or the same sale price.* We expressed this total cost price in terms of the same sale price.

### Applying Abstraction technique to ignore given value of same sale price altogether

*We have effectively abstracted out the sale price from consideration completely.* With sale price value changing, and other percentage values remaining unchanged, the cost prices will change but not the desired final percentage loss.

This is because the final percentage loss is in terms of the total cost. The actual total cost value which in turn depends on the same sale price value, will change but won't change the percent loss value.

This is **first level of application of the abstraction technique.** Let us recount the abstraction technique again.

### Abstraction technique

This technique is re-stated as,

In a situation with two entities or states, when there is a common set of properties between the two states, you can focus on only the specific special properties of each state that are not common leaving out the common properties or vice versa.

In this special case of our similar problems, we have formed the abstract representation of sale price that are same or common to both sales. Instead of specific numeric value we represented it just as SP and carried out our deduction using this abstract representation, to finally arrive at the desired loss percentage in terms of SP. *We never actually needed the numeric value of the sale price.*

*By first level of this abstraction we have effectively factored out the sale value from calculations altogether.*

### First higher level rich concept

Thus we conclude that

Whatever be the equal sale price in such a profit and loss problem, if other percent values and actions on the values remain unchanged the answer will remain same.

This is the * first higher level of rich concept* in this type of problems.

As a proof of this new concept, we have seen in version 2 of our problem that even though the sale value changed to Rs.300 from Rs.400 as in our first problem version, the desired answer of loss percent as $9{\%}$ still remains valid.

### Third similar problem version

A man sells two wrist watches one at a profit of 50% and another at a loss of 50%, but each at a same selling price of Rs.300. The net profit or loss is,

- 25%
- 0%
- 9%
- 16%

#### Efficient solution in a few steps

We will straightaway represent the final expression of total cost **using Rich concepts** **in profit and loss and abstraction technique**,

\begin{align} CP1 + CP2 & = SP\left(\displaystyle\frac{1}{1.5} + \displaystyle\frac{1}{0.5}\right) \\ & = 2SP\times{\displaystyle\frac{1}{0.75}} \end{align}

Because of the change of percentage loss and gain in the individual transactions to 50%, you will notice that the denominators of individual CPs changed to,

\begin{align} CP1 & = SP\left(\displaystyle\frac{1}{1 + 0.5}\right) \\ & = SP\left(\displaystyle\frac{1}{1.5}\right) \end{align}

\begin{align} CP2 & = SP\left(\displaystyle\frac{1}{1- 0.5}\right) \\ & = SP\left(\displaystyle\frac{1}{0.5}\right) \end{align}

Because of this change, the numerator of the total CP does not change but the denominator has changed from earlier 0.91 in case of 30% loss or gain to 0.75 in this case of 50% loss or gain.

This results in finally a net loss of 25% as the total sale price is 2SP. This is the net loss percentage when the individual loss or gain percentage is 50%. In comparison, the net loss percent was 9% when the individual loss or gain percent was 30%.

This prompts us to take up a fourth similar problem version.

### Fourth similar problem version

A man sells two wrist watches one at a profit of 40% and another at a loss of 40%, but each at a same selling price of Rs.300. The net profit or loss is,

- 25%
- 0%
- 9%
- 16%

We have changed the individual loss or gain percentages to 40% here.

#### Efficient solution in a few steps

Being well-conversant with dealing with this type of problems by now, we will repeat the total cost price step, but won't explain how we arrived at it (this is the advantage of experience in solving a particular type of problem, and also the advantage of repeated trials for solution).

\begin{align} CP1 + CP2 & = SP\left(\displaystyle\frac{1}{1.4} + \displaystyle\frac{1}{0.6}\right) \\ & = 2SP\times{\displaystyle\frac{1}{0.84}} \end{align}

As the total sale price is 2SP, we can say with confidence that in this case of individual transaction loss or gain of 40%, the net percent loss is 16%.

### Pattern recognition technique

Do you recognize any pattern in this similar type of problems?

For convenience let us list out the results only for the three similar problem versions.

**Individual percent loss or gain of** **30%** results in a net loss **9%.**

**Individual percent loss or gain of 50%** results in a net loss **25%.**

**Individual percent loss or gain of 40%** results in a net loss **16%.**

The *inherent pattern that works here* seems to be,

The net loss is a square of the ten's digit of the individual loss or gain each of which is a ten's multiple.

For 30% loss or gain, ten's digit is 3 and net loss is 9%, for 40% ten's digit is 4 and the net loss is 16%, for 50% ten's digit is 5 and the net loss is 25%.

### Principle of induction

This is a very well known and heavily used powerful principle in Mathematics but it can as well be used and actually is used in many important real life problem solving situations. This principle, in efficient problem solving parlance, says,

If a distinct pattern of behavior of change in an well-defined entity depends precisely on systematic change of value of a specific parameter of the entity (without any other change in each entity state) and if this pattern of behavior is seen to happen empirically in at least three cases, we can form a conjecture that this change pattern will work for any other value of the critical parameter as well.

We will use here the discovery and application of the pattern as a conjecture only and we intend to confirm the validity of the conjecture by testing it for other values of ten's multiples of individual transaction loss or gain, instead of drawing firm conclusions based on the principle of induction straightaway.

### Technique of conjecture testing

The reason for this apparent lack of confidence in use of the principle of induction in drawing the conclusions * lies in our belief in testing each such conclusion for increasing the belief in the conjecture.* We, the problem solvers, are used to such strategems especially in case of real life problem solving for increasing the assurance in our solution. And Mathematical problem solving forms one part of Real life problem solving.

### Fifth similar problem version

A man sells two wrist watches one at a profit of 20% and another at a loss of 20%, but each at a same selling price of Rs.300. The net profit or loss is,

- 25%
- 4%
- 9%
- 16%

This time we have changed the key parameter of percentages to 20% loss or gain in individual transactions.

#### Efficient solution in a few steps

Being fully confident in dealing with this type of problems, again we will represent the net loss as,

\begin{align} (CP1 + CP2) - 2SP & = SP\left(\displaystyle\frac{1}{1.2} + \displaystyle\frac{1}{0.8}\right) - 2SP \\ &= 2SP\times{\displaystyle\frac{1}{0.96}} - 2SP \\ & = 4{\%}\end{align} of total cost price.

The ten's digit of the common individual loss or gain is 2 and as expected the net loss is its square, that is, 4%.

Trying once more targeting still higher confidence in our conjecture, we take up our last version of a similar problem.

### Sixth similar problem version

A man sells two wrist watches one at a profit of 10% and another at a loss of 10%, but the selling price of each watch is 200. Find the net loss or gain.

- 1% loss
- 1% gain
- 9% loss
- 16% gain

In this last version we have made two changes - the individual loss or gain is changed to 10% and the sale price changed to Rs.200. As we know already the common sale price won't make any difference, we would repeat the expression of total cost price expression directly.

Total cost price is,

\begin{align} (CP1 + CP2) & = SP\left(\displaystyle\frac{1}{1.1} + \displaystyle\frac{1}{0.9}\right) \\ & = 2SP\times{\displaystyle\frac{1}{0.99}} \end{align}

As before we observe, this total cost price is more than the total sale price of 2SP, and so the net loss is,

\begin{align} Loss & = 2SP\times{\displaystyle\frac{1}{0.99}} - 2SP \\ & = 2SP\left(\displaystyle\frac{1}{0.99} - 1\right) \\ & =2SP\times{\displaystyle\frac{0.01}{0.99}} \end{align}

As the total cost is $2SP\times{\displaystyle\frac{1}{0.99}}$, the net loss perecnt is 0.01 of total cost price or 1% of total cost price. This result again satisfies our conjecture.

**Aside:** For detailed derivation of this solution you may refer to **our earlier discourse.**

### How to solve similar problems in a few seconds

Armed with the knowledge gained from the small discovery of a specific pattern of the result in similar problems, where the defining parameter value of individual loss or gain percentage may take up a specific type of different value (only in multiples of ten), if we face now a similar problem with a loss and gain of 60% in two sale situations, we may select the correct answer of net loss of 36% in a few seconds without going through any derivation at all.

And this will hold good whatever be the common sale value (a positive real number) in two sale transactions and the individual loss or gain within its valid range of values, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80% and 90%.

### Specifying these similar problems with precision

We have now reached the stage where the questions such as, "What really are the specifics of this similar type of problem?" or "What is the use of this approach at all?" automatically arise in our mind.

To reach the last stage of this step by step long process, we must specify with precision the "similar type of problem" where our capacity to solve such a problem has grown to even solving a new instance of such a problem in seconds. We attempt to define this similar type of problem in abstraction precisely as,

#### Precise and abstract problem definition

If two similar objects (anything that can be bought and sold, from pens to bullocks) are sold on two separate transactions, one at a loss of $n\times{10{\%}}$, where $n$ may take only values 1, 2, 3, 4, 5, 6, 7, 8 and 9, at the same sale price of $p$, where $p$ is any positive real number, what will be the net loss or gain?

Using the knowledge of useful patterns in such problem, we may directly arrive at the answer as, $n^2{\%}$ net loss.

### Domain model

**We define a domain**, according to our problem of interest, as

An area of activity within which all aspects including the behavior of various entities involved and the concepts underlying these behavior are bounded.

*For example, according to our problem requirement, we can define our domain of interest as large as Mathematics or only a small part of Mathematics, that is, say, the topic of Profit and Loss.*

In this case, our domain is represented by * all particular similar type of problems* as precisely defined above

**along with the concepts involved.**#### Purpose of modeling a domain

But we define and model a domain not as an academic activity only, but for understanding and effective use of all aspects of the particular domain with targeted results of manifold efficiency and minimal cost compared to conventional approaches to the solution of any problem arising in the domain.

We have seen how ultimately armed with the clear knowledge of the "similar type of problem" we are considering, *such a new problem can be solved in seconds* without even any derivation.

For a large and complex domain, if we can build it at all, the gains and uses may only be limited by our imagination.

#### Similarity to Expert knowledge

We can informally state that,

A domain model is somewhat similar to an explicit representation of expert knowledge implicitly embedded in the mind of an expert on the domain.

An expert arrives at the solution of a complex problem in her domain very quickly following a path of solution that she may not be able to explain clearly, but nevertheless the solution would be spot on in most cases.

Because of this great value of expert knowledge, for at least six decades, we see intense focus on capturing the expertise of experts and effective use of it. Over time, the approach to capture and use expertise changed but nevertheless the importance never diminished. It only changed form.

### Components of a domain model

The components of a domain model loosely can be stated as,

- Precise boundary definition of the knowledge or activity area of the domain of interest.
- All entities involved in the domain with explicit definition of the characteristics of each entity.
- All agents involved in the domain that can affect any of the entities, and their precise definition, including how they affect.
- All underlying useful concepts explicitly arrived at and stated precisely, starting at the most basic level to the richest concept level.
- Relationships between the concepts, preferably in a structured form.
- Relationships between the entities, preferably in a structured form.
- Problem statements that may arise in the domain.
- Various ways to arrive at the desired solution for a specific such problem, and
- Identification and application process of the most efficient solution at minimal cost for a particular problem, and similarly for all problems.

There would always be an endeavor to define all important problems that may arise in the domain, and finding the most efficient and minimal cost path to its solution including implementation.

### Processes to building a domain model

Some of the most important processes to build a useful practical problem domain model are,

- to go through successive stages of variation of a problem definition,
- analyze its behavior with respect to its solution,
- discovering any useful pattern,
- incorporating the pattern in the domain model for subsequent refinement of problem solving, and
- using abstraction at all the stages to generalize as broadly as possible within the imposed domain boundary.

This is just an indicative list of steps.

### A very small domain model

Our **domain model of interest is** the "similar type of problems" as we defined earlier. We reproduce it here for convenience,

If two similar objects (anything that can be bought or sold, from pens to bullocks) are sold on two separate transactions, one at a loss of $n\times{10{\%}}$, where $n$ may take only values 1, 2, 3, 4, 5, 6, 7, 8 and 9, at the same sale price of $p$, where $p$ is any positive real number, what will be the net loss or gain?

Using rich concepts, we may immediately arrive at the answer as: loss of $n^2{\%}$.

In this domain **we have to include all basic and rich concepts of Profit and loss relevant to solving the problem.**

There are only **two entities of same type that can be bought and sold**, resulting in **profit** or **loss**.

There are **explicitly two activities of selling**, once one entity and the second time the other same type of entity. But **there also are two implicit activities of buying each entity**.

**Result of the actions of buying and selling** are in **profit** and **loss** that have specific concepts attached to them.

**Procedures of using the concepts to arrive at solutions** to the problems in the domain.

**Patterns of variation** of an important characteristic of the intangible entities - individual same profit or loss, and its relationship to resulting net loss.

We **applied abstraction** on the entities to a great extent, freeing up the solution procedures from considering the same sale value or finally eliminating even the formal however brief steps to the solution.

Just the use of pattern would give us the solution nearly instantaneously.

**End note:** Domain modeling is an esoteric but undoubtedly an extremely valuable activity area in any serious effort to understand and use of the complex processes of Efficient Problem Solving.

#### How to solve difficult SSC CGL Math problems at very high speed using efficient problem solving strategies and techniques

These resources should be extremely useful for you to speed up your in-the-exam-hall SSC CGL math problem solving. You will find these under the subsection **Efficient Math Problem Solving.**

This is a collection of high power strategies and techniques for solving apparently tricky looking problems in various topic areas

usually within a minute.These are no bag of tricks but are based on concepts and strategies that are not to be memorized but to be understood and applied with ease along withpermanent skillset improvement.

**The following are the associated links,**

**How to solve difficult SSC CGL Profit and loss problems in a few steps 3**

**How to solve difficult SSC CGL Profit and loss problems in a few steps 1**