196k views
2 votes
For the following super increasing sequence

4, 8, 15, 29, 61, 125, 255, 510

Determine whether the given value of t can be written as a sum of a subset of the sequence. For each value of t for which there is a solution enter the sequence x1x2x3...xn of zeros and ones encoded in the number. If the sum t cannot be written as a subset of the sequence enter NA.

a) t = 335

b) t = 725

c) t = 970

d) t = 913

What is the answers for A,B,C,D

1 Answer

6 votes

Final answer:

For the given super increasing sequence, we determine whether the given values of t can be written as a sum of a subset of the sequence. If there is a solution, we encode the subset as a sequence of zeros and ones. If there is no solution, we enter NA.

Step-by-step explanation:

To determine whether a given value of t can be written as a sum of a subset of the super increasing sequence, we can use the approach of generating all the subsets of the sequence and checking their sum. If the sum is equal to t, we can encode the subset as a sequence of zeros and ones, with each zero indicating that the element is not included and each one indicating that the element is included. If the sum cannot be written as a subset of the sequence, we enter NA.

a) For t = 335, there is a solution: 1 1 1 1 1 0 0 0.

b) For t = 725, there is a solution: 1 0 1 1 0 0 0 0.

c) For t = 970, there is no solution. NA.

d) For t = 913, there is no solution. NA.

User Magnus Gladh
by
8.3k points