Generate 10-digit number using a phone keypad

后端 未结 12 948
遥遥无期
遥遥无期 2020-12-13 14:12

Given a phone keypad as shown below:

1 2 3
4 5 6
7 8 9
  0

How many different 10-digit numbers can be formed starting from 1? The constrain

12条回答
  •  半阙折子戏
    2020-12-13 14:42

    This problem may be also modelled as a Constraint satisfaction problem (aka CSP for short).

    I suggest to use the Minion solver (fast and scalable) that you can find here.

    Modelling maybe tedious and time consumming (steep learning curve).

    Instead of using Minion language input, my advice is to formulate the model with solver independent modelling language such as ESSENCE and find a converter accordingly.

提交回复
热议问题