# logic's questions - English 1answer

599 logic questions.

### 7 “Famous logicians have made embarrassing errors here,” a line from SICP. What is this referring to?

Here is the context (Structure and Interpretation of Computer Programs, section 1.1.8, under heading "Local names"): A formal parameter of a procedure has a very special role in the procedure ...

### What are constraints on some new logic programming language and system?

2 answers, 44 views logic programming-languages prolog
As I understand, everyone can create logic programming language and system by declaring that the valid program of some logic programming language is the set of statements in the form: ...

### 3 Validity of this formula in WS1S logic

The following formulas are said to be defined in WS1S logic. $Closed(Z, R) := ∀x ∀y(x ∈ Z ∧ R(x, y) → y ∈ Z)$ $(z_1, z_2) ∈ R^∗ := ∀Z.(z_1 ∈ Z ∧ Closed(Z, R) → z_2 ∈ Z)$ However since WS1S formula ...

### 5 propositional Modal logic filtration definition

Hello I have a slightly unusual question which relates to a definition of filtration structure. The following is my current state of the definition: $\mathcal{M} = (W, R, L)$, W is a set of worlds, ...

### 11 How to construct XOR gate using only 4 NAND gate?

7 answers, 120.225 views logic boolean-algebra
xor gate, now I need to construct this gate using only 4 nand gate ...

### 1 Difference between logic, fuzzy logic, probabilistic logic, quantum logic?

I am not sure if the names of these logics are right, but I saw that you can generalize logic with probability theory. Then I found 3 ways of reasoning with probabilistic/smooth logic, Fuzzy, Bayes/...

### 2 A 4-bit combinatorial circuit that outputs 1 when integer greater than 7 and is odd number

2 answers, 97 views logic combinatorics
I need to draw a combinatorial circuit that when an integer is greater than 7 and is an odd number, the output will be 1. There are 4 inputs representing 4 bits and 1 output wire. The output wire is ...

### 5 What does instantiating existential variables with out of scope variable imply?

1 answers, 140 views logic coq
I have following unfinished proof of a lemma: ...

### 2 Finiteness of the set of equivalence classes of formulas generated by boolean combination

0 answers, 25 views logic modal-logic
Define a relation $\equiv$ on the set of modal formulas by $\phi \equiv \psi \Leftrightarrow (\forall M\forall w, M,w \models \phi\Leftrightarrow M,w \models \psi)$ (so it is an equivalence relation) ...

### 3 Why use logic gates in this situation? (XOR gates)

I came across this circuit that swaps logical signals: However I don't understand why would you need to use logic gates. Would it be possible to just connect the A on the left to the B on the right ...

### 3 Predicate Logic - Natural Deduction; Assumptions about exists-elimination

2 answers, 75 views logic natural-deduction
I am stuck on how to progress with this proof; i cannot see my next move. The task is to show $S \to \exists x Q(x) \vdash \exists x (S \to Q(x))$ using natural deduction for predicate logic. My ...

### How to solve for the precondition give a postcondtion that must satisfy two conditions

1 answers, 22 views logic formal-methods hoare-logic
I tried solving past exam question but there is this one that I haven't been able to solve. The question states that a suitable precondition should be found for the statement.  a= i +2; i++\{(a = ...

### Writing LTL formula for sequencing with coordination

Suppose there are 2 workers w1 and w2 who can cool a hot iron. So if iron is hot (denoted by atomic proposition ...

### 4 Logical characterization of P versus NP problem (and references for least fixed point logic)

Wikipedia says the following (and more) about the logical characterization of the P versus NP problem here: Thus, the question "is P a proper subset of NP" can be reformulated as "is existential ...

### 6 Does Provable P equal Provable NP?

2 answers, 165 views complexity-theory logic p-vs-np
My question is a very basic one. It seems feasible to believe that $\mathsf{P = NP}$, because there is some "pathological" good algorithm for SAT, yet it is impossible to prove that the algorithm is ...

### Are there any implementations of computability logic?

1 answers, 57 views computability logic
I'm currently looking into Japridze's computability logic. It looks great, but I was wondering whether any programming languages or systems implement it. Does anyone know of any implementation? ...

### 3 Represent there are infinitely many in FOL

3 answers, 72 views logic first-order-logic
How to represent in first order logic the expression: "there are infinitely many" To be honest I'm confused and not even sure whether you can represent them in first order logic.

### -1 Optimization problems and quantifiers

1 answers, 29 views optimization logic
A simple optimization problem is of form $\max_{x\in\mathcal R}f(x)$. We can quantify as $\exists x\in\mathcal R\forall y\in\mathcal R f(y)\leq f(x)$. The quantification here is $\exists\forall$. ...

### Easiest way to find y in $x \text{ xor } y = z$ with given $x \text{ and } z$

2 answers, 48 views logic bit-manipulation
Let's say we have given two numbers $x, z$, and we need to find another number $y$ such that $x \text{ xor } y = z$. The xor ( exclusive or ) is bitwise operation: xor table . I know that this can be ...

### 5 Why does the copycat strategy work for two parallel chess games?

2 answers, 1.394 views computability logic
I'm currently looking into computability logic. Japaridze explain that a game !P v P like !Chess v Chess is always winnable thanks to the copycat strategy (http://www.csc.villanova.edu/~japaridz/CL/3....

### Boolean expression to a truth table

1 answers, 38 views logic boolean-algebra
How do I fill a truth table from the following expression? I can't decide whether it is SOP or POS.Y=(A+B)C+AB+(A+C)C+(`AB)

### binary max and binary min [closed]

1 answers, 27 views terminology logic
I'm reading a paper about constraint satisfaction problem and found a term "binary Max and binary Min" operations but I dont know the meaning. If someone know could you please explain for me? I ...

### 2 Why, intuitively, is Lob's theorem true? [closed]

0 answers, 40 views logic mathematical-foundations
Lob's theorem states that: Let $\textbf{Prov}(n^A)$ be the arithmetic statement such that $PA\vdash$ $A$ iff $\textbf{Prov}(n^A)$, where $PA$ is peano arithmetic, and $n^A$ is the godel number of $A$....

### -2 How to specify a robot go always right relative to itself from absolute perspective (north west east south)

I have a robot that has a start and goal position within a maze. Each point in the maze-grid is simply a Position object containing x and y. I need an algorithm that specifies the robot only moving to ...

### Converting CNF boolean expression into DNF and vice versa [duplicate]

Is there any algorithm for converting a DNF boolean expression to CNF and vice versa if it's exists what is time complexity and complexity class for solving this problem?

### Techniques used in customizing Task Scheduling

0 answers, 9 views logic scheduling heuristics
I am just learning about Scheduling, in particular the Completely Fair Scheduler. In thinking of specific cases of the types of things that would need to be "prioritized" against each other, there ...

### 1 Is it possible to define logic programming for every logic that has implication and conjunction connectives?

Is it possible to define logic programming for every logic that has implication and conjunction connectives? Does logic programming adds something new to the usual inference process. By usual ...

### 8 Why doesn't Godel's Second Incompleteness Theorem rule out a formalizable proof of P!=NP?

I'm sure there must be something wrong with the following reasoning because otherwise a lot of P vs. NP research would be curtailed but I cannot determine my error: For any fixed integer $k>0$ ...

### 2 Least fix point of CTL formula

In the book Logic in Computer Science on page 244, there is a proof that $[[E(\phi U\psi)]]$ is the least fixed point of $G(X)=[[\psi]] \cup ([[\phi]]\cap\mathop{\textrm{pre}}_\exists(X))$. I don't ...

### Maximum number of distinct values for bitwise OR

1 answers, 44 views logic arrays
You are given an array with $N$ elements. The values of the elements may be any number in the interval $[0,10^9]$. Define $f(a,b)$ as the bitwise or of all the values in the subarray $[a,b]$. Find a ...

### 1 Can an FO formula with infinite length be expressed with an infinite set of finite formulas?

I'm confused as to why we can't write formulas of infinite length in FO. For example, to express reachability, I understand the proof that there cannot be a single formula for it, but it is ...

### 1 Is the halting problem theorem really proven

2 answers, 119 views logic halting-problem
Here is a popular proof of the halting problem theorem: Suppose there exist a procedure h(x, y) so that for any procedure p(x) and any data d, the execution of h(p, d) will halt, where halt means ...

### 1 Understanding a Single Step in the Model Checking Algorithm

This answer explains roughly how to convert a nested boolean function into a Binary Decision Diagram (BDD). This question is about how to structure the states for the BDD. Now in this question I am ...

### 2 Equivalence preserving operator from CTL* to LTL

The question is about an operator that transforms any CTL* formula ${\psi}$ into a (not necessarily equivalent) LTL formula ${A\psi^d}$, where $d$ means syntactically removing all $A,E$ quantifiers ...

### Descriptive complexity: 3-colorability example

So in Neil Immerman's book http://books.google.co.kr/books?id=kWSZ0OWnupkC&pg=PA113&lpg=PA113#v=onepage&q&f=false, 3-colorability problem in descriptive complexity fashion is expressed ...

### 1 Can agent be autonomous without having consciousness?

1 answers, 38 views logic agent-based-computing philosophy
My intuition is that 1) self-awareness (modeled through epistemic modal logics); 2) goal reasoning (e.g. https://www.aaai.org/ocs/index.php/AAAI/AAAI16/paper/view/12292) and 3) consciousness (e.g. ...

### 2 Unclear logic notation for PFX program rules

I'm very new to this so please bear with me. I found this document describing the PFX language, a stack-oriented language where the instructions act on a stack and replace the arguments with the ...

### 1 How to apply Hoare Logic to this function

I would like to apply Hoare Logic to realistic, complex imperative programs that use while loops, if statements, functions, modules, etc. and have side effects (e.g. access the network). In order to ...

### 1 Operation with second-order logic formulas

I have one or more second-order logic formulas that correct for some finity model. What operation can I perform on them, so that resault is also correct for some finity model? Just conjunction is ...

### How to apply Operational Semantics to this function

Say I have a function like this: ...

### 2 Simplifying this Boolean Expression

1 answers, 133 views logic boolean-algebra
I have to simplify A+C'+B'CD but I don't see how. I had to deduce the expression starting from a logic diagram in which two AND gates were used for the B'CD part. Seeing the diagram all I can think ...

### 2 Subtlety of a bar in introduction rule

I am going through the following lecture notes by Frank Pfenning : http://www.cs.cmu.edu/~fp/courses/15317-f17/lectures/02-natded.pdf In page no 5 I cam across the introduction rule . The rule ...

### 6 Is there an algorithm to detect race conditions in logic circuits?

1 answers, 155 views algorithms logic
I'm writing a logic gate simulator. I would like to prevent user from constructing circuits prone to race condition such as flip-flops, and instead provide them as separate building blocks. Is that ...

### Provide a derivation from backwards on?

Suppose you have to provide a derivation by natural deduction, e.g. $((A \rightarrow B) \rightarrow A) \rightarrow A$ Is it a good advice to start from backwards on in general? I mean doing the ...