Results 1 to 10 of 10

Thread: Math Problem: Piano Key Combinations

  1. #1

    Default Math Problem: Piano Key Combinations

    How many unique combinations of the 88 piano keys are there, including any combination of 1, 2, 3, ... , or 88 different keys played simultaneously?

    At first glance, I think the answer is 88 + 87!! + 86!! + 85!! + ... + 1

    where n!! is defined as n + (n-1) + (n-2) + ... + 1

    Is this right?

  2. #2
    Member qqwref's Avatar
    Join Date
    Dec 2007
    Location
    a <script> tag near you
    WCA Profile
    2006GOTT01
    YouTube
    qqwref2
    Posts
    6,424

    Default

    No.

    If you want to count the number of unique combinations of any number of keys, just notice that each key can be either used or not used, so there are 2^88 combinations exactly. (If you don't count pressing 0 keys, there are 2^88 - 1 possible chords.)
    Computer cube PB averages of 12: [Clock: 5.72] [Pyraminx: 3.44] [Megaminx: 49.52]
    [2x2: 2.66] [3x3: 8.71] [4x4: 29.06] [5x5: 52.69] [6x6: 1:34.78] [7x7: 2:20.34]

  3. #3

    Default

    88+(88*87)+(88*87*86)+(88*87*86*85)+...(88*87*86*. ..45*44) + (88*87*86*...44*43)+(88*87*86*...45*44)...+ 88*87 + 88 + 1

    Each term in the sum represents the number of possible combinations for 1 2 3 4 ... 41 42 43 ... 86 87 88 keys.

    edit: or the easy way that qqwref found that i totally overlooked. chances are they come out equal...

  4. #4

    Default

    Quote Originally Posted by qqwref View Post
    No.

    If you want to count the number of unique combinations of any number of keys, just notice that each key can be either used or not used, so there are 2^88 combinations exactly. (If you don't count pressing 0 keys, there are 2^88 - 1 possible chords.)
    Err, sorry if this sounds dumb, but I don't quite follow how this counts out all the possible piano chords (I don't have a very mathematical mind). Could you possibly describe verbally how 2^n counts out all possible combinations of a set of n objects?
    Last edited by beingforitself; 11-01-2009 at 08:22 PM.

  5. #5
    Member
    Join Date
    Apr 2008
    Location
    Ohio, USA
    WCA Profile
    2006MERT01
    Posts
    777

    Default

    Think about a small piano with 2 keys. The first key can be up with the second key in 2 possible states, or it can be down with the 2nd key in 2 possible states (2*2 = 2^2).

    With 3 keys, you have these 4 states, but in addition the 3rd key can have 2 possible states for each of the 4 cases (2*2*2 = 2^3).

    Continuing this pattern, you have 2^n states for a piano with n keys.

  6. #6

    Default

    Quote Originally Posted by JBCM627 View Post
    Think about a small piano with 2 keys. The first key can be up with the second key in 2 possible states, or it can be down with the 2nd key in 2 possible states (2*2 = 2^2).

    With 3 keys, you have these 4 states, but in addition the 3rd key can have 2 possible states for each of the 4 cases (2*2*2 = 2^3).

    Continuing this pattern, you have 2^n states for a piano with n keys.
    Makes perfect sense to me now, thanks.

  7. #7
    Member qqwref's Avatar
    Join Date
    Dec 2007
    Location
    a <script> tag near you
    WCA Profile
    2006GOTT01
    YouTube
    qqwref2
    Posts
    6,424

    Default

    Quote Originally Posted by TacticalPenguin View Post
    88+(88*87)+(88*87*86)+(88*87*86*85)+...(88*87*86*. ..45*44) + (88*87*86*...44*43)+(88*87*86*...45*44)...+ 88*87 + 88 + 1

    Each term in the sum represents the number of possible combinations for 1 2 3 4 ... 41 42 43 ... 86 87 88 keys.

    edit: or the easy way that qqwref found that i totally overlooked. chances are they come out equal...
    Your sum is incorrrect. Think about the number of ways you can choose a 2-key chord... it is not 88*87, but half that, because if you just choose the first key and then the second one you could make each chord in two possible ways. The number of ways to choose k out of the 88 keys (which is known as "88 choose k" in math speak) is (88 * 87 * ... * (89-k)) / (k * (k-1) * ... * 1).
    Computer cube PB averages of 12: [Clock: 5.72] [Pyraminx: 3.44] [Megaminx: 49.52]
    [2x2: 2.66] [3x3: 8.71] [4x4: 29.06] [5x5: 52.69] [6x6: 1:34.78] [7x7: 2:20.34]

  8. #8

    Default

    Youre right about the duplicates thing, I certainly missed that, I was thinking permutations not combinations, but your math was doing the same - it is for permutations not combinations. Combinations would be
    (88 * 87 * ... * (89-k)) / (k * (k-1) * ... * 1)*k!

  9. #9
    Member qqwref's Avatar
    Join Date
    Dec 2007
    Location
    a <script> tag near you
    WCA Profile
    2006GOTT01
    YouTube
    qqwref2
    Posts
    6,424

    Default

    Sorry, no, you're wrong again. You only divide by k! once.
    Computer cube PB averages of 12: [Clock: 5.72] [Pyraminx: 3.44] [Megaminx: 49.52]
    [2x2: 2.66] [3x3: 8.71] [4x4: 29.06] [5x5: 52.69] [6x6: 1:34.78] [7x7: 2:20.34]

  10. #10

    Default

    Ah right I was quite confused.

    N choose R = (N!/(N-R)!)/R!
    and N permute R = N!/(N-R)!
    Very well.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •