Questions tagged [deterministic]

The system or program exhibits the same behavior in different runs.

The system or program exhibits the same behavior on different runs. This is opposed to .

353 questions
3
votes
0 answers

Is MYSQL UNIX_TIMESTAMP('02/05/2019') non-deterministic?

According to the definition given here at: https://dev.mysql.com/doc/refman/5.7/en/create-table-generated-columns.html A function is deterministic if, given the same data in tables, multiple invocations produce the same result, independently of the…
The-Proton-Resurgence
  • 808
  • 1
  • 13
  • 28
3
votes
3 answers

How to prove decidability of a partial order inductive predicate?

Context I am trying to define the partial order A ≤ B ≤ C with a relation le in Coq and prove that it is decidable: forall x y, {le x y} + {~le x y}. I succeeded to do it through an equivalent boolean function leb but cannot find a way to prove it…
authchir
  • 1,605
  • 14
  • 26
3
votes
1 answer

Pymc3 python function to deterministic

In this notebook from Bayesian Methods for Hackers, they create a Deterministic variable from a python function as such: # from code line 9 in the notebook @pm.deterministic def lambda_(tau=tau, lambda_1=lambda_1, lambda_2=lambda_2): out =…
RSHAP
  • 2,337
  • 3
  • 28
  • 39
3
votes
4 answers

Is Java's PriorityQueue Instable or Nondeterministic or both?

I was running through Java's documentation for its PriorityQueue and ran across an important note: If multiple elements are tied for least value, the head is one of those elements -- ties are broken arbitrarily I would like to understand the…
code11
  • 1,986
  • 5
  • 29
  • 37
3
votes
2 answers

Is the order of an unordered_map deterministic?

I'm wondering if there's any guarantee that the order of an unordered_map will always be the same across all CPUs, threads, etc. I realize there may be no obvious pattern to the particular order itself (hence, 'unordered' map), but if I run my…
Tyson
  • 1,226
  • 1
  • 10
  • 33
3
votes
2 answers

Is stof, strtof deterministic?

I'm reading floats from a string. They can be written in a various form, so float f1 = strtof("999999999999.16"); float f2 = stof("000999999999999.1600000"); assert(f1 == f2); Can I be sure that the assertion will be always true, no matter of…
marmistrz
  • 5,974
  • 10
  • 42
  • 94
3
votes
2 answers

If a language (L) is recognized by an n-state NFA, can it also be recognized by a DFA with no more than 2^n states?

I'm thinking so, because the upper bound would be the 2^n, and given that these are both finite machines, the intersection for both the n-state NFA and the DFA with 2^n or less states will be valid. Am I wrong here?
John
  • 31
  • 2
3
votes
2 answers

Is scipy.optimize.least_squares deterministic?

I am using scipy's optimize.least_squares algorithm with set initial conditions and always get the same result on my Computer, if however I try this on any other Computer (all with latest Scipy, Python, and bumpy packages and the same 64 Bit Ubuntu…
Swift
  • 360
  • 1
  • 3
  • 12
3
votes
1 answer

Deterministic function for getting today's date

I am trying to create an indexed view using the following code (so that I can publish it to replication it as a table): CREATE VIEW lc.vw_dates WITH SCHEMABINDING AS SELECT DATEADD(day, DATEDIFF(day, 0, GETDATE()), number) AS SettingDate FROM…
bbailes
  • 371
  • 1
  • 9
3
votes
2 answers

In need of a deterministic uniform distribution using C++11

I'm using C++11's random library for producing deterministic random values, I need to restrict the output to various ranges and naturally used std::uniform_int_distribution but much to my dismay the specification gives library implementations too…
bsdunx
  • 137
  • 7
3
votes
1 answer

Any way to implement deterministic physics in AS3?

It seems like Box2D for actionscript 3 is not deterministic, it means, in the event of a multiplayer game wheere physics plays an important role in determining who wins/loses, the results would be different for each user if their microprocesors are…
Artemix
  • 8,497
  • 14
  • 48
  • 75
3
votes
1 answer

GPU and determinism

I was thinking of off-loading some math operations to the GPU. As I'm already using D3D11 I'd use a compute shader to do the work. But the thing is I need the results to be the same for the same input, no matter what GPU the user might have. (only…
Bob Coder
  • 391
  • 3
  • 13
3
votes
0 answers

Difference between `DETERMINISTIC`, `READS SQL DATA` and `NO SQL` in MySQL functions

I have been working in a project where I have to create functions in MySQL. But it's been hard for me to find the proper difference between DETERMINISTIC, READS SQL DATA and NO SQL. I also read in one of the posts that DETERMINISTIC has been…
skywalker
  • 41
  • 3
3
votes
4 answers

Achieving game engine determinism with threading

I would like to achieve determinism in my game engine, in order to be able to save and replay input sequences and to make networking easier. My engine currently uses a variable timestep: every frame I calculate the time it took to update/draw the…
Vittorio Romeo
  • 90,666
  • 33
  • 258
  • 416
3
votes
1 answer

Static checker can't assess deterministic behaviour under certain conditions?

I've managed to boil this down to the following test case but I'm wondering whether this is a limitation of the static checker in C# code contracts or something I'm missing. When I attempt to prove a contract using one style of code it throws an…
Rushyo
  • 7,495
  • 4
  • 35
  • 42