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

 Half odd, half even (Posted on 2014-10-16)
How many distinct solutions are there to the alphametic
EO*OE=OEOE?

What if Itold you that the two partial products are:
OOO & EEE?

O & E stand for odd and even digits respectively.

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 2 of 3 |
DefDbl A-Z
Dim crlf\$, used(9)

ChDir "C:\Program Files (x86)\DevStudio\VB\projects\flooble"
Text1.Text = ""
crlf\$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents

For a = 2 To 8 Step 2
For b = 1 To 9 Step 2
For c = 1 To 9 Step 2
For d = 0 To 8 Step 2
ab = 10 * a + b
cd = 10 * c + d
prod = ab * cd
pr\$ = LTrim(Str(prod))
If InStr("13579", Mid(pr\$, 1, 1)) > 0 Then
If InStr("02468", Mid(pr\$, 2, 1)) > 0 Then
If InStr("13579", Mid(pr\$, 3, 1)) > 0 Then
If InStr("02468", Mid(pr\$, 4, 1)) > 0 Then
Text1.Text = Text1.Text & ab & Str(cd) & "   " & prod
good = 1
pp1\$ = LTrim(Str(ab * d))
pp2\$ = LTrim(Str(ab * c))
If Len(pp1) = 3 And Len(pp2) = 3 Then
For i = 1 To 3
If InStr("02468", Mid(pp1, i, 1)) > 0 Then Mid(pp1, i, 1) = "e" Else Mid(pp1, i, 1) = "o"
If InStr("02468", Mid(pp2, i, 1)) > 0 Then Mid(pp2, i, 1) = "e" Else Mid(pp2, i, 1) = "o"
Next
If pp1 = "ooo" And pp2 = "eee" Or pp1 = "eee" And pp2 = "ooo" Then
Text1.Text = Text1.Text & " * "
End If
End If
pp1\$ = LTrim(Str(cd * b))
pp2\$ = LTrim(Str(cd * a))
If Len(pp1) = 3 And Len(pp2) = 3 Then
For i = 1 To 3
If InStr("02468", Mid(pp1, i, 1)) > 0 Then Mid(pp1, i, 1) = "e" Else Mid(pp1, i, 1) = "o"
If InStr("02468", Mid(pp2, i, 1)) > 0 Then Mid(pp2, i, 1) = "e" Else Mid(pp2, i, 1) = "o"
Next
If pp1 = "ooo" And pp2 = "eee" Or pp1 = "eee" And pp2 = "ooo" Then
Text1.Text = Text1.Text & " r "
End If
End If

Text1.Text = Text1.Text & crlf
ct = ct + 1
DoEvents
End If
End If
End If
End If
Next
Next
Next
Next

Text1.Text = Text1.Text & ct & crlf & "done"
End Sub

finds 65 distinct solutions:

`EO OE   OEOE21 50   105021 52   109221 58   121821 70   147021 78   163821 90   189023 70   161023 72   165625 50   125025 58   145025 74   185027 54   145827 70   189029 50   145041 30   123041 36   147641 74   303441 90   369041 94   385443 30   129043 38   163443 70   301043 72   309643 90   387047 30   141047 36   169247 70   329047 74   347849 30   147049 70   343061 18   109861 30   183061 50   305061 54   329461 56   341661 90   549061 92   561261 96   585663 30   189063 52   327663 58   365463 90   567065 50   325065 78   507065 90   585067 16   107267 54   3618 * 67 76   509269 50   345081 16   129681 18   145881 38   307881 70   567081 72   583281 90   729081 92   745281 94   761483 18   149483 70   581083 90   747083 92   763685 38   323085 90   765087 14   121887 90   7830`

The one marked with an asterisk is the only one that has the two given partial products.

 Posted by Charlie on 2014-10-16 15:07:00

 Search: Search body:
Forums (0)