Reducing a set of non-unique elements via transformations

Posted by Andrey Fedorov on Stack Overflow See other posts from Stack Overflow or by Andrey Fedorov
Published on 2010-05-31T18:51:41Z Indexed on 2010/05/31 18:53 UTC
Read the original article Hit count: 244

Filed under:
|

I have:

1) a "starting set" of not-necessarily-unique elements, e.x. { x, y, z, z },

2) a set of transformations, e.x. (x,z) => y, (z,z) => z, x => z, y => x, and

3) a "target set" that I am trying to get by applying transformations to the starting set, e.x. { z }.

I'd like to find an algorithm to generate the (possibly infinite) possible applications of the transformations to the starting set that result in the target set. For example:

{ x, y, z, z }, y => x
{ x, x, z, z }, x => z
{ z, x, z, z }, x => z
{ z, z, z, z }, (z, z) => z
{ z, z, z }, (z, z) => z
{ z, z }, (z, z) => z
{ z }

This sounds like something that's probably an existing (named) problem, but I don't recognize it. Can anyone help me track it down, or suggest further reading on something similar?

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about algorithm-design