# Algorithms on Strings Quiz

Enroll Now

## Week- 1

### Programming Assignment: Programming Assignment 1

Download

[Attention]: To get any assignment File you must need to YouTube and after that fill up this google form]

## Week- 2

#### Programming Assignment: Programming Assignment 2

Download

[Attention]: To get any assignment File you must need to YouTube and after that fill up this google form]

## Week- 3

### Exact Pattern Matching

1.
Question 1
For the Brute Force algorithm (from this lecture) matching some Pattern against the Text AAAAAAAAATAAAAAAAAAT, which of the Patterns below will require the maximum number of comparisons throughout the whole algorithm?

1 point

AAAAAAAA

TTTTTTTT

AATAAATA

=================================================

2.
Question 2
You’ve just tried to match the Pattern AACTAACATAACTAACAT against some Text starting from position 3 and you know that AACTAACAACTAAC is the longest common prefix of the Pattern and the suffix of the Text starting in position 3:

{\tt ???AACTAAC?????????????\\\phantom{?}\phantom{?}\phantom{?}AACTAACAT}???AACTAAC????????????????AACTAACAT

What is the maximum amount by which you can shift the Pattern to the right without missing an occurrence of the Pattern in the Text?

1 point

44

33

77

1

=================================================

3.
Question 3
What are the values of the prefix function for the string ACATACATACACAACATACATACACA?

1 point

[0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 2, 3]

[0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

[0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1]

=================================================

4.
Question 4
What is the total number of times that the condition of the while loop will be checked in this pseudocode for ComputePrefixFunctionComputePrefixFunction if we call it for the string ACATACATACACAACATACATACACA?

1 point

1515

1212

1414

1313

## Week- 4

### Suffix Array Construction

1.
Question 1
For the string S=AACGATAGCGGTAGA\$, what will be the contents of array orderorder after SortCharactersSortCharacters?

1 point

[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]

[15,14,0,1,12,6,4,2,8,13,3,7,9,10,11,5]

[15,0,1,4,6,12,14,2,8,3,7,9,10,13,5,11]

[0,1,4,6,12,14,2,8,3,7,9,10,13,5,11,15]

=================================================

2.
Question 2
For string S=AACGATAGCGGTAGA\$, what will be the contents of the array classclass after ComputeCharClassesComputeCharClasses?

1 point

[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

[1,1,2,3,1,4,1,3,2,3,3,4,1,3,1,0]

[0,0,1,2,0,3,0,2,1,2,2,3,0,2,0,4]

[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]

=================================================

3.
Question 3
For string S=AACGATAGCGGTAGA\$, what will be the order of cyclic shifts of length 22 ordered by the second character in ascending order?

1 point

A\$,\$A,AA,GA,TA,TA,GA,AC,GC,CG,AG,CG,GG,AG,AT,GT

\$A,AA,GA,TA,TA,GA,AC,GC,CG,AG,CG,GG,AG,AT,GT,A\$

\$A,AA,AC,AT,AG,AG,A\$,CG,CG,GA,GC,GG,GT,GA,TA,TA

\$A,A\$,AA,AC,AG,AG,AT,CG,CG,GA,GA,GC,GG,GT,TA,TA

=================================================

4.
Question 4
For string S=AACGATAGCGGTAGA\$, what will be the order of cyclic shifts of length 22 after SortDoubledSortDoubled with L = 1L=1?

1 point

[15,14,0,1,6,12,4,2,8,3,13,7,9,10,5,11]

[14,0,1,6,12,4,2,8,3,13,7,9,10,5,11,15]

[15,14,0,1,12,6,4,2,8,13,3,7,9,10,11,5]

=================================================

5.
Question 5
For string S=AACGATAGCGGTAGA\$, what will be the contents of the array classclass for the cyclic shifts of length 22 after UpdateClassesUpdateClasses?

1 point

[0,1,2,3,4,5,6,7,2,8,9,5,6,3,10,11]

[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

[2,3,6,7,5,11,4,8,6,9,10,11,4,7,1,0]

[2,3,7,9,6,14,4,11,8,12,13,15,5,10,1,0]

=================================================

6.
Question 6
For string S=AACGATAGCGGTAGA\$, what will be the suffix array?

1 point

[15,14,0,1,12,6,4,2,8,13,3,7,9,10,11,5]

[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]

[15,0,1,4,6,12,14,2,8,3,7,9,10,13,5,11]

[1,1,2,3,1,4,1,3,2,3,3,4,1,3,1,0]

### Programming Assignment: Programming Assignment 3

Download

[Attention]: To get any assignment File you must need to YouTube and after that fill up this google form]

Other Questions Of This Category