对5个表过滤三个条件
let l13 = filter filter10 (filter filter11 (filter filter15 l11))
let l23 = filter filter10 (filter filter11 (filter filter15 l21))
let l33 = filter filter10 (filter filter11 (filter filter15 l3))
let l43 = filter filter10 (filter filter11 (filter filter15 l4))
let l53 = filter filter10 (filter filter11 (filter filter15 l51))
Prelude> l13
[(1,'B','N','H','B','U'),(1,'B','N','F','B','U'),(1,'Y','N','C','W','D'),(1,'Y','N','C','B','D'),(1,'Y','N','F','W','D'),(1,'Y','N','F','B','D'),(1,'G','N','H','C','U'),(1,'G','N','F','C','U')]
Prelude> l23
[(2,'B','G','C','W','R'),(2,'B','G','C','B','R'),(2,'B','G','H','W','R'),(2,'B','G','H','B','R'),(2,'B','G','F','W','R'),(2,'B','G','F','B','R'),(2,'B','S','D','B','U'),(2,'B','D','H','T','U'),(2,'B','D','F','T','U')]
Prelude> l33
[(3,'R','E','H','M','U'),(3,'R','E','F','M','U'),(3,'B','G','C','M','R'),(3,'B','G','H','M','R'),(3,'B','G','F','M','R'),(3,'B','S','D','M','U'),(3,'Y','S','D','M','D'),(3,'W','G','C','M','R'),(3,'W','G','H','M','R'),(3,'W','G','F','M','R'),(3,'W','S','D','M','U')]
Prelude> l43
[(4,'R','E','H','B','U'),(4,'R','E','F','B','U'),(4,'B','G','C','W','R'),(4,'B','G','C','B','R'),(4,'B','G','H','W','R'),(4,'B','G','H','B','R'),(4,'B','G','F','W','R'),(4,'B','G','F','B','R'),(4,'B','S','D','B','U'),(4,'B','D','H','T','U'),(4,'B','D','F','T','U'),(4,'Y','S','D','W','D'),(4,'Y','S','D','B','D'),(4,'Y','D','C','T','D'),(4,'Y','D','F','T','D'),(4,'W','G','C','W','R'),(4,'W','G','C','B','R'),(4,'W','G','H','W','R'),(4,'W','G','H','B','R'),(4,'W','G','F','W','R'),(4,'W','G','F','B','R'),(4,'W','S','D','B','U'),(4,'W','D','H','T','U'),(4,'W','D','F','T','U'),(4,'G','G','C','C','R'),(4,'G','G','H','C','R'),(4,'G','G','F','C','R'),(4,'G','S','D','C','U')]
Prelude> l53
[(5,'R','E','H','B','U'),(5,'R','E','F','B','U'),(5,'B','G','C','W','R'),(5,'B','G','C','B','R'),(5,'B','G','H','W','R'),(5,'B','G','H','B','R'),(5,'B','G','F','W','R'),(5,'B','G','F','B','R'),(5,'B','S','D','B','U'),(5,'B','D','H','T','U'),(5,'B','D','F','T','U'),(5,'Y','S','D','W','D'),(5,'Y','S','D','B','D'),(5,'Y','D','C','T','D'),(5,'Y','D','F','T','D'),(5,'W','G','C','W','R'),(5,'W','G','C','B','R'),(5,'W','G','H','W','R'),(5,'W','G','H','B','R'),(5,'W','G','F','W','R'),(5,'W','G','F','B','R'),(5,'W','S','D','B','U'),(5,'W','D','H','T','U'),(5,'W','D','F','T','U')]
Prelude>
Prelude> length l13
8
Prelude> length l23
9
Prelude> length l33
11
Prelude> length l43
28
Prelude> length l53
24
总理论组合数8*9*11*28*24 = 532224
现在已可穷举
谁作下穷举
[ 本帖最后由 无心人 于 2008-6-20 16:39 编辑 ] |