Results 1 to 14 of 14

Math Help - Factorial probability

  1. #1
    Newbie
    Joined
    Jan 2013
    From
    dog's breakfast
    Posts
    5

    Factorial probability

    Hi,

    I have a number. For example !3. What is the probability of a specific number from the permutations to be in front of another number? Like 3 in front of 1?

    Thank you,
    RobertEagle
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,969
    Thanks
    1788
    Awards
    1

    Re: Factorial probability

    Quote Originally Posted by RobertEagle View Post
    I have a number. For example !3. What is the probability of a specific number from the permutations to be in front of another number? Like 3 in front of 1?
    Please expand on what the question means.
    For example, what if the number were 1123?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2013
    From
    dog's breakfast
    Posts
    5

    Re: Factorial probability

    Okay.

    This are the combinations for !3.
    1 2 3
    1 3 2
    2 1 3
    2 3 1
    3 1 2
    3 2 1

    What's the probability of a specific digit to be in front of another specific digit? Like 1 in front of 3 or in front of 2?
    In this situation the probability is 50%.
    i.e: for !4 the probability is 46,15% and so on..

    Thank you,
    RobertEagle
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,969
    Thanks
    1788
    Awards
    1

    Re: Factorial probability

    Quote Originally Posted by RobertEagle View Post
    1 2 3
    1 3 2
    2 1 3

    2 3 1
    3 1 2
    3 2 1
    What's the probability of a specific digit to be in front of another specific digit? Like 1 in front of 3 or in front of 2?
    In this situation the probability is 50%.
    I still must be missing your idea here.
    The above seems to be asking about randomly rearranging 123, what is the probability that the 1 comes before the 2 or the 3.
    I have indicated in BLUE the four cases in which that happens. So the answer is \frac{2}{3}.

    So tell us what do you really mean.
    Please use a number like 2342.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Banned
    Joined
    Aug 2010
    Posts
    961
    Thanks
    98

    Re: Factorial probability

    50%. For ex, 13 occurrs 3 times & 31 occurrs 3 times, 3/6.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member ILikeSerena's Avatar
    Joined
    Dec 2011
    Posts
    733
    Thanks
    121

    Re: Factorial probability

    Suppose you have n digits, and you want a specific digit, say 1, to be in front of another specific digit, say 2.

    Now let's leave out 1.
    That leaves us with (n-1)! permutations of the other (n-1) digits.
    If we put 1 in front of 2, we get n digits with (n-1)! permutations.

    The total number of permutations is n!.

    So the probability of a specific digit to be in front of another specific digit is {(n-1)! \over n!} = {1 \over n}.

    If you look again, you'll see that in the case of 3 digits, this is 33% instead of 50%.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Banned
    Joined
    Aug 2010
    Posts
    961
    Thanks
    98

    Re: Factorial probability

    It's a matter of interpretation. I considered 1 to be in front of 3 in 123.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Jan 2013
    From
    dog's breakfast
    Posts
    5

    Re: Factorial probability

    I'm sorry for my misunderstanding and for my bad calculus.
    Actually, it doesn't matter what !n is.The percentage will always be 50%. From what I see, it's a constant.

    I've made a program which calculates this percentage and it always shows me 50%, in any n!. The problem is that I don't know how to prove it mathematically.

    The digit doesn't have to be next to the other comparing digit.
    Last edited by RobertEagle; January 26th 2013 at 08:43 AM.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Banned
    Joined
    Aug 2010
    Posts
    961
    Thanks
    98

    Re: Factorial probability

    Quote Originally Posted by ILikeSerena View Post
    Suppose you have n digits, and you want a specific digit, say 1, to be in front of another specific digit, say 2.

    Now let's leave out 1.
    That leaves us with (n-1)! permutations of the other (n-1) digits.
    If we put 1 in front of 2, we get n digits with (n-1)! permutations.

    The total number of permutations is n!.

    So the probability of a specific digit to be in front of another specific digit is {(n-1)! \over n!} = {1 \over n}.

    If you look again, you'll see that in the case of 3 digits, this is 33% instead of 50%.
    If you do all permutations of 1234 you find any particular digit comes directly in front of another particular digit 8 out of 24 times which is 33%. 1/n = 1/4 = 25% is wrong.
    Last edited by Hartlw; January 26th 2013 at 08:44 AM.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Jan 2013
    From
    dog's breakfast
    Posts
    5

    Re: Factorial probability

    It doesn't have to be directly in front of another digit.
    If it would have been directly in front of that particular digit, than yes. The formula would have been 1/n.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,969
    Thanks
    1788
    Awards
    1

    Re: Factorial probability

    Quote Originally Posted by RobertEagle View Post
    I'm sorry for my misunderstanding and for my bad calculus. Actually, it doesn't matter what !n is.The percentage will always be 50%. From what I see, it's a constant.
    I've made a program which calculates this percentage and it always shows me 50%, in any n!.The problem is that I don't know how to prove it mathematically.
    The digit doesn't have to be next to the other comparing digit.
    Ok. Thank you for the clarification. You are asking about two particular digits in a string of n different digits. Is that correct?

    For example: 123456. Say the digits of particular interest are 3~\&~6. There 6!=720 possible rearrangements of that string. Think about it: in any of those arrangements either the 3 come before the 6 or the 6 comes before the 3. So 50\% or one half is correct.

    If digits can be repeated, then that is different matter.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Banned
    Joined
    Aug 2010
    Posts
    961
    Thanks
    98

    Re: Factorial probability

    Quote Originally Posted by RobertEagle View Post
    It doesn't have to be directly in front of another digit.
    If it would have been directly in front of that particular digit, than yes. The formula would have been 1/n.
    You are correct RobertEagle. My apologies!

    1234, 1243, 1324, 1342, 1423, 1432
    2134, 2143, 2314, 2341, 2413, 2431
    3124, 3142, 3214, 3241, 3412, 3421

    For the case of any number in front of another, any pair occurrs in every permutation and in half of those one occurrs in front of another, so 50%. If, it didn't it would be a missing permutation.

    EDIT: Whoops! ILikeSerena came up with correct answer of 1/n for neighboring numbers.
    Last edited by Hartlw; January 26th 2013 at 09:20 AM.
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Newbie
    Joined
    Jan 2013
    From
    dog's breakfast
    Posts
    5

    Re: Factorial probability

    Yes, that's right Plato and Hartlw.
    You're words speak truth.

    If you think we can go further on this topic, this problem was given at the National Informatics Olympiad. If I were there (now I'm just preparing myself) the teachers would have expected to see a program which permutates and then calculates, right? What would be said if I write that it's a property and it's a constant? Would I be considered that I have failed or pass?
    I don't know what to say..

    Thank you,
    RobertEagle
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Super Member ILikeSerena's Avatar
    Joined
    Dec 2011
    Posts
    733
    Thanks
    121

    Re: Factorial probability

    Quote Originally Posted by RobertEagle View Post
    If you think we can go further on this topic, this problem was given at the National Informatics Olympiad. If I were there (now I'm just preparing myself) the teachers would have expected to see a program which permutates and then calculates, right? What would be said if I write that it's a property and it's a constant? Would I be considered that I have failed or pass?
    I don't know what to say..
    When I participated in that contest (in my own country), we wrote a program that contained only a single output command.
    According to the rules (and we asked for a clarification during the contest), we needed to have a program that accepted the proper input (if any), and that spit out the proper output.
    Our program did and it was accepted.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Factorial
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: April 11th 2012, 04:42 AM
  2. Factorial N
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: August 28th 2010, 11:18 PM
  3. factorial!
    Posted in the Statistics Forum
    Replies: 5
    Last Post: January 18th 2010, 04:58 PM
  4. Sequences, series & probability: Factorial
    Posted in the Statistics Forum
    Replies: 4
    Last Post: March 18th 2009, 07:03 PM
  5. factorial
    Posted in the Algebra Forum
    Replies: 3
    Last Post: January 15th 2009, 08:13 AM

Search Tags


/mathhelpforum @mathhelpforum