+ Reply to Thread
Results 1 to 15 of 15

number puzzle

  1. #1
    Registered User
    Join Date
    01-24-2007
    Posts
    5

    Unhappy number puzzle

    Hello
    New to the forum today. I need a math guru or puzzle solver. I have a number grid that uses seven numbers on seven lines and matches with each other number two times. It looks like this.
    1236
    2347
    3451
    4562
    5673
    6714
    7125
    I want to increase the numbers to nine (or another number that would work)still having seven lines and matching an equal time with each of the other numbers. One of my attemps looks like this.
    186429
    297531
    318642
    429753
    531864
    642975
    753186
    As you can see things have not worked out as even as previous. Maybe not possible with these parameters? So what would be the next size group of numbers that would work into an evenly matched configuration? I'm perplexed and challenged but can't come up with the right combination. There may be a formula? Did I just get lucky on my first set? Thanks.
    Newbe

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mkron
    Hello
    New to the forum today. I need a math guru or puzzle solver. I have a number grid that uses seven numbers on seven lines and matches with each other number two times. It looks like this.
    1236
    2347
    3451
    4562
    5673
    6714
    7125
    I want to increase the numbers to nine (or another number that would work)still having seven lines and matching an equal time with each of the other numbers. One of my attemps looks like this.
    186429
    297531
    318642
    429753
    531864
    642975
    753186
    As you can see things have not worked out as even as previous. Maybe not possible with these parameters? So what would be the next size group of numbers that would work into an evenly matched configuration? I'm perplexed and challenged but can't come up with the right combination. There may be a formula? Did I just get lucky on my first set? Thanks.
    Newbe
    I'm not much of what might be called a 'mathemetician', but you have 7 numbers on each of 7 rows, that's one digit per row (1 through 7 in your display), the second digit is the same offset by 1 (2 through 7 then 1), and the third is a further 1 offset (3 through 7 then 1 & 2)

    Each number appears once in each set, for 4 digits each number appears 4 times, as is shown in your example.

    Your second set has mixtures of 4 and 5 appearances, but with only 7 rows and 9 digits you cannot follow the format of the first pattern.

    You could try 9 rows, and number each successive digit +1 on the previous column as per in the first example.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Registered User
    Join Date
    01-24-2007
    Posts
    5
    Thanks for the reply. I've tried it that way but can only get it right by having 9 rows and 9 columns. I'm looking for a way to have less columns than rows and still have it come out even like my example. Here is one with 9rows and six columns.
    123785
    234896
    345917
    456128
    567239
    678341
    789452
    891563
    912674
    Not working because of; 1 matches with 2 three times and 1 matches with 3 four times.

    Lets say you coached track in school. Your season was 9 weeks long and you had 9 schools involved. Your track field was only large enought for six schools at one time. You want to meet each school the same amount of times. Do we need more weeks or a bigger field? Or can it work?
    Here is another one that works.
    123
    425
    153
    214
    435
    423
    152
    431
    523
    415
    Here we have 10 rows and 3 columns with 5 numbers. Each number matches with another 6 times. Thanks!
    Mkron

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mkron
    Thanks for the reply. I've tried it that way but can only get it right by having 9 rows and 9 columns. I'm looking for a way to have less columns than rows and still have it come out even like my example. Here is one with 9rows and six columns.
    123785
    234896
    345917
    456128
    567239
    678341
    789452
    891563
    912674
    Not working because of; 1 matches with 2 three times and 1 matches with 3 four times.

    Lets say you coached track in school. Your season was 9 weeks long and you had 9 schools involved. Your track field was only large enought for six schools at one time. You want to meet each school the same amount of times. Do we need more weeks or a bigger field? Or can it work?
    Here is another one that works.
    123
    425
    153
    214
    435
    423
    152
    431
    523
    415
    Here we have 10 rows and 3 columns with 5 numbers. Each number matches with another 6 times. Thanks!
    Mkron
    Hi,

    no idea (yet) but the attached will let you shuffle numbers and calculate the answers for you.


    A2:A8 is your original set, with columns L to T the row count of each digit (should only be = 1)
    and V through AA the 'pairs', AC2:AH8 proving that what you said was true, each pair meets twice.


    Enter your tests in A10:D18 (or A20:E27 or A29:E37) and view AC10:AH18 (etc) for the matches, obviously you cannot get all '2's on 4 selections, but a mix of 1's and 2's.

    Columns AT through CC show the meetings for all possible combination pairs.

    Hope this helps
    ---
    amended attachment is MeetingsB
    ---
    Attached Files Attached Files
    Last edited by Bryan Hessey; 01-24-2007 at 09:31 PM.

  5. #5
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    For 6 from up to 20, use the range A44:F63

    the matched pairs are listed at V44:AJ63, and are counted at AL44 to AZ63

    Total possible pairings are at BD:CM with the block count at BD43:CM43 and the individual placings at BD44:CM63

    It doesn't solve your problem, of how to auto-generate the A44:F63 range, but it does the counts for you.

    hth
    ---
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-24-2007
    Posts
    5
    Wow! Thanks for all the hard work. That is a lot of formulas and good thinking on your part. I will have to digest that worksheet for awhile. I do a lot with Excel but nothing that heavy. Thanks again. I am suprise no one else has taken the challenge. What do you think on my 7 rows 7 numbers and 4 column example that works? Was this just dumb luck or won't that scenario work again only on some huge grid? Thanks again.
    Mkron

  7. #7
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mkron
    Wow! Thanks for all the hard work. That is a lot of formulas and good thinking on your part. I will have to digest that worksheet for awhile. I do a lot with Excel but nothing that heavy. Thanks again. I am suprise no one else has taken the challenge. What do you think on my 7 rows 7 numbers and 4 column example that works? Was this just dumb luck or won't that scenario work again only on some huge grid? Thanks again.
    Mkron
    becaue numbers have a habit of repeating I believe there will be other matching sets, but how to find them is your problem.

    4 columns = 6 possible pairs, AB AC AD BC BD CD and
    5 columns = 4 more pairs
    6 columns = 5 more pairs
    7 columns = 6 more pairs (than 5 columns), your formula from V to AP starts to become interesting.
    The two following blocks ae easy, as 1 formula in each block will fill sideways and downwards.

    good luck with this.

    ---

  8. #8
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mkron
    Wow! Thanks for all the hard work. That is a lot of formulas and good thinking on your part. I will have to digest that worksheet for awhile. I do a lot with Excel but nothing that heavy. Thanks again. I am suprise no one else has taken the challenge. What do you think on my 7 rows 7 numbers and 4 column example that works? Was this just dumb luck or won't that scenario work again only on some huge grid? Thanks again.
    Mkron
    others that will succeed evenly . . .

    hth
    ---
    added, amended formula in AL44
    ---
    added later, amended formula in E5 (block) to

    =IF($D5*E$3/E$4=INT($D5*E$3/E$4),TEXT($D5*E$3/E$4,"0.000")&" "&$D5*E$3/$D5&" rows",IF(2*$D5*E$3/E$4=INT(2*$D5*E$3/E$4),TEXT(2*$D5*E$3/E$4,"0.000")&" "&2*$D5*E$3/$D5&" rows",IF(4*$D5*E$3/E$4=INT(4*$D5*E$3/E$4),TEXT(4*$D5*E$3/E$4,"0.000")&" "&4*$D5*E$3/$D5&" rows",IF(3*$D5*E$3/E$4=INT(3*$D5*E$3/E$4),TEXT(3*$D5*E$3/E$4,"0.000")&" "&3*$D5*E$3/$D5&" rows",$D5*E$3/E$4))))

    to pickup on items that match after 2, 3 or 4 times the number of rows.

    9 digits then matches 4 to 12 columns, but up to 36 rows may be required.

    Scott, your formula went straight over, hopefully the OP will be more mathematically minded than I, but from my (old) table the numbers
    columns = 4, numbers = 7, rows = 7 matches 2 times per pair (the example)
    columns = 6, numbers = 7, rows = 7 matches 5 times per pair
    columns = 7, numbers = 7, rows = 7 matches 7 times per pair (as expected)
    columns = 7, numbers = 8, rows = 8 matches 6 times per pair
    columns = 8, numbers = 8, rows = 8 matches 8 times per pair (as expected)
    columns = 8, numbers = 9, rows = 9 matches 7 times per pair
    columns = 9, numbers = 7, rows = 7 matches 12 times per pair
    columns = 9, numbers = 9, rows = 9 matches 9 times per pair (as expected)
    columns = 9, numbers = 10, rows = 10 matches 8 times per pair
    columns = 10, numbers = 7, rows = 7 matches 15 times per pair
    columns = 10, numbers = 10, rows = 10 matches 10 times per pair (as expected)
    columns = 12, numbers = 7, rows = 7 matches 22 times per pair

    and that other combinations of 4-12 columns and 7-10 digits don't match an even number of times? (the latest table shows a match for all combinations of 9 digits, but with multiple sets of rows where .5 .25 or .333 was previously noted)

    I tried to put these figures into your formula, but failed, well failed miserably is the word, I'll just go back to my crayons.

    ---
    Attached Files Attached Files
    Last edited by Bryan Hessey; 01-26-2007 at 03:31 AM.

  9. #9
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    My apologies if this is somewhat confusing. I may not necessarily be explaining what I'm thinking in an understandable way.

    Let:
    - N represent the number of digits you have to choose from.
    - L represent the number of numbers you want to have (ie. lines).
    - D represent the number of digits in each number.

    For your example above, N was 7, L was 7, and D was 4.

    Part 1: Testing the Number of Digits

    Each digit has to appear the same number of times (otherwise some number would be paired up with the others more times than necessary). This means that L*D has to be a multiple of N (LD = kN, k an integer).

    For the N=7, L=7, D=4, you can see that LD = 7*4 = k*7 results in an integer value for k that is less than N and L.

    If you look at your example where you went up to 9 in the first message, N was 9, L was 7.... and this means for the above formula, you have 7D=k9 => D=k*9/7 which means that for D to be an integer value, k has to be a multiple of 7, and the smallest multiple of 7 is 7. This means that the lowest possible solution when N is 9, L is 7 is when D = 7*9/7 = 7.

    This means that if you choose 2 numbers N & L:
    (1) If N = L, then it is possibly we can choose a value for D less than N,
    (2) If N != L, then if N and L are relatively prime, the smallest D can be is MIN(N,L) (otherwise, there won't be an equal number of occurances of each digit),
    (3) If N != L, and N or L is a factor of the other number (ie. N is a multiple of L or L is a multiple of N), then the smallest k value is MIN(N,L),
    (4) If N != L, but they are relatively prime and neither is a factor of the other, you can choose a smaller number. For example, consider N = 12, L = 9. You have LD = kN => 9D = 12k => D = 12k/9 = 4k/3. Obviously, 4k/3 is an integer when k is a multiple of 3, and thus k = 3 or k = 6.

    Part 2: Testing the number of Pairs

    Based on Part 1, we can generate a value for D = kN/L.

    Note:
    - k represents the number of times a digit occurs in the L lines.

    # Times = D*(L/N) = kN/L*(L/N) = k

    Let:
    - P represent the number of pairs a digit is part of.

    For each occurance of a digit in a line, it is part of D-1 pairs. So we can see that:
    P = k(D-1)

    The total number of pairs for one line is:
    (D-1) + (D-1) + ... + (D-1) = D(D-1)

    The total number of pairs based on the number of lines is:
    LD(D-1)

    The total number of pairs we need based on the digits per line and N is:
    PN = kN(D-1)

    If these two are equivalent, then based on the number of pairs, you should be able to do it.
    LD(D-1) = L(kN/L)(D-1) = kN(D-1) = PN

    Part 3: The Actual Matching

    There may be some peculiarity with the actual matching, but right now I can't think of anything, so cannot provide you any guidance in this respect. (Someone else may be able to go into more detail in that area) You can probably use Bryan's stuff to find a good match.

    Conclusion:

    Choose N (number of numbers) and L (number of lines) such that N and L are NOT relatively prime and NEITHER is a factor of the other.

    Scott

    (Long winded, aren't I...)

  10. #10
    Registered User
    Join Date
    01-24-2007
    Posts
    5
    Hot dog Brian you found one……….now your getting’ the idea. I was with my daughter (you know the smarter generation) last night and she said “Well dad maybe it only works because 7 is a prime number. Bingo! Maybe that is correct because I had done one with 13 previously but didn’t work for my application ie;
    1 2 3 4
    1 5 6 7
    1 8 9 10
    1 11 12 13
    2 5 8 11
    2 6 9 12
    2 7 10 13
    3 5 9 13
    3 8 12 11
    3 6 10 7
    4 7 9 11
    4 10 12 5
    4 13 8 6
    So then when I got home I started working with 11 rows and 11 numbers in various configurations. I copied and pasted formulas on your spreadsheet until I could get 11 rows to fit. Copied and pasted until I was blue in the face thinking these possibilities are endless. Like 11 times 11 times 5 squared or to the hundredth power or something. But then BINGO;
    1 2 11 7 4
    2 3 1 8 5
    3 4 2 9 6
    4 5 3 10 7
    5 6 4 11 8
    6 7 5 1 9
    7 8 6 2 10
    8 9 7 3 11
    9 10 8 4 1
    10 11 9 5 2
    11 1 10 6 3
    So………..now does anyone see a pattern? It the prime number theory correct? This is not exactly going to work for me so I’m still going to experiment with more grids and find others that work out like this.

    Sorry…………..I haven’t been able to digest the last couple of posts to see if it will help in my quest. Thanks you guys for all your hard work and thought process. I believe there are more grids that will work out this way. Useful for any competition like track or dart leagues. Thanks again.
    Mkron

  11. #11
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Sorry, my post was probably confusing.

    If I can think of a better way to word it, I'll re-post.

    Scott

  12. #12
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mkron
    Hot dog Bryan you found one……….now your getting’ the idea. I was with my daughter (you know the smarter generation) last night and she said “Well dad maybe it only works because 7 is a prime number. Bingo! Maybe that is correct because I had done one with 13 previously but didn’t work for my application ie;
    1 2 3 4
    1 5 6 7
    1 8 9 10
    1 11 12 13
    2 5 8 11
    2 6 9 12
    2 7 10 13
    3 5 9 13
    3 8 12 11
    3 6 10 7
    4 7 9 11
    4 10 12 5
    4 13 8 6
    So then when I got home I started working with 11 rows and 11 numbers in various configurations. I copied and pasted formulas on your spreadsheet until I could get 11 rows to fit. Copied and pasted until I was blue in the face thinking these possibilities are endless. Like 11 times 11 times 5 squared or to the hundredth power or something. But then BINGO;
    1 2 11 7 4
    2 3 1 8 5
    3 4 2 9 6
    4 5 3 10 7
    5 6 4 11 8
    6 7 5 1 9
    7 8 6 2 10
    8 9 7 3 11
    9 10 8 4 1
    10 11 9 5 2
    11 1 10 6 3
    So………..now does anyone see a pattern? It the prime number theory correct? This is not exactly going to work for me so I’m still going to experiment with more grids and find others that work out like this.

    Sorry…………..I haven’t been able to digest the last couple of posts to see if it will help in my quest. Thanks you guys for all your hard work and thought process. I believe there are more grids that will work out this way. Useful for any competition like track or dart leagues. Thanks again.
    Mkron
    I think that the table in MeetingC disproves the 'prrime' theory, there is a match for 9 numbers in any of 4 columns through 12 columns.

    There are also matches for 8 and 10 digits, over varying rows etc.

    the green flagged items are capable of solution.

    the non-green items are not

    hth
    ---

  13. #13
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Maistrye
    Sorry, my post was probably confusing.

    If I can think of a better way to word it, I'll re-post.

    Scott
    Scott,

    I think it's more my non-understanding of derived maths formula, with a little imagination I should be able to get the attached table to calculate at what (minimum) number of rows the solution is possible, but I'm limited in thinking to those that were .5, .25 and one-third.

    mkron

    the attached MeetingD has the table expanded from 4 digits to 16 didgits, from 4 columns to 20 columns, and I 'think' the rows stated in the green-flagged items are the minimum possibble, but maybe I've missed a possibility somewhere.

    note, you still need to work out the solution on Sheet3, which is setup for only 4, 5 or 6 columns. (the formula can be extended, just follow the pattern)

    hth
    ---
    replaced attachment
    Attached Files Attached Files
    Last edited by Bryan Hessey; 01-28-2007 at 12:11 AM.

  14. #14
    Registered User
    Join Date
    01-24-2007
    Posts
    5
    Hello
    Hey, Brian I'm unable to open your last revised spreadsheet. It says it is corrupted or invalid. Could you try again or email direct to [email protected] . Thanks
    mkron

  15. #15
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mkron
    Hello
    Hey, Bryan I'm unable to open your last revised spreadsheet. It says it is corrupted or invalid. Could you try again or email direct to [email protected] . Thanks
    mkron
    I have anended the attachment, and it is now readable.

    hth
    ---

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1