instruction
stringlengths
35
29.1k
I have the following problem. Given a finite number of lists of items. The same item can appear in many lists. I would like to color items with 3 colors, such at least two colors appear in each list. I would like to show that this problem is NP-hard. I would like to provide reduction from the 3-coloring problem which s...
Suppose in an architecture, interrupt driven IO is used. And suppose a program is to be loaded from an IO device into the RAM. I have been studying IO mechanisms and I came to know that upon receiving a request to load a program, the processor generates control signals to the IO module and then the data is loaded into ...
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 inference process I mean the construction of the consequence set from the axioms - deriving all true statements. Does logic prog...
In descriptive complexity, HO corresponds to ELEMENTARY. ELEMENTARY is a subset of R, so therefore all HO queries are decidable. Then undecidable problems have no corresponding HO query. Is my understanding correct? If so, can I have an example undecidable problem and an intuitive/informal explanation of why it doesn...
A while ago I wondered about how Proof Assistants like Coq prove $m \leq n$ and the like. It looks like they actually need to traverse the natural numbers based on the successor/predecessor formulation: Coq < Eval compute in le_lt_dec 100000 1000000. Warning: Stack overflow or segmentation fault happens when working...
This is problem 2.44 from Introduction to the theory of computation by Michael Sipser. If $A$ and $B$ are languages, define $A \diamond B = \{xy: x \in A \land y \in B \land |x| = |y|\}$ Show that if $A$ and $B$ are regular languages, then $A \diamond B$ is a $CFL$. My try: Let us define the following languages: $$...
Let $G=(V,E)$ be a planar graph, only specified by its set of vertices and edges. Suppose $|V|=n$. According to Fary's theorem, there exists a planar embedding of $G$ with straight line segments. Then this embedding can be represented by a set of points in the plane (each $v\in V$ is represented by a unique point $p_v$...
Alice and Bob play the famous game of divide and choose $n$ times with $n$ identical cakes. Each time, Alice cuts the cake to two pieces, and Bob chooses the piece he prefers. Alice does not know Bob's preferences, but she assumes that they come from a uniform distribution. What is the strategy that maximizes Alice's e...
Suppose P vs. NP is independent of ZFC. Then there cannot be an efficient SAT solver, otherwise it would constitute a proof for P = NP. Therefore P $\ne$ NP. What we see here is that independence implies unequality. So why is independence a big deal? It is just one way to show P $\ne$ NP. See Scott Aaronson's paper Is ...
Given two positive integers: $d \in \mathbb{N}^+$ space dimension $s \in \mathbb{N}^+$ expected sum list all the points $(x_1, .. x_d) \in \mathbb{N}^d$ such that $$\sum_{i=1}^d x_i = s$$ Expected output: For $d = 2$ and $s = 3$ the algorithm should output (3, 0), (2, 1), (1, 2), (0, 3). For $d = 3$ and $s = 1$ the ...
I am confused now (in thinking about limits and continuity) how curves are represented in a typical modern computer. Curves are "continuous" in that there is no discrete change from one angle to the next. Wondering how the computer approximates this and/or what equations it uses/approximates.
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 its relative right only using goEast, west, east and south from the perspective of the maze. There is an implementatio...
I am confused on byte addressable/word addressable architecture. I have studied MIPS implementation and I came to know that when the data is retrieved from main memory, it is shifted accordingly to convert it into a byte. But if this is the case, why do we need byte addressable? We can simply fetch a word shift it and ...
To give a brief outline of my actual problem, I'm attempting to identify possible impurities in proteins. I have a theoretical mass and an experimental mass, and the difference between the two would in theory be caused by any impurities present in the proteins. Impurities could take the form of an amino acid insertion,...
I have been reading the Algorithm Design Manual by Steven S. Skienna and on page 15 it mentions a term called "cavallier extension claim" and I have been desperately trying to find a definition for this. A search in Google just returns quotes of the same book. Possibly my confusion lies in the misspelling of the word "...
I’m not even a CS student, so this might be a stupid question, but please bear with me... In the pre-computer era, we can only implement an array data structure with something like an array of drawers. Since one have to locate the drawer with corresponding index before extracting the value from it, the time complexity ...
**A hypergraph is k-rainbow colorable if there exists a vertex coloring using k colors such that each hyperedge has all the k colors. Is k-rainbow coloring of a hypergraph is NP-complete or not? The problem is also called "polychromatic coloring" ** I looked at some reference papers such as "Hardness of Rainbow Colorin...
Let there be a language $A$ which is NP complete and language $B$ which is a finite language, is the union of $A \cup B$ NP complete language?
So it seems that you can get pretty far with just type definitions as a formal model of a system. The typed properties verify that the properties will have that type, typed function arguments verify the functions will get the appropriate input and output types, etc. But now I am wondering about algorithms. In an ideal ...
In the paper Total Functional Programming by D.A. Turner three rules are given for a programming language to remain total: complete case analysis covariant type recursion (type constructor should not appear in negative position in a constructor argument) structural recursion But with these rules I can still have an i...
How can I prove that $\mathsf{DTIME}^{\mathrm{Htm}}(n^2)$ is contained in $\mathsf{DTIME}^{\mathrm{Htm}}(n^3)$? (sorry about how it is written. I mean the set of languages decided by a deterministic TM with an oracle to $\mathrm{Htm}$ in $n^2$ time and $n^3$ time). If someone can please write the proof, it will be grea...
During lecture the professor talked about Integer Compare for floats and kept mentioning two's complement. What's the relation between them? All I understand is that two's complement can take us from a number to its negative.
I have a problem which is basically TSP where is a limit on how far youcan go and every city has a profit. I need to make algorithm where he could come back with highest profit after a trip. It's not important how many cities he will visit as only profit is important. I need to the solution in code so it has to be pra...
I have some data that includes two columns for dates, and I want to retrieve - based on these two columns - all the instances where an illegal operation has occured. An operation is illegal if the value in Col B breaks chronology in the column. Structure * Col A * Col B * * Opened * Moved ...
Can someone explain how the insertion sort have quadratic time complexity and not quasi-linear time complexity in the worst-case? Even in the case of a reversely sorted list, it's not like it'll have to compare each element with all the other elements. For example in [4, 3, 2, 1], 4 won't be compared with anything. 3 w...
I've seen it used but I can't think of a way to construct such TM. Would appreciate any help!
I'm trying to understand the complexity of the Kruskal algorithm implemented with the Quick-Union by rank and with the path compression. Now there is a theorem for the last structure above: The complexity of any sequence of m operations of Makeset, Union and Find, n of which are of Makeset, on a Quick Union by rank an...
in my practice for a test I came across this question: prove or disprove that those languages are regular: I succeeded proving that the second language is nonregular with homomorphism but i'm having trouble with the other 2 - my intuition tellin me that first 1 is Σ∗ but i'm really stuck on how to prove it (not sure...
I read that each segment is 64KB,but how? If you have address ABCD:EFGH , then 1 segment is 16B if it is addreses by bytes. How do they don't overlap? Example: 0000:0010 = 00010 0001:0000 = 00010 , is is same address.
I am wondering what it takes to "verify" or "prove" that an automaton is correct. What the components are that are required. It seems that an automaton would be an easier thing to formally verify as sound than say an arbitrary function. Not sure though what needs to be verified in an automaton, which is what brings up ...
In a typical read operation from a dram chip, all the banks are equipped with sense amplifiers which select one bit from each bank using column multiplexer. But how does write operation takes place? How does only one column in a bank is written in a particular row?
I have thousands of documents, and a term list with thousands of entries. The entries in the term list range in length from an acronym of two characters to a 14-word phrase with 96 characters. I would like to find every occurrence of any term in the term list in each document in the order that they appear. I have creat...
I've got a set of items that I'd like to sort into a list. The items have two independent sets of constraints that the ordering should respect: A set of hard constraints that must be satisfied, e.g.: Item A has to come before item B A set of soft constraints whose satisfaction I'd like to maximise, e.g.: It'd be nice ...
I am working through the NLP notes for Naive Bayes' classification here: https://web.stanford.edu/~jurafsky/slp3/6.pdf Below $c$ is the class of the observation and $w_i$ is the $i$th word of a text document. In developing the maximum likelihood estimate for the conditional probability of the feature (word) $w_i$ given...
The "common term" would be in standard form, but the two input multivariate polynomials needn't be, e.g $x(1+y)+y$ and $y(x+a+b)$ have one common term, $xy$. A brute force solution would be to expand both polynomials to standard form, then check for common terms. e.g. $x+xy+y$, $xy+ay+ab$. Is there a better way? EDIT ...
I apologize in advance if the wording of my problem is inappropriate for this forum. Or if another platform i more suitable for it. I'm new here and typically do not have to solve complex algorithmic problems. I'm looking for an algorithm that is able to find a answer to the following question: If I ran 10 km this morn...
Say I have a family of hash functions that are weakly universal, i.e. the probability of two non-identical keys $x\neq y$ are mapped to the same hash-value is bounded by $k/m$ when I have $m$ bins and $k$ is some constant (I am mainly interested in $k=1$ and $k=2$): $$\Pr_h\left[h(x)=h(y)\right] \leq \frac{k}{m} $$ I h...
Automatic differentiation is a set of techniques to numerically evaluate the derivative of a function. Quoting from Wikipedia (emphasis mine): These classical methods run into problems: symbolic differentiation leads to inefficient code (unless done carefully) and faces the difficulty of converting a computer program ...
I'm working on some lecture notes and wondered if there was a good example algorithm for the recurrence equation $$T(n) = T(n/2) + n$$ I know that I can do selection in this running time, but that is a probabilistic algorithm, and I was hoping not to introduce this algorithm at this point in my lecture notes. I plan to...
I took an introductory MATLAB course a couple of years ago (and since then have only taken a basic C++ course) and am presently stumped as to how to start with a project I am undertaking. As part of this, I need to simulate the formation of branching structures using a branching annihilating random walk (BARW). I am s...
Capsule networks seem to match performance of convolutional neural networks on image classification tasks (more specifically on classification of handwritten digits in the MNIST dataset) 1. I have also read in various articles that capsule networks require less training data than convolutional neural networks. Does th...
So I finally realized the difference between transition systems and automata, and now am closer to understanding Model Checking. One of the last pieces is understanding what exactly "state" is in Model Checking. It is mentioned that you create a Kripke Structure, which is pretty much just a state-transition system. But...
S' -> S $ S -> I ; S S -> return E ; S S -> return I ; S S -> '' I -> id I -> id = E I -> id = I E -> C && C E -> C || C E -> ! C E -> C C -> A > A C -> A < A C -> A >= A C -> A <= A C -> A == A C -> A A -> T A' A'-> + T A' A'-> - T A' A'->'' T -> F T' T'-> * F T' T'-> / F T' T'->'' F -> id F -> const F -> ( A )...
The atomic propositions in Symbolic Model Checking form the state in the state-transition graph (the model $\mathcal{M}$ in Model Checking). The other part of Model Checking is the specification, which is usually some sort of temporal logic formula over the atomic propositions in the model. My question is about the ato...
When machine code is actually being executed by hardware and the CPU, what does it look like? Would it look like binary, as in instructions being represented by ones and zeros, or would it be something made up of hexadecimal digits where opcodes are bytes presented as hex numbers which can be broken back down into bina...
Is a full stop regarded as a character along or must it be with a space in huffman encoding. I know of taking a comma with a space to a character.
I (think I) understand the enumeration and then diagonalization proof of the undecidability of the halting problem, but I came cross this proof in SICP below, which does not seem to require the enumeration. Did I miss anything? (define (run-forever) (run-forever)) (define (try p) (if (halts? p p) (run-forever)...
I'm studying Context free Grammar and I have a question to a specific Exercise: Why is i. True? How is this possible?
Basically what the title says. Why can you "ignore" the "xy" part if you want to prove whether a language is regular?
I have been working on understanding formal verification of software. Formal methods include things like modeling your software with Petri Nets, Automata, or State-Transition Graphs. Other techniques for formal verification include using type systems, model checking, automated theorem proving, proofs, and doing program...
The global pointer is initialized to 01x10008000. The data segment starts at 0x1000000. I want to load the first word found in the data segment. So I place 0x8000 in the address field of lw. lw $a0, 8000hex(\$gp) Apparently 0x8000 in binary is 1000 0000 0000 0000 which is a negative number because the sign bit is 1. T...
I am new to this independent set problem in graph theory. As per my understanding so far an independent set is a set of vertices in which no two vertices are adjacent. And the maximal independent set is a set of vertices in which if some vertex is added it will construct an edge. I understand this now my question is i...
I found this solution but I don't understand it. Can anyone explain the idea behind it ? the solution: A O(n) time and O(1) extra space solution: The idea is similar to this post. We use array elements as index. To mark presence of an element x, we change the value at the index x to negative. But this approach does...
I wrote my implementation of Bubble Sort according to my understanding of the general principle of how the algorithm works, and then compared it against another implementation I found online. def my_bubble_sort(n): switched = True while switched: switched = False for i in range(1, len(n)): ...
I am confused about what does a VC dimension of a set of hypothesis means. I have two hypothesis, say $H_1$ with VC dimension of $x$, and $H_2$ of VC dimension of $y$. Does this automatically mean that the VC dimension of this set is $max(x,y)$? Or does this mean that I can use the combination of these two somehow to g...
I posted a question about a month back regarding the significance of Turing machines (relative to other models of computation). In that post, I mentioned vaguely some conversion between an input string and a physical system as a model of computation. (I just got my BS in CS, so it's likely I have no idea what I'm talki...
A question from a lecture of mine. The way I see it, while summing sets is meaningless, O(f(n)) + O(g(n)) is obviously limited from above by the greatest function in either, which means that I practically take the maximum of O(f(n)) and the maximum O(g(n)), and claim that either is the maximal one, or they are equal. W...
Given that there are examples of formal proofs used to formally verify real-world software applications, I would like to know what these people and teams actually do to create these formal proofs. That is, the kind of code they write and/or the types of formal proofs they create, and how the proofs work. For example, m...
To mathematically solve a game you have to prove, using various tehniques, that some player will win, lose or draw the game. Specifically I'm interested in solving games by brute force (trying out all the possible combinations). If I were to try every possible move for some game I would get a tree of all the moves and ...
I'm reading the paper Enhanced Simplified Memory-bounded A Star (SMA*+). In short, the authors propose a limited-memory version of A* where we cull nodes if we are out of memory, to re-expand them later on. To do this they choose the worst node to cull. And they propose a heuristic to maximize to choose what is conside...
Bear in mind I'm almost a complete noob at complexity theory. I was reading about how AKS Primality shows that numbers of size n can be shown to be prime or composite in polynomial time. Given that, does that imply finding all prime numbers less than a number n is also doable in polynomial time and thus the algorithm r...
$$L = \{a^{m+n}b^{m+k}c^{n+k}\mid m,n,k\ge 1\}.$$ Is $L$ DCFL or not? According to me it should be DCFL since we can write $L$ as $\{a^{n}a^{m}b^{m}b^{k}c^{k}c^{n}\mid m,n,k\ge1\}$. So, now after push and pop on the stack, it will be empty. So, according to me it will be DCFL but I have doubt since DPDA can't count $n$...
I am reading Theorems for free! by Philip Wadler which is a paper about how to derive theorems from the type signature of a function. Parametricity is just a reformulation of Reynolds’ abstraction theorem: terms evaluated in related environments yield related values. What is an environment in this case ? More general...
I want to show that $\text{NP} \neq \text{SPACE}(n)$ and tried it like this: Let $L$ be in $\text{SPACE}(n)$ so there is a deterministic $k$-tape TM which decides $L$ in polynomial time. Let's consider a binary alphabet. There are $2^{kn}$ possible strings on the working tapes so for an input of length $n$ the TM can b...
According to book by Peter Linz, the transition function for non deterministic Turing machine is: $Q\times \Gamma\rightarrow 2^{Q\times \Gamma\times \{L,R\}}$ where, $Q$ is a set of states $\Gamma$ is a set of tape alphabet $L$ is a movement of head to left $R$ is a movement of head to right whereas the definiti...
I'm working on an exercise that involves checking if the Rice's theorem can be applied on a two languages. The first language is $E_{TM} = \{ \langle M \rangle \text{ | M is a Turing Machine and } L(M) = \emptyset \} $. I already know it's undecidable, thus Rice's theorem should apply without any problem and in fact it...
What is the definition of a 'simple path' in a finite acceptor? My concern is whether self loops can be considered as a part of simple path from initial to final state?
How can I chose the condition for expanding of the array in chain-hashing if I want that given some cell (that contains elements) , the number of cells that I need to move about them is O(1) until the next cell that contains elements? And in addition, I want that - the number of cells that I need to move about them bet...
I came across the fact that The number of DFAs that can be constructed for $n$ number of states and alphabet containing $m$ symbols is $n\times (\color{red}{n}^m)^n \times 2^n$ So I was wondering whats about NFA? I mean how many NFA can be constructed for for $n$ number of states and alphabet containing $m$ symbols....
We have given convex polygon of $N$ vertices, and two circles of radius $r$. Is it possible to check if we can place those two circles completely inside the polygon, such that they don't intersect, but they might have one point in common. For example if we have given square with sides of length $1$, and $r = 0.25$. The...
Wiki and my classes Textbook defines a decider as: In computability theory, a machine that always halts—also called a decider (Sipser, 1996) or a total Turing machine (Kozen, 1997)—is a Turing machine that halts for every input. So shouldn't this decider be able to decide the Halting Problem? Because it halts alw...
As I understand, diagonalization cannot be used to prove or disprove P vs NP, because for some oracle $A$, $P^A = NP^A$, whereas under another oracle $B$, $P^B \neq NP^B$. I don't fully understand this logic. Diagnolization (Time Hierarchy Theorem) proves that $P \neq EXPTIME$. Does it therefore mean that there is no o...
I was thinking a way to send password to server secure way without using secure connection,I found one solution.I want to find flaw in this.(Note: I am begginer,dont judge me, I know little about cryptography and little about networks) So server contains hashed version of my password. When i want to send password I sen...
Is every formal language not closed under infinite union operation ? I know that Regual Languages are not closed under infinite union operation and I have counter-example for it but I don't have any counter-example for other languages. Intuitively , I think it should not be closed but intuition could be wrong also. S...
The scenario is the creation of street maps. For example, two people at Open Street map edit the same part of the map at the same time. Now the one that submits the data later should see a diff. Assume they both started with no vertex, but they had the same aerial image as a basis to create the digital map. Let's defin...
Here is the problem I tried to solve. Finally, I gave up and found a solution which was correct. Here is it. Here is the problem description: For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible rooted trees, those with min...
I have an array of 100,000 strings, all of length $k$. I want to compare each string to every other string to see if any two strings differ by 1 character. Right now, as I add each string to the array, I'm checking it against every string already in the array, which has a time complexity of $\frac{n(n-1)}{2} k$. Is ...
In the general stochastic MAB model, the reward obtained at each trial is generally assumed to be independent of previous trials and obtained from some fixed (but unknown) distribution. However, if the reward function is a monotonically increasing function of time, what would be the corresponding MAB model? Should it b...
In the wiki page of Vertex Cover, it is claimed that an exhaustive search algorithm can solve the problem(the decision version of vertex cover problem) in time $2^{k}n^{O(1)}$. Intuitively, with a fixed parameter $k$, in the worst case, the exhaustive search needs to check whether every vertex subset of size $k$ is ve...
An Exercise from a Textbook: L3 := {ε,01,0011} is L3 ∈ DTime(log(n)) The answer says yes it is, it is even in DTime(1). How is this possible? I would say it takes at least n steps to check the word. How is it possible to do it in less than n steps?
This question occurred to me while reading http://arxiv.org/abs/1806.08762/ Any observed sequence is necessarily finite, and any finite sequence is computable, either by explicitly storing all the data and just printing it, or by fitting an $n^{th}$-degree polynomial to an $n$-length sequence, etc. So there's no such t...
I would like to find a reduction from Max-Cut to Max-2Sat. Could someone shed light on this problem, preferably spiced with some intuition? Thanks, Matan.
Given the definition for all x ∈ Σ∗ x ∈ L ⇔ ∃ u ∈ Σ∗ with |u| ≤ p(|x|) and M(x, u) = 1 Lets say the input x = ababab Then the certificate u shouldn't be longer than p(|x|). But what would be p(|x|)? In my example?
Using the following context as an example for the calculations: Data bus connecting the processor to a memory 32 bits, considering a memory with capacity of 16kB. How many bits does a data bus need to have?
I have read that in some pipelined architectures, memory access requires more than just one clock cycle. In that case how does processor handles the next instruction if the next instruction tries to access something the previous memory instruction has yet to write to its register files?
This is the code: j=2 while j<(n*n) j=j*j At first my approach was to treat this like this loop i=1 while (i<n) i=i*2 Which generates on $i$ various powers of $2$ ($i=2^0, 2^1, 2^2....2^k$). At a certain $k$ iteration, $i$ is equal to or exceeds $n$. So $2^k=n$ is the time when the while stops. We find $...
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$. Then $$PA \vdash\textbf{Prov}(n^A)\rightarrow A\quad\quad\text{ implies} \quad \quad PA\vdash A$$ Where the same app...
I got this question in an interview recently. I was given a bunch of points (for eg.- Start(88, 81), Dest(85,80), P1(19, 22), P2(31, 15), P3(27, 29), P4(30, 10), P5(20, 26), P6(5, 14)) on a 2D plane and any two of them were Source and Destination. I was asked to calculate the least cost to travel all the points startin...
Using a monte carlo approach and evalutation function. Some moves will deemed to be more advantageous than others. As a computer plays itself, it will generally go for the best moves possible. And hence train itself to deal with these moves. But what if a human does a few seemingly detrimental moves to throw the AI off...
When do you use Turing- and when Karp Reduction? What are the advantages and disadvantages? I've read about Karp Reduction mainly used in the Context of reducing a Language: e.g. L1 $≤_p$ L2
This is my first time in the field of TOC so I am not able to provide any self-approach while asking .In the above example what will happen if input string is "1001" or "1111"?The state q4 can be reached with the first 3 inputs only ,so what will happen after that ?
I'm reading SICP, and I'm a little bit confuse about this statement: Consider the problem of computing the exponential of a given number. We would like a procedure that takes as arguments a base b and a positive integer exponent n and computes b n . One way to do this is via the recursive definition b n = b ⋅ b ...
I'm working through Types and Programming Languages right now, and I'm a little confused about the recursive definition given for nameless/de Bruijn terms (chapter 6, definition 6.1.2). Below is the definition given: Let $\mathcal{T}$ be the smallest family of sets $\{\mathcal{T}_0, \mathcal{T}_1, \mathcal{T}_2, \ldo...
I am kind of new to timed automaton domain. I am trying to understand in which way they are different to Markov Decision Process. First I know there objectives is to solve the non-determinism of a MDP. However, is there anything else? Are they still memoryless? I am not able to find any information about this topic.
Background: In a nutshell. I coded a video player application (on linux). I used a proprietary library/API, with this, video and audio frames comes with well defined format. After decoding (via API), I call scheduling() function for video and audio frames and library does the rest. For argument sake I oversimplified th...
Given: $L_1 = \{0^k1^k|k \in \mathbb{N}\}$ $L_2= \{1\}$ $L_1 \leq_p L_2$ There must be a function $$f:Σ^* \rightarrow Σ^*$$ such that $$w \in L_1 \iff f(w) ∈ L_2$$ Let's say a word in $L_1$ is mapped to $1$ in $L_2$. If it is not in $L_1$ it is mapped to $0$. So each word in $L_1$ is mapped to $1$. So the input for th...
If I have an instance of $k$-SAT with $m$ clauses, then a trivial upper bound on the number of variables $n$ is given by $n \leq mk$. But we can only have $n = mk$ when no variable is repeated and that would be a trivial yes-case of k-SAT. I am making some running time analysis based on number of clauses, and therefore...
I am trying to design an algorithm that allows to create balanced teams for a summer camp. There are about a 100 campers of different ages. Gender ratio isn't necessarily 50/50. Also there are a different number of campers for each age group. The idea is to create fair and well-balanced teams while having approximately...
Ex.1. Give a Search Problem whose deciding Problem is in co-NP. Assuming 3SAT is in NP then asking wether a given Boolean formula has a Solution is a search problem in NP right? Then would asking wether a given Boolean formula has no Solution be in co-NP?
Given numbers $0<x_1<x_2< \dots<x_{n^2}<1,$ for every subset of $n$ of them $x_{i_1}<x_{i_2}< \dots<x_{i_n},$ let us consider the size: $$\max\{x_{i_1}, x_{i_2}-x_{i_1}, x_{i_3}-x_{i_2},\dots,x_{i_n}-x_{i_{n-1}},1-x_{i_n}\}$$ Give an algorithm to find the minimal size that subset of $n$ numbers can achieve. My though...