I am learning Mathematica because I love it. I also love solving puzzles so I think it would be a nice way to learn Mathematica through puzzles. This is first puzzle in series I intend to solve.
So here is the problem.
- People = 20
- Food = 20
- A man eats 2 units
- A woman consumes 1.5 units
- A baby can take only .5 units of food
- Combined number of men women and babies must equal 20
- All units of food must be consumed.
There are four possible solutions, I would like to learn
shortest syntax to get a random solution
syntax/program which gives all possible solution