0
$\begingroup$

With the letters A, B, C, D, E, F, G.

a. How many strings can you make with 5 characters?

b. maximum 7 characters?

c. 4 characters, no repetition?

d. sorted strings without repetition. Sorted = alphabetical.

e. sorted strings with 7 characters.

I think I got a-d solved, so no need to explain those too much. However, please do explain how you got the answer for e, in a way I could figure out similar questions later.

EDIT:

I tried messing around some with 'e' and got a question equal to something a machine told me. Used formula C(m+n-1, n-1) (C(7+7-1, 7-1) = 1716) to get there. I'm not sure why what I did was right though.

Thanks for any reply. Sorry of I messed up anything about this question.

$\endgroup$
  • $\begingroup$ Is there a typo on e.? $\endgroup$ – Andrew Elkouri Oct 21 '13 at 16:08
  • $\begingroup$ It appears so. Fixed it. $\endgroup$ – Morten242 Oct 21 '13 at 16:10
  • $\begingroup$ Before I post my full solution, I would like to clarify. What do you mean by "sorted strings"? Do you mean A must come before B, C, D, E, F, or G, B must come before C, D, E, F, or G, etc.? $\endgroup$ – Ahaan S. Rungta Oct 21 '13 at 16:12
  • $\begingroup$ Yes. Sorted, meaning alphabetical. $\endgroup$ – Morten242 Oct 21 '13 at 16:13
  • $\begingroup$ And you may repeat? $\endgroup$ – Ahaan S. Rungta Oct 21 '13 at 16:14
0
$\begingroup$

a. Assuming you may repeat, there are $7$ choices for each of the five slots, so the answer is $7^5$.

b. This is just $7^0+7^1+\cdots+7^7$.

c. There are $7$ choices for the first slot, $6$ for the second slot, $5$ for the third slot, and $4$ for the last slot, so the answer is $$ 7 \cdot 6 \cdot 5 \cdot 4. $$

d. Unclear. How many letters?

e. Waiting for clarification. Will edit in when I find out.

$\endgroup$
  • $\begingroup$ 'd' has no repetition, so I guess it's maximum 7 characters. $\endgroup$ – Morten242 Oct 21 '13 at 16:20
  • $\begingroup$ What needs to be clarified on 'e'? $\endgroup$ – Morten242 Oct 21 '13 at 18:26
0
$\begingroup$

You want the number of weak compositions of $7$ into $7$ parts. Each element of the composition tells you how many of that letter are in your string, and the order is set because the string is sorted. For example, the composition 4,2,0,0,0,1,0 would correspond to the string AAAABBF

$\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.