The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math

Topic: make 100 by using 1, 7, 7, 7, 7
Replies: 41   Last Post: Nov 15, 2007 6:13 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Robert Israel

Posts: 3,262
Registered: 2/1/07
Re: make 100 by using 1, 7, 7, 7, 7
Posted: Nov 13, 2007 3:05 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Kira Yamato <kirakun@earthlink.net> writes:

> On 2007-11-13 13:22:13 -0500, Robert Israel
> <israel@math.MyUniversitysInitials.ca> said:
>

> > "Benjamin A. Bartsch" <benjamin.a.bartsch@gmail.com> writes:
> >

> >>
> >> dangerousgam...@gmail.com schrieb:

> >>> So, using only +, -, x, /, and parentheses, and ONLY these numbers:
> >>>
> >>> 1, 7, 7, 7, 7
> >>>
> >>> how can you make 100? Is there more than one solution?

> >>
> >> --> (1/7+7)*(7+7)
> >>
> >> Benjamin

> >
> > Yes, and that's the only solution (up to commutativity).

>
> I'm very curious how you concluded this. Was it by a program that
> tests through all possible combinations?
>
> I tried to write a program too, but I stop when I couldn't quickly find
> a way to list out all possible trees with 7 leaves.


Here's my search program, written in Maple.

trees:= proc(S)
option remember;
local oper,SL,L,res,ret,V,W,v,w,R,r;
if nops(S) = 1 then {[op(S),op(S)]}
else
res:= {}; ret:= {};
for oper in [`+`,`-`,`/`,`*`] do
for SL in combinat[powerset]({$1..nops(S)}) do
if nops(SL) > 0 and nops(SL) < nops(S) then
L:= sort([seq(S[j],j=SL)]);
R:= sort([seq(S[j],j=({$1..nops(S)} minus SL))]);
V:= trees(L);
W:= trees(R);
for v in V do
for w in W do
if ((oper = `+`) or (oper = `*`)) and (v[1] > w[1]) then next
end if;
try
r:= oper(v[1],w[1]);
catch: next;
end try;
res:= res union {r};
ret:= ret union {[r, [v[2],oper,w[2]]]};
end do
end do
end if
end do
end do;
ret
end if
end proc;

> select(t -> (t[1]=100), T);

{[100, [[[1, /, 7], +, 7], *, [7, +, 7]]]}
--
Robert Israel israel@math.MyUniversitysInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada


Date Subject Author
11/12/07
Read make 100 by using 1, 7, 7, 7, 7
dangerousgame95@gmail.com
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Thomas Nordhaus
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
amzoti
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
quasi
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
dangerousgame95@gmail.com
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
magidin@math.berkeley.edu
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Thomas Nordhaus
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
quasi
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Joshua Cranmer
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Raymond Manzoni
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
William Elliot
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
amzoti
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
David R Tribble
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Nat Silver
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Raymond Manzoni
11/12/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Raymond Manzoni
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Adrian Duma
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
benjamin.a.bartsch@gmail.com
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
amzoti
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
David W. Cantrell
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
magidin@math.berkeley.edu
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
David W. Cantrell
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
magidin@math.berkeley.edu
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
briggs@encompasserve.org
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Robert Israel
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Dave Seaman
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
benjamin.a.bartsch@gmail.com
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
amzoti
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
David W. Cantrell
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Jan Kristian Haugland
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Robert Israel
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Kira Yamato
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Kira Yamato
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Robert Israel
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
amzoti
11/14/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Thomas Nordhaus
11/15/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Michael Press
11/14/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Michael Press
11/15/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Kira Yamato
11/15/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Michael Press
11/15/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Rick Decker
11/13/07
Read Re: make 100 by using 1, 7, 7, 7, 7
Raymond Manzoni

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.