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

Home > General
Counting Ten Segment Paths (Posted on 2016-02-19) Difficulty: 2 of 5
Multiple paths can be drawn on the grid below following along ten of the twelve segments but never using any segment twice.
+--+--+
|  |  |
+--+--+
|  |  |
+--+--+
How many such paths are there?

No Solution Yet Submitted by Brian Smith    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution re: As many as I found | Comment 3 of 6 |
(In reply to As many as I found by Jer)

Using only what on Jer's diagram (assuming the first f should be e) would start hk, I get the following paths,

hkifcadgjl  be
hkifcadgeb  jl
hkifcabegd  jl
hkifcabejl  dg
hkidacfgjl  be
hkidacfgeb  jl
hkidbegfca  jl
hkigebacfd  jl
hkigebdfca  jl
hkljgfcadi  be
hkljgfcabe  di
hkljgdacfi  be
hkljebacfi  dg
hkljebacfd  gi
hkljebacfg  di
hkljebdfca  gi

showing the missing segments after the path,

from the following segment of my computer results:

01,00,10,11,01,02,12,11,21,20,10,
01,00,10,11,01,02,12,11,21,22,12,
01,00,10,11,01,02,12,22,21,11,12,
01,00,10,11,01,02,12,22,21,20,10,
01,00,10,11,12,02,01,11,21,20,10,
01,00,10,11,12,02,01,11,21,22,12,
01,00,10,11,12,22,21,11,01,02,12,
01,00,10,11,21,22,12,02,01,11,12,
01,00,10,11,21,22,12,11,01,02,12,
01,00,10,20,21,11,01,02,12,11,10,
01,00,10,20,21,11,01,02,12,22,21,
01,00,10,20,21,11,12,02,01,11,10,
01,00,10,20,21,22,12,02,01,11,10,
01,00,10,20,21,22,12,02,01,11,12,
01,00,10,20,21,22,12,02,01,11,21,
01,00,10,20,21,22,12,11,01,02,12,

using the reference:

a: 02,12 12,02
b: 12,22 22,12
c: 01,02 02,01
d: 11,12 12,11
e: 21,22 22,21
f: 01,11 11,01
g: 11,21 21,11
h: 00,01 01,00
i: 10,11 11,10
j: 20,21 21,20
k: 00,10 10,00
l: 10,20 20,10

DefDbl A-Z
Dim crlf$, seg(12) As String

Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 Open "ten seg ref.txt" For Input As #1
 For i = 1 To 12
   Line Input #1, seg(i)
 Next
 
 Close 1
 
 Open "ten seg input.txt" For Input As #1
 
 Do
   Line Input #1, l$
   bld$ = ""
   For i = 1 To 28 Step 3
     lkup$ = Mid(l, i, 5)
     For j = 1 To 12
       If InStr(seg(j), lkup) > 0 Then Exit For
     Next
     If j > 12 Then Text1.Text = Text1.Text & "error": Exit Sub
     Text1.Text = Text1.Text & Left(seg(j), 1)
     bld = bld & Left(seg(j), 1)
   Next
   Text1.Text = Text1.Text & "  "
   For i = 1 To 12
    If InStr(bld, Mid("abcdefghijkl", i, 1)) = 0 Then Text1.Text = Text1.Text & Mid("abcdefghijkl", i, 1)
   Next
   Text1.Text = Text1.Text & crlf
 Loop Until EOF(1)
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub


  Posted by Charlie on 2016-02-19 14:09:29
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 (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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