[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1564.0. "Selecting connected unit squares" by PAISA::STAMMERS () Fri Feb 14 1992 15:49

Can any one help with the following problem?

  Given an N * N grid of unit squares, how many ways can one select
  m unit squares (1<= m <= N**2) such that all the m selected unit
  squares are connected together. (By connected I mean connected 
  together by an edge, not merely touching at the corners - in other
  words if the selected unit squares were GO stones they would make
  one group of m stones).

  m=1, 2 ,(N**2)-2, (N**2)-1, and N**2 are easy but the "bit in the
  middle" seems to be a lot harder!
  
  Any help with F(N,m) as described above would be appreciated such as:-

		A solution! bounds or approximations
                Any insights or observations
                Pointers to related papers or texts.

Richard
T.RTitleUserPersonal
Name
DateLines
1564.1tic tac toe, anyone?CIVAGE::LYNNLynn Yarbrough @WNP DTN 427-5663Fri Feb 14 1992 16:3215
Does this situation

	+---+---+---+
	|   |   |   |
	+---+---+---+
	|   | X |   |
	+---+---+---+
	|   |   |   |
	+---+---+---+

Where square X is surrounded by other squares in a solution set, count as
one solution (with X) or two (with and without X)? It makes a big
difference. 

I think this will prove to be a very tough problem.
1564.2Unless there is a trick which is not obvious.CADSYS::COOPERTopher CooperFri Feb 14 1992 16:545
    I agree with Lynn -- its likely to be very tough.  The difficulty is
    that attempts to enumerate configurations are likely to overcount
    because of symetries of some, but not other configurations.

				Topher
1564.3some wild-ass guessesALLVAX::JROTHI know he moves along the piersFri Feb 14 1992 20:309
    Polya's coloring theorem (which was devised for counting organic
    chemical compounds) *may* be able to help, but I'm only guessing
    and have not thought about it.  At the least, it will reduce the
    work by taking account of symmetries, and usually you find in
    the analysis that one term dominates so you can get an asymptotic
    estimate.  There may be some kind of generating function way to
    attack it also...

    - Jim
1564.4Comments on replies and 3 example to solve.PAISA::STAMMERSTue Feb 18 1992 14:01104
 Thanks very much for your replies. 

>I think this will prove to be a very tough problem.
   and
>    I agree with Lynn -- its likely to be very tough.

  Yes, I thought it was very difficult too.

>Does this situation
>
>	+---+---+---+
>	|   |   |   |
>	+---+---+---+
>	|   | X |   |
>	+---+---+---+
>	|   |   |   |
>	+---+---+---+
>
>Where square X is surrounded by other squares in a solution set, count as
>one solution (with X) or two (with and without X)? It makes a big
>difference. 

 I would count them as two solutions.


>  The difficulty is
>    that attempts to enumerate configurations are likely to overcount
>    because of symetries of some, but not other configurations.

 I was not differentiating between symetrical solutions. 

 Hence in evaluating, say, F(4,3) (number of ways of selecting three connected
unit squares from a 4*4 grid) both of the following would contribute: 

	+---+---+---+---+
	| X | X |   |   |
	+---+---+---+---+
	|   | X |   |   |
	+---+---+---+---+
	|   |   |   |   |
	+---+---+---+---+
	|   |   |   |   |
	+---+---+---+---+
and
	+---+---+---+---+
	|   |   |   |   |
	+---+---+---+---+
	|   |   |   |   |
	+---+---+---+---+
	|   | X |   |   |
	+---+---+---+---+
	| X | X |   |   |
	+---+---+---+---+

 Even discounting symetries it still seems tough.

>    Polya's coloring theorem (which was devised for counting organic
>    chemical compounds) *may* be able to help, but I'm only guessing
>    and have not thought about it.  At the least, it will reduce the
>    work by taking account of symmetries, and usually you find in
>    the analysis that one term dominates so you can get an asymptotic
>    estimate.  


 I have had a looked at assigning a "checkerboard" colour scheme to the 
grid, (with same colours running diagonally) to the grid. If c is number
of colors used, this provides a usefull categorisation of solutions
with c selected 

                2 <=  c <= m
and                   c <= N

 Solutions then get a categorisation depending on their parity with respect
to of each of the colors they use. (A related technique has been used to
identify "impossible" situations/prune search trees in polyomino fitting
problems which have some similarity). Is this at all the same? Where would I
find information on Polya's colouring theorem?

>    There may be some kind of generating function way to
>    attack it also...

 Problem does seem to have this sort of a feel to it. For example 
solutions involving selecting say 5 unit squares in a sense are built upon
solutions involving 4 unit squares, etc. etc. (Just extend on earlier solution
by adding one square to each edge of previous solution). However the rules
for uniqueness, and the constraints of the edge of the grid make it very
difficult. But perhaps there is some pattern like Pascal's triangle or the
Bell numbers waiting to be found.

 Another approach I have used is to develope various forms of recursive 
lists to describe the "connectivity" of unit squares on the grid, and then
to search the lists or map the lists against certain patterns corresponding
to solutions. I suppose this no more than a re-formulation of the problem but
I was hoping some pattern or algorithm might appear that it is more difficult
to see in the actual problem.

 ---------------------------------------------------------------------------

 The problem is interesting to program or otherwise solve.

 Would any one care to calculate F(5,5), F(6,6), F(7,7) and F(8,8)?

Richard.  
1564.5HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Fri Feb 21 1992 11:2617
A closely related problem is:


	Count the number of ways m colored squares can be connected in the
	plane lattice.


For many m, this is equivalent to your question, but your question constrains
the larger m to "fit" in the square.



Perhaps this second question is a bit easier since we're only dealing with m
and not N.  But perhaps it's still "too hard".

/Eric