Re: [eclipse-clp-users] 7.11 puzzle

From: Alexandre Saidi <Alexandre.Saidi_at_...37...>
Date: Wed, 14 Sep 2011 12:19:21 +0200
Hi,
I added 	A #>= B, B #>= C, C #> D,
to the Puzzle to discard symmetrical solutions and to speed up  :

Eclipse on Mac (Snow Leopard) :
[eclipse 5]: 
		Sum = 711,
		Product = 711,
   		Prices = [A, B, C, D],
   		A #> 0, B #> 0, C #> 0, D #> 0,		
		A #>= B, B #>= C, C #> D, 
		A + B + C + D #= Sum,
   		A * B * C * D #= Product * 1000000,
   		labeling(Prices),
   		writeln(Prices).									
		[316, 150, 125, 120]

		Sum = 711
		Product = 711
		Prices = [316, 150, 125, 120]
		A = 316
		B = 150
		C = 125
		D = 120
	
Yes (10.92s cpu, solution 1, maybe more) ? 

But, without that, I get an answer (then times more !)  : 
	==> Yes (111.26s cpu, solution 1, maybe more) ? 

Cheers

Alex


Le 13 sept. 2011 à 23:21, Sergey Dymchenko a écrit :

> It's 6.44, I believe. The prices are 1.25, 1.60, 1.75, 1.84.
> 
> ECLiPSe is such a powerful tool with very helpful community!
> 
> On Tue, Sep 13, 2011 at 11:50 PM, Joachim Schimpf <jschimpf@...311...> wrote:
>> Sergey Dymchenko wrote:
>>> Hi!
>>> 
>>> I'm trying to solve this puzzle: http://programmingpraxis.com/2009/11/27/7-11/
>>> 
>> 
>> By the way, you can make the same puzzle with numbers
>> smaller than 7.11 -- what's the smallest?
>> 
>> -- Joachim
>> 
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>> Learn about the latest advances in developing for the
>> BlackBerry&reg; mobile platform with sessions, labs & more.
>> See new tools and technologies. Register for BlackBerry&reg; DevCon today!
>> http://p.sf.net/sfu/rim-devcon-copy1
>> _______________________________________________
>> ECLiPSe-CLP-Users mailing list
>> ECLiPSe-CLP-Users_at_lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
>> 
> 
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> Learn about the latest advances in developing for the 
> BlackBerry&reg; mobile platform with sessions, labs & more.
> See new tools and technologies. Register for BlackBerry&reg; DevCon today!
> http://p.sf.net/sfu/rim-devcon-copy1 
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users

 -------------------------------
Alexandre Saidi
Maitre de Conférences
Ecole Centrale de Lyon-Dép. MI
LIRIS-CNRS UMR 5205
Tél : 0472186530, Fax : 0472186443
Received on Wed Sep 14 2011 - 10:34:24 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST