CS计算机代考程序代写 __author__ = ‘jayha_000’

__author__ = ‘jayha_000’

from csp import CSP
canterbury_colouring = CSP(
var_domains={
‘christchurch’: [‘red’, ‘green’],
‘selwyn’: [‘red’, ‘green’],
‘waimakariri’: [‘red’, ‘green’],
},
constraints={
lambda christchurch, waimakariri: christchurch != waimakariri,
lambda christchurch, selwyn: christchurch != selwyn,
lambda selwyn, waimakariri: selwyn != waimakariri,
})