All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Triangle of Sticks (Posted on 2023-07-11) Difficulty: 2 of 5
There are n sticks which have distinct integer length. Suppose that it's possible to form a non-degenerate triangle from any 3 distinct sticks among them. It's also known that there are sticks of lengths 5 and 12 among them. What is the largest possible value of n under such conditions?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 4
clearvars,clc
 
ptr=1; v=3;
while v<131072
  set=dec2base(v,2,17);
  psns=strfind(set,'1');
  if ismember(5,psns) && ismember(12,psns) && length(psns)>2
    good=true;
    cmb=combinator(length(psns),3,'c');
    cmb=psns(cmb);
    for i=1:size(cmb,1)
      t=sum(cmb(i,:));
      if 2*max(cmb(i,:))>=t
        good=false;
        break;
      end
    end
    if good
      disp(psns)
    end
  end
  v=v+1;
end

finds the possible sets of sticks of varied lengths, the largest of which has 6 sticks:

     5    12    16
     5    12    15
     5    12    15    16
     5    12    14
     5    12    14    16
     5    12    14    15
     5    12    14    15    16
     5    12    13
     5    12    13    16
     5    12    13    15
     5    12    13    15    16
     5    12    13    14
     5    12    13    14    16
     5    12    13    14    15
     5    12    13    14    15    16
     5    11    12
     5    11    12    15
     5    11    12    14
     5    11    12    14    15
     5    11    12    13
     5    11    12    13    15
     5    11    12    13    14
     5    11    12    13    14    15
     5    10    12
     5    10    12    14
     5    10    12    13
     5    10    12    13    14
     5    10    11    12
     5    10    11    12    14
     5    10    11    12    13
     5    10    11    12    13    14
     5     9    12
     5     9    12    13
     5     9    11    12
     5     9    11    12    13
     5     9    10    12
     5     9    10    12    13
     5     9    10    11    12
     5     9    10    11    12    13
     5     8    12
     5     8    11    12
     5     8    10    12
     5     8    10    11    12
     5     8     9    12
     5     8     9    11    12
     5     8     9    10    12
     5     8     9    10    11    12


It became apparent that the number sets merely needed to have the highest number be larger than the sum of the two lowest, at the level of the full set, rather than checking individual triples within the set. ... also that increasing the size of the second smallest stick then raised both the highest and lowest lengths of the remaining portion of the set.

  Posted by Charlie on 2023-07-11 09:28:31
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information