-1

I need to list all bool sequences of a certain length (say, 100), which satisfy a given set of rules. An example for a rule is: if bit10=bit20=1, then bit35=0.

I wrote a C++ program which enumerates the possible sequences in a few seconds, but it's too long and complicated. Can you recommend me a programming language in which I can achieve this with a significantly shorter code and a (near) similar performance?

4

1 に答える 1

0

可変ルールがプログラムへの入力である一般化された問題を解決する必要がある場合、それは充足可能性または「SAT」と呼ばれます。CryptoMiniSatなど、さまざまな機能を備えた SAT ソルバーがいくつかあります。ルールを入力形式に変換してから、その上で SAT ソルバーを実行する必要があります。

于 2012-11-08T12:36:59.230 に答える