Блог пользователя amsen

Автор amsen, история, 9 лет назад, По-английски

How to become strong and expert in DP ?

can any body tell me some problems and some links to read ?

thanks all!

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

DP for Dynapic Programming?

»
9 лет назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

I suggest to you reading this article with practicing examples mentioned in it.

https://www.topcoder.com/community/data-science/data-science-tutorials/dynamic-programming-from-novice-to-advanced/

»
9 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

I'd suggest you reading Nicolaus Wirt — "Algorithms and Data Structures". Chapter "Dynamic Programming"

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Practice makes perfect.

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

The core of DP is to turn the problem into a formula, to generate an new algorithm. It is likely that 100 DP problems have 101 formulas(by my friend). So actually, the only way to improve DP skill is to practice more and AC different kind of DP.

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    could you please say me some problems in any online judges?

    • »
      »
      »
      9 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      (⊙ˍ⊙)I'm a Chinese ACMer, I mainly solve some problems on Chinese OJ. You can find many DP problems through the tag in 'Problem Set' on CF. I learn my DP skill on this page problem ID 1003(largest sub-string) 1081(largest sub-rectangle) 1159(longest common sub-sequence) 1025(longest increasing sub-sequence) 2602 1059(two package problem) is some primary problem. If you are satisfied with the problem, you may solve other problem on the list, just skip ones with Chinese description. It may be hard for you to find the solution as you can't read others' solution on HduOJ. HUST is another big OJ in China, you may register an account and search the solution in 'STATUS' (OJ 'HDU' 'Accepted'), you can see the code of solution by clicking green ones below language.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +4 Проголосовать: не нравится

      Any tips to improve everything including dp?.. except practice what else??

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        except practice what else??

        Get a brain transplant (if that is even possible). That's pretty much all you need. My condolences that God didn't give you a brain that is as good as those of red coders. Lmao.

        On a more serious note, please get a life. Not everyone is suited for CP.

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Just with one thing. "Practice"

There are lots of problem about DP on codeforces , LightOJ or other websites.

You can start with easiest one. Then you will see you are improving day by day.

»
9 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

solve the problems in these answers on Quora

when you are thinking about the solution try to solve it with recursion and memorization,don't submit the recursion/memorization solution,after your solution is right you can easily convert it to DP.

Don't forget to practice a lot ,because better results needs hard working :)

I'm telling you to do this because this is the strategy to start DP(because DP is an optimization for recursion),sorry for my bad English.

  • »
    »
    9 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Is there any resource how to convert memoization to DP?

    • »
      »
      »
      9 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Just think about what dp results you need to construct some larger dp result. In recursion, you would say something like:

      dp(k)= dp(k-1) + dp(k-2)
      

      If you think about program flow, once the function dp hits its base cases, then it starts returning answers to increasingly larger problems. So you know later indices depend only on earlier ones, so you iterate from earliest to latest indices in your recursion.

    • »
      »
      »
      9 лет назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      Try reading this...

      Read some solutions in recursion and DP (the solution is for the same problem) and you'll understand... It may be hard in the beginning...,but don't stop practicing :)

      sorry for my bad English

»
5 лет назад, # |
  Проголосовать: нравится +41 Проголосовать: не нравится

Now you are master can u tell how u did it??

»
3 года назад, # |
  Проголосовать: нравится -79 Проголосовать: не нравится

I can teach you lessons on dp. But it will cost 100$ per lesson. Believe me you'll be the best in dp.You maybe will beat tourist after my lessons.

»
3 года назад, # |
  Проголосовать: нравится +35 Проголосовать: не нравится

Since necroposting this became the new thing, i just want to point out how cool it is to see people blogs of people asking relatively simple stuff that became orange/red a couple of years later