Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2014-12-09 05:27:56

hummmer98
Guest

help me please and fast

HIG + CAB = EDF
CIH + EDF = GBA
please help me i can t solve it. A-I is 1-9

#2 2014-12-09 05:53:23

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

There are many solutions to the first one, one of them is 124 + 659 = 783


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2014-12-09 07:17:32

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: help me please and fast

I think it needs to satisfy both.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#4 2014-12-09 11:30:03

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

This appears to be the only solution.

HIG + CAB = EDF
CIH + EDF = GBA

H = 4
I  =  3
G = 8
C = 2
A = 1
B = 9
E = 6
D = 5
F = 7


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2014-12-09 22:02:21

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

Hi Bobby,

That's also the only solution I found.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#6 2014-12-09 23:38:42

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

Hi phrontister;

What method did you like?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2014-12-10 00:28:04

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

M...the one I always use for alphametics. I couldn't work out how to get M to do the whole lot for me, though, so I got Excel to help me with the rest. I'm working on a complete solution in M right now, but it's rather messy because I don't know what I'm doing. Sort of getting there, I think, but have got some way to go yet.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#8 2014-12-10 00:36:22

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

Okay, remember you can translate what you did in Excel into M talk. It will be ugly but, "any port is good enough in a storm."


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#9 2014-12-10 02:44:40

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

Hi Bobby,

Ok...a cuppa and a midnight snack later: done! smile

My output is {4,3,8,2,1,9,6,5,7}, from which values can easily be assigned to letters manually.

I tidied up my messy code, but no doubt went about the solution process the long way round.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#10 2014-12-10 02:55:56

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

That is good enough.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#11 2014-12-10 03:08:39

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

Yes, I'm happy. Whittled it down to 6 Lines of code.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#12 2014-12-10 03:15:18

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

Can I see your approach?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#13 2014-12-10 03:19:05

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

Ok, here 'tis. I got the formula for d from SE.

p = {1, 2, 3, 4, 5, 6, 7, 8, 9}; s1 = Permutations[p, {6}];
r = Select[
   s1, (100 #[[1]] + 10 #[[2]] + #[[3]]) + (100 #[[4]] + 
        10 #[[5]] + #[[6]]) + (100 #[[4]] + 
        10 #[[2]] + #[[1]]) == (100 #[[3]] + 10 #[[6]] + #[[5]]) &];
For[n = 1, n < Length[r], n++, a = Part[r, n];
 d = DeleteDuplicates[#2~Join~#]~Drop~Length[#2] &[p, a];
 EDF = IntegerDigits[FromDigits[Take[a, 3]] + FromDigits[Take[a, -3]]];
 If[d == Sort[EDF], Print[Flatten[Append[a, EDF]]]]]

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#14 2014-12-10 03:21:08

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

That is interesting code, a bit different than mine.

SE where?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#15 2014-12-10 03:31:23

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

The fourth post...from Mr Wizard.

Last edited by phrontister (2014-12-10 10:56:26)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#16 2014-12-10 03:36:25

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

That is very good.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#17 2014-12-10 03:40:15

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

I would never have thought of it, of course. Even though I don't understand it, it was nice to be able to use it because it simplified some messy ideas I was toying with.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#18 2014-12-10 03:41:54

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

The great thing about coding is that you are allowed to use it even if you do not have any idea how it works.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#19 2014-12-10 03:44:50

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

I'll say!

That code fitted well into my plan, and worked because neither p nor a contained duplicates.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#20 2014-12-10 03:45:31

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

Is yours fast?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#21 2014-12-10 03:47:26

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

Instantaneous.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#22 2014-12-10 03:50:04

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

Then it beats mine which takes a couple of seconds.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#23 2014-12-10 03:50:09

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

Well, not exactly instantaneous...0.437500seconds, according to the Timing function.


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#24 2014-12-10 03:50:54

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: help me please and fast

What does it read with AbsoluteTiming?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#25 2014-12-10 03:53:13

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: help me please and fast

0.435430


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

Board footer

Powered by FluxBB