MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Find Upper Neighbor in a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85022] Find Upper Neighbor in a list
  • From: P_ter <peter_van_summeren at yahoo.co.uk>
  • Date: Thu, 24 Jan 2008 04:44:06 -0500 (EST)

Hello,
I would like to find the Upper Neighbour of a set in a list, where the (lattice) order is inclusion. I have as example: {{3}, {4}, {6}, {7}, {2, 3}, {3, 4}, {3, 6}, {5, 6}, {6, 8}, {1, 2, 3}, {2, 3, 4}, {5, 6, 8}, {6, 7, 8}, {1, 2, 3, 4}, {5, 6, 7, 8}, {1,2, 3, 5, 6}, {3, 4, 6, 7, 8}, {1, 2, 3, 4, 5, 6, 7, 8}}
The subsets I call nodes. I form a list of lists where in each list the first member is a node which has an intersection with all the other nodes in the list. 
So a sublist is: {{5,6},{5,6,8},{5,6,7,8},{1,2,3,5,6},{1,2,3,4,5,6,7,8}}
As one can see {5,6} is included in every other set in this list. The upper neigbor of {5,6} is {5,6,8} because there is no set in between. But also {1,2,3,5,6} is an upper neighbor, because there is no other set of the list in between it and (5,6}.
I have this problem for a list of lists where the first member is the set for which the upper neighbour is sought.
I solved it with loops, but I am not satisfied. Please, if someone has better ideas? 
Also, I have a second question. Once the upper neighbours are found, I want to plot it in GraphPlot3D (which is very convenient!). I convert every set with  FromDigits and make a list of 56->568 etc. Better ideas are welcome.
Thanks in advance,
P_ter


  • Prev by Date: ColorFunction question - DensityPlot and ContourPlot difference
  • Next by Date: Re: Sticky Animations Anyone?
  • Previous by thread: ColorFunction question - DensityPlot and ContourPlot difference
  • Next by thread: Re: Find Upper Neighbor in a list