Question 189Asked in DSSSB TGT Computer Science, 24 Jun 2023, Shift 3 (4:30 PM)

What are the solutions for the following sum of a subset problem?

What are the solutions for the following sum of a subset problem? w[1:5]={2,7,8,9,15}; Sum required = 17 1 means the item is included. 0 means the item is excluded.
  1. A11100; 10101; 00110
  2. B11100; 10001; 00110
  3. C11000; 10001; 00110
  4. D11100; 10101; 00111
Show answerHide answer

Correct answer: (B) 11100; 10001; 00110

Explanation

The subsets summing to 17 are 2 + 7 + 8 (11100), 2 + 15 (10001) and 8 + 9 (00110).

From DSSSB TGT Computer Science PYQ, 24 Jun 2023, Shift 3 (4:30 PM)

This is question 189 of DSSSB TGT Computer Science PYQ, 24 Jun 2023, Shift 3 (4:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.