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

MSSQL Why is this function non-deterministic

I have this user function, which is always flagged as non-deterministic, although the value will always be the same as long as the input parameter is the same. Everything I've read suggests this should be deterministic. Can anybody spot why? SET…
2
votes
2 answers

Z3 producing different models when run multiple times

I've been using Z3 with the JAVA bindings for 2 years now. For some reason, I've always generated the SMTLib2 code myself as a String and then used the parseSMTLib2String to build the corresponding Z3 Expr. As far as I can remember, every time I…
Guillaume Voiron
  • 1,785
  • 2
  • 15
  • 16
2
votes
2 answers

Example of deterministic bug

Can someone gives me an example of deterministic bug in a program? Thanks.
Lok
  • 21
  • 1
2
votes
0 answers

How can DIR* get EBADF error?

I have some code that I have inherited which is part of a class for iterating, accessing the directory content and uses boost::filesystem::path. The code reads in part: struct directory_iterator_impl { private: void skip_dots(const path& p, const…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
2
votes
1 answer

sorting sqlalchemy relationships by primary key

How can I make a relationship attribute be sorted by the child tables primary key? I have a schema where many of the tables have a common parent and the parent has a list of each of its children using the declaritive system like this class…
David Nehme
  • 21,379
  • 8
  • 78
  • 117
2
votes
2 answers

What does an NFA with epsilon transitions let us do?

I have the following automaton. I am supposed to understand the use of empty transitions through it. I think that the regular expression of this automaton is the following: 0* 1* 2* I just want to know what this automaton lets us do? in other words…
2
votes
2 answers

Combining State and List Monads

Consider the following Haskell code: import Control.Monad.State test :: Int -> [(Int, Int)] test = runStateT $ do a <- lift [1..10] modify (+a) return a main = print . test $ 10 This produces the following…
Aadit M Shah
  • 72,912
  • 30
  • 168
  • 299
2
votes
2 answers

Nondeterminism versus polynomial-time verifiability

I have read that an NP problem is verifiable in polynomial time or, equivalently, is solvable in polynomial time by a non-deterministic Turing machine. Why are these definitions equivalent?
ishan3243
  • 1,870
  • 4
  • 30
  • 49
2
votes
2 answers

What's a non-deterministic procedure?

I have a problem...what's a nondeterministic procedure? I have this exercise Provide a nondeterministic procedure for the following language: L = {: G=(V,E) has an Indipendent Set I s.t. |I| >= k and the vertices V\I form a Hamilton cycle} Thanks!
2
votes
1 answer

Undebuggable non-deterministic heisenbug in single-threaded C++ function call

I'm at the end of my rope here: I have a single-threaded C++ program. Here is some empirical data and background information, I tried to highlight the most important keywords; The entire section I'm talking about does not have any syscalls, other…
bitmask
  • 32,434
  • 14
  • 99
  • 159
2
votes
2 answers

Two inputs on self loop, deterministic or non-deterministic state machine?

Wikipedia states that a Deterministic State Automation "produces a unique computation (or run) of the automaton for each input string". I always understood this as there being only 1 possible path to compute any unique string. In which case, the…
kbirk
  • 3,906
  • 7
  • 48
  • 72
1
vote
0 answers

ANTLR - non-deterministic behaviour during run/debug

I'm trying to use ANTLR (tried 3.3 and 3.4). Strange thing happens when I try to run my test code. Please see my very simple code first, I'll explain my problem afterwards. Test grammar: lexer grammar CSVLexer; Comma : ',' ; LineBreak : …
John K.
  • 11
  • 2
1
vote
2 answers

Can I get an ORDER BY with several columns but still deterministic?

I know that a deterministic ORDER BY is when you sort by a UNIQUE INDEX column, 1) is this true?. I want to sort by the columns name and percentage. There is a possibility that 2 or more students have the same name and the same percentage,…
gus
  • 123
  • 5
1
vote
1 answer

nondeterministic finite automation question

Im doing some studying and im a bit confused on this little nondeterministic algorithm when it processes a 1. I understand that it will split into a brand with q1 since a 0 or 1 will redirect back, and that theres an exit arrow to q2 is there is a…
jfisk
  • 6,125
  • 20
  • 77
  • 113
1
vote
0 answers

Confusion on the Syntax of a Python Module named automata.pda.npda within automata -lib

I have been asked to construct a NPDA that accepts the following language L = {anb2n : n ≥ 1}. I have completed the written assignment portion and after testing it thoroughly i am sure that my NPDA is correct. Here is an image using JFLAP: …