From cjcheng@es.co.nz Wed Jun 13 14:28:34 2001
Received: from smtp2.ihug.co.nz (root@smtp2.ihug.co.nz [203.109.252.8])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f5DCSW304784
	for <prolog@swi.psy.uva.nl>; Wed, 13 Jun 2001 14:28:33 +0200 (MET DST)
Received: from cjcheng (p35-max11.dun.ihug.co.nz [203.173.238.163])
	by smtp2.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id AAA08438
	for <prolog@swi.psy.uva.nl>; Thu, 14 Jun 2001 00:28:27 +1200
X-Authentication-Warning: smtp2.ihug.co.nz: Host p35-max11.dun.ihug.co.nz [203.173.238.163] claimed to be cjcheng
Message-ID: <000a01c0f404$3a5e9ee0$0101fea9@ihug.co.nz>
From: "cjcheng" <cjcheng@es.co.nz>
To: <prolog@swi.psy.uva.nl>
Date: Thu, 14 Jun 2001 00:27:34 +1200
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0007_01C0F468.CEB1AA60"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [SWIPL] possible combinations of the sum.

This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C0F468.CEB1AA60
Content-Type: text/plain;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

I am a novice of Prolog programming. I hope to write a predicate,which =
for a given integer N, can generate a list of lists,with each list can =
be summed up to N.
e.g. =
sum(5,X)=3D>X=3D[[5],[1,4],[2,3],[1,1,3],[1,2,2],[1,1,1,2],[1,1,1,1,1]].
I already wrote one ,but if N>9, it will be really slow.

------=_NextPart_000_0007_01C0F468.CEB1AA60
Content-Type: text/html;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DMingLiu size=3D2>I am a novice of Prolog programming. =
I hope to=20
write a predicate,which for a given integer N, can generate a list of =
lists,with=20
each list can be summed up to N.</FONT></DIV>
<DIV><FONT face=3D=B2=D3=A9=FA=C5=E9 size=3D2>e.g.=20
sum(5,X)=3D&gt;X=3D[[5],[1,4],[2,3],[1,1,3],[1,2,2],[1,1,1,2],[1,1,1,1,1]=
].</FONT></DIV>
<DIV><FONT face=3D=B2=D3=A9=FA=C5=E9 size=3D2>I already wrote one ,but =
if N&gt;9, it will be really=20
slow.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0007_01C0F468.CEB1AA60--

