Page 1

Learning. Thinking. Engineering. An Introduction


Learning. Thinking. Engineering. 

Redefine how you go about:

Learning

Thinking

Engineering


Learning. Thinking. Engineering. 

Working in any field – be it programming, design, requirements engineering, management, or even while we are just learning a new subject – what we are doing is solving a problem at hand.

There is a field called “Heuristics” – the science of meta-thinking, or mathematical problem solving.

How we’ll tackle this process of continually finding ourselves as better engineers would be by making ourselves better problem solvers .


Learning. Thinking. Engineering. 

How would you solve a problem? Are there tools that would help you to find solutions to any given problem?

Are there patterns of thought that we repeat in finding solutions to seemingly difficult problems?

The answer affirmative, and the good news is the thinking-skills can be easily learnt, and put to practice.

Here we’ll give you an introduction, and leave it to your judgment to apply what you have learnt to use it to solve bottlenecks you face as engineers.

In the coming few weeks, among other things, I’ll be giving you an overview of heuristics theory.


Learning. Thinking. Engineering. "The intelligent problem-solver tries first of all to understand the problem as fully and as clearly as he can. Yet understanding alone is not enough; he must concentrate upon the solution. If he cannot summon up real desire for solving the problem he would do better to leave it alone. The open secret of real success is to throw your whole personality into your problem.” – George Polya, Mathematician

Get over the psychological barrier

Boldness has magic in it.

Experiment, experiment, experiment. Vary your experiments .


A Simple Puzzle We have a pizza, and you are allowed to cut it 17 times. What is the maximum number of pieces you can get out of it? Assume you know how to count, and no more of math!

Secret Hint:

Now is your chance to apply what you learned a slide before

“Going around an obstacle is what we do in solving any kind of problem…” - Polya


A Simple Puzzle – Cutting a Pizza 

The first step to solving a puzzle is to clearly understand the problem-statement.

Read the problem, clearly state it in your own words. Then restate it in clearer, simpler terms.

Ask yourself: Are there superfluous elements in it which could be pared out? What exactly are we asked to find?

What are the variables in it? What are the relationships between these variables? Could the apparent relationships between the variables help arrive at the solution? What are the given data?

Are there peculiarities to the given data that could help us arrive at the solution? Is the given data sufficient to arrive at a solution? If not, why exactly is it insufficient? The goal being to gain from the problem-statement as much insight as you can into the puzzle. Vague insights gained by analyzing the problem statement could later spark in your mind the crux insight that solves the puzzle.


A Simple Puzzle – Cutting a Pizza 

First, we restate the problem, reducing it to its essentials. The knife and the pizza being just embellishments, we have: What is the maximum number of parts into which 17 lines can divide a circle?

Next, we ask ourselves what the variables in this problem are. There are two variables here: The number of lines and the number of parts created by the lines. Is there an obvious relationship between the two variables? Yes. As the number of lines increases, the number of parts increases as well.

Could we leverage this obvious-seeming relationship to lead us to the solution? Hmmm.. If we could uncover how the number of regions increases with number of lines, uncover a pattern in how that variable increases with increase in the number of lines, we could use it to arrive at the solution.

See if u can find such a pattern. How many regions do a single line create? How many regions can two lines create? How many regions can three lines create? Collect your data, search for patterns in it. If you see a pattern, try to reason out why such a pattern occurs. )

A conjecture is an intelligent guess, often made on patterns observed. Problem solving is often involves coming up with intelligent conjectures based on observed patterns, reasoning out why they could be true, and proving them.


The Solution 

Experimenting on the problem leads us to conjecture that the number of additional regions created by a new line is n+1, where n is the number of lines already present.

Why could this be so? Let us observe how additional regions come to being as a new line is drawn, starting from the boundary of the circle. Each time the line touches an already existing line, a new region forms. In addition, a new region is formed when the line touches the boundary again.


The Problem Solver’s Attitude

“The problem solver gets hot, cold, wet, tired, and hungry. The problem solver gets lost and has to find his or her way. The problem solver gets blisters. The problem solver climbs to the top of mountains, sees hitherto undreamed of vistas. The problem solver arrives at places of amazing beauty, and experiences ecstasy that is amplified by the effort expended to get there. When the problem solver returns home, he or she is energized by the adventure, and cannot stop gushing about the wonderful experience.� - Zietz


The Lessons 

Never sit and stare at a problem. Attack it. Understand the problem space, make it your friend, before you move ahead.

Actively analyze the factors involved. Experiment to better understand the problem-space. “What happens when you make a change there?” How does it affect the problem-space? ( Understand the Objects and their relations)

If an approach fails. Vary your approach. Make a plan. Execute.

Experiment with simple cases. Search for patterns.

Don’t be like a fly at a glass window. Take a step back, take another step back, get the big picture, search for alternate routes.

Pursue clarity of thought, pursue simplicity. The simpler the solution the better.


Terminology – The Objects 

Terminology exists for the purpose of organizing thought.

We give names to concepts in the problem-space ( or the solution-space) for the purpose of organizing thought.

When you deal with an existing problem-space, develop a deep understanding of the terminology used, including why it is used. This is critical to gaining mastery over a real world problem. ( more so in modeling scenarios). Get the inside-out of the concept behind a terminology.

In s/w engineering these “nouns” are what often end up as object-classes in your system . To engineer a scenario in a solution-space well, you need to understand the objects in the problem-space.

Ask yourself questions such as “Why is it called so? What role does it play in the larger system? What is the object’s relation with other objects in the solution-space” (Same applies when learning a new subject)


Our First Heuristic – Thinking backwards 

Mastering this one technique will leave you a better engineer than most of your peers.

In many problems it helps to :

Imagine yourself at the solution and looking around for paths leading to where you are.


Our First Heuristic – Thinking backwards

You are given a 5 Liter vessel and a 3 Liter vessel. Can you measure out exactly 4 liters of water from a river?


Our First Heuristic – Thinking backwards 1.

Imagine yourself at the solution. In the 5L vessel, you have 4L of water.

2.

How would we have ended up with that?

3.

One way is to have poured out 1liter from the 5 L vessel

4.

To pour out exactly 1L from a 5L vessel, the only way is if we have 2 L in the 3 L vessel

5.

Now the question has been reduced to how to measure out 2 L (and have it in the 3L vessel. ). Can u find the answer now?


Our First Heuristic – Thinking backwards You visit 10 different stores, and from each store you buy 10 sachets of rice labeled 100g. On the way back home, a friend informs you that exactly one of the stores is selling 99 g packets of rice, labeled as 100g. Given a weighing machine, and allowed a single weigh, can you figure out which of the 10 stores are selling the wrongly labeled sachets?


Our First Heuristic – Thinking backwards 

We reason backwards. The difference of the weight displayed by the weighing machine, from the expected weight, should tell us which store is selling the falsely labeled sachets.

So, in the sample we weigh, we include a different number of sachets from each store. We have 1 sachet from store 1, 2 from store 2, 3 from store 3 and so on.. Then, if there is, say, a difference of 6g from expected weight, we can immediately tell it was store 6 that sold us 99g packs of rice.


Our First Heuristic – Thinking backwards You are given 9 pearls, and have been told that exactly one among them is odd and lighter than the rest. Given an arm balance, how many weighs would you need to find the lighter pearl?


Our First Heuristic – Thinking backwards 

We are at our last weigh. What is the maximum number of pearls we could be left with? From three pearls we could find the lighter in a single weigh. We compare two, if the lighter is one of the two, the balance will tell us which one. If not, it is the pearl left out.

We continue to trace our way, backwards, from the last weighing: The last-but-one weigh should leave me with exactly three marbles. What if I pack 9 pearls into three boxes, each with three pearls? The second-last weigh, then, can tell me which the lighter box (the one with the lighter pearl) is!

And we not only have our solution (2 weighs), but we have a general result: In n weighs we can find an odd-lighter pearl, from 3^n pearls.


Our First Heuristic – Thinking backwards ď ˝

A person is stuck on the terrace of a 100m high building. He has a knife and a rope 75m in length. There is a balcony at 50m of height. How could he escape?

( Do it yourself)


Back to the beginning

Find a walk through the city that would cross each bridge once and only once.Â


Back to the beginning –


By Analogy( sampler for another Heuristic). ď ˝

Can u solve:


Our Next Heuristic Principle

"In order to solve a problem, we need a certain amount of previously acquired knowledge.” – Polya

Problem Solving: A Quick Introduction  

On Heuristics and Problem Solving. A Programmer's Perspective, by Dilip Rajeev

Read more
Read more
Similar to
Popular now
Just for you