Re: String substitution system
- To: mathgroup at smc.vnet.net
- Subject: [mg97214] Re: String substitution system
- From: Raffy <raffy at mac.com>
- Date: Sun, 8 Mar 2009 05:51:55 -0500 (EST)
- References: <got89g$gge$1@smc.vnet.net>
vAlphabet = {"A", "B", "C", "D"}; vWords = Map[ StringJoin, Join @@ Table[Tuples[vAlphabet, i], {i, 7}] ]; vRules = {"CC" -> "C", "DD" -> "D", "CA" -> "C", "AC" -> "C", "DB" -> "D", "BD" -> "D", "CDC" -> "C", "DCD" -> "D", "CBC" -> "C", "DAD" -> "D", "ABC" -> "DC", "CBA" -> "CD", "BAD" -> "CD", "DAB" -> "DC", "BAB" -> "ABA"}; FixedPoint[StringReplace[#, vRules] &, vWords]