Problem 44456. Sum of combinations
Input: X = 40, Y = [40 20 10 4]
Output: Z = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 0 1 8; 0 0 0 10]
Description:
- Z(1,:)*Y' >=40; (40*1+0+0+0)=40
- Z(4,:)*Y' >=40; (0+20*1+10*1+4*3)>40 (but minimum), and so on...
- Z should not contain any fraction.
- Z should contain all possible combinations.
- Input Y is always sorted
Solution Stats
Problem Comments
-
1 Comment
Alfonso Nieto-Castanon
on 7 Mar 2019
please clarify the problem statement, in particular the "but minimum" bit seems somewhat puzzling...
Solution Comments
Show commentsGroup

Physics
- 18 Problems
- 13 Finishers
- Mechanics 1
- jogging?
- Bouncing disk
- Energy of an object
- Kepler's Equation
- Mechanical Advantage of a Gear Train
- What gear ratio does the cyclist need?
- Bernoulli's Equation
- Juggling
- Find the jerk
- Determine if a four bar mechanism is of Grashof type
- center of mass
- Center of mass
- Elastic Collision 001: 1-D
- Calculate compression ratio of engine
- Distance of the centroids of the balls
- Calculate the height of an object dropped from the sky
- How Far Can You Throw Something?
Problem Recent Solvers17
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!