Clarification on the definition of strongly NP-hard

I am seeing two definitions of strongly NP-hard that seem to be slightly different:

  1. A problem is strongly NP-hard if a strongly NP-complete problem has a polynomial time reduction to it.

  2. A problem is strongly NP-hard if it is still NP-hard when all numbers in the input are bounded by a polynomial in the length of the input. Or equivalently, if it is still NP-hard when the input is given in unary.

Wikipedia gives Definition 1, but Definition 2 seems to be more common overall. Both definitions preclude the existence of a pseudo-polynomial time algorithm to such a problem. However, it seems to me that Definition 1 is stronger since there might exist a problem for which there is no pseudo-polynomial time algorithm, but also no strongly NP-complete problem can be reduced to it. This would be a strange problem indeed, but I don’t see why it can’t exist.

So am I missing something or is one of the definitions slightly off?

Proper complexity function definition

Following the book Computational Complexity from Christos H. Papadimitrious I found an example of proper complexity function that I can not understand (Example 7.1 in the book):

The function$ f(n) = \lceil\log{n}\rceil$ is a proper complexity function. use the three-string Turing Machine $ M_f$ as follows:

  1. Its first cursor moves slowly from left to right,
  2. The second string counts in binary the number of input symbols (using a binary successor),
  3. Erase the second string and copying all symbols to the output as quasi blank symbols.

I am not able to see the point 2 (so what is happening in the middle tape). I do not know how a machine is able to count the number of digits of an input of size say $ n$ .

Domain of definition for the following variables: is it possible to derive in Mathematica?

Consider 4 4-vectors $ $ P_{0} = (E_{0},0,0,\sqrt{E_{0}^{2}-m_{0}^{2}}), \quad P_{i} = (E_{i},p_{i}s(\theta_{i})c(\phi_{i}),p_{i}s(\phi_{i})s(\theta_{i}),p_{i}c(\theta_{i})), $ $ with $ c \equiv \cos, s \equiv \sin$ , $ p_{i}\equiv \sqrt{E_{i}^{2}-m_{i}^{2}}$ and the scalar products $ $ P_{i}\cdot P_{j} \equiv P_{i}^{0}P_{j}^{0} – \sum_{k = 1}^{3}P_{i}^{k}P_{j}^{k} $ $ $ m_{0-3},E_{0}$ play the role of real parameters, with $ E_{0}> m_{0}>m_{1}+m_{2}+m_{3}$ and $ E_{i}\geqslant m_{i}$ , while $ E_{i},\theta_{i},\phi_{i}$ are variables.

The implicit region of the definition of $ E_{i},\theta_{i},\phi_{i}$ is given by $ $ \tag 1 P_{3} = P_{0}-P_{1}-P_{2}, $ $ $ $ \tag 2 s_{12,\text{min}}(s_{23})<s_{12}<s_{12,\text{max}}(s_{23}), \quad s_{23,\text{min}}<s_{23}<s_{23,\text{max}}, $ $ where $ s_{ij} = m_{i}^{2}+m_{j}^{2}+2P_{i}\cdot P_{j}$ , and $ $ \tag 3 s_{12,\text{min}/\text{max}} = m_{1}^{2}+m_{2}^{2}-\frac{1}{2s_{23}}\bigg(s_{23}-m_{0}^{2}+m_{1}^{2})(s_{23}-m_{2}^{2}-m_{3}^{2}) \pm \ \pm \sqrt{\lambda(s_{23},m_{0}^{2},m_{1}^{2})\lambda(s_{23},m_{2}^{2},m_{3}^{2})}\bigg), $ $ $ $ \tag 4 s_{23,\text{min}} = (m_{2}+m_{3})^{2}, \quad s_{23,\text{max}} = (m_{0}-m_{1})^{2}, \quad \lambda(a,b,c) = (a-b-c)^{2}-4bc $ $

I need to integrate a function $ f(E_{i},\theta_{i},\phi_{i})$ over the domain of the definition $ (1)-(4)$ of the mentioned variables. Is it possible to derive the domain of definition in Mathematica, at least implicitly, in order to perform the integration? There are so many variables…

Which inductive schemes can encode the following Agda definition?

Which induction schemes (e.g. induction-recursion by Dybjer and Setzer, “Irish” induction-recursion by McBride or induction-induction by Forsberg and Setzer or perhaps some simpler ones) allow one to encode the following Agda definition

  data A : Set where     a : Maybe (List A) → A 

I can think of some tricks to reformulate List in this definition so that induction-recursion becomes applicable, but are there any schemes that would allow me to first say what a list is and then refer to this information to say what A is the way it’s done in Agda?

Definition of “Effect”

Is there a concise definiton of an “effect” in D&D 5e? For example, is damage considered an effect?

The following is defined under “Conditions”.

“Conditions alter a creature’s capabilities in a variety of ways and can arise as a result of a spell, a class feature, a monster’s attack, or other effect.”

“If multiple Effects impose the same condition on a creature, each instance of the condition has its own Duration, but the condition’s Effects don’t get worse. A creature either has a condition or doesn’t.”

define temporary variable inside the the definition of a funciton

This is mostly a matter of me trying to define functions in a tidy way. Suppose I want to define a function which is very complicated and so would like to break it into pieces. To get the idea, here’s a simple example

instead of this

f[x_,y_]:= (x^2 + y^2)/(x y)  

I want to write it along the lines of

f[x_,y_]:= A/(x y) where A= (x^2 + y^2) 

What is the correct way to do this?

Break down the CISecurity OVAL definitions file to smaller definition files

I am working on a project that uses OpenSCAP and the OVAL vulnerability definitions provided by CISecurity (Example definitions file Warning: link will auto-download the file).

This is a huge definitions file, containing over 3.6k definitions, which takes approximately 2 hours to complete on our desktops.

My plan was to break down the definitions file into 30 smaller files each containing just over 100 definitions, I have already scripted this and it effectively works.

I then intended to complete 30 smaller scans, each taking about 4 minutes to complete, whenever I detect the desktop user has been idle for 5 minutes. This would allow us to complete the scans during the working day when users are on breaks or in meetings (it’s a strange requirement, but the client is refusing WOL for overnight scans).

When I tested the first of the 30 smaller definition files, I received a lot of these errors:

File 'C:\Users\SomeUser\Desktop\testdefinition-1of30.xml' line 4803: Element '{}extend_definition': No match found for key-sequence ['oval:org.cisecurity:def:6326'] of keyref '{}extendKeyRef'. OpenSCAP Error: Invalid OVAL Definition (5.11.1) content in file [C:\projects\openscap\src\source\oscap_source.c:346] 

So it appears OVAL definitions are vitally linked with one another, something I hadn’t spotted in the standard myself.

Can anyone explain these links to me, or help me understand how I can break down the large definitions file into several smaller ones?

I can write the script myself, but I’m having difficulty understanding the logic.