I would be grateful to anyone who could help me with this assignment.
You have some number of recipes. Every recipe contains a list of ingredients and its result.
For example:
Recipes:
4 Wood=6 Stick2 Stick+2 Stone=1 Axe
Then you have list of items, that you need to make out of these recipes.
For example:
6 Axe
The goal is to print what ingredients do you need, to make the desired item.
For example:
For 6 Axe you would need 12 Stick + 12 Stone (Recipe 2). And you can make 12 Stick by using 8 Wood (Recipe 1).
So the output would be:
12 Stone
8 Wood
How can you do all of this? Sorry, I'm still learning and not experienced that much.
I want to find out more about solving problem like this.
What's the name of the algorithm for this? Do you have any links to forums about this?
I appreciate any help! Thank you in advance!