Hello computer scientists,

I am a mathematician. I have taken some undergraduate courses in C++, Python, assembly language, boolean algebra, logic, graph theory, etc. I would like to learn more about computer science because I think it’s cool. Could you give me some advice as to where to start? Thanks!

Posted on Categories Articles

## turing machines – If two languages are decidable, can one be mapping reducible to the other?

That is false. Consider for example the alphabet $$Sigma = {0,1}$$ and the two languages $$A = emptyset$$ and $$B = Sigma^*$$.

Clearly both $$A$$ and $$B$$ are decidable (by the trivial algorithms that always reject and always acccept, respectively) but it is false that $$A le_m B$$.

Posted on Categories Articles

## formal languages – When are existential quantifiers in the intuitionistic propositional calculus eliminable and when not

I am so ignorant I don’t even know where should I ask this – on FOM? On mathoverflow? On cstheory? So please consider as sort of a meta-question readdressing me in case you think this is a wrong site. (Also my tags are most probably wrong, sorry)

The simple case when I definitely know the answer and it is positive: given some propositional formula $$phi$$, I know that there is an $$x$$ such that $$phi$$ is IPC-equivalent to $$xlorneg x$$ if and only if $$negphi$$ is equivalent to $$bot$$.

Two simplest cases when I suspect the answer is negative but I don’t know how to prove it: again given some $$phi$$, when does there exist an $$x$$ such that $$phi$$ is IPC-equivalent to $$neg xlornegneg x$$; or when does there exist an $$x$$ such that $$neg x$$ is equivalent to $$bot$$ and $$phi$$ is equivalent to $$xlorneg x$$. In these two cases I can formulate necessary first order conditions on $$mathscr V(phi)$$ in any valuation $$mathscr V$$ under either Kripke or some more general semantics, but I suspect that I cannot eliminate existential quantifier staying in IPC.

How to approach such questions? What science is this? Is there some software which I can use for MUCH more complicated expressions?

Posted on Categories Articles

## formal languages – When are intuitionistic existential quantifiers eliminable and when not

I am so ignorant I don’t even know where should I ask this – on FOM? On mathoverflow? On cstheory? So please consider as sort of a meta-question readdressing me in case you think this is a wrong site. (Also my tags are most probably wrong, sorry)

The simple case when I definitely know the answer and it is positive: given some $$phi$$ in IPC, I know that there is an $$x$$ such that $$phi$$ is equivalent to $$xlorneg x$$ if and only if $$negphi$$ is equivalent to $$bot$$.

Two simplest cases when I suspect the answer is negative but I don’t know how to prove it: again given some $$phi$$, when does there exist an $$x$$ such that $$phi$$ is equivalent to $$neg xlornegneg x$$; or when does there exist an $$x$$ such that $$neg x$$ is equivalent to $$bot$$ and $$phi$$ is equivalent to $$xlorneg x$$. In these two cases I can formulate necessary first order conditions on $$mathscr V(phi)$$ in any valuation $$mathscr V$$ under either Kripke or some more general semantics, but I suspect that I cannot eliminate existential quantifier staying in IPC.

How to approach such questions? What science is this? Is there some software which I can use for MUCH more complicated expressions?

Posted on Categories Articles

## programming languages – Looking for a software to make license key for my pdf file such a way that for different machines the license key will be different

Looking for a software to make license key for my pdf file such a way that for different machines the license key will be different. I have already seen serial key maker is not a solution. I am describing it a little more. Whenever someone will open the pdf file, there will be generated as for example 16 digit no and when he/she will email me that copied out 16 digits no and then I will enter the no in my software there will be generated a serial key for his machine only. so obviously you got my point for the different machines the 16 digits no will be different.

Posted on Categories Articles

## formal languages – Check if given safety properties are regular, and if so construct NFAs

Let $$mathit{AP} = {a, b, c}$$. Consider the following LT properties:

1. Between two neighboring occurrences of $$a$$, $$b$$ always holds.
2. Between two neighboring occurrences of $$a$$, $$b$$ occurs more often than $$c$$.

For each of these properties $$P_i$$ (where $$1 leq i leq 2$$), decide if it is a regular safety property (justify your answers) and if so, define the NFA $$A_i$$ with $$L(A_i) = mathrm{BadPref}(P_i)$$.

Posted on Categories Articles

## formal languages – How would I prove that nondeterministic Turing machines are undecidable?

How would I go about proving that the language:

$$A_{NTM }= {langle N, wrangle | N text{ is a nondeterministic TM and } N text{ accepts }w}$$

is undecidable?

I looked at the proof for $$A_{TM}$$ being undecidable, but am struggling to figure out how to prove the above. Any ideas?

Posted on Categories Articles

## programming languages – key benefit of using container?

I’m not a guy who has computer science related background, just curious about the container technology and of course I did some googling to see what container is.

hope this is the correct site for container related question.

Here are my questions.

1. what is the primary benefit that container tech. offer? packing the environment(libraries, configurations…etc) for codes/programs or offering great portability across different computer system?

(some guy tells me that the portability isn’t the key benefit but close to)

1. is it doable and practical to use container provide services just like what servers can do?

2. can containers isolate malicious codes/apps to prevent them from affecting underlying operating system?

Posted on Categories Articles

## history – What are programming languages written in?

What are programming languages written in?

Programming language compilers and runtimes are written in programming languages — not necessarily languages that are older or are different than the one they take as input.  Some of the runtime code will drop into assembly to access certain hardware instructions or code sequences not easily obtained through the compiler.

Once bootstrapped, programming languages can self-host, so they are often written in the same language they compile.  For example, C compilers are written in C or C++ and C#’s Roselyn compiler is written in C#.

When the Roselyn compiler adds a new language feature, they won’t use it in the source code for the compiler until it is debugged and working (e.g. released).  This akin to the bootstrapping exercise (limited to a new feature rather than the whole language).

But to be clear, there is the potential (and often realized) for the programming language to be written in the latest version of its input language.

So what came first, and what was that coded in?

Machine code came first, and the first assemblers were themselves very very simple (early assembly languages were very easy to parse and generate machine code for), they were written in machine code, until bootstrapped and self-hosted.

Posted on Categories Articles

## syntax – Is there a common agreed upon token symbol used in computer science or common across languages?

I have seen tokens like this:

`````` var message = "Hello, {Name}";
``````

and like this:

`````` var message = "Hello, \${name}";
``````

and like this:

`````` var message = "Hello, @NAME";
``````

and a few other styles over the years.

Is there a common or preferred token format, style or character used in creating a set of tokens?

I have tried to used constants, like so,

“The width is WIDTH”

but I ran into problems when I had a token phrase that was contained in another token phrase.

For example, I had WIDTH and PERCENT_WIDTH as tokens. If the string contained both tokens one token could be replaced by the other in the first run through.

So if the token replacement value was 50 and the string was:

“The width of the item is WIDTH. That is PERCENT_WIDTH of the total.”

then I ended up with,

“The width of the item is 50. That is PERCENT_50 of the total.”

It wouldn’t find “PERCENT_WIDTH” because that token string was modified.

So if I replaced the “PERCENT_WIDTH” token first that would solve that problem but as I added more tokens that would increase the chances for errors. So now I’m trying to figure out a recommended token format.

I’m using regex to find and replace matches.

There appears to be no “tokens” topic tag.

Posted on Categories Articles