In Means-End Analysis you try to reduce the difference between initial state and goal state by creating sub goals until a sub goal can be reached directly (probably you know several examples of recursion which works on the basis of this).
An example for a problem that can be solved by Means-End Analysis are the „Towers of Hanoi“
The initial state of this problem is described by the different sized discs being stacked in order of size on the first of three pegs (the “start-peg“). The goal state is described by these discs being stacked on the third pegs (the “end-peg“) in exactly the same order.
There are three operators:
· You are allowed to move one single disc from one peg to another one
· You are only able to move a disc if it is on top of one stack
· A disc cannot be put onto a smaller one.
In order to use Means-End Analysis we have to create subgoals. One possible way of doing this is described in the picture:
1. Moving the discs lying on the biggest one onto the second peg.
2. Shifting the biggest disc to the third peg.
3. Moving the other ones onto the third peg, too.
You can apply this strategy again and again in order to reduce the problem to the case where you only have to move a single disc – which is then something you are allowed to do.
Strategies of this kind can easily be formulated for a computer; the respective algorithm for the Towers of Hanoi would look like this:
1. move n-1 discs from A to B
2. move disc #n from A to C
3. move n-1 discs from B to C
Where n is the total number of discs, A is the first peg, B the second, C the third one. Now the problem is reduced by one with each recursive loop.
Means-end analysis is important to solve everyday-problems - like getting the right train connection: You have to figure out where you catch the first train and where you want to arrive, first of all. Then you have to look for possible changes just in case you do not get a direct connection. Third, you have to figure out what are the best times of departure and arrival, on which platforms you leave and arrive and make it all fit together.