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
5
votes
1 answer

Sources of non-determinism of Apache Spark

I am trying to figure out all sources of non-determinism in Spark. I understand that non-determinism can come from user provided functions e.g in a map(f) with f involving random. I am instead looking for the operations that can lead to…
savx2
  • 1,011
  • 2
  • 10
  • 28
5
votes
1 answer

Pushing/popping stack in reverse order in a Pushdown Automaton

So I'm studying for a test I have coming up on pushdown automata and context-free languages and I'm stuck on this one construction. I have every part of this automaton completely working perfectly except for one part which I will explain below. The…
5
votes
1 answer

Why is this opencl code non-deterministic?

The following python code uses PyOpenCL to fill the array a_plus_b with the sum of the elements in array b (this isn't my actual objective, but it's the simplest code I can find that still shows the problem). import pyopencl as cl import numpy as…
rprospero
  • 913
  • 11
  • 26
5
votes
2 answers

Non-determinstic choice with amb-operator

Is it possible to implement McCarthy's amb-operator for non-deterministic choice in C#? Apparently .NET lacks continuation support but yield return could be useful. Would this be possible in other static .NET-languages like F#?
Dario
  • 48,658
  • 8
  • 97
  • 130
4
votes
3 answers

Mercury: How to declare determinism of a higher-order data type?

When I compile the Mercury code below, I get this error from the compiler: In clause for `main(di, uo)': in argument 1 of call to predicate `test_with_anonymous_functions.assert_equals'/5: mode error: variable `V_15' has instantiatedness `/*…
Evan
  • 2,400
  • 1
  • 18
  • 34
4
votes
1 answer

CUDA debugging procedure for non-deterministic output

I'm debugging my CUDA 4.0/Thrust-based image reconstruction code on my Ubuntu 10.10 64-bit system and I've been trying to figure out how to debug this run-time error I have in which my output images appear to some random "noise." There is no random…
Fares
  • 241
  • 1
  • 7
4
votes
2 answers

Fair concurrent `map` function in haskell?

Say I am simulating a network of some sort, and have a function which broadcasts a value over a list of Chans: broadcast :: a -> [Receiver] -> IO () broadcast a = mapM_ (send a) This will "send" the data to each Receiver in order. I would like…
jberryman
  • 16,334
  • 5
  • 42
  • 83
4
votes
0 answers

Truly reproducible Docker containers?

There is a security trend called reproducible builds, which aims for having a way to create bit-exact copies of output binaries so that the user can verify whether the version found on the internet is trustworthy. Is there a similar movement and…
d33tah
  • 10,999
  • 13
  • 68
  • 158
4
votes
1 answer

Causes of floating point non-determinism? Including NumPy?

IEEE floating point operations are deterministic, but see How can floating point calculations be made deterministic? for one way that an overall floating point computation can be non-deterministic: ... parallel computations are non-deterministic in…
Jerry101
  • 12,157
  • 5
  • 44
  • 63
4
votes
2 answers

A turing machine that decides {0^2^n; n>0} that's not the commonly accepted one

We're being asked to create a Turing Machine that accepts {0^(2^n); n>0} that is not the commonly accepted one published by Michael Sipser. Instead, we are being asked to create one for the algorithm as follows: On the first pass of the head, the…
4
votes
1 answer

Identifying duplicates in Haskell tuples

I'm trying to write a function that will Nothing a Just Int tuple if any two values in the tuple are the same. For a tuple of five values, here's what I've got. Clearly, there's room for improvement: nothingIfMatch :: Maybe (Int, Int, Int, Int, Int)…
TheEnvironmentalist
  • 2,694
  • 2
  • 19
  • 46
4
votes
1 answer

Restored model in tensorflow gives different results for relu operation

The weights retrieved from restored model doesn't change and the input is also constant But the output of 'Relu:0' operation is giving different results each time. Below is my code: sess=tf.Session() saver =…
4
votes
2 answers

How to nondeterministically put a value in a state?

In the following code, how can I replace put 1 with some code that insert nondeterministically 1 or 2 in the state? import Control.Monad.List import Control.Monad.Trans.State test :: StateT Int [] Int test = do put 1 v <- get return v
Bob
  • 1,713
  • 10
  • 23
4
votes
2 answers

Testing for non-deterministic behavior of python function

We've got a large and complex function which needs to be deterministic. It is one of the workhorses at our company and covers a large amount of code. This code often becomes non-deterministic due to python's dict iterator. This has happened many…
Zach Dwiel
  • 529
  • 1
  • 4
  • 18
4
votes
1 answer

Track non-deterministic MySQL errors in Perl

I have a single-thread Perl script running on a hosted shared server that mainly executes the following code: my $O_dbh = DBI->connect("dbi:mysql:dbname=dbname", "abc", "xxx", {RaiseError => 1}); $O_dbh->begin_work(); my $O_sth1 =…
Meise2000
  • 43
  • 5