It is currently Sun May 04, 2025 8:05 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
Offline
 Post subject: Combinatorics
Post #1 Posted: Sun Jun 15, 2014 2:32 am 
Dies with sente

Posts: 94
Location: Amsterdam, NL
Liked others: 29
Was liked: 63
I'm quite sorry to keep using this forum this way.. but I just feel so uncomfortable unanswered, so.

Attachment:
6236754_1402771389.jpg
6236754_1402771389.jpg [ 5.17 KiB | Viewed 6119 times ]

This is everything.

Mathics, a freeware alternative to Mathematica, claims the above true.

Code:
(Input)
C := (#1)!/((#2)!*(#1-#2)!) &
Sum[C[n, k], {k, 0, s-1}] == Sum[2^(k-1)*C[n-k, s-k], {k, 1, s}]

(Output)
True

While I find this computer proof so fast and wonderful, it unfortunately does not explain its reasoning.

Can anyone please help me with this problem?

_________________
Wait, please.

Top
 Profile  
 
Offline
 Post subject: Re: Combinatorics
Post #2 Posted: Sun Jun 15, 2014 2:43 am 
Lives in gote

Posts: 420
Liked others: 75
Was liked: 58
Rank: EGF 4k
Just a question on the syntax - does nCk stand for the number of combinations, where k elements are selected out of n (i.e. n!/(k!(n-k)!)?

Top
 Profile  
 
Offline
 Post subject: Re: Combinatorics
Post #3 Posted: Sun Jun 15, 2014 2:58 am 
Dies with sente

Posts: 94
Location: Amsterdam, NL
Liked others: 29
Was liked: 63
schawipp wrote:
Just a question on the syntax - does nCk stand for the number of combinations, where k elements are selected out of n (i.e. n!/(k!(n-k)!)?

Sure, as you can see in the code.

_________________
Wait, please.

Top
 Profile  
 
Offline
 Post subject: Re: Combinatorics
Post #4 Posted: Sun Jun 15, 2014 3:15 am 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Hmmm I'd prove this by induction over the number of elements of the sum. I.e. first check a simple case (like S=3) to bootstrap your intuition. Then assume it's true for some number S-1 (capital s, so it is different from the arguments in the formula.) Write down the formulas for S, and try to arrange them so you get "something" + the S-1 case. The case S=3 or S=4 will help you realise how this can work.

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net

Top
 Profile  
 
Offline
 Post subject: Re: Combinatorics
Post #5 Posted: Sun Jun 15, 2014 3:17 am 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Meh, more easy:

The combinatorics C(n,k) are the coefficients when expanding (a+b)^n. So, the sum of all up to a certain number is like (1+1)^S. I guess it's easier using this relationship

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net

Top
 Profile  
 
Offline
 Post subject: Re: Combinatorics
Post #6 Posted: Sun Jun 15, 2014 8:37 am 
Beginner

Posts: 15
Liked others: 0
Was liked: 3
MJK wrote:
...

C(n,k) is the number of ways one can choose k things from a set of n things.
The left hand side is the number of ways one can pick at most s-1 things from a set of n.
Put your things in a row, and look at any of these choices. Let k be minimal such that this choice contains s-k from the first n-k things. Then k lies between 1 and s. The thing in position n-k+1 was not chosen, otherwise k could be decreased. An arbitrary subset of the rest could be chosen. So there are 2^{k-1} C(n-k,s-k) choices that give rise to this k. Together these are all, so both sides are equal.

Top
 Profile  
 
Offline
 Post subject: Re: Combinatorics
Post #7 Posted: Wed Jun 18, 2014 6:49 am 
Lives in sente
User avatar

Posts: 801
Location: Amsterdam (NL)
Liked others: 353
Was liked: 107
Rank: KGS 7 kyu forever
GD Posts: 460
I dont quite understand the solution in the last post. So here my try.
These binomial problems are often simplified if you visualize with Pascal's triangle. For typographical reasons I use X for empty spots and T for 10.

0X0X0X0X0X1X0X0...
X0X0X0X0X1X1X0...
0X0X0X0X1X2X1X0...
X0X0X0X1X3X3X1X0...
0X0X0X1X4X6X4X1X0...
X0X0X1X5XTXTX5X1X0...

It is well known that every entry is the sum of its two diagonal neighbours above.
In the red sum the green 6 is contained one time. But the green 3 two times. One time via the 10 and one time via the 5. And the green 1 is contained 4 times in the red sum. Two times via the blue 1 and two times via blue 4.
So we have: the red sum = 16 = 1*6 + 2*3 + 4*1. as your theorem states.
It should now be easy to formalyze this "proof".
For example by induction: ( short hand ;) ) The red sum is the green 6 + 2 times the blue sum ( 4 + 1 ) . But by induction is the blue sum is the green 3 + two times the green 1. So 1 + 5 + T= 1*6 + 2*3 +4*1. qed ( after obvious formalysation ).
Next it would be interesting to understand how the computer establishes this theorem. Probably hypergeometrical series are the key.

_________________
I think I am so I think I am.

Top
 Profile  
 
Offline
 Post subject: Re: Combinatorics
Post #8 Posted: Wed Jun 18, 2014 10:01 am 
Beginner

Posts: 15
Liked others: 0
Was liked: 3
cyclops wrote:
I dont quite understand the solution in the last post. So here my try.
Next it would be interesting to understand how the computer establishes this theorem. Probably hypergeometrical series are the key.

Zeilberger-Wilf theory provides automatic summation methods for such identities, so verification is completely routine.
Still it is a nice game to provide 1-1 correspondence proofs, where one finds a set that is counted by the left hand side, and also by the right hand side.

Let me redo your example.
We have n=5, s=3 and are showing that C(n,0) + ... + C(n,s-1) = C(n-1,s-1) + 2C(n-2,s-2) + 4C(n-3,s-3) + ... + 2^{s-1}C(n-s,0). In this case C(5,0)+C(5,1)+C(5,2) = C(4,2)+2C(3,1)+4C(2,0).
The left hand side is the number of subsets of size at most 2 in a set of 5: {}, {1}, {2}, {3}, {4}, {5}, {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,4}, {2,5}, {3,4}, {3,5}, {4,5}.
For each of these subsets, find the smallest k such that it contains 3-k elements from {1,...,n-k}.
The value k=1 works for {1,2}, {1,3}, {1,4}, {2,3}, {2,4}, {3,4}.
The value k=2 works for {1}, {2}, {3}, {1,5}, {2,5}, {3,5}.
The value k=3 works for {}, {4}, {5}, {4,5}.
The sizes of these three sets are C(4,2) and 2C(3,1) and 4C(2,0).

You see that our solutions are basically the same.


This post by zorq was liked by: cyclops
Top
 Profile  
 
Offline
 Post subject: Re: Combinatorics
Post #9 Posted: Thu Jun 19, 2014 7:58 am 
Lives in sente
User avatar

Posts: 801
Location: Amsterdam (NL)
Liked others: 353
Was liked: 107
Rank: KGS 7 kyu forever
GD Posts: 460
It took me quite some time to understand your reasoning. So I took the arrogance to rewrite it in my own language.

In the equation below you have partioned the left hand side into 3 disjunct parts.
Notation:
<1..4>2 stands for all 2-element subsets of {1..4}
<4,5> all subsets of {4,5}
<> empty set
P X Q for all unions of one element from P with one from Q where P and Q are disjunct subsets of {1..5}.
+ for disjunct unions

{ {}, {1}, {2}, {3}, {4}, {5}, {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,4}, {2,5}, {3,4}, {3,5}, {4,5} } =
<1..4>2 X <> + <1..3>1 X <5> + <1..2>0 X <4,5>
The knack in your proof is to see that this equation is correct.
From this MJK's formula follows easily.
Though we proof the same formula, I think the proofs are essentially different.

_________________
I think I am so I think I am.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group