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

Home > Numbers
Egyptian Fraction Expression (Posted on 2022-06-24) Difficulty: 4 of 5
Determine the minimum number of summands for expressing 21/23 as an Egyptian Fraction.

What is the total number of ways of expressing 21/23 for that minimum value?

Note: In the context of the current problem, each of the summands is positive.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 3 |
The minimum number of summands is 5. There are 37 ways if, as usual, duplicates are not allowed. If duplicates are allowed, there are only eight more ways: 45.

clearvars,clc
global depth found v  egyptian  level remain
 syms egyptian
 
for depth=3:6
   
  v=sym(21)/23;
   egyptian=sym.empty; found=0; level=0; rnum=0;rden=1;
  addon( )
  if found>0
    break
  end
end

function addon( )
  global depth found v   egyptian level remain  
 
  if isempty(egyptian)
    egyptian=sym.empty;     
    remain=v;
  end
  [numr,denr]=numden(remain);
  d=floor(denr/numr);
  
  level=level+1;
  if level<=depth
  while 1/sym(d)>=remain-sum(1./[sym(d+1):d+depth-level])
    if remain<0 
      break
    end
    if level>1
      if d<=1/egyptian(end)
        d=1/egyptian(end)+1;
      end
    end
    
    egyptian(end+1)=1/sym(d);
    remain=remain-1/sym(d);
    if   remain<=0
      if remain==0 && level== depth
        found=found+1; 
         fmat=repmat(' %s',1,depth');
         fprintf(['%4d ' fmat  '\n'],found,egyptian);
      end
    else
      if level<=depth
       addon( )
      end
    end
    remain=remain+1/sym(d);
    egyptian(end)=[];
    d=d+1;
  end
  end
  level=level-1;
end

While the usual way of writing the egyptian fractions is to list only the denominators of the fractions, I list here the fractions themselves.

   1  1/2 1/3 1/13 1/359 1/644046
   2  1/2 1/3 1/13 1/360 1/107640
   3  1/2 1/3 1/13 1/364 1/25116
   4  1/2 1/3 1/13 1/366 1/18239
   5  1/2 1/3 1/13 1/368 1/14352
   6  1/2 1/3 1/13 1/390 1/4485
   7  1/2 1/3 1/13 1/414 1/2691
   8  1/2 1/3 1/13 1/494 1/1311
   9  1/2 1/3 1/13 1/598 1/897
  10  1/2 1/3 1/13 1/663 1/782
  11  1/2 1/3 1/14 1/121 1/58443
  12  1/2 1/3 1/14 1/123 1/6601
  13  1/2 1/3 1/14 1/126 1/2898
  14  1/2 1/3 1/14 1/133 1/1311
  15  1/2 1/3 1/14 1/138 1/966
  16  1/2 1/3 1/14 1/161 1/483
  17  1/2 1/3 1/14 1/231 1/253
  18  1/2 1/3 1/15 1/77 1/17710
  19  1/2 1/3 1/15 1/78 1/4485
  20  1/2 1/3 1/15 1/80 1/1840
  21  1/2 1/3 1/15 1/85 1/782
  22  1/2 1/3 1/15 1/92 1/460
  23  1/2 1/3 1/15 1/110 1/253
  24  1/2 1/3 1/15 1/115 1/230
  25  1/2 1/3 1/16 1/60 1/1840
  26  1/2 1/3 1/16 1/69 1/368
  27  1/2 1/3 1/17 1/48 1/18768
  28  1/2 1/3 1/17 1/51 1/782
  29  1/2 1/3 1/18 1/42 1/2898
  30  1/2 1/3 1/18 1/46 1/414
  31  1/2 1/3 1/19 1/38 1/1311
  32  1/2 1/3 1/22 1/33 1/253
  33  1/2 1/3 1/23 1/28 1/1932
  34  1/2 1/3 1/23 1/30 1/345
  35  1/2 1/3 1/23 1/46 1/69
  36  1/2 1/4 1/10 1/16 1/1840
  37  1/2 1/5 1/6 1/23 1/345

If duplicate values are allowed the list expands to 45 sets:

   1  1/2 1/3 1/13 1/359 1/644046
   2  1/2 1/3 1/13 1/360 1/107640
   3  1/2 1/3 1/13 1/364 1/25116
   4  1/2 1/3 1/13 1/366 1/18239
   5  1/2 1/3 1/13 1/368 1/14352
   6  1/2 1/3 1/13 1/390 1/4485
   7  1/2 1/3 1/13 1/414 1/2691
   8  1/2 1/3 1/13 1/494 1/1311
   9  1/2 1/3 1/13 1/598 1/897
  10  1/2 1/3 1/13 1/663 1/782
  11  1/2 1/3 1/14 1/121 1/58443
  12  1/2 1/3 1/14 1/123 1/6601
  13  1/2 1/3 1/14 1/126 1/2898
  14  1/2 1/3 1/14 1/133 1/1311
  15  1/2 1/3 1/14 1/138 1/966
  16  1/2 1/3 1/14 1/161 1/483
  17  1/2 1/3 1/14 1/231 1/253
  18  1/2 1/3 1/15 1/77 1/17710
  19  1/2 1/3 1/15 1/78 1/4485
  20  1/2 1/3 1/15 1/80 1/1840
  21  1/2 1/3 1/15 1/85 1/782
  22  1/2 1/3 1/15 1/92 1/460
  23  1/2 1/3 1/15 1/110 1/253
  24  1/2 1/3 1/15 1/115 1/230
  25  1/2 1/3 1/16 1/60 1/1840
  26  1/2 1/3 1/16 1/69 1/368
  27  1/2 1/3 1/17 1/48 1/18768
  28  1/2 1/3 1/17 1/51 1/782
  29  1/2 1/3 1/18 1/42 1/2898
  30  1/2 1/3 1/18 1/46 1/414
  31  1/2 1/3 1/19 1/38 1/1311
  32  1/2 1/3 1/22 1/33 1/253
  33  1/2 1/3 1/23 1/28 1/1932
  34  1/2 1/3 1/23 1/30 1/345
  35  1/2 1/3 1/23 1/46 1/69
  36  1/2 1/4 1/10 1/16 1/1840
  37  1/2 1/5 1/5 1/77 1/17710
  38  1/2 1/5 1/5 1/78 1/4485
  39  1/2 1/5 1/5 1/80 1/1840
  40  1/2 1/5 1/5 1/85 1/782
  41  1/2 1/5 1/5 1/92 1/460
  42  1/2 1/5 1/5 1/110 1/253
  43  1/2 1/5 1/5 1/115 1/230
  44  1/2 1/5 1/6 1/23 1/345
  45  1/3 1/3 1/5 1/23 1/345

(entries 37-43, and 45 have duplicated values)



  Posted by Charlie on 2022-06-24 12:36:49
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 (9)
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