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

Home > Numbers
Six sets (Posted on 2014-02-17) Difficulty: 3 of 5
Please scrutinize the following sets of integers:

S1 (2, 5, 8)
S2 (22, 55, 888, 201)
S3 (232, 88781, 20)
S4 (1, 635, 5, 868, 781, 20 ,115)
S5 (26, 3 ,19, 110, 35, 544, 82, 68, 781, 207)
S6 (3 ,14, 15, 926, 535)


I am choosing one random member from each set :
e.g. 2, 888, 20, 1, 544 and 926.

Sum of those numbers apparently ends by 1.

How many distinct results generated this way will terminate by 1?

How many by a zero digit?

Any comments?

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 7

DATA 2,5,8
DATA 22,55,888,201
DATA 232,88781,20
DATA 1,635,5,868,781,20,115
DATA 26,3,19,110,35,544,82,68,781,207
DATA 3, 14, 15, 926, 535

DIM s(6, 10)
FOR a = 1 TO 3: READ s(1, a): NEXT
FOR b = 1 TO 4: READ s(2, b): NEXT
FOR c = 1 TO 3: READ s(3, c): NEXT
FOR d = 1 TO 7: READ s(4, d): NEXT
FOR e = 1 TO 10: READ s(5, e): NEXT
FOR f = 1 TO 5: READ s(6, f): NEXT

KILL "sixsetsb.txt"
OPEN "sixsetsb.txt" FOR BINARY AS #1

FOR a = 1 TO 3
FOR b = 1 TO 4
  t2 = s(1, a) + s(2, b)
FOR c = 1 TO 3
  t3 = t2 + s(3, c)
FOR d = 1 TO 7
  t4 = t3 + s(4, d)
FOR e = 1 TO 10
  t5 = t4 + s(5, e)
FOR f = 1 TO 5
  t6 = t5 + s(6, f)
  n$ = " "
  GET #1, t6, n$
  v = ASC(n$) + 1
  n$ = CHR$(v)
  PUT #1, t6, n$
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT

l = LOF(1)

OPEN "sixsets1.txt" FOR OUTPUT AS #2
OPEN "sixsets0.txt" FOR OUTPUT AS #3
DIM lastdigtot(9), lastdigct(9)

FOR psn = 1 TO l
     lastdig = psn MOD 10
     GET #1, psn, n$
     v = ASC(n$)
     IF v > 0 THEN
       IF v > 1 THEN PRINT psn; v, : bigct = bigct + 1
       lastdigtot(lastdig) = lastdigtot(lastdig) + v
       lastdigct(lastdig) = lastdigct(lastdig) + 1
       IF v > 1 AND lastdig = 1 THEN PRINT #2, psn; v
       IF v > 1 AND lastdig = 0 THEN PRINT #3, psn; v
     END IF
NEXT
PRINT : PRINT

CLOSE

FOR i = 0 TO 9
  PRINT i, lastdigtot(i), lastdigct(i)
NEXT

PRINT bigct

finds the following list


ending         total       distinct
digit          ways         results

 0             1260          455
 1             1260          460
 2             1260          457
 3             1260          458
 4             1260          449
 5             1260          457
 6             1260          456
 7             1260          460
 8             1260          459
 9             1260          448

3085 possible totals have more than one way of occurring. This results in the curious fact that althogh there are different numbers of distinct results for most ending digits, the number of ways is equal, so that if a sampling from each set is taken at random, the probability of any given ending digit is the same.

Those totals that have more than one way of being produced and end in zero are:

total ways
 70   3
 90   3
 100  4
 110  3
 120  4
 130  4
 140  2
 150  2
 160  2
 170  3
 180  5
 200  3
 210  3
 230  3
 250  2
 260  3
 270  4
 280  7
 290  4
 300  5
 310  8
 320  5
 330  5
 340  5
 350  6
 360  3
 370  3
 380  5
 390  3
 400  3
 410  3
 420  4
 440  4
 450  2
 460  4
 470  4
 480  5
 490  4
 500  3
 510  3
 540  3
 560  2
 570  2
 590  3
 610  3
 620  2
 640  3
 650  3
 670  2
 680  2
 700  4
 720  5
 730  3
 750  3
 790  3
 800  4
 810  4
 820  3
 830  4
 840  6
 850  4
 860  5
 870  6
 880  6
 890  2
 900  4
 910  5
 920  2
 930  4
 940  8
 950  5
 960  6
 970  6
 980  8
 990  5
 1000  11
 1010  8
 1020  3
 1030  8
 1040  5
 1050  3
 1060  8
 1070  2
 1080  6
 1090  6
 1100  5
 1110  9
 1120  8
 1130  3
 1140  9
 1150  4
 1160  6
 1170  10
 1180  6
 1190  3
 1200  8
 1210  5
 1220  5
 1230  5
 1240  8
 1250  6
 1260  6
 1270  8
 1280  3
 1290  5
 1300  2
 1320  3
 1330  2
 1340  7
 1350  3
 1360  2
 1370  2
 1380  3
 1390  3
 1400  5
 1410  2
 1420  3
 1430  3
 1440  3
 1450  5
 1470  3
 1480  3
 1500  3
 1510  3
 1530  2
 1540  4
 1550  3
 1560  2
 1570  3
 1580  3
 1590  3
 1600  3
 1610  3
 1620  3
 1630  5
 1640  4
 1660  7
 1670  4
 1680  3
 1690  7
 1700  6
 1710  4
 1720  5
 1730  5
 1740  3
 1760  4
 1770  5
 1780  6
 1790  7
 1800  3
 1810  7
 1820  2
 1840  3
 1850  2
 1860  8
 1870  4
 1880  3
 1890  3
 1900  3
 1910  3
 1920  4
 1930  2
 1940  4
 1950  3
 1960  2
 1970  4
 1980  2
 2000  5
 2020  2
 2030  5
 2040  2
 2070  2
 2090  4
 2110  2
 2120  2
 2130  2
 2150  2
 2170  2
 2180  3
 2210  2
 2230  3
 2260  3
 2290  2
 2300  2
 2340  2
 2400  2
 2480  2
 2490  2
 2520  2
 2540  3
 2600  2
 2630  2
 2710  2
 2730  2
 2780  3
 2830  2
 2870  2
 3010  2
 88830  2
 88850  5
 88860  4
 88880  6
 88890  2
 88910  5
 88930  2
 88940  4
 88960  3
 88970  4
 89010  3
 89020  3
 89030  4
 89040  2
 89050  4
 89060  3
 89070  3
 89080  3
 89120  3
 89140  2
 89210  2
 89360  2
 89370  3
 89380  2
 89390  2
 89400  3
 89460  2
 89470  2
 89480  3
 89490  4
 89510  2
 89520  2
 89540  2
 89550  4
 89570  4
 89600  3
 89610  2
 89620  2
 89630  4
 89640  5
 89660  8
 89690  4
 89700  4
 89710  7
 89720  4
 89730  3
 89740  3
 89750  7
 89760  3
 89770  3
 89780  4
 89790  5
 89800  7
 89810  6
 89820  3
 89830  3
 89840  3
 89850  3
 89890  2
 89900  5
 89910  2
 89920  3
 89930  2
 89940  5
 89950  2
 89990  2
 90000  2
 90010  2
 90040  2
 90060  2
 90140  2
 90150  2
 90160  2
 90180  5
 90220  2
 90230  4
 90240  3
 90250  2
 90260  2
 90270  4
 90320  2
 90330  3
 90340  2
 90350  4
 90390  2
 90410  2
 90420  3
 90440  2
 90460  2
 90470  3
 90480  2
 90490  3
 90540  2
 90550  2
 90560  2
 90570  3
 90580  6
 90600  2
 90620  2
 90630  5
 90640  2
 90670  4
 90680  2
 90700  2
 90720  2
 90800  2
 90850  2
 90860  2
 90870  2
 91010  2
 91100  3

and those ending in 1 (and having more than one way of being produced):

 81  3
 91  2
 101  4
 111  3
 121  3
 131  5
 141  4
 161  3
 171  3
 181  3
 191  3
 201  2
 221  2
 241  3
 261  5
 271  4
 281  5
 291  4
 301  6
 311  6
 321  3
 331  9
 341  3
 361  6
 371  3
 381  4
 391  5
 411  3
 421  5
 441  3
 451  3
 461  3
 471  4
 481  4
 491  2
 501  4
 511  3
 521  3
 531  3
 551  2
 571  3
 591  2
 611  2
 621  3
 631  3
 641  3
 651  3
 661  4
 681  3
 691  2
 701  2
 721  2
 751  2
 761  2
 771  2
 781  4
 791  2
 801  5
 811  3
 821  3
 831  5
 841  4
 851  6
 861  2
 871  2
 881  6
 891  4
 901  4
 911  6
 921  5
 931  4
 941  9
 951  7
 961  9
 971  7
 981  3
 991  5
 1001  9
 1011  5
 1021  6
 1031  6
 1041  6
 1051  4
 1061  7
 1071  5
 1081  7
 1091  8
 1101  2
 1111  12
 1121  4
 1131  5
 1141  6
 1151  5
 1161  9
 1171  4
 1181  4
 1191  6
 1201  9
 1211  4
 1221  6
 1231  6
 1241  8
 1251  8
 1261  6
 1271  5
 1281  3
 1291  3
 1301  4
 1321  2
 1331  2
 1341  2
 1351  5
 1361  4
 1371  4
 1381  2
 1391  5
 1401  4
 1411  2
 1431  4
 1441  2
 1451  2
 1461  5
 1471  5
 1481  6
 1491  5
 1511  4
 1521  5
 1531  2
 1551  4
 1561  2
 1581  3
 1591  3
 1601  4
 1611  3
 1621  2
 1631  8
 1641  3
 1661  3
 1671  2
 1681  4
 1691  3
 1701  4
 1711  6
 1721  5
 1731  4
 1741  3
 1751  2
 1761  2
 1771  3
 1781  3
 1791  6
 1801  5
 1811  2
 1821  4
 1831  2
 1841  3
 1861  4
 1871  3
 1881  4
 1891  4
 1911  3
 1921  3
 1931  3
 1941  5
 1951  3
 1961  2
 1971  2
 1981  2
 1991  6
 2001  4
 2011  2
 2021  3
 2031  7
 2051  5
 2061  2
 2071  2
 2081  6
 2091  3
 2121  5
 2131  2
 2141  2
 2151  3
 2161  2
 2171  2
 2231  3
 2251  3
 2261  3
 2301  3
 2311  3
 2321  2
 2331  3
 2341  2
 2381  2
 2461  2
 2551  3
 2571  2
 2861  2
 2911  2
 88831  3
 88851  3
 88861  4
 88871  3
 88881  4
 88891  4
 88901  2
 88911  2
 88921  2
 88931  3
 88941  5
 88961  3
 88971  3
 88991  3
 89011  2
 89021  3
 89031  3
 89041  6
 89051  2
 89071  4
 89081  3
 89101  2
 89131  2
 89181  2
 89201  2
 89371  3
 89401  3
 89431  2
 89461  4
 89481  5
 89491  3
 89511  3
 89551  3
 89561  4
 89571  3
 89591  2
 89601  3
 89611  2
 89621  3
 89631  2
 89641  5
 89651  2
 89661  2
 89671  4
 89701  7
 89711  5
 89721  4
 89731  5
 89741  3
 89751  2
 89761  8
 89771  4
 89791  8
 89801  4
 89811  3
 89821  4
 89841  4
 89851  2
 89861  3
 89871  3
 89881  4
 89891  2
 89901  6
 89911  2
 89921  2
 89931  2
 89941  2
 89961  2
 89971  2
 89981  2
 90001  3
 90011  2
 90031  3
 90121  2
 90141  2
 90181  3
 90231  3
 90241  3
 90271  2
 90301  2
 90311  2
 90321  2
 90331  3
 90341  2
 90351  2
 90361  3
 90391  3
 90421  6
 90431  3
 90451  2
 90461  3
 90471  3
 90481  3
 90501  2
 90531  3
 90541  2
 90551  4
 90561  2
 90571  5
 90621  3
 90631  2
 90641  2
 90651  2
 90661  3
 90701  2
 90711  2
 90761  2
 90871  2
 90941  2
 90991  2
 91101  2
 91241  2
 91251  2
 91491  2

 

Edited on February 18, 2014, 11:40 pm
  Posted by Charlie on 2014-02-17 13:08:09

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 (14)
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