Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Maths question (https://www.askmehelpdesk.com/showthread.php?t=774505)

  • Nov 9, 2013, 09:19 AM
    Sabarkantha
    Maths question
    For a particular problem, I have arranged the letters A and B twelve by twelve : AAAAAAAAAAAA, ABBAABBAAABA, and so on. Order matters: AB is not equal to BA. Altogether there are 2 raised to 12 or 4096 pemutations giving all possible combinations of A and B, twelve by twelve. Now amongst the 4096 lines of all the combinations, I want to select just the lines which have A six times, like for instance AABBBBBAAABA. How many such lines are there amongst the 4096? I tried the formula 4096!/(4096-6)! but I am not sure that this does the job, since it does not specifically choose lines with six times A.

    Thanks for the answer. It is important to me.
  • Nov 9, 2013, 10:58 AM
    ebaines
    There are ways to place the 6 A's in the twelve letter positions. Thus:



    In general the number of ways that 'k' A's can be placed in a string of 'n' letter positions is:

  • Nov 9, 2013, 06:28 PM
    Sabarkantha
    Quote:

    Originally Posted by ebaines View Post
    There are ways to place the 6 A's in the twelve letter positions. Thus:



    In general the number of ways that 'k' A's can be placed in a string of 'n' letter positions is:


    Thanks a million for your answer. I suppose that this is independent of the total sample of 4096, all the ways you can arrange A and B, twelve by twelve. Since you are very knowledgeable, I want to ask you a further question in order to solve my problem completely. Now that I have reduced my sample to 954, keeping just the lines with six A's, I want to reduce it still further by just keeping the lines where three A's come in a row, side by side: AAA. How manu such lines will there be amongst the 954? Sorry for this further bother.
  • Nov 10, 2013, 12:11 AM
    Sabarkantha
    Quote:

    Originally Posted by Sabarkantha View Post
    Thanks a million for your answer. I suppose that this is independent of the total sample of 4096, all the ways you can arrange A and B, twelve by twelve. Since you are very knowledgeable, I want to ask you a further question in order to solve my problem completely. Now that I have reduced my sample to 954, keeping just the lines with six A's, I want to reduce it still further by just keeping the lines where three A's come in a row, side by side: AAA. How manu such lines will there be amongst the 954? Sorry for this further bother.

    Sorry, in the above, please read 924 instead of 954. Thank you.
  • Nov 10, 2013, 12:12 AM
    Sabarkantha
    [QUOTE=Sabarkantha;3583162]Sorry, in the above, please read 924 instead of 954. Thank you very much.
  • Nov 10, 2013, 08:31 AM
    ebaines
    To clarify your question - I assume you mean that if you get 4 or more A's in a row it's counted as a fail, and if you get two groups of 3 A's each separated by at least one B it's a success.

    Start by considering how the three A's are arranged relative to B's:
    Case 1. You can have the three A's as the first three letters followed by a B, and you don't care how the remaining 8 letters are arranged:: AAABxxxxxxxx.
    Case 2. The first N letters can be anything, followed by the pattern BAAAB, and then the remaining 7-N letters can be anything; for example if N=2: xxBAAABxxxxx. This is valid for N=0 to N=7.
    Case 3. The first 8 letters can be anything, followed by BAAA for the last four letters: xxxxxxxxBAAA.

    For case 1 the number of ways that the last 8 letters can be arranged, given that they consist of 3 A's and 5 B's is:



    For case 2 the number of ways that the remaining 7 letters can be arranged, given that there are 3 A's and 4 B's, is:



    Note that case 2 can occur in 8 different ways, since the starting B can be in position 1, 2, 3, 4, 5, 6, 7, or 8. Thus the total number of ways that case 2 can occur is 8 x 35 = 280.

    Finally for case 3 the math is the same as for case 1, so there are 56 ways it can occur.

    Thus the total number of arrangements that yield 3 A's in a row, given that you have 6 A's and 6 B's, is 2x56+280 = 392.
  • Nov 10, 2013, 09:39 AM
    Sabarkantha
    Quote:

    Originally Posted by ebaines View Post
    To clarify your question - I assume you mean that if you get 4 or more A's in a row it's counted as a fail, and if you get two groups of 3 A's each separated by at least one B it's a success.

    Start by considering how the three A's are arranged relative to B's:
    Case 1. You can have the three A's as the first three letters followed by a B, and you don't care how the remaining 8 letters are arranged:: AAABxxxxxxxx.
    Case 2. The first N letters can be anything, followed by the pattern BAAAB, and then the remaining 7-N letters can be anything; for example if N=2: xxBAAABxxxxx. This is valid for N=0 to N=7.
    Case 3. The first 8 letters can be anything, followed by BAAA for the last four letters: xxxxxxxxBAAA.

    For case 1 the number of ways that the last 8 letters can be arranged, given that they consist of 3 A's and 5 B's is:



    For case 2 the number of ways that the remaining 7 letters can be arranged, given that there are 3 A's and 4 B's, is:



    Note that case 2 can occur in 8 different ways, since the starting B can be in position 1, 2, 3, 4, 5, 6, 7, or 8. Thus the total number of ways that case 2 can occur is 8 x 35 = 280.

    Finally for case 3 the math is the same as for case 1, so there are 56 ways it can occur.

    Thus the total number of arrangements that yield 3 A's in a row, given that you have 6 A's and 6 B's, is 2x56+280 = 392.

    Thanks once again for the perfectly clear answer. You have understood the problem well. I think that I can work things out myself now.

  • All times are GMT -7. The time now is 09:21 AM.