Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Arithmetic Puzzle (so simple it's hard)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71351] Re: [mg71301] Arithmetic Puzzle (so simple it's hard)
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 15 Nov 2006 06:45:00 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Using brute force

chars=Characters/@{"BUT","ASK","FEAST"};

nbrs=FromDigits/@chars;

dgts={0,1,2,4,5,6,7,9};

subs=(Thread[#->dgts]&/@
        Permutations[Union[Flatten[chars]]]);

soln=Union/@Select[subs,
      Times@@Most[nbrs]==Last[nbrs]/.#&]

{{"A" -> 4, "B" -> 0, "E" -> 7, "F" -> 2, "K" -> 1, 
   "S" -> 9, "T" -> 6, "U" -> 5}, {"A" -> 1, "B" -> 6, 
   "E" -> 5, "F" -> 9, "K" -> 2, "S" -> 4, "T" -> 0, 
   "U" -> 7}}


Bob Hanlon

---- Bruce Colletti <vze269bv at verizon.net> wrote: 
> How would this problem be solved in Mathematica?
> 
> BUT * ASK = FEAST, where each letter is a 1-digit number, no two letters may stand for the same number, and the letters are in {0,1,2,4,5,6,7,9}.
> 
> Thankx.
> 
> Bruce
> 


  • Prev by Date: Re: List difference using patterns and substitutions.
  • Next by Date: Re: Arithmetic Puzzle (so simple it's hard)
  • Previous by thread: Re: Arithmetic Puzzle (so simple it's hard)
  • Next by thread: Re: Arithmetic Puzzle (so simple it's hard)