This assignment is due at the **beginning** of
the lecture on Wednesday, September 24th.

You may work with at most one other person on this assignment. If you work with a partner, please submit just one solution with both of your names on it.

The purpose of this assignment is to give you practice solving problems in Common Lisp.

[2]> (solve-problem '() 10 t) There are 0 possible solutions to this problem. NIL [3]> (solve-problem '(1) 10 t) (1 1 1 1 1 1 1 1 1 1) There are 1 possible solutions to this problem. NIL [4]> (solve-problem '(1 2) 10 t) (1 1 1 1 1 1 1 1 1 1) (1 1 1 1 1 1 1 1 2) (1 1 1 1 1 1 2 2) (1 1 1 1 2 2 2) (1 1 2 2 2 2) (2 2 2 2 2) There are 6 possible solutions to this problem. NIL [5]> (solve-problem '(1 2 3) 10 t) (1 1 1 1 1 1 1 1 1 1) (1 1 1 1 1 1 1 1 2) (1 1 1 1 1 1 1 3) (1 1 1 1 1 1 2 2) (1 1 1 1 1 2 3) (1 1 1 1 2 2 2) (1 1 1 1 3 3) (1 1 1 2 2 3) (1 1 2 2 2 2) (1 1 2 3 3) (1 2 2 2 3) (1 3 3 3) (2 2 2 2 2) (2 2 3 3) There are 14 possible solutions to this problem. NIL [6]> (solve-problem '(1 2 3) 10) There are 14 possible solutions to this problem. NIL [7]> (solve-problem '(1 2 3) 10 nil) There are 14 possible solutions to this problem. NIL

Define a function named *solve-problem*
that has two required parameters and one optional one.
The first required parameter is a list consisting of one
or more positive integers in ascending order. The
second requirement parameter is a target value. The purpose
of the function is to determine the number of unique ways
that combinations of the first required parameter can be made
to add up to equal the second required parameter. For example,
if the first parameter is '(1 2) and the second parameter is 4,
there are 3 combinations: (1 1 1 1), (1 1 2), and (2 2). Notice that
(1 1 2), (1 2 1), and (2 1 1) are all considered to be the same solution!

The optional parameter may take on either the value t or nil and should default to nil. If this parameter is t, each individual solution should be printed.

If individual solutions are being printed, each individual solution should have its components printed in non-descending order. Furthermore, the solutions should be printed out in ascending lexigraphical order. Please see the sample output if you don't understand what this means.

- A printout of the source code that you produce.
- A printout of your program running on the sample output above.

- 20% Correctness of Printout.
- 40% Demonstration Results. On Wednesday 24th between 2:00 p.m. and 4:30 p.m., you should drop by my office. During this time, we will compile your program on esus to make sure that there are no errors or warnings. We will also run the program on one or two new inputs to validate its correctness. The demo should take no more than 5 minutes. Note: you must come to the demo or you will lose these points.
- 10% Elegant Code
- 10% Good Style - no global variables, meaningful variables names, indentation, etc.
- 10% Appropriate Comments - file header comment, function header comments, tricky code comments, local variable comments, etc. (see 9/8 material for one example).
- 10% Matching the Output Format Above