RE: permutations?
- To: mathgroup at smc.vnet.net
- Subject: [mg46477] RE: [mg46466] permutations?
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 20 Feb 2004 00:29:21 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Sean, One method... Needs["DiscreteMath`Combinatorica`"] alist = {a, b, c, d, e}; blist = {ap, bp, cp, dp, ep}; pos = Partition[Range[5], 1]; subsets = Flatten[Table[KSubsets[pos, i], {i, 0, 5}], 1]; Table[Inner[If[#1 === Null, #2, #1] &, ReplacePart[alist, Null, Part[subsets, i]], blist, List], {i, 1, Length[subsets]}] And two complaints about Mathematica. 1) Why doesn't the prime character, esc ' esc, display in a raised position? It displays sitting on the floor! Primed symbols are common in texts, but the Mathematica character is useless. 2) Combinatorica needs MUCH better Help. There should be an individual Help page for each command, with a groupings of related commands in the panels and cross links in the Help pages. This package is too large and too important to have a single notebook Help. And don't tell me about the book. I have the old book and am going to get the new book but the book is no substitute for a good Help. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: sean kim [mailto:sean_incali at yahoo.com] To: mathgroup at smc.vnet.net I think this is a permutation problem. but i'm not sure. do correct me. let's say you have... a, b, c, d, e and... a', b', c', d', e' what are the possible combination will go from a( or a' ) to e ( or e') so that you get... {a b c d e}, {a b c d e'}, {a b c d' e}, {a b c d' e'}, {a b c' d e}, { a b c' d' e}, {a, b, c' d e'}, {a, b, c' d' e'}....so on I have 32 from doing it the brute force way by hand. how do i do that with Mathematica? I don't think it's fully connected graph. because a only connects to downstream b or b' also... what kinda problem is described above? Thank you all very much in advance for any thoughts and comments. sean