instruction stringlengths 0 29.8k ⌀ |
|---|
|algorithms|algorithm-design| |
>For the second one, would the answer be that an attacker can simply obtain the original message given a hash?
Well, the message $M$ is already given to the adversary (it is sent to Bob over an insecure channel), so he needs not find it. To break the scheme he needs to send a new pair $M^*, h(M^*\|S_{ab})$ such that... |
null |
"Special case" is simply the opposite of "general case".
For instance, a tree is a special case of a graph, etc. The same works for *problems*: "find the minimal element of some list" or "find the median" are merely special cases of the problem "find the $k$-th smallest element in the list".
As for the complexity... |
I am taking a complexity course and I am having trouble with coming up with reductions between NPC problems. How can I find reductions between problems? Is there a general trick that I can use? How should I approach a problem that asks me to prove a problem is NPC? |
Finding reductions |
|complexity-theory|np-complete|reductions| |
I'll try to give a partial answer, since I'm not fully aware of how this issue is considered by the entire crypto-community (maybe repost on [crypto.SE](http://crypto.stackexchange.com)?).
I would say there are two "kinds" of cryptographers: *Theoretical* and *Practical*. I will not try to tell them apart (every pr... |
null |
In many text books NP problems are defined as:
Set of all decision problems solvable by non deterministic algorithms in polynomial time
I couldn't understand the part "solvable by non deterministic algorithms". Anyone please explain that |
What is meant by "solvable by non deterministic algorithm in polynomial time" |
|algorithms|algorithm-analysis|nondeterminism| |
"$L$ is solvable by non deterministic algorithms in polynomial time" means that there exists a non-deterministic turing machine $M$, and a polynomial $p$ s.t. for all $x \in L$, $M$ accepts $x$ in at most $p(|x|)$ steps in one of the branches of its execution. |
I need to cover these topics in Role Mining. If anyone knows good site which well summarizes the topics and concepts are well explained please help out.
Basic role mining problem<br>
• Delta-approx RMP<br>
• Min-noise RMP<br>
• Nature of the RMP problems<br>
• Mapping RMP to database tiling problem<br>
• Minimu... |
Where can I find good study material on Role Mining? |
|security|access-control| |
|complexity-theory|nondeterminism| |
|education|security|access-control| |
In many textbooks NP problems are defined as:
> Set of all decision problems solvable by non deterministic algorithms in polynomial time
I couldn't understand the part "solvable by non deterministic algorithms". Could anyone please explain that? |
null |
null |
|complexity-theory|cryptography|asymptotics| |
Adding to [Shitikanth's answer][1],
a [nondeterministic algorithm][2] is one that has multiple choices in some points during its control flow. The actual choice made when the program runs is not determined by the input or values in registers, or if we are talking about Turing machines, the choice is not determined by... |
Adding to [Shitikanth's answer][1],
a [nondeterministic algorithm][2] is one that has multiple choices in some points during its control flow. The actual choice made when the program runs is not determined by the input or values in registers, or if we are talking about Turing machines, the choice is not determined by... |
A formal definition of the Role Mining problem is found in the paper [On the Definition of Role Mining](http://www.mariofrank.net/paper/DefOfRoleMining_SACMAT2010.pdf) by
Mario Frank, Joachim M. Buhmann, and David Basin. This is a good starting point, as it also contains references to much of the earlier work.
Thes... |
Select the median ,element left to it and element right to it in efficient way! |
There is no magic bullet; NP-hardness proofs are hard. However, there is a general framework for all such proofs. Many students who struggle with NP-hardness proofs are confused about _what_ they're supposed to be doing, which obviously makes it impossible to figure out _how_ to do it. So here is _what_ to do to pro... |
Suppose we have a set $S = \{ a_1,a_2,a_3,\ldots , a_N \}$ of $N$ coders.
Each Coders has rating $R_i$ and the number of gold medals $E_i$, they had won so far.
A Software Company wants to hire exactly three coders to develop an application.
For hiring three coders, they developed the following strategy:
... |
Suppose we have a set $S = \{ a_1,a_2,a_3,\ldots , a_N \}$ of $N$ coders.
Each Coders has rating $R_i$ and the number of gold medals $E_i$, they had won so far.
A Software Company wants to hire exactly three coders to develop an application.
For hiring three coders, they developed the following strategy:
... |
Efficiently selecting the median and elements to its left and right |
null |
The paper [The Role Mining Problem: Finding a Minimal Descriptive
Set of Roles](http://cimic.rutgers.edu/~jsvaidya/pub-papers/vaidya-sacmat07rm.pdf) by Jaideep Vaidya, Vijayalakshmi Atluri and Qi Guo covers the basic definitions and some variants and includes a mapping to the minimum tiling problem. This is explored i... |
null |
People who apparently think this is theoretically possible, or in a far future, are completely wrong in my opinion. The point lies in the fact that dynamic languages provide and impose a totally different programming style. Actually, the difference is twofold, even if both aspect are interrelated:
* Symbols (vars, or ... |
As m = k*n, we can look at this in terms of k and n instead of n and m. Let's say Ti is the time it takes the i-th processor to finish its work.
As n grows, the probability that Ti = 5k for some i approaches 1, so makespan being defined as Max(Ti), E[M] approaches 5k.
For the second scenario this is 4k so increas... |
As m = k*n, we can look at this in terms of k and n instead of n and m. Let's say Ti is the time it takes the i-th processor to finish its work.
As n grows, the probability that Ti = 5k (the processor was assigned only T=5 tasks) for some i approaches 1, so makespan being defined as Max(Ti), E[M] approaches 5k.
F... |
Let's say that we have a large collection of tasks $\tau_1, \tau_2, ..., \tau_n$ and a collection of identical (in terms of performance) processors $\rho_1, \rho_2, ..., \rho_m$ which operate completely in parallel. For scenarios of interest, we may assume $m \leq n$. Each $\tau_i$ takes some amount of time/cycles to c... |
I started writing a prototype for a brute force solution, that hopefully can be optimized to a point where it will be practical.
First, some definitions: Let $W$ be the set of all windows. Each window $w$ is composed of $x_w, y_w, w_w, h_w$ for the x, y coordinates and the width and height. A window is initialized w... |
Here is an equivalent and more natural interpretation:
A problem $L$ is said to be in $NP$ if for all $x\in L$ there is an efficient certificate ($|y| \lt |x|^c$) and there is an efficient deterministic polynomial-time algorithm that verifies the membership of $x$ in $L$ using certificate $y$. |
null |
Given a set of elements
$$\Sigma = \{\sigma_1, \sigma_2, ..., \sigma_n\}$$
and a set of triplets
$$S = \{(\sigma_i, \sigma_j, \sigma_k) | \sigma_i, \sigma_j, \sigma_k \in \Sigma, i \neq j, j \neq k, i \neq k\}$$
find an algorithm which either constructs an ordering $\rho_S = (\sigma_{m_1}, \sigma_{m_2}, ..., \sigma... |
Ordering elements so that some elements don't come between others |
|algorithms|optimization| |
Informally, the main he main difference between non-deterministic algorithms and the normal, deterministic, algorithms is that when provided with multiple choices to take, the deterministic solution will have to check one of them at a time in sequence while the non-deterministic version can cheat a bit. There are two m... |
Given a set of elements
$$\Sigma = \{\sigma_1, \sigma_2, ..., \sigma_n\}$$
and a set of triplets
$$S = \{(\sigma_i, \sigma_j, \sigma_k) \mid \sigma_i, \sigma_j, \sigma_k \in \Sigma, i \neq j, j \neq k, i \neq k\}$$
find an algorithm which either constructs a total ordering $\rho_S = (\sigma_{m_1}, \sigma_{m_2}, ...... |
Given a set of elements
$$\Sigma = \{\sigma_1, \sigma_2, ..., \sigma_n\}$$
and a set of triplets
$$S = \{(\sigma_i, \sigma_j, \sigma_k) | \sigma_i, \sigma_j, \sigma_k \in \Sigma, i \neq j, j \neq k, i \neq k\}$$
find an algorithm which either constructs an ordering $\rho_S = (\sigma_{m_1}, \sigma_{m_2}, ..., \sigma... |
Given a set of elements
$$\Sigma = \{\sigma_1, \sigma_2, ..., \sigma_n\}$$
and a set of triplets
$$S = \{(\sigma_i, \sigma_j, \sigma_k) | \sigma_i, \sigma_j, \sigma_k \in \Sigma, i \neq j, j \neq k, i \neq k\}$$
find an algorithm which either constructs an ordering $\rho_S = (\sigma_{m_1}, \sigma_{m_2}, ..., \sigma... |
Given a set of elements
$$\Sigma = \{\sigma_1, \sigma_2, ..., \sigma_n\}$$
and a set of triplets
$$S = \{(\sigma_i, \sigma_j, \sigma_k) | \sigma_i, \sigma_j, \sigma_k \in \Sigma, i \neq j, j \neq k, i \neq k\}$$
find an algorithm which either constructs an ordering $\rho_S = (\sigma_{m_1}, \sigma_{m_2}, ..., \sigma... |
Informally, the main he main difference between non-deterministic algorithms and the normal, deterministic, algorithms is that when provided with multiple choices to take, the deterministic solution will have to check one of them at a time in sequence while the non-deterministic version can cheat a bit. There are two m... |
I am writing a Program, solving the "Chinese Postman Problem" in an undirected Graph and currently facing the problem to find the best "additional" Edges to connect the uneven knots. So I can compute an Euler-Tour.
There might be (considering the size of the Graph that wants to be solved) an enormous combination of ... |
algorithm for finding best connections between uneven Knots (Chinese Postman Problem) |
|algorithms|graphs| |
People who apparently think this is theoretically possible, or in a far future, are completely wrong in my opinion. The point lies in the fact that dynamic languages provide and impose a totally different programming style. Actually, the difference is twofold, even if both aspect are interrelated:
* Symbols (vars, o... |
Here is an equivalent and more natural interpretation:
A problem $L$ is said to be in $NP$ if there is an deterministic polynomial-time algorithm for all $x\in L$ which verifies the membership of $x$ in $L$ using a short certificate $y$ ($|y| \lt |x|^c$). |
As $m = k \times n$, we can look at this in terms of $k$ and $n$ instead of $n$ and $m$. Let's say $T_i$ is the time it takes the $i$-th processor to finish its work.
As $n$ grows, the probability that $T_i$ = $5k$ (the processor was assigned only $T=5$ tasks) for some $i$ approaches $1$, so makespan being defined a... |
Here is an equivalent and more natural interpretation:
A problem $L$ is said to be in $NP$ if there is a deterministic polynomial-time algorithm for all $x\in L$ which verifies the membership of $x$ in $L$ using a short certificate $y$ ($|y| \lt |x|^c$). |
Let's say that we have a large collection of tasks $\tau_1, \tau_2, ..., \tau_n$ and a collection of identical (in terms of performance) processors $\rho_1, \rho_2, ..., \rho_m$ which operate completely in parallel. For scenarios of interest, we may assume $m \leq n$. Each $\tau_i$ takes some amount of time/cycles to c... |
I am writing a Program, solving the "Chinese Postman Problem" in an undirected Graph and currently facing the problem to find the best "additional" Edges to connect the uneven knots. So I can compute an Euler-Tour.
There might be (considering the size of the Graph that wants to be solved) an enormous combination of ... |
I am writing a Program, solving the [Chinese Postman Problem](http://en.wikipedia.org/wiki/Route_inspection_problem) (also known as route inspection problem) in an undirected draph and currently facing the problem to find the best additional edges to connect the nodes with odd degree, so I can compute an Eulerian circu... |
Chinese Postman Problem: finding best connections between odd-degree nodes |
I understand that a church numeral $c_n$ looks like $\lambda s. \lambda z. s$ (... n times ...) $s\;z$. This means nothing more than "the function $s$ applied $n$ times to the function $z$".
A possible definition of the $\mathtt{times}$ function is the following: $\mathtt{times} = \lambda m. \lambda n. \lambda s. m ... |
A question on a $\lambda$ calculus evaluation |
|lambda-calculus| |
I understand that a [Church numeral](http://en.wikipedia.org/wiki/Church_encoding) $c_n$ looks like $\lambda s. \lambda z. s$ (... n times ...) $s\;z$. This means nothing more than "the function $s$ applied $n$ times to the function $z$".
A possible definition of the $\mathtt{times}$ function is the following: $\mat... |
A lambda calculus evaluation involving Church numerals |
I think your reduction is correct (I've only eyeballed it, though). At the end, you can't apply $(\lambda z. s s s z)$ to $z$, this never appears in the term. $\lambda z. f f z$ is $\lambda z. (f f) z$, not $\lambda z. f (f z)$. Functions in the lambda-calculus take a single argument; they are effectively [curried](htt... |
null |
null |
The needed data structure is an _occur list_, a list for each variable containing the clauses the variable occurs in. These lists are built once, when the CNF is first read. They are used in steps 3 and 5 below to avoid scanning the whole CNF formula to count satisfied clauses.
A better algorithm than flipping ev... |
|logic|lambda-calculus| |
null |
Recently I found in a paper [1] a special symmetric version of SAT called the **2/2/4-SAT**. But there are many $\text{NP}$-complete variants out there, for example: **MONOTONE NAE-3SAT**, **MONOTONE 1-IN-3-SAT**, ...
Some other variants are tractable: $2$-$\text{SAT}$, Planar-NAE-$\text{SAT}$, ...
Are there surv... |
When we say that a problem $B$ is a special case of a problem $A$, we mean that $B$ is the same problem as $A$, with the exception that not all problem instances of $A$ are problem instances for $B$. If $B$ is a special case of $A$, we say that $A$ is a generalization of $B$.
Two examples: the addition of positive w... |
JeffE outlines a famous strategy: know lots of NP-complete problems, find one that fits very well and make the *easy* reduction.
Another valid strategy is to *always* use 3SAT so you have more practice.
Elaborating later. |
Packing problems are a class of optimization problems in which one has to pack objects together as densely as possible. One could be for example packing rectangles inside a rectangle. |
null |
(this is related to my other question, see [here][1])
Imagine a screen, with 3 windows on it:
![enter image description here][2]
Suppose each window is represented by a tuple (x, y, width, height).
I'd like to find an efficient way of generating all unoccupied points inside the red bounding rectangle.
In... |
Finding unoccupied points in a screen filled with windows |
|algorithms|computational-geometry|user-interface| |
null |
I started writing a prototype for a brute force solution, that hopefully can be optimized to a point where it will be practical.
First, some definitions: Let $W$ be the set of all windows. Each window $w$ is composed of $x_w, y_w, w_w, h_w$ for the x, y coordinates and the width and height. A window is initialized w... |
null |
An easy optimization to the naive algorithm is to skip some points when you check one covered by a window. Say you scan left-to-right, top-to-bottom. If you encounter an $(x, y)$ in window $w = (l, r, w, h)$, you can jump from $x$ to $l + w + 1$ and continue. If windows are big and don't overlap, off the cuff, I'd wild... |
(this is related to my other question, see [here][1])
Imagine a screen, with 3 windows on it:
![enter image description here][2]
I'd like to find an efficient data structure to represent this, while supporting these actions:
- return a list of coordinates where a given window can be positioned without overl... |
Efficient queriable data structure to represent a screen with windows on it |
For the following jobs:
![job table][1]
The **average wait time** would be using a FCFS algorithm:
(6-6)+(7-2)+(11-5)+(17-5)+(14-1) -> 0+5+6+10+13 -> 34/5 = 7 (6.8)
What would the **average turnaround time** be?
[1]: https://i.stack.imgur.com/rwOBN.png
|
What is the average turnaround time? |
|algorithms|operating-systems|process-scheduling|scheduling| |
When I was explaining the Baker-Gill-Solovay proof that there exists an oracle with which we can have, $\mathsf{P} = \mathsf{NP}$, and an oracle with which we can have $\mathsf{P} \neq \mathsf{NP}$ to a friend, a question came up as to why such techniques are ill-suited for proving the $\mathsf{P} \neq \mathsf{NP}$ pro... |
Why is Relativization a barrier? |
|complexity-theory| |
(this is related to my other question, see [here][1])
Imagine a screen, with 3 windows on it:
![enter image description here][2]
I'd like to find an efficient data structure to represent this, while supporting these actions:
- return a list of coordinates where a given window can be positioned without overl... |
An easy optimization to the naive algorithm is to skip some points when you check one covered by a window. Say you scan left-to-right, top-to-bottom. If you encounter an $(x, y)$ in window $w = (l, r, w, h)$, you can jump from $x$ to $l + w + 1$ and continue. If windows are big and don't overlap, off the cuff, I'd wild... |
> To put it more concretely, if I have an approach to prove P≠NP and if I could construct oracles to make a situation like above happen, why does it make my method invalid?
Note that the latter “if” is not a condition, because Baker, Gill, and Solovay already constructed such an oracle. It is just a mathematical tr... |
(this is related to my other question, see [here][1])
I would like to write a function that scores a given arrangement of windows on a screen.
The purpose of this function is to determine whether a particular layout is good and by going over other possible layouts, finding the one with the highest score.
Here ... |
How to score a given a arrangement of windows on a screen to produce good layouts |
|computational-geometry|user-interface| |
An easy optimization to the naive algorithm is to skip some points when you check one covered by a window. Say you scan left-to-right, top-to-bottom. If you encounter an $(x, y)$ in window $w = (l, r, w, h)$, you can jump from $x$ to $l + w + 1$ and continue. If windows are big and don't overlap, off the cuff, I'd wild... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.