Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to design and analysis of algorithms.
2
votes
4
answers
4k
views
Resolution and what it means to derive the empty set
When using resolution, if the empty set {Ø} is derived from a formula like {¬x,¬y} {x,y}, does that mean the formula is unsatisfiable?
If this is the case, why is {x,y},{¬x,¬y},{x,¬y} satisfiable, a …
13
votes
4
answers
45k
views
Complexity of recursive Fibonacci algorithm
Using the following recursive Fibonacci algorithm:
def fib(n):
if n==0:
return 0
elif n==1
return 1
return (fib(n-1)+fib(n-2))
If I input the number 5 to find fib(5), I know th …
2
votes
3
answers
451
views
Can not follow the example for max-flow-min-cut on Wikipedia
This Wikipedia example is very confusing. Its saying the max flow = min cut. But I see the max flow = 9 and the min cut = 7. If not, how does the capacity =min cut here? Which is the max flow min cut …
1
vote
1
answer
2k
views
RSA encryption why does ed=1?
So I fully understand the how the RSA algorithm works, but now I am trying to reason with the formula. I want to know:
why the public key e and the private key d in the RSA encryption have
to s …
0
votes
Accepted
Can not follow the example for max-flow-min-cut on Wikipedia
Okay, really sorry. I got confused with maximal and max flow in the graph. Obviously, the maximal is what is at most the capacity, and max flow is how much at most can flow though this network. The an …
1
vote
2
answers
1k
views
Applying dynamic programming to a simple two-person game of perfect information
A natural number n represents the initial position in the game. When it is a players turn he/she is allowed to
I) Subtract 2 from n
II) Subtract 3 from n
III) Subtract 5 from n
We call the pla …
-1
votes
3
answers
1k
views
Dijkstra algorithm: equal number of shortest paths
If I had a Dijkstra graph with the number shortest paths from Node A to O being 1,
would it be correct to say: the equal number of shortest paths from A to O is 1 and not 0, because that node is incl …