Symbolic Regression

7+ years ago I posted a question here regarding symbolic regression in Mathematica. At that time there did not seem to be much built-in support for this. I’m interested in multi-input models of the form y=f(x1,x2,x3,x4,x5) where I need to find the best fit "f" given a data set.

Has any meaningful progress been made during the last 7 years in this regard in Mathematica ? I’m aware of TuringBot. Is that considered the state of the art in symbolic regression ?

Thanks for any knowledge on this subject.

Replace in a Symbolic Derivative doesnt work with Pi/2

I was writing some small functions for GR applications, and I was defining a Function that gives me the Geodesic equations. When testing if those worked with the Schwarzschild Metric I came upon a problem when trying to replace the angle $ \theta$ with $ \frac{\pi}{2}$ this then didn’t properly simplify it when there are derivatives of $ \theta$ .

I have made a simple example to showcase what my problem is:

Sum[D[xx[[i]][\[Tau]], \[Tau]], {i, 4}] /. t -> Pi/2 

This produces the following output:

$ \left(\frac{\pi }{2}\right)'(\tau )+x'(\tau )+y'(\tau )+z'(\tau )$

What can I do to either prevent this from happening or resolve this issue?

Cancel common factors in symbolic product

Suppose I have the following function

G[n_, k_] := Product[g[n + i]/g[i], {i, 0, k}] 

where $ n,k$ are assumed to be natural numbers and $ g$ is a nonzero symbolic function. I want to simplify the expression G[n,k+1]/G[n,k] and cancel all common terms to get g[n+k+1]/g[k+1]. However, Simplify, FullSimplify, Expand and Cancel all yield the symbolic (not cancelled) product.

Symbolic minimum value

I have the following polynomial expression v1[z]:

-((5 L^3 q z)/(12 J Y)) + (L^2 q z^2)/(4 J Y) - (L q z^3)/(12 J Y) 

and I would like to symbolically evaluate its minimum in 0<z<L, with q>0, L>0, J>0 and Y>0. How can I do this?

I have tried the following numerical way:

minv1 = Minimize[{v1[z] /. q -> 1 /. L -> 1 /. J -> 1 /. Y -> 1,z > 0, z < 1}, z ] 

Substitution of expressions in a symbolic expression

I define tables of symbolic variables in the following form (for convenience)

X = Table[Symbol["x" <> ToString[i]], {i, 1, num}]; Y = Table[Symbol["y" <> ToString[j]], {j, 1, num}];  

And after that, in cycles, I create some expressions. For example, here is one of them

Expon := Exp[ - ((X[[1]] * Y[[1]]) / 4) ];  For[i = 2, i <= num, i++,  Expon = Expon * Exp[ - ((X[[i]] * Y[[i]]) / 4)] ]  

After that, I want to act by some differential operator on my symbolic expression (let’s call it $ \Psi$ ) and substitute in the final expression some tables of numbers X1 and Y1 (here they are not symbolic, but filled by real numbers). I tried to use ReplaceAll ./ command, but it didn’t work. Could you tell me please, how can I substitute two or more tables of real numbers in symbolic expression? Long story short, how to calculate something like $ \Psi(X1, Y1)$ ?

What are the differences between symbolic execution and SAT solvers?

My understanding is that symbolic execution only deals with specific paths and bad patterns, while SAT solvers, or satisfiability modulo theories in general, provide a much more robust analysis of the program.

Could someone validate the statement above and (briefly) explain the differences between these two formal verification methodologies?

Analytical Solution of an symbolic set of equations

I tried solving a set of symbolic equations but it keeps running and yields no result. The set of equations are:

a^2 + b^2 = A, a c \exp{(\iota \theta)} + bd\exp{(\iota \phi)} = B, c^2\exp{(2\iota \theta)} + d^2\exp{(2\iota \phi)} = C, c^2 + d^2 = D

Since, the number of variables exceeds the number of equations I was hoping to find the solutions (symbolic) in terms of $ a$ .

Looking for a way to overwrite a symbolic link

I’m peparing for OSCP and I found an interesting situation (Alpine Linux).

There is a daemon super_service executed by root that is reading configuration file from /var/super_service/configs/ which is a symbolic link to location that my user john has no write permissions.

$   id uid=1000(john) gid=1000(john) groups=1000(john)  $   ls -la /var/super_service drwxr-xr-x    2 root     root          4096 May  9  2019 . drwxr-xr-x    3 root     root          4096 May  9  2019 .. lrwxrwxrwx    1 root     root            13 May  9  2019 configs -> /etc/super_service/configs  $   ls -la /etc/super_service/configs drwxr-xr-x    1 root     root          4096 Jan 29 12:10 . drwxr-xr-x    1 root     root          4096 Jan 29 12:10 .. -rw-------    1 root     root           283 Jan 23  2019 root.cfg 

Potential flaw is that /var/super_service/configs/ symbolic link permissions are rwx for everyone. If I manage to “redirect” this symbolic link to location controlled by me, I’d be able to control the config file read by super_service. Unfortunately, due to /var/super_service permissions (r-x) I’m not able to remove or replace this symbolic link.

I wonder if this situation is exploitable in any way?

My understanding is that if /var/super_service/configs would be regular file, not symbolic link, with exact permissions I could overwrite this file. But is there an equivalent of overwrite that is applicable for symbolic links?