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

 To-day is Monday & a PIday (Posted on 2016-03-14)
The 9 numbers and 7 Xs of the set (1,2,3,4,5,6,7,8,9,X,X,X,X,X,X,X ) were placed in a 4x4 grid to create a matrix as follows:
X 4 8 9
5 6 X 7
1 X X X
3 2 X X
Consider the Xs as black squares in a crossword and evaluate the sum of the sums taken per row: Sr=489+(56+7)+1+32=585.
Same operation per column: Sc= 513+(46+2)+8+97=666
Evaluate the ratio r= Sr/ Sc=585/666= 0.878378...

Distribute the 9 non-zero digits and 7 black squares in a 4x4 grid so
that the ratio r, calculated as in the example above will be as close
to the value of pi (=3.14159265…) as possible.

HaPPy Pi day, every Person.

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer-generated solving aid | Comment 1 of 13
355/113 is a good approximation to pi, so if you could get the totals to be these two, you've got a good approximation,   3.141592920353983.

333/106, the previous level in a continued fraction approximation, is not as good,  3.141509433962264.

Of course multiples of the numerator and denominator of each of these, such as 710/226, would be the same good approximations.

Combining the two numerators and two denominators can give good approximations also. For example, the worst approximation shown below, 3.14160263 which is 2862/911, is (9*355+1*333)/(9*113+1*106).  All are shown reduced to simplest form.

`discrepancy    value     numerator/denominator0.00000127   3.14159138  18083/57560.00000130   3.14159135  17728/56430.00000133   3.14159132  17373/55300.00000137   3.14159129  17018/54170.00000140   3.14159125  16663/53040.00000144   3.14159122  16308/51910.00000148   3.14159118  15953/50780.00000152   3.14159114  15598/49650.00000156   3.14159110  15243/48520.00000160   3.14159105  14888/47390.00000165   3.14159101  14533/46260.00000169   3.14159096  14178/45130.00000174   3.14159091  13823/44000.00000180   3.14159086  13468/42870.00000185   3.14159080  13113/41740.00000186   3.14159452  17417/55440.00000190   3.14159455  17062/54310.00000191   3.14159074  12758/40610.00000193   3.14159458  16707/53180.00000197   3.14159068  12403/39480.00000197   3.14159462  16352/52050.00000200   3.14159466  15997/50920.00000204   3.14159061  12048/38350.00000204   3.14159470  15642/49790.00000209   3.14159474  15287/48660.00000211   3.14159054  11693/37220.00000213   3.14159478  14932/47530.00000217   3.14159483  14577/46400.00000219   3.14159047  11338/36090.00000222   3.14159488  14222/45270.00000226   3.14159039  10983/34960.00000227   3.14159493  13867/44140.00000232   3.14159498  13512/43010.00000235   3.14159030  10628/33830.00000238   3.14159503  13157/41880.00000244   3.14159021  10273/32700.00000244   3.14159509  12802/40750.00000250   3.14159515  12447/39620.00000254   3.14159012  9918/31570.00000257   3.14159522  12092/38490.00000264   3.14159001  9563/30440.00000264   3.14159529  11737/37360.00000271   3.14159536  11382/36230.00000275   3.14158990  9208/29310.00000279   3.14159544  11027/35100.00000281   3.14158984  18061/57490.00000287   3.14158978  8853/28180.00000287   3.14159553  10672/33970.00000294   3.14158972  17351/55230.00000296   3.14159562  10317/32840.00000300   3.14158965  8498/27050.00000306   3.14159571  9962/31710.00000307   3.14158958  16641/52970.00000315   3.14158951  8143/25920.00000316   3.14159581  9607/30580.00000322   3.14158943  15931/50710.00000327   3.14159593  9252/29450.00000330   3.14158935  7788/24790.00000339   3.14158927  15221/48450.00000339   3.14159605  8897/28320.00000347   3.14158918  7433/23660.00000352   3.14159618  8542/27190.00000357   3.14158909  14511/46190.00000359   3.14159624  16729/53250.00000366   3.14158899  7078/22530.00000366   3.14159632  8187/26060.00000374   3.14159639  16019/50990.00000376   3.14158889  13801/43930.00000382   3.14159647  7832/24930.00000387   3.14158879  6723/21400.00000390   3.14159655  15309/48730.00000398   3.14158867  13091/41670.00000399   3.14159664  7477/23800.00000408   3.14159673  14599/46470.00000410   3.14158855  6368/20270.00000417   3.14159682  7122/22670.00000418   3.14158847  18749/59680.00000422   3.14158843  12381/39410.00000427   3.14158839  18394/58550.00000427   3.14159692  13889/44210.00000436   3.14158830  6013/19140.00000438   3.14159703  6767/21540.00000445   3.14158820  17684/56290.00000449   3.14159714  13179/41950.00000450   3.14158816  11671/37150.00000455   3.14158811  17329/55160.00000460   3.14159726  6412/20410.00000465   3.14158801  5658/18010.00000473   3.14159738  12469/39690.00000475   3.14158790  16619/52900.00000481   3.14158785  10961/34890.00000486   3.14158779  16264/51770.00000486   3.14159751  6057/19280.00000498   3.14158768  5303/16880.00000500   3.14159765  11759/37430.00000510   3.14158756  15554/49510.00000514   3.14159780  5702/18150.00000516   3.14158750  10251/32630.00000522   3.14158743  15199/48380.00000525   3.14159790  16751/53320.00000530   3.14159795  11049/35170.00000535   3.14158730  4948/15750.00000535   3.14159801  16396/52190.00000547   3.14159812  5347/17020.00000549   3.14158716  14489/46120.00000556   3.14158709  9541/30370.00000558   3.14159824  15686/49930.00000563   3.14158702  14134/44990.00000564   3.14159830  10339/32910.00000567   3.14158698  18727/59610.00000571   3.14159836  15331/48800.00000579   3.14158687  4593/14620.00000584   3.14159849  4992/15890.00000591   3.14158675  18017/57350.00000595   3.14158671  13424/42730.00000597   3.14159862  14621/46540.00000603   3.14158662  8831/28110.00000604   3.14159869  9629/30650.00000611   3.14159877  14266/45410.00000612   3.14158654  13069/41600.00000616   3.14158649  17307/55090.00000626   3.14159892  4637/14760.00000629   3.14158636  4238/13490.00000642   3.14159907  13556/43150.00000643   3.14158622  16597/52830.00000648   3.14158617  12359/39340.00000650   3.14159915  8919/28390.00000658   3.14158607  8121/25850.00000658   3.14159924  13201/42020.00000668   3.14158597  12004/38210.00000673   3.14158592  15887/50570.00000676   3.14159941  4282/13630.00000689   3.14158576  3883/12360.00000694   3.14159960  12491/39760.00000703   3.14158563  19060/60670.00000704   3.14159969  8209/26130.00000706   3.14158559  15177/48310.00000712   3.14158554  11294/35950.00000714   3.14159979  12136/38630.00000716   3.14158549  18705/59540.00000719   3.14159984  16063/51130.00000724   3.14158542  7411/23590.00000731   3.14158534  18350/58410.00000735   3.14160000  3927/12500.00000736   3.14158530  10939/34820.00000742   3.14158523  14467/46050.00000746   3.14158520  17995/57280.00000751   3.14160016  15353/48870.00000757   3.14160022  11426/36370.00000761   3.14158504  3528/11230.00000768   3.14160034  7499/23870.00000778   3.14158488  17285/55020.00000780   3.14160045  11071/35240.00000782   3.14158484  13757/43790.00000786   3.14160051  14643/46610.00000789   3.14158477  10229/32560.00000794   3.14158471  16930/53890.00000803   3.14158462  6701/21330.00000805   3.14160070  3572/11370.00000812   3.14158453  16575/52760.00000818   3.14158447  9874/31430.00000825   3.14160090  13933/44350.00000826   3.14158440  13047/41530.00000830   3.14158435  16220/51630.00000832   3.14160097  10361/32980.00000833   3.14158432  19393/61730.00000846   3.14160111  6789/21610.00000850   3.14158416  3173/10100.00000860   3.14160126  10006/31850.00000866   3.14158399  18683/59470.00000868   3.14160133  13223/42090.00000870   3.14158396  15510/49370.00000875   3.14158391  12337/39270.00000883   3.14158382  9164/29170.00000891   3.14158375  15155/48240.00000891   3.14160156  3217/10240.00000901   3.14158364  5991/19070.00000910   3.14160176  15730/50070.00000913   3.14158353  14800/47110.00000915   3.14160181  12513/39830.00000920   3.14158345  8809/28040.00000924   3.14160189  9296/29590.00000930   3.14158336  11627/37010.00000931   3.14160196  15375/48940.00000936   3.14158330  14445/45980.00000940   3.14158326  17263/54950.00000941   3.14160207  6079/19350.00000942   3.14158323  20081/63920.00000952   3.14160218  15020/47810.00000960   3.14158305  2818/8970.00000960   3.14160225  8941/28460.00000969   3.14160234  11803/37570.00000975   3.14160240  14665/46680.00000978   3.14158287  19371/61660.00000981   3.14158284  16553/52690.00000985   3.14158280  13735/43720.00000992   3.14158273  10917/34750.00000997   3.14158269  19016/60530.00000998   3.14160263  2862/911`

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

pi = 4 * Atn(1)

n1 = 333: d1 = 106
n2 = 355: d2 = 113

For frst = -50 To 50
For scond = -50 To 50
DoEvents
If frst <> 0 And scond <> 0 Then
If gcd(frst, scond) = 1 Then
num = frst * n1 + scond * n2
den = frst * d1 + scond * d2
If num > 0 And den > 0 And Abs(pi - num / den) < 0.00001 Then
g = gcd(num, den)
num = num / g
den = den / g
Text1.Text = Text1.Text & mform(Abs(pi - num / den), "0.00000000") & mform(num / den, "###0.00000000") & "  " & num & "/" & den & crlf
End If
End If
End If
Next
Next

Text1.Text = Text1.Text & crlf & " done"

End Sub

Function gcd(a, b)
x = a: y = b
Do
q = Int(x / y)
z = x - q * y
x = y: y = z
Loop Until z = 0
gcd = x
End Function

Function mform\$(x, t\$)
a\$ = Format\$(x, t\$)
If Len(a\$) < Len(t\$) Then a\$ = Space\$(Len(t\$) - Len(a\$)) & a\$
mform\$ = a\$
End Function

 Posted by Charlie on 2016-03-14 09:05:33

 Search: Search body:
Forums (0)