A tuple, unlike a multiset, has an order: (1,2,1) is different than (1,1,2). Define the sum of a tuple as the sum of all the elements in that tuple. For instance, the sum of (1,1,2) is 4. Using the elements of S, how many tuples of size 4 can be made that sum to 5? For example,(1,2,1,1), (2,0,0,3) and (0,3,0,2) are such tuples.
S = {0, 1, 2, 3, 4}
total 52 tuple possible.
(4 1 0 0 ),(4 0 1 0),(4 0 0 1),(1 4 0 0 ),(0 4 1 0),(0 4 0 1),(1 0 4 0),(0 1 4 0),(0 0 4 1),(1 0 0 4),(0 1 0 4),(0 0 1 4)
(3 2 0 0) (3 0 2 0) (3 0 0 2) (2 3 0 0)(0 3 2 0) (0 3 0 2 ) (2 0 3 0) (0 2 3 0)(0 0 3 2) (2 0 0 3)(0 2 0 3)(0 0 2 3)
(2 2 1 0)(2 2 0 1)(2 1 2 0)(2 1 0 2)(2 0 1 2)(2 0 2 1)(1 2 2 0)(1 2 0 2)(1 0 2 2)(0 2 2 1)(0 2 1 2)(0 1 2 2)
(1 1 1 2)(1 1 2 1)(1 2 1 1 )(2 1 1 1)
(3 1 1 0)(3 1 0 1)(3 0 1 1)(1 3 0 1)(1 3 1 0)(0 3 1 1)(0 1 3 1)(1 0 3 1)(1 1 3 0)(0 1 1 3)(1 0 1 3)(1 1 0 3)
Get Answers For Free
Most questions answered within 1 hours.