Question: ( b ) Evaluate the following by hand, showing all your working: ( ( 5 6 ) 1 5 + 3 5 ) 2 mod

(b) Evaluate the following by hand, showing all your working:
((56)15+35)2mod29
(c) The list (xi)1..6=(P,A,C,I,N,G) is to be sorted using Selection sort. The
sorting is to be achieved by progressively modifying an index function , rather
than by shuffling members of the list itself. So initially (xi)1..6=(x(i))1..6 where
(i)=i for i=1,dots,6, and when sorting is complete is sufficiently changed so
that (x(i))1.66 is in alphabetical order. Complete the following so that it repre-
sents the final index function.
([1,2,3,4,5,6])larr Write in this line
(d) The list
(7,1,3,4,6,8,5,5)
is to be sorted into non-decreasing order using Merge sort (for reference, a de-
scription of the algorithm is given on the next page). A comparison operation is
performed when two elements in a list are compared to see which is bigger. How
many comparison operations will be performed during the sorting process?
( b ) Evaluate the following by hand, showing all

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!