creativity - describe an example of text of length and pattern of length such that force the brute-force pattern-matching algorithm achieves running time that is (nmc- adapt the brute-force pattern-matching algorithm in order to implement functionrfind brute( , )that returns the index at which the rightmost occurrence of pattern within text if any - redo the previous problemadapting the boyer-moore pattern-matching algorithm appropriately to implement function rfind boyer moore( ,pc- redo exercise - adapting the knuth-morris-pratt pattern-matching algorithm appropriately to implement function rfind kmp( ,pc- the count method of python' str class reports the maximum number of nonoverlapping occurrences of pattern within string for examplethe call abababa countaba returns (not adapt the brute-force pattern-matching algorithm to implement functioncount brute( , )with similar outcome - redo the previous problemadapting the boyer-moore pattern-matching algorithm in order to implement function count boyer moore( ,pc- redo exercise - adapting the knuth-morris-pratt pattern-matching algorithm appropriately to implement function count kmp( ,pc- give justification of why the compute kmp fail function (code fragment runs in (mtime on pattern of length - let be text of length nand let be pattern of length describe an ( + )-time method for finding the longest prefix of that is substring of - say that pattern of length is circular substring of text of length if is (normalsubstring of or if is equal to the concatenation of suffix of and prefix of that isif there is an index < msuch that [ nt [ kgive an ( )-time algorithm for determining whether is circular substring of - the knuth-morris-pratt pattern-matching algorithm can be modified to run faster on binary strings by redefining the failure function asf (kthe largest such that [ jp is suffix of [ ]where  denotes the complement of the jth bit of describe how to modify the kmp algorithm to be able to take advantage of this new failure function and also give method for computing this failure function show that this method makes at most comparisons between the text and the pattern (as opposed to the comparisons needed by the standard kmp algorithm given in section