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
Restrictions;
- 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
You will find getting solutions to questions which have less number of equations than variables (which make the equations) is not easy. Because you will have to hit and try to get correct answer
Anyway, if you REALLY KNOW that there is a way to solve such kind of puzzles/questions then do tell me I am always eager to learn.
– Jawad_Mansoor Feb 25 '17 at 17:13So, what is direct method?
– Jawad_Mansoor Feb 26 '17 at 08:12