Does there exist an algorithm to generate the production rules of CFG, given a sample production?

Lets say, we provide the algorithm a set of tokens.


x + y - z x - x - x 

It will then try to generate a CFG which fits all the provided examples

S -> S O T | T T -> x | y | z O -> + | - 

It feels like a data compression problem but I could be wrong.

Does anybody know any existing literature or a starting point to solve this problem?

Does this problem have a name? What should I Google?

Need a code to convert some sample text to .vtt format

I need a python code to convert some sample text in notepad to .vtt format. After the conversion the code should look like the .vtt form given below. The sample is text I want to convert from to .vtt is also give bellow. Please I want the code to be written in python

After conversion the text should look like the .vtt form given below.


00:00.210 –> 00:00.930 Hi there.

00:00.940 –> 00:06.110 So would you be willing to take a look at mathematical operation on me in my lab.

00:06.120 –> 00:10.700 So first thing we are going to do is to create fullest Ari.

00:11.010 –> 00:26.070 Let’s say one hour later he can dance on 3 4 and 6 AM we going to create another four or eight B that

00:26.070 –> 00:29.620 contains five six eight.

00:30.030 –> 00:39.490 Make sure that you can either use space or comma to separate your Each element in the key.

Example of the sample text(example before the conversion) that I want to convert from to .vtt format is ….

0:00I’ve got a transformation, m that’s a mapping from Rn 0:06Rn, and it can be represented by the matrix A. 0:10So the transformation of x is equal to A times x. 0:14We saw in the last video it’s interesting to find the 0:17vectors that only get scaled up or down by the 0:20transformation. 0:21So we’re interested in the vectors where I take the 0:23transformation of some special vector v. 0:27It equals of course, A times v. 0:29And we say it only gets scaled up by some factor, 0:32lambda times v. 0:34And these are interesting because they make for 0:35interesting basis vectors. 0:38You know, the transformation matrix in the alternate 0:40basis– this is one of the basis vectors.

Set which is easy to sample, but difficult to sample from its complement

Given a set $ S \subseteq \{0,1\}^*$ , the algorithm $ A$ is a generator for $ S$ if given $ n$ random bits $ x \in \{0,1\}^n$ , $ A$ generates an element of $ S$ of size $ n$ , and $ A$ can generate at least $ \frac{2}{3}$ members of $ S$ of size $ n$ (for all $ n$ ). $ A$ does not have to be uniform.

Is there a set $ S$ such that there exists an efficient algorithm $ A$ such that for all $ n$ , $ A$ generates at least $ \frac{2}{3}$ members of $ S$ (of size $ n$ ), but any efficient algorithm for $ S^C$ can only generate at most $ \frac{1}{3}$ elements from $ S^C$ of size $ n$ (under complexity asuumptions)?

How do I configure the Calculator web service sample code in netbeans to use x509 certificates for authentication?

I have successfully followed the steps outlined here:

Everything works correctly (i.e. I can run a client jar file from terminal and have it send two numbers to add; the calculator web service receives them and returns the correct sum in the SOAP response).

I now wish to add authentication using x509 certificates, but I am unable to find specific documentation on how to do so. The closest link I found is a secure calculator here:

But this appears to be using “Username Authentication with Symmetric Keys”, which is not what I am looking for.

I am looking for the calculator client to send its x509 certificate over to the calculator web service. The calculator web service authenticates the x509 certificate it just received from the client. If authentication is successful, it will proceed to add the two numbers sent by the client. Otherwise it returns “invalid cert”.

This seems like a simple thing to do, but I am not able to find any documentation or a sample netbeans project that does this.

This website seems promising:

Specifically the Example: Mutual Certificates Security (MCS) . However, when I get to the step in the “Securing the Example Web Service Client Application (MCS) section that says:

Select the WSIT Configuration tab of the CalculatorWSService dialog.

Netbeans does not have a WSIT Configuration tab. So this appears to be outdated since I am running Netbeans 8.2.

Would appreciate all / any help from the community.

Sample complexity of mean estimation using empirical estimator and median-of-means estimator?

Given a random variable $ X$ with unknown mean $ \mu$ and variance $ \sigma^2$ , we want to produce an estimate $ \hat{\mu}$ based on $ n$ i.i.d. samples from $ X$ such that $ \rvert \hat{\mu} – \mu \lvert \leq \epsilon\sigma$ .

Empirical estimator: why are $ O(\epsilon^{-2}\cdot\delta^{-1})$ samples necessary? why are $ \Omega(\epsilon^{-2}\cdot\delta^{-1})$ samples sufficient?

Median-of-means estimator: why are $ O(\epsilon^{-2}\cdot\log\frac{1}{ \delta})$ samples necessary?

Can I sample audio sources from others without asking?

As the title says, would it be considered legal if I take a part of an audio source (any media like music, dialog, video, etc.) to use in a project, whether it is for commercial or non-commercial purposes, without contacting the owner/creator of the asset?

As an example, Earthbound used this technique to create unique and memorable soundtracks.