Perform a trace on the following sequence 3 9 11 2 4 6 8 usi
Perform a trace on the following sequence: {3, 9, 11, 2, 4, 6, 8} using your algorithm.
I am very confused by this.
Solution
for solving this problem you just need to use the some algorithm that you have ever seen in the class
for example this are some algorithms covered in course of classes like math, statistics, probability
Karatsuba-Offman.
Mergesort
Linear-time deterministic selection
Expected-linear-time selection
you need to find the sequence of the data
that means that you need to do an algorithm, with this algorithm you need to find the succession
all the step that you use for finding the succesion!
STEPS
the succesion star with 3 this will be our first number
the second number is 9... for finding a relation between the first and second you can multiply the first number by the same number
3*3 = 9
for the 3 number that is 11
you can add +2 to the second number (9) 9+2=11
for the 4 number that is 2
you can subtract the 2 number to the 3 number like this
11-9 = 2
for the 5 number always using the previous number
add +2
2+2 = 4
for the 6 number that is 6
4+2=6
for the 7 number that is 8
6+2= 8

