Questions tagged [non-deterministic]

Nondeterminism refers either to a computing system where the result may be one of many specified results or to a theoretical construct in which a computing system is allowed to try many options in parallel to search for a result.

Nondeterminism has several meanings in computing. In theoretical CS, nondeterministic computations are computations that have multiple options specified at various points and allows the computing machine to choose any of them. In programming, a nondeterministic computation is one where the result may vary from run to run due to factors such as thread timing or values from external devices.

238 questions
1
vote
1 answer

type of determinism of an evironment

Studying the environment where an agent has to work, I have to tell about it's determinism. An environment is deterministic if the next state is perfectly predictable given knowledge of the previous state and the agent's action Otherwise it's…
1
vote
2 answers

Floating point comparison - Result between different runs

I know that I can not compare two floating point or double numbers for absolute equality on C++/C. If for some reason, I write a if condition which uses the absolute equality, is it guaranteed that the if condition will return the same result on…
1
vote
1 answer

Will find() ever act nondeterministically?

I know if I run a simple find() function such as (1 to 5).find(_ < 6), I will always get back Some(1). Here, find() is deterministic and will always return the same result, even though the collection (1 to 5) contains four other elements that make…
Shuklaswag
  • 1,003
  • 1
  • 10
  • 27
1
vote
1 answer

Does this SDL_gfx code involve a race condition?

When I run the following code on my machine, it doesn't behave deterministically. The triangle it should draw only appears sometimes: #include #include int main(int argc, char* args[]) { int xres = 250; …
sacheie
  • 768
  • 6
  • 16
1
vote
1 answer

Highest number of states - DFA / NFA

I am trying to wrap my head around some operations on regular languages, such as intersection, concatenation and Kleene star (for both DFA and NFA, and how they differ). Imagine the following: Assume we have L_A and L_B as regular languages…
yulai
  • 741
  • 3
  • 20
  • 36
1
vote
2 answers

Promela - non-determinism not non-deterministic?

Consider this snippet: chan sel = [0] of {int}; active proctype Selector(){ int not_me; endselector: do :: sel ? not_me; if :: 0 != not_me -> sel ! 0; :: 1 != not_me -> sel ! 1; :: 2 != not_me ->…
User1291
  • 7,664
  • 8
  • 51
  • 108
1
vote
1 answer

non deterministic garbage collection

I have come across that the dispose method in C# is for deterministic garbage collection as you know the object is disposed when that method is called. Can you provide a simple example on non deterministic garbage collection? Does it usually occur…
Sean
  • 981
  • 1
  • 9
  • 19
1
vote
2 answers

Erratic behavior with compiled legacy code using ifort

How I wish I had a minimum working example for this! I'm doing a bunch of linear algebra using the HSL libraries. I've turned on every debugging flag I can think of. On my workstation, the final result of my "deterministic" code rarely works. Most…
jvriesem
  • 1,859
  • 3
  • 18
  • 40
1
vote
1 answer

Unable to construct 4-state NFA for certain regular expression

In an exercise on NFA's I'm asked to construct a 4-state NFA on the regular expression (aa|aab)*b. I have tried to construct it myself, and I could only find a 5-state NFA, which an online tool later confirmed. (I found it without (4) being final…
konewka
  • 620
  • 8
  • 21
1
vote
1 answer

Matching determinism of a lambda and a predicate in Mercury

In Mercury, can I declare a lambda as having the same determinism as the mode of the predicate that contains the lambda? Here's what I'm trying to do. I wrote a fold function (below) that works on the array2d type. fold calls a caller-supplied…
Evan
  • 2,400
  • 1
  • 18
  • 34
1
vote
2 answers

choosing one of the nondeterministic choices

The following toy example computes nondeterministically a number by calling a function anyFunction, and then keeps only the even choices. How could I write a similar code that keeps the maximum choice instead the even choices? Do I need a different…
Bob
  • 1,713
  • 10
  • 23
1
vote
1 answer

Java/Groovy: Non Deterministic Crypto Algorithm

I'm working on a Groovy application that has to provide users with a link containing encrypted query parameters. Currently we use the AES encryption algorithm with the same IV used for all links. We know this is bad (hence the reason we want to…
Harry Muscle
  • 2,247
  • 4
  • 38
  • 62
1
vote
1 answer

muZ3: Non-deterministic recursive call

Is there a way to perform a recursive call non-deterministically in a muZ3 relation specification? Specifically, I want to translate a function like the following: int foo(int x) { ... if (*) y = foo(y); ... } to the muZ3 rule format.
Hinton
  • 2,320
  • 4
  • 26
  • 32
1
vote
1 answer

Using nondeterminism to detect cliques?

I am trying to understand non-determinism with the clique-problem. In computer science, the clique problem refers to any of the problems related to finding particular complete subgraphs ("cliques") in a graph, i.e., sets of elements…
ade19
  • 1,150
  • 4
  • 13
  • 28
1
vote
0 answers

inconsistent random 'load' failures in Ruby 1.9.3-p448

For purposes of asking another question, I was loading and re-loading the same file over and over again. I noticed a fair fraction of the time the load would fail, for no apparent reason whatsoever. This is ruby 1.9.3p448 (2013-06-27)…
d00t
  • 31
  • 4