Given strings x = “Deep”, y = “Learning” and an empty string ε, the following are some operations undertaken on the strings: i) Lengths of x, y, ε are |x| = |“Deep”| = 4, |y| = |“Learning”| = 8 and |ε| = 0. ii) The concatenation operation applied over x, y and ε as follows yields the resulting strings and results: x + y = “DeepLearning” y + x = “LearningDeep” x + ε = “Deep” ε + y = “Learning” |x + y| = 12 | ε + y| = 8 iii) “Learn” is a prefix of string y, and “Deep” is a prefix of string x + y. iv) “earning” is a suffix of string y, and “Learning” is a suffix of string x + y. v) “earn” is a substring of string y. vi) x = y is false; x = x+ ε is true. vii) “Lenin” is a subsequence of string y. make a program using given data:
Given strings x = “Deep”, y = “Learning” and an empty string ε, the following are some operations undertaken on the strings: i) Lengths of x, y, ε are |x| = |“Deep”| = 4, |y| = |“Learning”| = 8 and |ε| = 0. ii) The concatenation operation applied over x, y and ε as follows yields the resulting strings and results: x + y = “DeepLearning” y + x = “LearningDeep” x + ε = “Deep” ε + y = “Learning” |x + y| = 12 | ε + y| = 8 iii) “Learn” is a prefix of string y, and “Deep” is a prefix of string x + y. iv) “earning” is a suffix of string y, and “Learning” is a suffix of string x + y. v) “earn” is a substring of string y. vi) x = y is false; x = x+ ε is true. vii) “Lenin” is a subsequence of string y.
make a program using given data:
Step by step
Solved in 3 steps with 1 images