Uploaded by Mr Jones

Tutorial 4 (1)

advertisement
Tutorial 4
1. Using Edit distance, calculate the similarity between each of the 2 strings below:
a. bear and beat
b. fast and cats (use matrix to show your working)
c. fake and mark
d. through and thought
e. cat and dog
2. Using LCS, calculate the similarity between the following:
a. misspelled to misinterpreted
b. filosofy and philosophy
c. S = ABAZDC and T = BACBAD
d. Thorough and thought
3. Create the regex for the following terms:
a. date in the format of dd/mm/yyyy or dd-mm-yyyy
b. full name e.g siti binti muhammad, where the first name and last name can be more
than 1 word e.g. nurul nazihah binti haji awang majid.
c. email address.
Download