"Chris Jones" <
[email protected]> wrote in message
news:
[email protected] om...
> Consider the grid shown below.
>
> There are 4 electrical "switch pairs" which need to be connected to
> make the overall connection work.
>
> ---------------------------------------------------------
> | | | | | | | | | | | | | | |
> ---------------------------------------------------------
> | | | | | | | | | | | | | | c`|
> ---------------------------------------------------------
> | | | | | | | | | | | | | | |
> ---------------------------------------------------------
> | | | | b | | | | | | | | | | |
> ---------------------------------------------------------
> | | | | | | | | | | | | | d'| |
> ---------------------------------------------------------
> | | | | | | | | | | | | | | |
> ---------------------------------------------------------
> | | | | | | | | | | | | | | |
> ---------------------------------------------------------
> | | | | | | a | | | | | a`| | | |
> ---------------------------------------------------------
> | | | | | | | | | | | | | | |
> ---------------------------------------------------------
> | | | | | | | | | | | | | | |
> ---------------------------------------------------------
> | | | | | | | | | | | b`| | | |
> ---------------------------------------------------------
> | | | | | | | d | | | | | | | |
> ---------------------------------------------------------
> | | | | | | | | | | | | | | |
> ---------------------------------------------------------
> | | c | | | | | | | | | | | | |
> ---------------------------------------------------------
>
> The paths are
>
> a --- a' (path A)
> b --- b' (path B)
> c --- c' (path C)
> d --- d' (path D)
>
> There would be two possible routes to connect these paths. The
> connection can follow either 1) horizontal then vertical direction,
> or 2) vertical then horizontal direction. There ie no other way that
> the path between the electrical switches could be made. Thus every
> possible path here would make a bounded rectangle encompassing the
> pair of switches.
>
> The following rule is to be followed for making up these paths:
>
> If a switch p belonging to one path lies in the bounded rectangle
> formed by the switches belonging to another path, then path p must be
> connected first.
>
> SO - What would be the order of connectivity of this set of paths?
>
> AND - Develop a generalized procedure to implement this strategy!
>
> Thanks,
> Chris
The strategy will not work in general. Consider the network:
a b -
- a' b'
It's easy to see a connection solution, but b is in the boundary of a-a',
and a' is in the boundary of b-b', so your strategy will not work here.
Also, you need to consider how to deal with unsolvable networks.