Measure my old Ruler

On my worn 39 39 cm ruler, the only marks remaining are at

0 , 8 , 15 , 17 , 20 , 21 , 31 , and 0, 8, 15, 17, 20, 21, 31, \text{and} 39. 39.

What is the shortest distance that cannot be measured between 2 2 marks ?


The answer is 25.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Don Antony
Jun 27, 2014

For 1:20-21. 2:15-17. 3:17-20. 4:17-21. 5:15-20. 6:15-21. 7:8-15. 8:0-8. 9:8-17. 10:21-31. 11:20-31. 12:8-20. 13:8-21. 14:17-31. 15:0-15. 16:15-31. 17:0-17. 18:21-39. 19:20-39. 20:0-20. 21:0-21. 22:17-39. 23:8-31. 24:15-39. 25: cannot be measured So 25 is the least length that cannot be measured

Damiann Mangan
Jun 27, 2014

Here's simple python code that solves this problem.

l = [0,8,15,17,20,21,31,39]
p = range(40)
d = []

for i in l:
    for j in l:
        d += [abs(i-j)]

print min(list(set(p) - set(d)))

Which returns 25 25 .

Nice approach

Chung Kevin - 6 years, 11 months ago

Log in to reply

Why, thank you.

Damiann Mangan - 6 years, 11 months ago

First set up a table of distances measurable by two marks. Start with the series visible marks. Then find the distances 1-mark away (minus the value of previous mark), 2-, 3-mark and so on.

  • Visible marks: 0, 8, 15, 17, 20, 21, 31, 39
  • 1-mark away: 8, 7, 2, 3, 1, 10, 8
  • 2-mark away: 15 , 9, 5, 4, 11, 18
  • 3-mark away: 17, 12, 6, 14, 19
  • 4-mark away: 20, 13, 16, 22
  • 5-mark away: 21, 23, 24
  • 6-mark away: 31, 31
  • 7-mark away: 39

The above are all measurable distances using the ruler. To find the shortest distance not measurable, we sort the data and we get what follows.

1 2 3 4 5 6 7 8 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 31 31 39

It can be seen that the first one missing from sequence and hence the shortest distance not measurable is 25 \boxed{25} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...