Homework Assignment 6, due April 6th

Write Java program that uses backward induction algorithm to find pay-off in subgame perfect equilibrium of a given centipede game with 2n steps. 

 Centipede Game with 2n steps

Centipede Game with 2n steps

The input file for your program will contain two lines. The first line will contain positive integer n. The second line will list 4n+2 integer values representing pay-offs: a1 b1 a2 b2 a3 b3 .... separated by empty spaces. For example, if your program is given input

1 2 3 4 15 5 7 8 9 10

then it should output into the terminal: 15, 5.

Use submission instructions posted earlier.