MathGroup Archive 2004

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

Search the Archive

partition list and enumerating


hello group, 


this is kinda like a follow up on my last post. 

i have a way to enumerate the problem i posted earlier. 

I wanted to find all tours that are possible with the edges given. Now
I have to plot them.

consider the following. it will generate 64 lists of edges within a
list.

la= {
      "{1, 4}, a",
      "{1, 5}, a",
      "{4, 2}, a",
      "{4, 5}, a", 
      "{5, 2}, a",
      "{5, 4}, a"
      };

li ={ 
      "{1, 4}, i",
      "{1, 5}, i",
      "{4, 2}, i",
      "{4, 5}, i",
      "{5, 2}, i",
      "{5, 4}, i"
      };

lai=Outer[List,Sequence@@Transpose[{la,li}]]//Flatten[#,Length[la]-1]&//ToString;

StringReplace[lai,{"a,"\[Rule] "EdgeColor ->
Blue},{","i,"->"EdgeColor-> Red},{", "a"-> "EdgeColor \[Rule] Blue",
"i"->"EdgeColor-> Red"}]//ToExpression;

Partition[%, 6]

%//Length


now what I woudl like to do is use combinatorica to show all 64
enumerations as 64 separate graphs using the same vertices as follows.


{
{{0.0, 1.5}, VertexLabel -> a1}, 
{{0.0, 0.0}, VertexLabel -> b2}, 
{{0.5, 0.75}, VertexLabel -> c3}, 
{{-0.5, 0.75}, VertexLabel -> d4}, 
{{-1.5, 0.75}, VertexLabel -> e5}
}

how do I do that?  at least how do map those vertices to those edge
sets generated by the enueration above so that i canuse in ShowGraph
command?

thanks all very much in adavnce


sean


  • Prev by Date: Re: Distinguishable From 1.0
  • Next by Date: Re: Re: Help: shift+enter doesn't give me any output suddenly!
  • Previous by thread: RE: Re: Matrix Expansion question to Mathgroup
  • Next by thread: Re: undocumented function StringQ