Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97841

Re: How to rearrange array using Python?

From Martin Schöön <martin.schoon@gmail.com>
Newsgroups comp.lang.python
Subject Re: How to rearrange array using Python?
Date 2015-10-20 18:57 +0000
Organization @ Home
Message-ID <d8nh3vFg8bvU1@mid.individual.net> (permalink)
References <d1vftgF65svU1@mid.individual.net> <mailman.1100.1438294883.3674.python-list@python.org> <1468455.P0rGZF1LBf@PointedEars.de> <d224qaFr1aeU1@mid.individual.net> <d3f15cF6mctU1@mid.individual.net>

Show all headers | View raw


It has been a while.
I have mastered solving Kenken and Sudoku using Python-constraint.

I still have no clue on how to tell the solver how to constrain
the number of occupants in rooms: I have made up an simple example
with nine persons and three rooms. Wishes for room mates are 
mild in the extreme so it is very easy for a human to place these
nine persons in the three three-bed rooms such that all wishes are
fulfilled. Python-constraint set up by me finds 27 solutions of
which most place more than three persons in at least one room.

Anyone into CSP willing to offer me a hint?

/Martin

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-07-30 20:31 +0000
  Re: How to rearrange array using Python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-30 23:21 +0100
    Re: How to rearrange array using Python? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-31 04:29 +0200
      Re: How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-07-31 20:40 +0000
        Re: How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-08-17 21:14 +0000
          Re: How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-10-20 18:57 +0000
            Re: How to rearrange array using Python? Ian Kelly <ian.g.kelly@gmail.com> - 2015-10-20 13:26 -0600
              Re: How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-10-21 18:47 +0000
            Re: How to rearrange array using Python? Ian Kelly <ian.g.kelly@gmail.com> - 2015-10-20 13:28 -0600
  Re: How to rearrange array using Python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-30 23:41 +0100
  Re: How to rearrange array using Python? Robin Koch <robin.koch@t-online.de> - 2015-07-31 03:18 +0200
    Re: How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-07-31 20:53 +0000

csiph-web