Loading ...
Sorry, an error occurred while loading the content.
 

an algorithm for a math problem

Expand Messages
  • broke_as_ajoke
    I need a lil help understanding this... i have a problem trying To figure out something. I m trying to come up with a way that will multiply these numbers and
    Message 1 of 1 , Jun 27 4:15 PM
      I need a lil help understanding this... i have a problem trying To
      figure out something. I'm trying to come up with a way that will
      multiply these numbers and the decrease them by one here is an example

      p(x=2) = 1/365
      p(x=3) = (365/365)(364/365)(2/365)
      p(x=4) = (365/365)(364/365)(363/365)(3/365)
      p(x=5) = (365/365)(364/365)(363/365)(362/365)(4/365)

      now what i was thinking was let
      n = 365
      n_1 = n-1/n

      i could put that in a loop, but the problem is how do i know where
      awww man
      how about if i say x = to the number of sets of ()'s
      mean if x = 3 I then have 3 sets of ()'s but the last number on top
      is x-1

      I'm not even sure if I'm explaining this correctly. Seems like I need
      two loops just to do this. I don't I can't seem to get it if anyone
      have any insight PLEASE let me know.
    Your message has been successfully submitted and would be delivered to recipients shortly.