Not logged in. · Lost password · Register

avdh
Member for 2 months
1 post
Subject: Permutations Assignment 1
I have a question regarding problem 1.1.3 myPermutations:
Is the function supposed to take duplicates into account or is a naive implementation of permutations sufficient?

For example is it ok for
?- myPermutations([1, 2, 2], X).
to output
X = [1, 2, 2]
X = [2, 1, 2]
X = [2, 2, 1]
X = [1, 2, 2]
X = [2, 1, 2]
X = [2, 2, 1]
or does it have to be
X = [1, 2, 2]
X = [2, 1, 2]
X = [2, 2, 1]

Thanks in advance.
katjab
Member for 2 months
54 posts
Sorry about the late reply - we'll count both solutions as correct.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Datenschutz | Kontakt
Powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2011 by Yves Goergen