optimal parsing using dynamic programming

  • Status: Closed
  • Prize: $25
  • Entries Received: 2
  • Winner: commaster90

Contest Brief

I need the program to get a list of numbers and make the optimal parse tree as following.
$ ./myprogram 10 10 11 12 5 3 16 17 19 4 8
((x(x(xx)))((xx)(x(xx)))) 5562

5562 is scalar multipication.
the first 10 is the number of integer parameter.
10 11 12 5 3 16 17 19 4 8 are the numbers passing to the programming to build the tree.
I also need comments to understand how its been coded. thank you

Recommended Skills

Employer Feedback

“Communication with him is very good and easy.”

Profile image liefde2010, Canada.

Top entries from this contest

View More Entries

Public Clarification Board

  • ingund
    ingund
    • 4 years ago

    let's give another try .

    • 4 years ago
  • sakhawat2
    sakhawat2
    • 4 years ago

    10 10 11 12 5 3 16 17 19 4 8

    From there, the integer inputs are:
    10 11 12 5 3 16 17 19 4 8
    There are 10 ints here.

    The parse formula is:
    ((x(x(xx)))((xx)(x(xx))))
    9 ints. Which 9 do we choose?

    • 4 years ago
    1. liefde2010
      Contest Holder
      • 4 years ago

      Its based on the tree. U can see an example below.
      https://drive.google.com/file/d/11BIlULcbk5HnAb93y1cnNbLA1R89MVu4/view?usp=drivesdk

      • 4 years ago
  • StrongDecs
    StrongDecs
    • 4 years ago

    #increaseprize

    • 4 years ago
    1. liefde2010
      Contest Holder
      • 4 years ago

      How much?
      How long does it take?

      • 4 years ago
    2. StrongDecs
      StrongDecs
      • 4 years ago

      I could describe my experience over similar tree development in the private messages, let's message to discuss the details

      • 4 years ago
  • ingund
    ingund
    • 4 years ago

    Hi , I would like to help you but I can't understand what is the formula:

    $ ./myprogram 10 10 11 12 5 3 16 17 19 4 8

    ((x(x(xx)))((xx)(x(xx)))) 5562
    #1: ((11*(12*(5*3)))*((16*17)(19*(4*8)))) * 5562
    #2: ((11(12(53)))((1617)(19(48)))) * 5562

    how should be output?

    Kind Regards

    • 4 years ago
    1. liefde2010
      Contest Holder
      • 4 years ago

      ((x(x(xx)))((xx)(x(xx)))) 5562
      This is the result the program should print

      • 4 years ago
    2. liefde2010
      Contest Holder
      • 4 years ago

      So ((x(x(xx)))((xx)(x(xx)))) is the way of parsing.
      and 5562 is scalar multipication.

      • 4 years ago

Show more comments

How to get started with contests

  • Post your contest

    Post Your Contest Quick and easy

  • Get tons of entries

    Get Tons of Entries From around the world

  • Award the best entry

    Award the best entry Download the files - Easy!

Post a Contest Now or Join us Today!