Can someone help me with solving boolean expressions with the help of forward chaining. A good tutorial will also help me. Example: A.(A + B) = A A.(A + B) => A.A + A.B [Applying distributive law] A.A + A.B => A + A.B [Applying idempotency law] A + A.B => A.(1 + B) A.(1 + B) => A.(1) => A I have made huge efforts but still am unable to do this. The procedure would require parsing the boolean expression and then recursive rule checking. I was thinking about creating a binary tree of the expression and then doing …

Member Avatar
+0 forum 0

hi All, I have question around Douglas Crockford "method" method. Function.prototype.method = function (name, func) { this.prototype[name] = func; return this; }; function azerizor(value) { this.value=value; } azerizor.method('toString', function () { return this.value; }); var me = new azerizor('salam').toString(); alert(me); this is it. But here arises question regarding **return this**? what does mean here **return this**? this method works without **return this**. I have read about that. so that one say that it is for chaining. But i didnt understand how can i use chaining using this "method" function. Thanks in advance for attention. I will wait your responses!

Member Avatar
Member Avatar
+0 forum 2

Dear friends, hello to you all as this is my first thread - question to the forum. This is my problem, which is a school exersize: I create a linked list which contains three numbers r,c,d per node From this list I have to create a hash table htable[7] with hash function hk=d mod 7 my idea of doing it is through the following code, where htable and fnl are hash tables and curr is a structure of the same type. [CODE] while (curr != NULL) { if (htable[hk]==NULL) { htable[hk]=curr; fnl[hk]=curr; } else { fnl[hk]->next=curr; fnl[hk]=curr; } curr=curr->next;[/CODE] doing …

Member Avatar
Member Avatar
+0 forum 2

Hey everybody, So I though that I understood linked lists and arrays well enough to make a hash table with separate chaining. Theoretically, it seems trivial, but I am getting a runtime error. The error appears to arise from the line head = heads[i], where head is a node pointer and heads is an array of node pointers. When I tried to go through this issue with my debugger, all I got was an indecipherable 'Unhandled Exception' error and a runtime crash. The node that I am using holds an instance of a class Person as its data member and …

Member Avatar
Member Avatar
+0 forum 1

The End.