Rype
Rype
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
I constantly keep getting back to the beginning, deciding to use memoization, recurrence? i hate having to use a specific thing. I tried a lot of things but in the end with change of parameters answers were wrong. I think i will give up, thank you both for the help.
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
I doubt bruteforce is what i should do though because with one decision of not storing/storing a car entire thing changes so the previous values are useless that is the entire point of dynamic programming.
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
what would the array be for bruteforce? dp[n] or dp[totalDemand] i'm confused about DP still :/
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
nope, can't bruteforce when there's storage costs that carry over from previous months
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
ok thank you i will try it with recursion
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
but i can't see it so simple, i don't think it can be formulated by a few comparisons/ 'cost this way is cheaper for this month so we should choose this one'.
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
yes
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
i mean i kinda get the knapsack problem using DP but the array indexes are weight and item but in my case demand varies so i'm confused as to what the indexes should represent. month and demand? and how does storage fit into the recursion?
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
dynamical programming has to use an array no?
22 replies
CC#
Created by Rype on 4/22/2023 in #help
❔ Dynamical Programming to find min cost of supplying cars for 'n' months.
I tried to change the knapsack problem code to fit this but this one is more complex, i'm stuck on DP array to start :/
22 replies