It's been 1 week since I started trying to find a solution to this problem, and I ended up reading about CYK algorithm, but I can't understand how it would help me.
So I have a certain string from which I start, let's call it startString.
And I have a certain string to which I want to get by applying the later-explained rules, called stopString.
-----------
Now let's take an example:
startString = "A"
stopString = "2403"
This example's rules are the following:
A->BC
B->D
B->ED
C->F
C->FB
E->0
D->2
D->3
F->4
E->1
The program will take the above input and output the minimal list of transformations applied to get from startString to stopString, which COULD BE the following:
A->BC, B->D, C->FB, B->ED, D->2, F->4, E->0, D->3
-----------
My question is: How does CYK help me here? How do I obtain "2403" from "A" using CYK? Is there any simpler solution to this problem?