# optimal parsing using dynamic programming

• Status: Closed
• Præmier: \$25
• Modtagne indlæg: 2
• Vinder: commaster90

## Konkurrence Instruktioner

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

Winner

## Arbejdsgiverfeedback

“Communication with him is very good and easy.”

## Offentlig Præciserings Opslagstavle

• ###### ingund
• 3 uger siden

let's give another try .

• 3 uger siden
• ###### sakhawat2
• 3 uger siden

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?

• 3 uger siden
1. Konkurrenceafholder
• 3 uger siden

Its based on the tree. U can see an example below.

• 3 uger siden
• ###### StrongDecs
• 3 uger siden

#increaseprize

• 3 uger siden
1. Konkurrenceafholder
• 3 uger siden

How much?
How long does it take?

• 3 uger siden
2. ###### StrongDecs
• 3 uger siden

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

• 3 uger siden
• ###### ingund
• 3 uger siden

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

• 3 uger siden
1. Konkurrenceafholder
• 3 uger siden

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

• 3 uger siden
2. Konkurrenceafholder
• 3 uger siden

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

• 3 uger siden

## Sådan kommer du i gang med konkurrencer

• Opret din konkurrence Hurtigt og nemt

• Få tonsvis af indlæg Fra hele verden