Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I represent a self-enumerating pangram as a boolean function?
    primarykey
    data
    text
    <p>The wiki article for self-enumerating pangrams states that they are computed using Binary Decision Diagrams. I've been reading about BDDs and from my understanding you need to represent some problem as a boolean function before you can construct a BDD for it.</p> <p>How would I go about doing this?</p> <p>I've been thinking about the problem for a few days now, and I'm pretty sure you could representing the input to the boolean function using a straightforward encoding:</p> <pre><code>10000 01010 01011 10101 ... 16A's 10B's 11C's 21D's ... </code></pre> <p>So for a pangram starting "sixteen A's, ten B's, eleven C's, twenty-one D's", you could represent it as 10000010100101110101...</p> <p>This would mean that there are 26 * 5 = 130 variables in the boolean function, assuming you restrict the maximum frequency of a character to 32 occurrences.</p> <p>The output should be whether the representation is a self-enumerating pangram or not, i.e. if the sentence describes its own set of frequencies.</p> <p>To do this, a hash table (or several) must surely be required along the way.</p> <p>So for the letter E, the hash table might begin:</p> <pre><code>one -&gt; 1 two -&gt; 0 three -&gt; 2 four -&gt; 0 five -&gt; 1 ... </code></pre> <p>Which in binary, might look like:</p> <pre><code>1 -&gt; 1 10 -&gt; 0 11 -&gt; 10 100 -&gt; 0 101 -&gt; 1 </code></pre> <p>If the summation of all lookups from the E hash table is equal to five input bits corresponding to E, then that section of the self-enumerating pangram is correct. If all sections are correct then the boolean function should yield 1, otherwise 0.</p> <p>I'm fairly sure I could figure out how to carry out addition using a boolean function and how to check if two numbers are equal. I have no idea where to start with representing the hash table as a boolean function, however. Also, connecting all of the pieces together is likely to bewilder me.</p> <p>Any thoughts? Ideas? Collaboration? I'd like to see where this goes.</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload