Python Forum
propositional logic formula converter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
propositional logic formula converter
#7
That code is just a small snippet of a 12,000 line code. I've always been reluctant to post code because how can you make someone understand an excerpt from a huge code base? I thought that code was reasonably well self-contained such that others might get off on it. It's mostly just a combinatorics problem.

Think of it this way. Suppose you have any number of blocks greater than 2. You number the blocks from 1 to n. You then have to fit the blocks into 2 categories and each block cannot appear twice in the same category. Further, the first block must always be in the first category or if it is in the second category then it must be the only block that is in that category. For each n, how many different ways are there to arrange the blocks? That's basically the problem that the code answers.
Reply


Messages In This Thread
RE: propositional logic formula converter - by bobsmith76 - Dec-03-2018, 08:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Decimal to binary weighted number converter hobbyprogrammer 1 2,402 Nov-28-2018, 12:38 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020