1 / 8
Jul 2012

If n = 5 then set {n} = {1,2,3,4,5}. When r = 3 ,i have to compute
sum = 1.2.3 + 1.2.4 + 1.2.5 + 1.3.4 + 1.3.5 + 1.4.5 + 2.3.4 + 2.3.5 + 2.4.5 + 3.4.5 [(.) = (*) multiply sign here].

Is there any closed form formula for arbitrary given (N and R)? plz help with this problem...

Thanks in advance...

  • created

    Jul '12
  • last reply

    Aug '12
  • 7

    replies

  • 433

    views

  • 2

    users

  • 1

    like

  • 1

    link

What's the best solution you have come up with? What input constraints do you expect?

I have tried with for loops and that worked for some small constraints. But bro i was curious to find out itz closed form formula. Itz N < 100 and R < 10.

With constraints this small, an O(N*R) should be more than sufficient.

11 days later

Suggested Topics

Topic Category Replies Views Activity
Off-topic 1 132 Apr 9

Want to read more? Browse other topics in Off-topic or view latest topics.