Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(1) (15 pts) In this problem, we are interested in strings of length 10 where ea

ID: 3605706 • Letter: #

Question

(1) (15 pts) In this problem, we are interested in strings of length 10 where each symbol is 1, 2, or 3. For example 2213231323 is one such string. (a) How many such strings are there? (b) In how many such strings either 1 is absent or 2 is absent ? c) How many such strings are palindromes? (2) (30 pts) In this problem, we are dealing with two dimensional arrays (or matrices) that have 20 rows and 20 columns. Further, each entry in the array is 1, 2,or 3. Assume that the rows as well as columns are indexed by 1 through 20. (a) How many different such arrays are there? (b) How many different such arrays are there in which 1 is absent from the top row? (hint: Build row by row.) from the top row or 2 is absent from the top row? (d) How many different such arrays are there in which every row is a palin (e) How many different such arrays are there in which every row is a palin- (f) How many different such arrays are there in which exactly one 1 ap- drome? drome and also every column is a palindrome? pears along the main diagonal (ie. entries with indices [1] [1], [2][2], ··· [20] 20]) and there are no other restrictions?

Explanation / Answer

Solution:

1 is solved, please repost the 2.

1)

Number of such strings are= 3^10= 59049, if the repetition is allowed, consider this as 10 boxes where we can put the given 3 digits,

suppose if we have 1 box then 3 strings are allowed, i.e. 1, 2, 3

if we have 2 boxes then 9 strings are allowed 11, 12, 13, 21, 22, 23, 31, 32, 33,

b)

If 1 is absent then the value will be 2^10 or if 2 is absent then also 2^10

total= 2* 2^10= 2^11

c)

A string is a palindrome when its reversal is also the same

like 111, 121, 131, 222, ...

So if the string is a palindrome the first and the last place needs to be same symbol and middle can be anything

if the length is even

number of strings of 3-ary number is possible= 3^(n/2)= 3(10/2)= 3^5

= 243.

Please rate and upvote..