Hi Can you please assist me in understanding how to fill in this table. Thanks T
ID: 3716746 • Letter: H
Question
Hi
Can you please assist me in understanding how to fill in this table.
Thanks
The Type A question is: Given that the element is in the 3rd row and 4th column, what is its position in the linear sequence? Answer: seg pos= (row num-1) × num cols+ col num (3-1x 5 +4 14 So the element is the 14th in the linear sequence (which is obviously true.) The Type B question is: Given that the element is in the 14th position in the linear sequence what are its row and column numbers in the array? Answer row num CLG(seq pos num cols) - CLG(14/5) CLG(2.8)3 MOD(seq pos -1, num cols) + col num - MOD(14-1, 5) +1 MOD(13, 5) + 1 3 1 4 So the element is in the 3rd row and 4th column. Practice examples: Fill in the blanks in the table Calculate the missing entries for the seven exercises in the table belovw (Give your answers in a table like the one below.) Row number Column number Sequence sition Number of columns in arraw 36 27 4 28 30 45 24 98 300 85 V1 V11Explanation / Answer
--------------------------------------------------------------------------------------------------------------------------------------------------------
(i) seq_number= (row_num-1)*num_cols+col_num
seq_number= (5-1)*14+11= 67
(ii) seq_number= (row_num-1)*num_cols+col_num
seq_number= (1-1)*36+27= 27
(iii) seq_number= (row_num-1)*num_cols+col_num
seq_number= (4-1)*9+8= 35
(iv) seq_number= (row_num-1)*num_cols+col_num
seq_number= (17-1)*28+11= 459
---------------------------------------------------------------------------------------------------------------------------------------------------
(v) row_num =CLG(seq_pos/num_cols)
row_num = CLG(98/30) =CLG(3.26) =4
col_num=MOD(seq_pos-1,num_cols)+1
=MOD(98-1,30)+1
= MOD(97,30) +1
=7+1 =8
----------------------------------------------------------------------------------------------------------------------------------------------------
(vi) row_num =CLG(seq_pos/num_cols)
row_num = CLG(300/45) =CLG(6.66) =7
col_num=MOD(seq_pos-1,num_cols)+1
=MOD(300-1,45)+1
= MOD(299,45) +1
=29+1 =30
---------------------------------------------------------------------------------------------------------------------------------------------------
(vii) row_num =CLG(seq_pos/num_cols)
row_num = CLG(85/24) =CLG(3.54) =4
col_num=MOD(seq_pos-1,num_cols)+1
=MOD(85-1,24)+1
= MOD(84,24) +1
=12+1 =13
No of columns in array Row number Column number Sequence number 14 5 11 67 36 1 27 27 9 4 8 35 28 17 11 459 30 4 8 98 45 7 30 300 24 4 13 85