Converting Lambda Calculus functionality to predicate logic syntax

I am trying to validate the simplest possibly notion of a formal system as relations between finite strings. I know that Lambda Calculus has the expressive power of a Turing Machine:

<λexp> ::= < var > | λ . <λexp> | ( <λexp> <λexp> )

I was thinking that it might be possible so somehow convert the functionality of lambda calculus into syntax that is closer to predicate logic by defining named functions that take finite string arguments and return finite string values.

Does anyone here have any ideas on this?

Number of logic gates for “reasonable” Turing completeness

Somewhere on stackexchage, I, or someone else asked what was the proper term for Turing completeness minus the infinite memory (e.g. a Turing machine that one can actually build, no bigger than your typical data center). Answer was inconclusive.

Also, someone else asked somewhere else on stackexchange about the number of gates for a Turing machine, but that got sidetracked into the useless infinite definition (that many quanta do not exist in the known universe).

So using the non-infinite Turing machine definition (*), whatever that is, is there a known lower bound on the number of 2-input binary gates needed to produce a Turing complete computer? Or a reasonable guess or a minimum among known current published existing example implementations?

(* If necessary assume the “tape” is external to the logic gate count, the gates just drive the tape read/write/move mechanism).

Can Inductive Logic Programming problem be recast as Relational Reinforcement Learning problem?

Inductive Logic Programming problem is to find set of formulas H (hypothesis), that satisfy logical equations: Known-knowledge-base & H => Set-of-positive-and-negative-facts-and-observations.

Relational Reinforcement Learning is Reinforcement Learning problem that expresses its inferred state transition function Q(s, a)->s' and reward function R(s, a)->reward (from whose the optimal policy can be easily inferred if those functions are inferred and knowns).

My question is – can ILP problem be recast as RRL problem, i.e. can RRL approach be used to solve ILP problem?

Currently I am reading about use of ILP for (natural) grammar induction, that is just one example of wide application of ILP.

But from the phylosophical and epistemological view I will that there is nothing beyong RL, there is no more general algorithm as RL, whole Knowledge should be learnt by thus. So, ILP should be solvable by RL as well. So – maybe I can express ILP as RRL and then I can apply RRL to natural language induction?

Donde instala eclipse el servidor web logic en linux?

Buen día comunidad, he estado aprendiendo Java web y he tenido problemas con el servidor WebLogic, ya que instale el weblogic con el marketplace de eclipse. introducir la descripción de la imagen aquí

Pero ahorra tengo que agregarlo en el “new server” y no encuentro donde estará el home del servidor. introducir la descripción de la imagen aquí

Estoy usando la ultima version de GNU/Linux lubuntu y ya busque en mi carpeta home y parece no estar por ningún lado el servidor. Alguien podría ayudarme y decirme en donde es que eclipse instala el weblogic ?

Number of circuits with at most $m$ logic gates

I’m working on the same exercise as described in this post:

How to show that hard-to-compute Boolean functions exist?

In the answer there I don’t understand how the number of circuits with at most $ m$ gates was found to be $ O(m^{4m})$ . My construction of the number of gates required:

Let any logic gate in the circuit take 2 inputs, which could be any of the $ n$ inputs or any of the $ m-1$ other logic gates. Then there are $ {{m+n-1}\choose{2}}$ possibilities for the inputs into any logic gate. There are 16 different functions that act on 2 inputs, so let there be $ 16{{m+n-1}\choose{2}}$ possibilities for the inputs and type for any logic gate. Lastly, since there are $ m$ gates, there will be $ 16^m {{m+n-1}\choose{2}}^m$ possibilities for the entire circuit.

Now we can say $ {{m+n-1}\choose{2}}^m < \frac{1}{2^m}(m+n-1)^{2m} < \frac{1}{2^m}(2m)^{2m}$ when $ m = 2^n/\log n$ (or $ 2^n/n$ ), so $ 16^m {{m+n-1}\choose{2}}^m < (32m^2)^m$ . So we would want to show that $ (32m^2)^m$ is less than $ 2^{2^n}$ . This doesn’t seem to be true anywhere, so I must have made a mistake somewhere.

I’ve looked online a bit and have found three different sources say that the number of circuits with at most $ m$ inputs is $ m^2$ , $ 2^m$ , and something similar to what I came up with. I understand that which gates to use is vague, but these are fundamentally different functions, and I’m very confused.

C# Static & Constructor Logic

I learn C# and try to understand the logic between static and Constructor right now. One thing I need ask you about an example which I will give at below. (please ignore the quality of code or how could be written better things, I just need to understand the logic which I am asking)

There are 2 classes named Computer and BaseType. Computer inherits from BaseType and I am taking instance from Computer class.

In short, I wanted to gave an ID number to “Id” field in BaseType Class increasingly (starting from 1 and then 2,3,4 etc when the Computer class’ instance has been taken). As I do that, I realized something interesting and wanted to ask you this logic to you.

Lemme give the sample code.

Main() Class

       static void Main(string[] args)     {         Computer C1 = new Computer();         Computer C2 = new Computer();         Computer C3 = new Computer();} 

Computer() Class

public class Computer : Product {     public string Cpu { get; set; }     public string Ram { get; set; }     public string VideoCard { get; set; } } 

BaseType() Class

public class BaseType {     static int counter = 1;     private int _Id;      public int Id     {         get         {             return _Id;         }         private set         {          }     }      public BaseType()     {         _Id = IdAssignment();     }      int IdAssignment()     {         return counter++;     } 

I put breakpoints to each instances as taken them, also to constructor method and IdAssignment() method. (“Computer C1 = new Computer();” and so on)

Question1: As I taking instance as “C1”, I realized that counter is “2” cause it’s 1 because it’s static in the beginning and has counter++. But, in constructor method, “_Id” is getting “1” instead of “2” and it continues so on. Normally it’s what I want but I don’t know how this happening. This I want to ask first.

Question2: As I am doing it, I realized that “_Id” in contructor method is always “0” before taking the “IdAssignment()”‘s value. Shouldn’t it be normally “1” as I come to taking second instance (C2 or C3)? This I want to ask you secondly.


C++ – BitVector logic

I have implemented a simple bit vector class. However, I have some problems with understanding, how to push data to it.

In a standard vector, push_back inserts new element et the end. A similar logic can be implemented for single bit.

However, I want to append number with a given precision. For example:

13 => 4bits (1101) 54 => 6bits (11 0110) 522 => 10bits (10 0000 1010) 

Starting with a bit vector with bits:

x x x 

I can append it from highest bit (left to right), so for eg. 54@6bits I got

x x x 11 0110 

or I can append it from lowest bit (right to left), so for eg. 54@6bits I got

x x x 0110 11 

For me, the first option seems more logical.

However, when I add aligned numbers 522@16bits I end up with for left to right

x x x 0000 0010 0000 1010 

or from right to left

x x x 0101 0000 0100 0000 

However, in this case (right to left), when I later wants to read data to memory, they are incorrect because of Endian. How to solve this logic?

I want to be able to append numbers with selected bits precision, and later copy them from memory to variables.

Currently, I have solved this as:

template <typename T> void BitVector::Append(T number, Endian e){     if (e == BitVector::Endian::Big){         this->Append(number, sizeof(T));     }     else {         uint8_t tmp[sizeof(T)];         memcpy(tmp, &number, sizeof(T));          for (size_t i = 0; i < sizeof(T); i++){             this->Append(tmp[i], 8);         }     } } 


void BitVector::Append(uint64_t number, uint32_t bitSize){     for (long i = long(bitSize - 1); i >= 0; i--){         this->push_back((number >> i) & 1);     } } 

Templated Append with Little endian should correspond to setting elements of array.

BitVector bb;  bb.Append<uint16_t>(160, BitVector::Endian::Little); bb.Append<uint16_t>(39, BitVector::Endian::Little);  uint16_t tmp[2]; tmp[0] = 160; tmp[1] = 39;  uint8_t res[4]; memcpy(res, tmp, 4);  

res and internal data of bit vector now contains the same data.

However, I am not sure if this is the most readable way.