Commit 7d5e947e authored by Frontull Samuel's avatar Frontull Samuel
Browse files

added two difficult pcp problems

parent 16bf96f9
......@@ -128,6 +128,9 @@ ba = LCStr $ \a b x -> b (a x)
bb :: LCStr
bb = LCStr $ \a b x -> b (b x)
baa :: LCStr
baa = LCStr $ \a b x -> b (a (a x))
bba :: LCStr
bba = LCStr $ \a b x -> b (b (a x))
......@@ -244,6 +247,14 @@ problem_2 = cons (pair a abbb) (cons (pair bb b) nil)
problem_3 :: ListStrPairs -- undecidable
problem_3 = cons (pair bba b) (cons (pair b ab) (cons (pair a bba) nil))
-- [(baa, b), (a, baa), (b, a)]
problem_4 :: ListStrPairs -- has a solution of length 74
problem_4 = cons (pair baa b) (cons (pair a baa) (cons (pair b a) nil))
-- [(ab, a), (ab, bba), (a, baa), (baa, ba)]
problem_5 :: ListStrPairs -- has a solution of length 76
problem_5 = cons (pair ab a) (cons (pair ab bba) (cons (pair a baa) (cons (pair baa ba) nil)))
-- PARSE LC ENCODINGS TO STRINGS
-- string encoding to String
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment