1
$\begingroup$

I know one can make a sample space for this problem, but are there any other ways of solving a problem like this:

Each letter has a number value. Find all possible combinations of the letters that sum of the number value is 15. Each letter can only be used once in a combination. Order doesn't matter, aik is the same as iak, kia, etc. a=5,b=2,c=3,d=3,e=3,f=1,g=2,h=2,i=9,j=1,k=1

An example of a correct combination: aik

An example of a incorrect combination: aacjk

Does anyone know a method that can be used to find the combinations for questions like this? I have a ti-89, so an easy method using it would be fine. Or an equation.

(sorry I don't know how to use the mathscript)

$\endgroup$
0
$\begingroup$

It seems that recursion is a natural and good algorithm for this problem. The input $(n; a_1,a_2,\dots a_k)$ of the algorithm consists of a number $n$ (15) and an ordered sequence of values $a_1\ge a_2\ge\dots\ge a_k$ (9,5,3,3,3,2,2,2,1,1,1). The output of the algorithm consists of the union of the outputs of the algorithm applied to inputs $(n-a_1;a_2,\dots a_k)$ and $(n;a_l,\dots a_k)$, where $l=\min\{m:a_m<a_1\}$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.